mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-12 21:53:48 +08:00
v3.15.0【新增】升级SaToken到最新版本;【新增】重磅优化 数据字典;【新增】升级wangEditor-next;【新增】优化缓存实现redis与caffeine
This commit is contained in:
31
smart-admin-web-javascript/src/plugins/dict-plugin.js
Normal file
31
smart-admin-web-javascript/src/plugins/dict-plugin.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 字典插件
|
||||
* 此插件为 1024创新实验室 自创的插件
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2024-09-06 20:51:03
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||
|
||||
export default {
|
||||
install: (app) => {
|
||||
|
||||
const dictPlugin = {};
|
||||
|
||||
/**
|
||||
* 根据枚举值获取描述
|
||||
* @param {*} dictCode 字典编码
|
||||
* @param {*} value 值
|
||||
* @returns
|
||||
*/
|
||||
dictPlugin.getDataLabels = function (dictCode, value) {
|
||||
return useDictStore().getDataLabels(dictCode, value);
|
||||
};
|
||||
|
||||
app.config.globalProperties.$dictPlugin = dictPlugin;
|
||||
app.provide('dictPlugin', dictPlugin);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user