Set the active tab to the active language

parent 0c0f0f01
......@@ -22,9 +22,9 @@
<div class="col-md-10">
<div class="box box-primary">
<div class="box-body">
<el-tabs type="card">
<el-tabs type="card" v-model="activeTab">
<el-tab-pane :label="localeArray.name" v-for="(localeArray, locale) in locales"
:key="localeArray.name">
:key="localeArray.name" :name="locale">
<span slot="label" :class="{'error' : form.errors.has(locale)}">{{ localeArray.name
}}</span>
<el-form-item :label="trans('page.title')"
......@@ -186,6 +186,7 @@
form: new Form(),
loading: false,
tags: {},
activeTab: window.AsgardCMS.currentLocale || 'en',
}
},
methods: {
......
......@@ -73167,7 +73167,8 @@ exports.default = {
},
form: new _formBackendValidation2.default(),
loading: false,
tags: {}
tags: {},
activeTab: window.AsgardCMS.currentLocale || 'en'
};
},
......@@ -73856,12 +73857,20 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
}, [_c('el-tabs', {
attrs: {
"type": "card"
},
model: {
value: (_vm.activeTab),
callback: function($$v) {
_vm.activeTab = $$v
},
expression: "activeTab"
}
}, _vm._l((_vm.locales), function(localeArray, locale) {
return _c('el-tab-pane', {
key: localeArray.name,
attrs: {
"label": localeArray.name
"label": localeArray.name,
"name": locale
}
}, [_c('span', {
class: {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment