support i18n
support i18n
This commit is contained in:
parent
86b4da54d4
commit
d33b51432d
10 changed files with 151 additions and 15 deletions
|
@ -5,9 +5,10 @@ import Vue from 'vue';
|
|||
import VueRouter from 'vue-router';
|
||||
import App from './app.vue';
|
||||
import iView from '../src/index';
|
||||
import locale from '../src/locale/lang/en-US';
|
||||
|
||||
Vue.use(VueRouter);
|
||||
Vue.use(iView);
|
||||
Vue.use(iView, { locale });
|
||||
|
||||
// 开启debug模式
|
||||
Vue.config.debug = true;
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<Row>
|
||||
<i-col span="12" style="padding-right:10px">
|
||||
<i-select :model.sync="model11" filterable>
|
||||
<i-option v-for="item in cityList" :value="item.value" :label="item.label"><span>{{ item.label }}</span><span>{{ item.des }}</span></i-option>
|
||||
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||
</i-select>
|
||||
</i-col>
|
||||
<i-col span="12">
|
||||
<i-select :model.sync="model12" filterable multiple>
|
||||
<i-option v-for="item in cityList" :value="item.value" :label="item.label"><span>{{ item.label }}</span><span>{{ item.des }}</span></i-option>
|
||||
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||
</i-select>
|
||||
</i-col>
|
||||
</Row>
|
||||
|
@ -19,27 +19,31 @@
|
|||
cityList: [
|
||||
{
|
||||
value: 'beijing',
|
||||
label: '北京市',
|
||||
des: '帝都'
|
||||
label: '北京市'
|
||||
},
|
||||
{
|
||||
value: 'shanghai',
|
||||
label: '上海市',
|
||||
des: '魔都'
|
||||
label: '上海市'
|
||||
},
|
||||
{
|
||||
value: 'shenzhen',
|
||||
label: '深圳市',
|
||||
des: '渔村'
|
||||
label: '深圳市'
|
||||
},
|
||||
{
|
||||
value: 'hangzhou',
|
||||
label: '杭州市'
|
||||
},
|
||||
{
|
||||
value: 'nanjing',
|
||||
label: '南京市'
|
||||
},
|
||||
{
|
||||
value: 'chongqing',
|
||||
label: '重庆市',
|
||||
des: '山城'
|
||||
label: '重庆市'
|
||||
}
|
||||
],
|
||||
model11: '',
|
||||
model12: ['beijing', 'shanghai']
|
||||
model12: []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue