This commit is contained in:
parent
c3126a8ec1
commit
d48769ef40
5
index.js
5
index.js
|
@ -34,20 +34,23 @@ const componentarr = [
|
|||
Configuration
|
||||
];
|
||||
|
||||
const install = function (Vue) {
|
||||
const install = function (Vue,options) {
|
||||
// 判断是否安装
|
||||
if (install.installed) return;
|
||||
install.installed = true;
|
||||
// 遍历并注册全局组件
|
||||
|
||||
Vue.use(DataDict, {
|
||||
//数据字典元信息
|
||||
metas: {
|
||||
dictapiurl:options.dictapiurl||"/api/sysdict/get_dict",
|
||||
//'*'表示这是一个通用配置,适用于所有数据字典
|
||||
'*': {
|
||||
//labelField 和 valueField 是用于指定数据字典项中标签和值的字段名
|
||||
labelField: 'dictLabel',
|
||||
valueField: 'dictValue',
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
componentarr.forEach((component) => Vue.component(component.name, component));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "erp-element-ui",
|
||||
"version": "1.0.47",
|
||||
"version": "1.0.48",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Loading…
Reference in New Issue