@skyfox2000/webui 1.3.5 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.vscode/settings.json +1 -1
  2. package/lib/assets/modules/{file-upload-C0twqMV5.js → file-upload-DhPgqGdk.js} +50 -50
  3. package/lib/assets/modules/index-02J2AYth.js +377 -0
  4. package/lib/assets/modules/{index-D1XAa1Uo.js → index-C31q4LHC.js} +2 -2
  5. package/lib/assets/modules/{index-C4CryM-R.js → index-CCpTizF9.js} +1 -1
  6. package/lib/assets/modules/{menuTabs-BrYQa4UO.js → menuTabs-DyhSKN9r.js} +2 -2
  7. package/lib/assets/modules/{toolIcon-B-g9pyE4.js → toolIcon-CqM4gBIc.js} +1 -1
  8. package/lib/assets/modules/{uploadList-0f2FA_5s.js → uploadList-DAVjJkqz.js} +127 -127
  9. package/lib/assets/modules/{uploadList-DCWRIxPJ.js → uploadList-ZajZKqaS.js} +4 -4
  10. package/lib/components/common/alert/index.vue.d.ts +13 -0
  11. package/lib/components/common/icon/helper.vue.d.ts +1 -0
  12. package/lib/components/common/index.d.ts +2 -0
  13. package/lib/components/content/form/formItem.vue.d.ts +1 -0
  14. package/lib/components/form/input/index.vue.d.ts +4 -1
  15. package/lib/components/form/select/index.vue.d.ts +2 -0
  16. package/lib/components/form/treeSelect/index.vue.d.ts +11 -2
  17. package/lib/components/index.d.ts +1 -1
  18. package/lib/es/AceEditor/index.js +3 -3
  19. package/lib/es/BasicLayout/index.js +3 -3
  20. package/lib/es/Error403/index.js +1 -1
  21. package/lib/es/Error404/index.js +1 -1
  22. package/lib/es/ExcelForm/index.js +311 -275
  23. package/lib/es/UploadForm/index.js +4 -4
  24. package/lib/index.d.ts +1 -1
  25. package/lib/typings/form.d.ts +2 -2
  26. package/lib/utils/excel-preview.d.ts +24 -0
  27. package/lib/utils/form-excel.d.ts +17 -4
  28. package/lib/webui.css +1 -1
  29. package/lib/webui.es.js +677 -662
  30. package/package.json +1 -1
  31. package/src/components/common/alert/index.vue +76 -0
  32. package/src/components/common/icon/helper.vue +7 -1
  33. package/src/components/common/index.ts +4 -1
  34. package/src/components/content/dialog/excelForm.vue +337 -308
  35. package/src/components/content/form/formItem.vue +6 -2
  36. package/src/components/form/input/index.vue +16 -3
  37. package/src/components/form/select/index.vue +5 -11
  38. package/src/components/form/treeSelect/index.vue +22 -17
  39. package/src/components/index.ts +1 -0
  40. package/src/index.ts +1 -0
  41. package/src/typings/form.d.ts +2 -2
  42. package/src/utils/excel-preview.ts +188 -0
  43. package/src/utils/file-upload.ts +0 -2
  44. package/src/utils/form-excel.ts +132 -126
  45. package/lib/assets/modules/index-CKJIxasX.js +0 -333
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyfox2000/webui",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "后台前端通用组件定义",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -0,0 +1,76 @@
1
+ <script setup lang="ts">
2
+ import { computed } from 'vue';
3
+ import { Alert } from 'ant-design-vue';
4
+ import ToolIcon from '../icon/toolIcon.vue';
5
+
6
+ type AlertType = 'success' | 'info' | 'warning' | 'error';
7
+
8
+ const props = withDefaults(
9
+ defineProps<{
10
+ /**
11
+ * 自定义图标内容
12
+ */
13
+ icon?: string;
14
+ /**
15
+ * 指定警告提示的样式,有四种选择 success、info、warning、error
16
+ */
17
+ type?: AlertType;
18
+ /**
19
+ * 是否显示图标
20
+ */
21
+ showIcon?: boolean;
22
+ /**
23
+ * 消息内容
24
+ */
25
+ message?: string;
26
+ }>(),
27
+ {
28
+ showIcon: true,
29
+ type: 'info',
30
+ },
31
+ );
32
+
33
+ // 图标颜色映射
34
+ const iconColorMap = {
35
+ success: '#52c41a',
36
+ info: '#1890ff',
37
+ warning: '#faad14',
38
+ error: '#ff4d4f',
39
+ };
40
+
41
+ const iconMap = {
42
+ success: 'icon-success-fill',
43
+ info: 'icon-info-fill',
44
+ warning: 'icon-warn-fill',
45
+ error: 'icon-error-fill',
46
+ };
47
+
48
+ // 计算当前类型
49
+ const currentType = computed(() => props.type || 'info');
50
+
51
+ // 计算图标颜色
52
+ const iconColor = computed(() => {
53
+ return iconColorMap[currentType.value];
54
+ });
55
+
56
+ // 计算当前图标
57
+ const currentIcon = computed(() => {
58
+ return iconMap[currentType.value];
59
+ });
60
+
61
+ // 生成组件实例ID
62
+ const componentId = Math.random().toString(36).substring(2, 9);
63
+
64
+ // 计算动态的实例ID,确保图标正确显示
65
+ const instanceId = computed(() => {
66
+ return `${componentId}-${currentType.value}-${currentIcon.value}`;
67
+ });
68
+ </script>
69
+
70
+ <template>
71
+ <Alert :show-icon="showIcon" :type="type" :message="message" v-bind="$attrs">
72
+ <template #icon>
73
+ <ToolIcon :icon="currentIcon" :style="{ color: iconColor }" :key="instanceId" />
74
+ </template>
75
+ </Alert>
76
+ </template>
@@ -6,6 +6,7 @@ import { useAttrs } from 'vue';
6
6
  defineProps<{
7
7
  text?: string;
8
8
  maxWidth?: string;
9
+ size?: number;
9
10
  }>();
10
11
  // 关闭自动继承属性到根元素
11
12
  defineOptions({
@@ -24,7 +25,12 @@ const attrs = useAttrs(); // 手动获取 $attrs
24
25
  </slot>
25
26
  </template>
26
27
  <span class="ml-2">
27
- <ToolIcon icon="icon-question-circle" class="text-[#888] w-4 h-4" v-bind="attrs" />
28
+ <ToolIcon
29
+ icon="icon-question-circle"
30
+ class="text-[#888]"
31
+ :class="[size ? 'w-' + size + ' h-' + size : 'w-5 h-5']"
32
+ v-bind="attrs"
33
+ />
28
34
  </span>
29
35
  </Popover>
30
36
  </template>
@@ -19,4 +19,7 @@ import ToolIcon from './icon/toolIcon.vue';
19
19
  export { ToolIcon };
20
20
 
21
21
  import Loading from './loading/index.vue';
22
- export { Loading };
22
+ export { Loading };
23
+
24
+ import Alert from './alert/index.vue';
25
+ export { Alert };