I have this code :
<li>
<a uk-toggle="target: #search" data-uk-icon='search'></a>
</li>
<li>
<a uk-toggle="target: #tags" data-uk-icon='grid'></a>
</li>
<li>
<a @click="switchLocale('en')">EN</a>
</li>
...
<div id="search" class="uk-light" data-uk-offcanvas="mode: reveal">
</div>
...
<div id="tags" class="uk-light" data-uk-offcanvas="mode: reveal">
</div>
export default {
name: "Home",
methods: {
switchLocale(locale) {
if (this.$i18n.locale !== locale) {
this.$i18n.locale = locale;
}
}
}
}
Works fine the change language, the only problem is that after changing language the previous off canvas is hiden : uk-offcanvas. Have you an idea how I can open the current offcanvas after changing language ? Or maybe exist a way do not close the canvas if I change the language
question from:
https://stackoverflow.com/questions/65886648/open-previous-canvas-after-language-change 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…