From d48769ef40818febe00900436130f73d387c1011 Mon Sep 17 00:00:00 2001 From: ln1778 <465410291@qq.com> Date: Thu, 20 Jun 2024 16:55:44 +0800 Subject: [PATCH] 22 --- index.js | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 6c95dc6..b6014f4 100644 --- a/index.js +++ b/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)); diff --git a/package.json b/package.json index e50389f..240ba8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "erp-element-ui", - "version": "1.0.47", + "version": "1.0.48", "description": "", "main": "index.js", "scripts": {