Set the active tab to the active language

parent 0c0f0f01
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
<div class="col-md-10"> <div class="col-md-10">
<div class="box box-primary"> <div class="box box-primary">
<div class="box-body"> <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" <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 slot="label" :class="{'error' : form.errors.has(locale)}">{{ localeArray.name
}}</span> }}</span>
<el-form-item :label="trans('page.title')" <el-form-item :label="trans('page.title')"
...@@ -186,6 +186,7 @@ ...@@ -186,6 +186,7 @@
form: new Form(), form: new Form(),
loading: false, loading: false,
tags: {}, tags: {},
activeTab: window.AsgardCMS.currentLocale || 'en',
} }
}, },
methods: { methods: {
......
...@@ -73167,7 +73167,8 @@ exports.default = { ...@@ -73167,7 +73167,8 @@ exports.default = {
}, },
form: new _formBackendValidation2.default(), form: new _formBackendValidation2.default(),
loading: false, 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 ...@@ -73856,12 +73857,20 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
}, [_c('el-tabs', { }, [_c('el-tabs', {
attrs: { attrs: {
"type": "card" "type": "card"
},
model: {
value: (_vm.activeTab),
callback: function($$v) {
_vm.activeTab = $$v
},
expression: "activeTab"
} }
}, _vm._l((_vm.locales), function(localeArray, locale) { }, _vm._l((_vm.locales), function(localeArray, locale) {
return _c('el-tab-pane', { return _c('el-tab-pane', {
key: localeArray.name, key: localeArray.name,
attrs: { attrs: {
"label": localeArray.name "label": localeArray.name,
"name": locale
} }
}, [_c('span', { }, [_c('span', {
class: { 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