From d3b630076af2b25603fba7c3adcf2c5313c3bd2e Mon Sep 17 00:00:00 2001
From: 抓蛙师 <770492966@qq.com>
Date: 星期五, 05 一月 2024 22:50:27 +0800
Subject: [PATCH] update 富文本组件,修复两个组件上传图片位置错乱问题
---
src/utils/dict.ts | 40 ++++++++++++++++++++--------------------
1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/src/utils/dict.ts b/src/utils/dict.ts
index 23948e5..0575072 100644
--- a/src/utils/dict.ts
+++ b/src/utils/dict.ts
@@ -4,24 +4,24 @@
* 鑾峰彇瀛楀吀鏁版嵁
*/
export const useDict = (...args: string[]): { [key: string]: DictDataOption[] } => {
- const res = ref<{
- [key: string]: DictDataOption[];
- }>({});
- return (() => {
- args.forEach(async (dictType) => {
- res.value[dictType] = [];
- const dicts = useDictStore().getDict(dictType);
- if (dicts) {
- res.value[dictType] = dicts;
- } else {
- await getDicts(dictType).then((resp) => {
- res.value[dictType] = resp.data.map(
- (p): DictDataOption => ({ label: p.dictLabel, value: p.dictValue, elTagType: p.listClass, elTagClass: p.cssClass })
- );
- useDictStore().setDict(dictType, res.value[dictType]);
- });
- }
- });
- return res.value;
- })();
+ const res = ref<{
+ [key: string]: DictDataOption[];
+ }>({});
+ return (() => {
+ args.forEach(async (dictType) => {
+ res.value[dictType] = [];
+ const dicts = useDictStore().getDict(dictType);
+ if (dicts) {
+ res.value[dictType] = dicts;
+ } else {
+ await getDicts(dictType).then((resp) => {
+ res.value[dictType] = resp.data.map(
+ (p): DictDataOption => ({ label: p.dictLabel, value: p.dictValue, elTagType: p.listClass, elTagClass: p.cssClass })
+ );
+ useDictStore().setDict(dictType, res.value[dictType]);
+ });
+ }
+ });
+ return res.value;
+ })();
};
--
Gitblit v1.9.3