+ 字典显示组件: w-tag
+ 操作类型(sys_oper_type):
+ 其他设置:
+
+
+
+ 使用插槽:
+
+ {{ JSON.stringify(dict) }}
+
+
+
+ {{ ` 操作类型(sys_oper_type):
+ 其他设置:
+
+
+
+ 使用插槽:
+
+ \{\{ JSON.stringify(dict) \}\}
+
+
+
` }}
+ 参数说明
+
+ - name: 必填,字典类型
+ - value: 必填,字典值,Number,String
+ - border: 是否显示边框
+ - --margin: CSS变量,外边距,可以直接使用margin
+ - --color: 颜色,优先,可以直接使用color
+ - 插槽(default): dict
+
+
+ 字典列表显示组件: w-tags
+ 操作类型(sys_oper_type):
+ 操作类型(sys_oper_type):
+ 操作类型(sys_oper_type):
+
+ {{ index }}:{{ dict }}
+
+
+ {{ ` 操作类型(sys_oper_type):
+ 操作类型(sys_oper_type):
+ 操作类型(sys_oper_type):
+
+ \{\{ index \}\}:\{\{ dict \}\}
+
+ ` }}
+
+ 参数说明
+
+ - name: 必填,字典类型
+ - border: 是否显示边框
+ - --margin: CSS变量,需要父元素设定
+ - --color: 颜色,优先,需要父元素设定
+ - 插槽(default): dict,index
+
+
+ 下拉选择组件: w-tag-select
+ {{ tag1 }}
+ {{ tag2 }}
+
+ {{ ` \{\{ tag1 \}\}
+ \{\{ tag2 \}\}` }}
+
+ 参数说明
+
+ - name: 必填,字典类型
+ - 说明: 本组使用el-select进行简单封装,复杂应用请使用字典数据仓库完成
+ - 可以使用的el-select属性:clearable,size,placeholder,disabled
+
+ 字典数据仓库
+ {{ ` import { useDictStore } from '@/store';
+ const dictStore = useDictStore();` }}
+
+ 获取列表: dictStore.list('sys_oper_type')
+ {{ JSON.stringify(dictStore.list('sys_oper_type'),null,2) }}
+ 获取单个: dictStore.get('sys_oper_type',1)
+ {{ JSON.stringify(dictStore.get('sys_oper_type',1),null,2) }}
+ 同步获取列表: dictStore.listAsync('sys_oper_type')
+ {{ ` const dictList = ref([]);
+onMounted(async() => {
+ dictList.value = await dictStore.listAsync('sys_oper_type');
+})` }}
+
+ {{ JSON.stringify(dictList,null,2) }}
+ 同步获取单个: dictStore.getAsync('sys_oper_type',1)
+ {{ `const dictOne = ref({});
+onMounted(async() => {
+ dictOne.value = await dictStore.getAsync('sys_oper_type',1);
+})` }}
+
+ {{ JSON.stringify(dictOne,null,2) }}
+
+ 原始请求方法: getDicts(name)
+
@@ -494,8 +591,24 @@ const emRef3 = proxy.$refs.emRef3;