@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.
- package/.vscode/settings.json +1 -1
- package/lib/assets/modules/{file-upload-C0twqMV5.js → file-upload-DhPgqGdk.js} +50 -50
- package/lib/assets/modules/index-02J2AYth.js +377 -0
- package/lib/assets/modules/{index-D1XAa1Uo.js → index-C31q4LHC.js} +2 -2
- package/lib/assets/modules/{index-C4CryM-R.js → index-CCpTizF9.js} +1 -1
- package/lib/assets/modules/{menuTabs-BrYQa4UO.js → menuTabs-DyhSKN9r.js} +2 -2
- package/lib/assets/modules/{toolIcon-B-g9pyE4.js → toolIcon-CqM4gBIc.js} +1 -1
- package/lib/assets/modules/{uploadList-0f2FA_5s.js → uploadList-DAVjJkqz.js} +127 -127
- package/lib/assets/modules/{uploadList-DCWRIxPJ.js → uploadList-ZajZKqaS.js} +4 -4
- package/lib/components/common/alert/index.vue.d.ts +13 -0
- package/lib/components/common/icon/helper.vue.d.ts +1 -0
- package/lib/components/common/index.d.ts +2 -0
- package/lib/components/content/form/formItem.vue.d.ts +1 -0
- package/lib/components/form/input/index.vue.d.ts +4 -1
- package/lib/components/form/select/index.vue.d.ts +2 -0
- package/lib/components/form/treeSelect/index.vue.d.ts +11 -2
- package/lib/components/index.d.ts +1 -1
- package/lib/es/AceEditor/index.js +3 -3
- package/lib/es/BasicLayout/index.js +3 -3
- package/lib/es/Error403/index.js +1 -1
- package/lib/es/Error404/index.js +1 -1
- package/lib/es/ExcelForm/index.js +311 -275
- package/lib/es/UploadForm/index.js +4 -4
- package/lib/index.d.ts +1 -1
- package/lib/typings/form.d.ts +2 -2
- package/lib/utils/excel-preview.d.ts +24 -0
- package/lib/utils/form-excel.d.ts +17 -4
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +677 -662
- package/package.json +1 -1
- package/src/components/common/alert/index.vue +76 -0
- package/src/components/common/icon/helper.vue +7 -1
- package/src/components/common/index.ts +4 -1
- package/src/components/content/dialog/excelForm.vue +337 -308
- package/src/components/content/form/formItem.vue +6 -2
- package/src/components/form/input/index.vue +16 -3
- package/src/components/form/select/index.vue +5 -11
- package/src/components/form/treeSelect/index.vue +22 -17
- package/src/components/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/typings/form.d.ts +2 -2
- package/src/utils/excel-preview.ts +188 -0
- package/src/utils/file-upload.ts +0 -2
- package/src/utils/form-excel.ts +132 -126
- package/lib/assets/modules/index-CKJIxasX.js +0 -333
package/package.json
CHANGED
|
@@ -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
|
|
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>
|