Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
69 views
in Technique[技术] by (71.8m points)

javascript - Open previous canvas after language change

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...