- 返回首页
- 在线咨询
-
语言{{chosenLangShowText}}
- {{lang.message}}
export default {
data () {
return {
langs: [
{message: '简体中文', notChosen: false},
{message: '繁体中文', notChosen: true},
{message: '粤语', notChosen: true},
{message: 'English', notChosen: true}
],
chosenLangShowText: '简体中文',
langBoxShow: false,
}
},
methods: {
langAlClick: function () {
this.langBoxShow = !this.langBoxShow;
},
chooseLang: function (lang) {
this.chosenLangShowText = lang.message;
//todo 把所有notchosen设为true
lang.notChosen = false;//当前点击对象notChosen为false
},
}
}

选项卡,请问下倒数第5行内todo该怎么来写???我想是实现点击选择后显示的{{chosenLangShowText}}和列表显示的不重复,始终加起来为4条,如果有其他更简便的方法更好,谢谢了
哎,看来还得靠自己。。。。。。
for (var i=0;i
用原生js写了。。。有其他办法的可以评论,多谢了
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...