hy-dispatch-ui-v3 0.1.0 → 0.1.2
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/dist/tailwind.css +186 -45
- package/es/bussiness/index.mjs +0 -1
- package/es/components/appButton/appButton.vue.mjs +133 -0
- package/es/components/appButton/index.mjs +6 -0
- package/es/components/appButton/style/appButton.scss +289 -0
- package/es/components/appConfigProvider/appConfigProvider.vue.mjs +91 -0
- package/es/components/appConfigProvider/index.mjs +6 -0
- package/es/components/appConfirmDialog/appConfirmDialog.vue.mjs +105 -60
- package/es/components/appConfirmDialog/appConfirmMethod.mjs +49 -27
- package/es/components/appConfirmDialog/index.mjs +0 -1
- package/es/components/appDatePicker/appDatePicker.vue.mjs +0 -1
- package/es/components/appDatePicker/index.mjs +0 -1
- package/es/components/appForm/appForm.vue.mjs +64 -67
- package/es/components/appForm/index.mjs +0 -1
- package/es/components/appForm/js/index.mjs +0 -1
- package/es/components/appForm/js/useAppForm.mjs +0 -1
- package/es/components/appForm/style/appForm.scss +1 -1
- package/es/components/{svgIcon/svgIcon.vue.mjs → appIcon/appIcon.vue.mjs} +4 -5
- package/es/components/appIcon/index.mjs +6 -0
- package/es/components/{svgIcon/style/svgIcon.scss → appIcon/style/appIcon.scss} +1 -4
- package/es/components/{svgIcon/iconBox.vue.mjs → appIconBox/appIconBox.vue.mjs} +6 -7
- package/es/components/appIconBox/index.mjs +6 -0
- package/es/components/appIconBox/style/appIconBox.scss +27 -0
- package/es/components/appOrgCascader/appOrgCascader.vue.mjs +18 -11
- package/es/components/appOrgCascader/index.mjs +0 -1
- package/es/components/appSearch/appSearch.vue.mjs +2 -6
- package/es/components/appSearch/index.mjs +0 -1
- package/es/components/appSearch/js/index.mjs +5 -6
- package/es/components/appSearch/js/useAppSearch.mjs +0 -1
- package/es/components/appSearch/style/appSearch.scss +17 -11
- package/es/components/appTable/appTable.vue.mjs +57 -32
- package/es/components/appTable/cpns/columnSelect.vue.mjs +87 -123
- package/es/components/appTable/cpns/columnSelectItem.vue.mjs +5 -0
- package/es/components/appTable/cpns/columnSelectItem.vue2.mjs +167 -0
- package/es/components/appTable/index.mjs +0 -1
- package/es/components/appTable/js/index.mjs +9 -8
- package/es/components/appTable/js/search.mjs +6 -6
- package/es/components/appTable/js/useAppTable.mjs +6 -3
- package/es/components/appTable/style/appTable.scss +20 -11
- package/es/components/appTooltip/appTooltip.vue.mjs +0 -1
- package/es/components/appTooltip/index.mjs +0 -1
- package/es/components/appUserAvatar/appUserAvatar.vue.mjs +136 -0
- package/es/components/appUserAvatar/index.mjs +6 -0
- package/es/components/appUserAvatar/style/appUserAvatar.scss +33 -0
- package/es/components/index.mjs +5 -2
- package/es/config/index.mjs +0 -1
- package/es/constants/index.mjs +0 -1
- package/es/constants/keys.mjs +0 -1
- package/es/hooks/index.mjs +4 -3
- package/es/hooks/useApi.mjs +20 -5
- package/es/hooks/useGlobalConfig.mjs +19 -10
- package/es/hooks/useLocale.mjs +1 -2
- package/es/hooks/useMixins.mjs +0 -1
- package/es/{store/maintain.mjs → hooks/useResizeHandler.mjs} +29 -44
- package/es/hooks/useUserAvatarMap.mjs +9 -0
- package/es/index.mjs +9 -6
- package/es/locale/{en_US.mjs → en.mjs} +8 -5
- package/es/locale/index.mjs +2 -3
- package/es/locale/zh_CN.mjs +6 -3
- package/es/make-installer.mjs +2 -8
- package/es/static/hy-svg-icons.mjs +11 -0
- package/es/style/element/element.scss +16313 -0
- package/es/style/element/index.scss +932 -0
- package/es/style/index.scss +37 -0
- package/es/style/theme.scss +18 -120
- package/es/utils/adaptive.mjs +0 -1
- package/es/utils/bus.mjs +0 -1
- package/es/utils/crypto.mjs +0 -1
- package/es/utils/date.mjs +0 -1
- package/es/utils/handler.mjs +0 -1
- package/es/utils/index.mjs +0 -1
- package/es/utils/is.mjs +0 -1
- package/es/version.mjs +1 -2
- package/lib/bussiness/index.js +0 -1
- package/lib/components/appButton/appButton.vue.js +137 -0
- package/lib/components/appButton/index.js +11 -0
- package/lib/components/appButton/style/appButton.scss +289 -0
- package/lib/components/appConfigProvider/appConfigProvider.vue.js +114 -0
- package/lib/components/appConfigProvider/index.js +11 -0
- package/lib/components/appConfirmDialog/appConfirmDialog.vue.js +103 -58
- package/lib/components/appConfirmDialog/appConfirmMethod.js +48 -26
- package/lib/components/appConfirmDialog/index.js +0 -1
- package/lib/components/appDatePicker/appDatePicker.vue.js +0 -1
- package/lib/components/appDatePicker/index.js +0 -1
- package/lib/components/appForm/appForm.vue.js +61 -64
- package/lib/components/appForm/index.js +0 -1
- package/lib/components/appForm/js/index.js +0 -1
- package/lib/components/appForm/js/useAppForm.js +0 -1
- package/lib/components/appForm/style/appForm.scss +1 -1
- package/lib/components/{svgIcon/svgIcon.vue.js → appIcon/appIcon.vue.js} +4 -5
- package/lib/components/appIcon/index.js +11 -0
- package/lib/components/{svgIcon/style/svgIcon.scss → appIcon/style/appIcon.scss} +1 -4
- package/lib/components/{svgIcon/iconBox.vue.js → appIconBox/appIconBox.vue.js} +6 -7
- package/lib/components/appIconBox/index.js +11 -0
- package/lib/components/appIconBox/style/appIconBox.scss +27 -0
- package/lib/components/appOrgCascader/appOrgCascader.vue.js +18 -11
- package/lib/components/appOrgCascader/index.js +0 -1
- package/lib/components/appSearch/appSearch.vue.js +2 -6
- package/lib/components/appSearch/index.js +0 -1
- package/lib/components/appSearch/js/index.js +5 -6
- package/lib/components/appSearch/js/useAppSearch.js +0 -1
- package/lib/components/appSearch/style/appSearch.scss +17 -11
- package/lib/components/appTable/appTable.vue.js +56 -31
- package/lib/components/appTable/cpns/columnSelect.vue.js +86 -122
- package/lib/components/appTable/cpns/columnSelectItem.vue.js +9 -0
- package/lib/components/appTable/cpns/columnSelectItem.vue2.js +171 -0
- package/lib/components/appTable/index.js +0 -1
- package/lib/components/appTable/js/index.js +9 -7
- package/lib/components/appTable/js/search.js +6 -6
- package/lib/components/appTable/js/useAppTable.js +6 -3
- package/lib/components/appTable/style/appTable.scss +20 -11
- package/lib/components/appTooltip/appTooltip.vue.js +0 -1
- package/lib/components/appTooltip/index.js +0 -1
- package/lib/components/appUserAvatar/appUserAvatar.vue.js +140 -0
- package/lib/components/appUserAvatar/index.js +11 -0
- package/lib/components/appUserAvatar/style/appUserAvatar.scss +33 -0
- package/lib/components/index.js +24 -18
- package/lib/config/index.js +0 -1
- package/lib/constants/index.js +0 -1
- package/lib/constants/keys.js +0 -1
- package/lib/hooks/index.js +8 -2
- package/lib/hooks/useApi.js +19 -3
- package/lib/hooks/useGlobalConfig.js +21 -11
- package/lib/hooks/useLocale.js +1 -2
- package/lib/hooks/useMixins.js +0 -1
- package/lib/{store/maintain.js → hooks/useResizeHandler.js} +29 -44
- package/lib/hooks/useUserAvatarMap.js +12 -0
- package/lib/index.js +37 -28
- package/lib/locale/{en_US.js → en.js} +8 -5
- package/lib/locale/index.js +3 -4
- package/lib/locale/zh_CN.js +6 -3
- package/lib/make-installer.js +1 -7
- package/lib/static/hy-svg-icons.js +13 -0
- package/lib/style/element/element.scss +16313 -0
- package/lib/style/element/index.scss +932 -0
- package/lib/style/index.scss +37 -0
- package/lib/style/theme.scss +18 -120
- package/lib/utils/adaptive.js +0 -1
- package/lib/utils/bus.js +0 -1
- package/lib/utils/crypto.js +0 -1
- package/lib/utils/date.js +0 -1
- package/lib/utils/handler.js +0 -1
- package/lib/utils/index.js +0 -1
- package/lib/utils/is.js +0 -1
- package/lib/version.js +1 -2
- package/package.json +17 -7
- package/es/bussiness/index.mjs.map +0 -1
- package/es/components/appConfirmDialog/appConfirmDialog.vue.mjs.map +0 -1
- package/es/components/appConfirmDialog/appConfirmMethod.mjs.map +0 -1
- package/es/components/appConfirmDialog/index.mjs.map +0 -1
- package/es/components/appConfirmDialog/style/appConfirmDialog.scss +0 -5
- package/es/components/appDatePicker/appDatePicker.vue.mjs.map +0 -1
- package/es/components/appDatePicker/index.mjs.map +0 -1
- package/es/components/appForm/appForm.vue.mjs.map +0 -1
- package/es/components/appForm/index.mjs.map +0 -1
- package/es/components/appForm/js/index.mjs.map +0 -1
- package/es/components/appForm/js/useAppForm.mjs.map +0 -1
- package/es/components/appOrgCascader/appOrgCascader.vue.mjs.map +0 -1
- package/es/components/appOrgCascader/index.mjs.map +0 -1
- package/es/components/appSearch/appSearch.vue.mjs.map +0 -1
- package/es/components/appSearch/index.mjs.map +0 -1
- package/es/components/appSearch/js/index.mjs.map +0 -1
- package/es/components/appSearch/js/useAppSearch.mjs.map +0 -1
- package/es/components/appTable/appTable.vue.mjs.map +0 -1
- package/es/components/appTable/cpns/columnSelect.vue.mjs.map +0 -1
- package/es/components/appTable/index.mjs.map +0 -1
- package/es/components/appTable/js/index.mjs.map +0 -1
- package/es/components/appTable/js/search.mjs.map +0 -1
- package/es/components/appTable/js/useAppTable.mjs.map +0 -1
- package/es/components/appTooltip/appTooltip.vue.mjs.map +0 -1
- package/es/components/appTooltip/index.mjs.map +0 -1
- package/es/components/index.mjs.map +0 -1
- package/es/components/svgIcon/iconBox.vue.mjs.map +0 -1
- package/es/components/svgIcon/index.mjs +0 -9
- package/es/components/svgIcon/index.mjs.map +0 -1
- package/es/components/svgIcon/style/iconBox.scss +0 -13
- package/es/components/svgIcon/svgIcon.vue.mjs.map +0 -1
- package/es/config/index.mjs.map +0 -1
- package/es/constants/index.mjs.map +0 -1
- package/es/constants/keys.mjs.map +0 -1
- package/es/hooks/index.mjs.map +0 -1
- package/es/hooks/useApi.mjs.map +0 -1
- package/es/hooks/useGlobalConfig.mjs.map +0 -1
- package/es/hooks/useLocale.mjs.map +0 -1
- package/es/hooks/useMixins.mjs.map +0 -1
- package/es/index.mjs.map +0 -1
- package/es/locale/en_US.mjs.map +0 -1
- package/es/locale/index.mjs.map +0 -1
- package/es/locale/zh_CN.mjs.map +0 -1
- package/es/make-installer.mjs.map +0 -1
- package/es/store/index.mjs +0 -7
- package/es/store/index.mjs.map +0 -1
- package/es/store/maintain.mjs.map +0 -1
- package/es/utils/adaptive.mjs.map +0 -1
- package/es/utils/bus.mjs.map +0 -1
- package/es/utils/crypto.mjs.map +0 -1
- package/es/utils/date.mjs.map +0 -1
- package/es/utils/handler.mjs.map +0 -1
- package/es/utils/index.mjs.map +0 -1
- package/es/utils/is.mjs.map +0 -1
- package/es/version.mjs.map +0 -1
- package/lib/bussiness/index.js.map +0 -1
- package/lib/components/appConfirmDialog/appConfirmDialog.vue.js.map +0 -1
- package/lib/components/appConfirmDialog/appConfirmMethod.js.map +0 -1
- package/lib/components/appConfirmDialog/index.js.map +0 -1
- package/lib/components/appConfirmDialog/style/appConfirmDialog.scss +0 -5
- package/lib/components/appDatePicker/appDatePicker.vue.js.map +0 -1
- package/lib/components/appDatePicker/index.js.map +0 -1
- package/lib/components/appForm/appForm.vue.js.map +0 -1
- package/lib/components/appForm/index.js.map +0 -1
- package/lib/components/appForm/js/index.js.map +0 -1
- package/lib/components/appForm/js/useAppForm.js.map +0 -1
- package/lib/components/appOrgCascader/appOrgCascader.vue.js.map +0 -1
- package/lib/components/appOrgCascader/index.js.map +0 -1
- package/lib/components/appSearch/appSearch.vue.js.map +0 -1
- package/lib/components/appSearch/index.js.map +0 -1
- package/lib/components/appSearch/js/index.js.map +0 -1
- package/lib/components/appSearch/js/useAppSearch.js.map +0 -1
- package/lib/components/appTable/appTable.vue.js.map +0 -1
- package/lib/components/appTable/cpns/columnSelect.vue.js.map +0 -1
- package/lib/components/appTable/index.js.map +0 -1
- package/lib/components/appTable/js/index.js.map +0 -1
- package/lib/components/appTable/js/search.js.map +0 -1
- package/lib/components/appTable/js/useAppTable.js.map +0 -1
- package/lib/components/appTooltip/appTooltip.vue.js.map +0 -1
- package/lib/components/appTooltip/index.js.map +0 -1
- package/lib/components/index.js.map +0 -1
- package/lib/components/svgIcon/iconBox.vue.js.map +0 -1
- package/lib/components/svgIcon/index.js +0 -15
- package/lib/components/svgIcon/index.js.map +0 -1
- package/lib/components/svgIcon/style/iconBox.scss +0 -13
- package/lib/components/svgIcon/svgIcon.vue.js.map +0 -1
- package/lib/config/index.js.map +0 -1
- package/lib/constants/index.js.map +0 -1
- package/lib/constants/keys.js.map +0 -1
- package/lib/hooks/index.js.map +0 -1
- package/lib/hooks/useApi.js.map +0 -1
- package/lib/hooks/useGlobalConfig.js.map +0 -1
- package/lib/hooks/useLocale.js.map +0 -1
- package/lib/hooks/useMixins.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/locale/en_US.js.map +0 -1
- package/lib/locale/index.js.map +0 -1
- package/lib/locale/zh_CN.js.map +0 -1
- package/lib/make-installer.js.map +0 -1
- package/lib/store/index.js +0 -10
- package/lib/store/index.js.map +0 -1
- package/lib/store/maintain.js.map +0 -1
- package/lib/utils/adaptive.js.map +0 -1
- package/lib/utils/bus.js.map +0 -1
- package/lib/utils/crypto.js.map +0 -1
- package/lib/utils/date.js.map +0 -1
- package/lib/utils/handler.js.map +0 -1
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/is.js.map +0 -1
- package/lib/version.js.map +0 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var elementPlus = require('element-plus');
|
|
7
|
+
var ElementLocale = require('element-plus/es/locales.mjs');
|
|
8
|
+
var useGlobalConfig = require('../../hooks/useGlobalConfig.js');
|
|
9
|
+
|
|
10
|
+
function _interopNamespaceDefault(e) {
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var ElementLocale__namespace = /*#__PURE__*/_interopNamespaceDefault(ElementLocale);
|
|
28
|
+
|
|
29
|
+
const __default__ = vue.defineComponent({
|
|
30
|
+
name: "AppConfigProvider"
|
|
31
|
+
});
|
|
32
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
33
|
+
props: {
|
|
34
|
+
locale: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: false,
|
|
37
|
+
default: "zhCn"
|
|
38
|
+
},
|
|
39
|
+
api: {
|
|
40
|
+
type: [Object, Function],
|
|
41
|
+
required: false
|
|
42
|
+
},
|
|
43
|
+
userAvatarMap: {
|
|
44
|
+
type: Map,
|
|
45
|
+
required: false,
|
|
46
|
+
default: () => /* @__PURE__ */ new Map()
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: false,
|
|
51
|
+
default: "default"
|
|
52
|
+
},
|
|
53
|
+
zIndex: {
|
|
54
|
+
type: Number,
|
|
55
|
+
required: false
|
|
56
|
+
},
|
|
57
|
+
button: {
|
|
58
|
+
type: Object,
|
|
59
|
+
required: false
|
|
60
|
+
},
|
|
61
|
+
link: {
|
|
62
|
+
type: Object,
|
|
63
|
+
required: false
|
|
64
|
+
},
|
|
65
|
+
dialog: {
|
|
66
|
+
type: Object,
|
|
67
|
+
required: false
|
|
68
|
+
},
|
|
69
|
+
message: {
|
|
70
|
+
type: Object,
|
|
71
|
+
required: false
|
|
72
|
+
},
|
|
73
|
+
emptyValues: {
|
|
74
|
+
type: String,
|
|
75
|
+
required: false
|
|
76
|
+
},
|
|
77
|
+
valueOnClear: {
|
|
78
|
+
type: [String, Number, null],
|
|
79
|
+
required: false
|
|
80
|
+
},
|
|
81
|
+
table: {
|
|
82
|
+
type: Object,
|
|
83
|
+
required: false
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
setup(__props) {
|
|
87
|
+
const props = __props;
|
|
88
|
+
const globalConfig = useGlobalConfig.provideGlobalConfig(props);
|
|
89
|
+
const config = vue.computed(() => {
|
|
90
|
+
const { locale, api, userAvatarMap, ...config2 } = globalConfig.value;
|
|
91
|
+
return {
|
|
92
|
+
locale: ElementLocale__namespace[locale] || ElementLocale__namespace["zhCn"],
|
|
93
|
+
...config2
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
return (_ctx, _cache) => {
|
|
97
|
+
return vue.openBlock(), vue.createBlock(
|
|
98
|
+
vue.unref(elementPlus.ElConfigProvider),
|
|
99
|
+
vue.mergeProps(config.value, { namespace: "hy-el" }),
|
|
100
|
+
{
|
|
101
|
+
default: vue.withCtx(({ config: config2 }) => [
|
|
102
|
+
vue.renderSlot(_ctx.$slots, "default", { config: config2 })
|
|
103
|
+
]),
|
|
104
|
+
_: 3
|
|
105
|
+
/* FORWARDED */
|
|
106
|
+
},
|
|
107
|
+
16
|
|
108
|
+
/* FULL_PROPS */
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var appConfigProvider = require('./appConfigProvider.vue.js');
|
|
6
|
+
var handler = require('../../utils/handler.js');
|
|
7
|
+
|
|
8
|
+
const AppConfigProvider = handler.withInstall(appConfigProvider.default);
|
|
9
|
+
|
|
10
|
+
exports.AppConfigProvider = AppConfigProvider;
|
|
11
|
+
exports.default = AppConfigProvider;
|
|
@@ -5,15 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
7
|
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
+
var index = require('../appButton/index.js');
|
|
8
9
|
var useLocale = require('../../hooks/useLocale.js');
|
|
9
10
|
|
|
10
|
-
import "./style/appConfirmDialog.scss";
|
|
11
|
-
|
|
12
11
|
const __default__ = vue.defineComponent({
|
|
13
12
|
name: "AppConfirmDialog"
|
|
14
13
|
});
|
|
15
14
|
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
16
|
-
props: {
|
|
15
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
17
16
|
width: {
|
|
18
17
|
type: [String, Number],
|
|
19
18
|
default: 500
|
|
@@ -32,15 +31,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
32
31
|
},
|
|
33
32
|
showClose: {
|
|
34
33
|
type: Boolean,
|
|
35
|
-
default:
|
|
34
|
+
default: false
|
|
36
35
|
},
|
|
37
36
|
showCancel: {
|
|
38
37
|
type: Boolean,
|
|
39
38
|
default: true
|
|
40
39
|
},
|
|
41
|
-
|
|
40
|
+
cancelType: {
|
|
42
41
|
type: String,
|
|
43
|
-
default: "
|
|
42
|
+
default: "default"
|
|
44
43
|
},
|
|
45
44
|
cancelText: {
|
|
46
45
|
type: String
|
|
@@ -49,40 +48,78 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
49
48
|
type: Boolean,
|
|
50
49
|
default: true
|
|
51
50
|
},
|
|
52
|
-
|
|
51
|
+
submitType: {
|
|
53
52
|
type: String,
|
|
54
|
-
default: "
|
|
53
|
+
default: "primary"
|
|
55
54
|
},
|
|
56
55
|
submitText: {
|
|
57
56
|
type: String
|
|
58
57
|
},
|
|
59
|
-
|
|
58
|
+
iconColor: {
|
|
60
59
|
type: String,
|
|
61
|
-
default: "
|
|
62
|
-
},
|
|
63
|
-
onCancel: {
|
|
64
|
-
type: Function
|
|
60
|
+
default: "rgb(var(--hy-main))"
|
|
65
61
|
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
62
|
+
onClose: Function,
|
|
63
|
+
onCancel: Function,
|
|
64
|
+
onSubmit: Function
|
|
65
|
+
}, {
|
|
66
|
+
"modelValue": { type: Boolean, default: false },
|
|
67
|
+
"modelModifiers": {}
|
|
68
|
+
}),
|
|
69
|
+
emits: /* @__PURE__ */ vue.mergeModels(["hide"], ["update:modelValue"]),
|
|
71
70
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
72
71
|
const props = __props;
|
|
72
|
+
const emits = __emit;
|
|
73
73
|
const { t } = useLocale.useLocale();
|
|
74
|
-
const visible = vue.
|
|
74
|
+
const visible = vue.useModel(__props, "modelValue");
|
|
75
|
+
const loading = vue.ref(false);
|
|
75
76
|
async function onSubmitHandler() {
|
|
77
|
+
if (loading.value) return;
|
|
78
|
+
loading.value = true;
|
|
76
79
|
if (props.onSubmit) {
|
|
77
|
-
|
|
80
|
+
try {
|
|
81
|
+
await props.onSubmit();
|
|
82
|
+
} catch (err) {
|
|
83
|
+
console.error(err);
|
|
84
|
+
loading.value = false;
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
78
87
|
}
|
|
79
88
|
visible.value = false;
|
|
89
|
+
loading.value = false;
|
|
90
|
+
emits("hide");
|
|
80
91
|
}
|
|
81
|
-
async function
|
|
92
|
+
async function onCancelHandler() {
|
|
93
|
+
if (loading.value) return;
|
|
94
|
+
loading.value = true;
|
|
82
95
|
if (props.onCancel) {
|
|
83
|
-
|
|
96
|
+
try {
|
|
97
|
+
await props.onCancel();
|
|
98
|
+
} catch (err) {
|
|
99
|
+
console.error(err);
|
|
100
|
+
loading.value = false;
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
84
103
|
}
|
|
85
104
|
visible.value = false;
|
|
105
|
+
loading.value = false;
|
|
106
|
+
emits("hide");
|
|
107
|
+
}
|
|
108
|
+
async function onCloseHandler() {
|
|
109
|
+
if (loading.value) return;
|
|
110
|
+
loading.value = true;
|
|
111
|
+
if (props.onClose) {
|
|
112
|
+
try {
|
|
113
|
+
await props.onClose();
|
|
114
|
+
} catch (err) {
|
|
115
|
+
console.error(err);
|
|
116
|
+
loading.value = false;
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
visible.value = false;
|
|
121
|
+
loading.value = false;
|
|
122
|
+
emits("hide");
|
|
86
123
|
}
|
|
87
124
|
__expose({
|
|
88
125
|
show: () => {
|
|
@@ -101,11 +138,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
101
138
|
"close-on-click-modal": false,
|
|
102
139
|
"close-on-press-escape": false,
|
|
103
140
|
"show-close": false,
|
|
104
|
-
top: "15%"
|
|
105
|
-
class: "app-confirm-dialog"
|
|
141
|
+
top: "15%"
|
|
106
142
|
}, _ctx.$attrs), {
|
|
107
143
|
header: vue.withCtx(() => [
|
|
108
|
-
vue.createElementVNode("div", {
|
|
144
|
+
vue.createElementVNode("div", {
|
|
145
|
+
class: "h-[38px] flex items-center justify-between border-b border-border pl-4 pr-[10px]",
|
|
146
|
+
onClick: vue.withModifiers(() => {
|
|
147
|
+
}, ["stop"])
|
|
148
|
+
}, [
|
|
109
149
|
vue.createElementVNode(
|
|
110
150
|
"span",
|
|
111
151
|
{ class: "text-sm text-main font-bold" },
|
|
@@ -113,60 +153,66 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
113
153
|
1
|
|
114
154
|
/* TEXT */
|
|
115
155
|
),
|
|
116
|
-
__props.showClose ? (vue.openBlock(), vue.createElementBlock(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
156
|
+
__props.showClose ? (vue.openBlock(), vue.createElementBlock(
|
|
157
|
+
"div",
|
|
158
|
+
{
|
|
159
|
+
key: 0,
|
|
160
|
+
class: vue.normalizeClass(["flex items-center clickBox", { "cursor-not-allowed": loading.value }]),
|
|
161
|
+
onClick: onCloseHandler
|
|
162
|
+
},
|
|
163
|
+
[
|
|
164
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), {
|
|
165
|
+
size: "18",
|
|
166
|
+
color: "rgb(var(--hy-danger-2))"
|
|
167
|
+
}, {
|
|
168
|
+
default: vue.withCtx(() => [
|
|
169
|
+
vue.createVNode(vue.unref(iconsVue.CircleClose))
|
|
170
|
+
]),
|
|
171
|
+
_: 1
|
|
172
|
+
/* STABLE */
|
|
173
|
+
})
|
|
174
|
+
],
|
|
175
|
+
2
|
|
176
|
+
/* CLASS */
|
|
177
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
178
|
+
], 8, ["onClick"])
|
|
133
179
|
]),
|
|
134
180
|
default: vue.withCtx(() => [
|
|
135
|
-
vue.createElementVNode("div", { class: "
|
|
181
|
+
vue.createElementVNode("div", { class: "flex flex-col items-center justify-between pt-[37px] pb-[27px]" }, [
|
|
136
182
|
vue.createElementVNode("div", { class: "flex flex-col items-center text-main" }, [
|
|
137
183
|
vue.createVNode(vue.unref(elementPlus.ElIcon), {
|
|
138
184
|
size: "40",
|
|
139
|
-
color:
|
|
185
|
+
color: __props.iconColor
|
|
140
186
|
}, {
|
|
141
187
|
default: vue.withCtx(() => [
|
|
142
188
|
vue.createVNode(vue.unref(iconsVue.Warning))
|
|
143
189
|
]),
|
|
144
190
|
_: 1
|
|
145
191
|
/* STABLE */
|
|
146
|
-
}),
|
|
192
|
+
}, 8, ["color"]),
|
|
147
193
|
vue.createElementVNode(
|
|
148
194
|
"div",
|
|
149
195
|
{
|
|
150
|
-
class: vue.normalizeClass(["text-base font-bold mt-[10px] mb-[26px]", __props.titleClass])
|
|
196
|
+
class: vue.normalizeClass(["text-base text-center font-bold mt-[10px] mb-[26px]", __props.titleClass])
|
|
151
197
|
},
|
|
152
198
|
vue.toDisplayString(__props.title),
|
|
153
199
|
3
|
|
154
200
|
/* TEXT, CLASS */
|
|
155
201
|
),
|
|
156
202
|
vue.createElementVNode("div", {
|
|
157
|
-
class: "max-w-[
|
|
203
|
+
class: "max-w-[300px] text-smword-break text-center break-all",
|
|
158
204
|
innerHTML: __props.content
|
|
159
205
|
}, null, 8, ["innerHTML"])
|
|
160
206
|
]),
|
|
161
207
|
__props.showSubmit || __props.showCancel ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
162
208
|
key: 0,
|
|
163
|
-
class: "
|
|
209
|
+
class: "pt-[32px]"
|
|
164
210
|
}, [
|
|
165
|
-
__props.showCancel ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
211
|
+
__props.showCancel ? (vue.openBlock(), vue.createBlock(vue.unref(index.AppButton), {
|
|
166
212
|
key: 0,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
onClick:
|
|
213
|
+
type: __props.cancelType,
|
|
214
|
+
disabled: loading.value,
|
|
215
|
+
onClick: onCancelHandler
|
|
170
216
|
}, {
|
|
171
217
|
default: vue.withCtx(() => [
|
|
172
218
|
vue.createTextVNode(
|
|
@@ -177,11 +223,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
177
223
|
]),
|
|
178
224
|
_: 1
|
|
179
225
|
/* STABLE */
|
|
180
|
-
}, 8, ["
|
|
181
|
-
__props.showSubmit ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
226
|
+
}, 8, ["type", "disabled"])) : vue.createCommentVNode("v-if", true),
|
|
227
|
+
__props.showSubmit ? (vue.openBlock(), vue.createBlock(vue.unref(index.AppButton), {
|
|
182
228
|
key: 1,
|
|
183
|
-
|
|
184
|
-
|
|
229
|
+
type: __props.submitType,
|
|
230
|
+
disabled: loading.value,
|
|
185
231
|
onClick: onSubmitHandler
|
|
186
232
|
}, {
|
|
187
233
|
default: vue.withCtx(() => [
|
|
@@ -193,7 +239,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
193
239
|
]),
|
|
194
240
|
_: 1
|
|
195
241
|
/* STABLE */
|
|
196
|
-
}, 8, ["
|
|
242
|
+
}, 8, ["type", "disabled"])) : vue.createCommentVNode("v-if", true)
|
|
197
243
|
])) : vue.createCommentVNode("v-if", true)
|
|
198
244
|
])
|
|
199
245
|
]),
|
|
@@ -205,4 +251,3 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
205
251
|
});
|
|
206
252
|
|
|
207
253
|
exports.default = _sfc_main;
|
|
208
|
-
//# sourceMappingURL=appConfirmDialog.vue.js.map
|
|
@@ -3,44 +3,68 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
var useApi = require('../../hooks/useApi.js');
|
|
7
|
+
var index = require('../appConfigProvider/index.js');
|
|
6
8
|
var appConfirmDialog = require('./appConfirmDialog.vue.js');
|
|
7
9
|
var useGlobalConfig = require('../../hooks/useGlobalConfig.js');
|
|
8
10
|
var useLocale = require('../../hooks/useLocale.js');
|
|
9
11
|
|
|
10
12
|
function appConfirmMethod(config) {
|
|
11
|
-
|
|
12
|
-
const currentConfig = {
|
|
13
|
+
let container = document.createDocumentFragment();
|
|
14
|
+
const currentConfig = {
|
|
15
|
+
...config,
|
|
16
|
+
onHide: () => {
|
|
17
|
+
destroy();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
13
20
|
let confirmDialogInstance = null;
|
|
14
21
|
function render(props) {
|
|
22
|
+
const globalConfig = useGlobalConfig.useGlobalConfig();
|
|
23
|
+
const {
|
|
24
|
+
locale = "zhCn",
|
|
25
|
+
api = useApi.defaultAxios,
|
|
26
|
+
...args
|
|
27
|
+
} = vue.unref(globalConfig) || {};
|
|
15
28
|
const vm = vue.createVNode(appConfirmDialog.default, props);
|
|
16
|
-
vue.
|
|
29
|
+
const configProvider = vue.createVNode(
|
|
30
|
+
index.AppConfigProvider,
|
|
31
|
+
{
|
|
32
|
+
locale,
|
|
33
|
+
api,
|
|
34
|
+
...args
|
|
35
|
+
},
|
|
36
|
+
() => [vm]
|
|
37
|
+
);
|
|
38
|
+
vue.render(configProvider, container);
|
|
17
39
|
return vm;
|
|
18
40
|
}
|
|
19
|
-
function destroy() {
|
|
20
|
-
confirmDialogInstance
|
|
21
|
-
|
|
41
|
+
async function destroy() {
|
|
42
|
+
if (confirmDialogInstance) {
|
|
43
|
+
confirmDialogInstance.component.exposed.close();
|
|
44
|
+
}
|
|
45
|
+
if (container) {
|
|
46
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
47
|
+
vue.render(null, container);
|
|
48
|
+
}
|
|
49
|
+
container = null;
|
|
50
|
+
confirmDialogInstance = null;
|
|
22
51
|
}
|
|
23
52
|
confirmDialogInstance = render(currentConfig);
|
|
24
53
|
confirmDialogInstance.component.exposed.show();
|
|
25
54
|
return destroy;
|
|
26
55
|
}
|
|
27
|
-
appConfirmDialog.default.tip =
|
|
28
|
-
|
|
29
|
-
const globalConfig = useGlobalConfig.getGlobalConfig();
|
|
30
|
-
const { t } = useLocale.useLocale((_a = vue.unref(globalConfig)) == null ? void 0 : _a.locale);
|
|
56
|
+
appConfirmDialog.default.tip = (props) => {
|
|
57
|
+
const { t } = useLocale.useLocale();
|
|
31
58
|
return appConfirmMethod({
|
|
32
|
-
showCancel: false,
|
|
33
|
-
submitText: t("confirmDialog.haveKnown"),
|
|
34
59
|
dialogTitle: t("confirmDialog.prompt"),
|
|
35
60
|
title: t("confirmDialog.prompt"),
|
|
36
61
|
content: t("confirmDialog.content"),
|
|
62
|
+
showCancel: false,
|
|
37
63
|
...props
|
|
38
64
|
});
|
|
39
65
|
};
|
|
40
|
-
appConfirmDialog.default.confirm =
|
|
41
|
-
|
|
42
|
-
const globalConfig = useGlobalConfig.getGlobalConfig();
|
|
43
|
-
const { t } = useLocale.useLocale((_a = vue.unref(globalConfig)) == null ? void 0 : _a.locale);
|
|
66
|
+
appConfirmDialog.default.confirm = (props) => {
|
|
67
|
+
const { t } = useLocale.useLocale();
|
|
44
68
|
return appConfirmMethod({
|
|
45
69
|
dialogTitle: t("confirmDialog.prompt"),
|
|
46
70
|
title: t("confirmDialog.prompt"),
|
|
@@ -48,30 +72,28 @@ appConfirmDialog.default.confirm = function(props) {
|
|
|
48
72
|
...props
|
|
49
73
|
});
|
|
50
74
|
};
|
|
51
|
-
appConfirmDialog.default.warning =
|
|
52
|
-
|
|
53
|
-
const globalConfig = useGlobalConfig.getGlobalConfig();
|
|
54
|
-
const { t } = useLocale.useLocale((_a = vue.unref(globalConfig)) == null ? void 0 : _a.locale);
|
|
75
|
+
appConfirmDialog.default.warning = (props) => {
|
|
76
|
+
const { t } = useLocale.useLocale();
|
|
55
77
|
return appConfirmMethod({
|
|
56
78
|
dialogTitle: t("confirmDialog.riskWarning"),
|
|
57
79
|
title: t("confirmDialog.prompt"),
|
|
58
80
|
titleClass: "text-warning",
|
|
59
81
|
content: t("confirmDialog.content"),
|
|
82
|
+
iconColor: "rgb(var(--hy-warning))",
|
|
60
83
|
...props
|
|
61
84
|
});
|
|
62
85
|
};
|
|
63
|
-
appConfirmDialog.default.danger =
|
|
64
|
-
|
|
65
|
-
const globalConfig = useGlobalConfig.getGlobalConfig();
|
|
66
|
-
const { t } = useLocale.useLocale((_a = vue.unref(globalConfig)) == null ? void 0 : _a.locale);
|
|
86
|
+
appConfirmDialog.default.danger = (props) => {
|
|
87
|
+
const { t } = useLocale.useLocale();
|
|
67
88
|
return appConfirmMethod({
|
|
68
89
|
dialogTitle: t("confirmDialog.dangerousOperation"),
|
|
69
|
-
titleClass: "text-
|
|
90
|
+
titleClass: "text-danger",
|
|
70
91
|
title: t("confirmDialog.prompt"),
|
|
71
92
|
content: t("confirmDialog.content"),
|
|
93
|
+
submitType: "danger",
|
|
94
|
+
iconColor: "rgb(var(--hy-danger))",
|
|
72
95
|
...props
|
|
73
96
|
});
|
|
74
97
|
};
|
|
75
98
|
|
|
76
99
|
exports.default = appConfirmDialog.default;
|
|
77
|
-
//# sourceMappingURL=appConfirmMethod.js.map
|