@elementplus-kit/uikit 1.6.0 → 1.7.0
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/build.log +0 -0
- package/components/button/index.ts +4 -0
- package/components/button/src/constants.ts +50 -0
- package/components/button/src/index.ts +264 -0
- package/components/button/style/index.scss +3 -0
- package/components/config.ts +4 -0
- package/components/dialog/index.ts +6 -0
- package/components/dialog/src/constants.ts +3 -0
- package/components/dialog/src/index.ts +54 -0
- package/components/dialog/style/index.scss +18 -0
- package/components/dictLabel/index.ts +4 -0
- package/components/dictLabel/src/index.vue +21 -0
- package/components/drawer/index.ts +4 -0
- package/components/drawer/src/constants.ts +3 -0
- package/components/drawer/src/index.ts +53 -0
- package/components/drawer/style/index.scss +18 -0
- package/components/form/index.ts +4 -0
- package/components/form/src/FormItem.ts +398 -0
- package/components/form/src/constants.ts +161 -0
- package/components/form/src/index.ts +198 -0
- package/components/form/src/types.ts +39 -0
- package/components/form/src/utils.ts +4 -0
- package/components/form/style/index.scss +5 -0
- package/components/pagination/index.ts +4 -0
- package/components/pagination/src/constants.ts +5 -0
- package/components/pagination/src/index.ts +50 -0
- package/components/search/index.ts +4 -0
- package/components/search/src/index.tsx +294 -0
- package/components/search/style/index.scss +104 -0
- package/components/table/index.ts +4 -0
- package/components/table/src/TableColumn.ts +116 -0
- package/components/table/src/constants.ts +42 -0
- package/components/table/src/index.ts +250 -0
- package/components/table/src/index2.ts +219 -0
- package/components/table/src/index3.ts +233 -0
- package/components/table/src/tableDictLabel.vue +21 -0
- package/components/table/src/tableaa.ts +71 -0
- package/components/table/src/type.ts +0 -0
- package/components/table/type/index.scss +0 -0
- package/components/table2/index.ts +4 -0
- package/components/table2/src/config.ts +5 -0
- package/components/table2/src/index.ts +12 -0
- package/components/table2/src/render.ts +136 -0
- package/components/table2/src/types.ts +39 -0
- package/components/table2/style/index.scss +0 -0
- package/components//346/250/241/346/235/277/index.tsx +57 -0
- package/components//346/250/241/346/235/277/ttt.ts +66 -0
- package/components//346/250/241/346/235/277/ttt.vue +18 -0
- package/index.ts +2 -0
- package/package.json +1 -4
- package/vite.config.ts +30 -0
- package//345/205/266/344/273/226/core/dialog/elementPlus/dialogWarp.vue +151 -0
- package//345/205/266/344/273/226/core/dialog/index.ts +10 -0
- package//345/205/266/344/273/226/core/form/elementPlus/elementWarp.ts +15 -0
- package//345/205/266/344/273/226/core/form/elementPlus/elementWarp.vue +16 -0
- package//345/205/266/344/273/226/core/form/elementPlus/formRender.ts +55 -0
- package//345/205/266/344/273/226/core/form/index.ts +10 -0
- package//345/205/266/344/273/226/core/table/config.ts +5 -0
- package//345/205/266/344/273/226/core/table/render.ts +91 -0
- package//345/205/266/344/273/226/core/table/warp.ts +11 -0
- package//345/205/266/344/273/226/core/utils/fetch.ts +58 -0
- package//345/205/266/344/273/226/useMessage.ts +95 -0
- package/dist/index.css +0 -1
- package/dist/index.mjs +0 -1079
- package/dist/index.umd.js +0 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ElMessage, ElMessageBox, ElNotification } from 'element-plus'
|
|
2
|
+
import { useI18n } from './useI18n'
|
|
3
|
+
export const useMessage = () => {
|
|
4
|
+
const { t } = useI18n()
|
|
5
|
+
return {
|
|
6
|
+
// 消息提示
|
|
7
|
+
info(content: string) {
|
|
8
|
+
ElMessage.info(content)
|
|
9
|
+
},
|
|
10
|
+
// 错误消息
|
|
11
|
+
error(content: string) {
|
|
12
|
+
ElMessage.error(content)
|
|
13
|
+
},
|
|
14
|
+
// 成功消息
|
|
15
|
+
success(content: string) {
|
|
16
|
+
ElMessage.success(content)
|
|
17
|
+
},
|
|
18
|
+
// 警告消息
|
|
19
|
+
warning(content: string) {
|
|
20
|
+
ElMessage.warning(content)
|
|
21
|
+
},
|
|
22
|
+
// 弹出提示
|
|
23
|
+
alert(content: string) {
|
|
24
|
+
ElMessageBox.alert(content, t('common.confirmTitle'))
|
|
25
|
+
},
|
|
26
|
+
// 错误提示
|
|
27
|
+
alertError(content: string) {
|
|
28
|
+
ElMessageBox.alert(content, t('common.confirmTitle'), { type: 'error' })
|
|
29
|
+
},
|
|
30
|
+
// 成功提示
|
|
31
|
+
alertSuccess(content: string) {
|
|
32
|
+
ElMessageBox.alert(content, t('common.confirmTitle'), { type: 'success' })
|
|
33
|
+
},
|
|
34
|
+
// 警告提示
|
|
35
|
+
alertWarning(content: string) {
|
|
36
|
+
ElMessageBox.alert(content, t('common.confirmTitle'), { type: 'warning' })
|
|
37
|
+
},
|
|
38
|
+
// 通知提示
|
|
39
|
+
notify(content: string) {
|
|
40
|
+
ElNotification.info(content)
|
|
41
|
+
},
|
|
42
|
+
// 错误通知
|
|
43
|
+
notifyError(content: string) {
|
|
44
|
+
ElNotification.error(content)
|
|
45
|
+
},
|
|
46
|
+
// 成功通知
|
|
47
|
+
notifySuccess(content: string) {
|
|
48
|
+
ElNotification.success(content)
|
|
49
|
+
},
|
|
50
|
+
// 警告通知
|
|
51
|
+
notifyWarning(content: string) {
|
|
52
|
+
ElNotification.warning(content)
|
|
53
|
+
},
|
|
54
|
+
// 确认窗体
|
|
55
|
+
confirm(content: string, tip?: string) {
|
|
56
|
+
return ElMessageBox.confirm(content, tip ? tip : t('common.confirmTitle'), {
|
|
57
|
+
confirmButtonText: t('common.ok'),
|
|
58
|
+
cancelButtonText: t('common.cancel'),
|
|
59
|
+
type: 'warning'
|
|
60
|
+
})
|
|
61
|
+
},
|
|
62
|
+
// 删除窗体
|
|
63
|
+
delConfirm(content?: string, tip?: string) {
|
|
64
|
+
return ElMessageBox.confirm(
|
|
65
|
+
content ? content : t('common.delMessage'),
|
|
66
|
+
tip ? tip : t('common.confirmTitle'),
|
|
67
|
+
{
|
|
68
|
+
confirmButtonText: t('common.ok'),
|
|
69
|
+
cancelButtonText: t('common.cancel'),
|
|
70
|
+
type: 'warning'
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
},
|
|
74
|
+
// 导出窗体
|
|
75
|
+
exportConfirm(content?: string, tip?: string) {
|
|
76
|
+
return ElMessageBox.confirm(
|
|
77
|
+
content ? content : t('common.exportMessage'),
|
|
78
|
+
tip ? tip : t('common.confirmTitle'),
|
|
79
|
+
{
|
|
80
|
+
confirmButtonText: t('common.ok'),
|
|
81
|
+
cancelButtonText: t('common.cancel'),
|
|
82
|
+
type: 'warning'
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
},
|
|
86
|
+
// 提交内容
|
|
87
|
+
prompt(content: string, tip: string) {
|
|
88
|
+
return ElMessageBox.prompt(content, tip, {
|
|
89
|
+
confirmButtonText: t('common.ok'),
|
|
90
|
+
cancelButtonText: t('common.cancel'),
|
|
91
|
+
type: 'warning'
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
package/dist/index.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";.c-form.el-form--inline .el-select{--el-select-width: 220px}.search-btn{margin-right:20px;margin-left:auto}.c-search{position:relative;height:50px}.c-search .c-search-simple{display:flex;justify-content:space-between}.c-search .c-search-simple-form{flex:1;overflow:auto;scrollbar-width:none}.c-search .c-simple-form-container{display:inline-block}.c-search .c-simple-form-container>.c-form{white-space:nowrap}.c-search .c-search-simple-btn{display:flex;margin-left:auto}.c-search .c-search-simple-icon{display:flex;justify-content:center;align-items:center;cursor:pointer;height:32px;width:32px;margin-right:10px;border-radius:4px;background-color:#409eff;transition:all .2s}.c-search .c-search-simple-icon:hover{background-color:#79bbff}.c-search .c-search-simple-icon:active{background-color:#337ecc}.c-search .c-search-icon{color:#fff;transition:all .2s}.c-search .icon-rotate{background-color:#337ecc}.c-search .icon-rotate .c-search-icon{transform:rotate(180deg)}.c-search .c-search-form{width:100%;position:absolute;top:50px;left:0;overflow:hidden;z-index:10;background-color:#fff}.search-form-transition-enter-active,.search-form-transition-leave-active{transition:all .3s ease;overflow:hidden;max-height:500px}.search-form-transition-enter-from,.search-form-transition-leave-to{max-height:0;opacity:0;padding-top:0;padding-bottom:0}.el-button+.el-dropdown{margin-left:10px}
|