This commit is contained in:
ln1778 2024-06-20 16:55:44 +08:00
parent c3126a8ec1
commit d48769ef40
2 changed files with 5 additions and 2 deletions

View File

@ -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));

View File

@ -1,6 +1,6 @@
{
"name": "erp-element-ui",
"version": "1.0.47",
"version": "1.0.48",
"description": "",
"main": "index.js",
"scripts": {