@dazhicheng/ui 1.5.203 → 1.5.204
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/_virtual/___vite-browser-external.js +6 -0
- package/dist/_virtual/__vite-browser-external.js +4 -0
- package/dist/_virtual/_commonjs-dynamic-modules.js +6 -0
- package/dist/_virtual/_commonjsHelpers.js +24 -0
- package/dist/_virtual/aes.js +4 -0
- package/dist/_virtual/cipher-core.js +4 -0
- package/dist/_virtual/core.js +4 -0
- package/dist/_virtual/enc-base64.js +4 -0
- package/dist/_virtual/enc-utf8.js +4 -0
- package/dist/_virtual/evpkdf.js +4 -0
- package/dist/_virtual/hmac.js +4 -0
- package/dist/_virtual/md5.js +4 -0
- package/dist/_virtual/mode-ecb.js +4 -0
- package/dist/_virtual/pad-pkcs7.js +4 -0
- package/dist/_virtual/sha1.js +4 -0
- package/dist/components/tt-api-component/index.js +17 -4
- package/dist/components/tt-api-component/index.vue2.js +24 -13
- package/dist/components/tt-area/TtArea.vue3.js +24 -13
- package/dist/components/tt-button/index.js +18 -5
- package/dist/components/tt-button/index.vue2.js +27 -16
- package/dist/components/tt-checkbox/index.js +17 -4
- package/dist/components/tt-checkbox/index.vue.js +38 -28
- package/dist/components/tt-drawer/index.js +17 -7
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +48 -36
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +39 -26
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +23 -10
- package/dist/components/tt-drawer/src/props.js +22 -9
- package/dist/components/tt-drawer/src/utils/drawer-api.js +42 -33
- package/dist/components/tt-empty/index.js +28 -18
- package/dist/components/tt-form/index.js +22 -14
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +23 -14
- package/dist/components/tt-form/src/components/FormActions.vue2.js +42 -32
- package/dist/components/tt-form/src/form/FormDescription.vue.js +19 -10
- package/dist/components/tt-form/src/form/FormItem.vue.js +18 -9
- package/dist/components/tt-form/src/form/FormLabel.vue.js +18 -9
- package/dist/components/tt-form/src/form/RenderContent.vue.js +25 -13
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +62 -55
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +36 -28
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +64 -56
- package/dist/components/tt-form/src/form-render/array-register/utils.js +18 -8
- package/dist/components/tt-form/src/form-render/dependencies.js +36 -24
- package/dist/components/tt-form/src/form-render/form.vue2.js +17 -7
- package/dist/components/tt-form/src/form-render/helper.js +29 -16
- package/dist/components/tt-form/src/form-render/rootWrapperClass.js +17 -7
- package/dist/components/tt-form/src/formApi.js +59 -48
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +17 -4
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +67 -57
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +55 -46
- package/dist/components/tt-form/src/group-form/groupFormApi.js +21 -10
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +27 -17
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +32 -23
- package/dist/components/tt-form/src/index.vue2.js +53 -45
- package/dist/components/tt-form/src/useFormContext.js +74 -62
- package/dist/components/tt-form-item-error-tooltip/index.js +18 -5
- package/dist/components/tt-form-item-error-tooltip/index.vue.js +32 -21
- package/dist/components/tt-icon/index.js +20 -7
- package/dist/components/tt-image/index.js +19 -6
- package/dist/components/tt-image/src/components/ImageViewer.js +27 -17
- package/dist/components/tt-loading/index.js +16 -4
- package/dist/components/tt-loading/src/directive.js +34 -22
- package/dist/components/tt-log/index.js +17 -4
- package/dist/components/tt-log/index.vue.js +21 -8
- package/dist/components/tt-modal/index.js +16 -5
- package/dist/components/tt-modal/src/RenderModal.vue.js +163 -151
- package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +38 -28
- package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +24 -11
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +36 -23
- package/dist/components/tt-modal/src/props.js +22 -9
- package/dist/components/tt-modal/src/utils/modal-api.js +39 -29
- package/dist/components/tt-modal-form/index.vue.js +44 -36
- package/dist/components/tt-nav-anchor/index.js +17 -4
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +69 -57
- package/dist/components/tt-panel-select/index.js +17 -4
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +51 -40
- package/dist/components/tt-panel-select/src/index.vue.js +35 -24
- package/dist/components/tt-select/index.js +17 -4
- package/dist/components/tt-select/src/Select.vue.js +79 -68
- package/dist/components/tt-select/src/components/SelectTable.vue.js +41 -30
- package/dist/components/tt-select/src/components/Table.vue.js +86 -76
- package/dist/components/tt-select/src/hooks/useDataSource.js +59 -49
- package/dist/components/tt-select/src/hooks/useSelect.js +46 -38
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +123 -112
- package/dist/components/tt-table/index.js +19 -12
- package/dist/components/tt-table/src/Table.vue.js +82 -71
- package/dist/components/tt-table/src/TableForm.vue.js +77 -65
- package/dist/components/tt-table/src/components/TableAction.vue.js +49 -39
- package/dist/components/tt-table/src/components/TableButtons.js +73 -60
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +14 -3
- package/dist/components/tt-table/src/components/TableToobalTools.vue.js +36 -25
- package/dist/components/tt-table/src/hooks/useColumns.js +72 -65
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +43 -31
- package/dist/components/tt-table/src/hooks/useDataSource.js +50 -42
- package/dist/components/tt-table/src/hooks/usePagination.js +36 -25
- package/dist/components/tt-table/src/props.js +55 -42
- package/dist/components/tt-table/src/utils/table-api.js +33 -22
- package/dist/components/tt-table/src/utils/table-form-api.js +35 -24
- package/dist/components/tt-text/index.js +17 -4
- package/dist/components/tt-upload/index.js +19 -6
- package/dist/components/tt-upload/src/TtUpload.vue.js +77 -66
- package/dist/directives/disabled-tip/index.js +37 -26
- package/dist/hooks/useFormSchemasLink.js +90 -79
- package/dist/hooks/useScreenshotOss.js +49 -35
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js +64 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.js +545 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js +508 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.js +81 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js +10 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.js +71 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.js +84 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js +72 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js +22 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js +11 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.js +50 -0
- package/dist/node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js +1024 -0
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js +32 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js +11 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js +92 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js +34 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js +52 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js +43 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js +47 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js +122 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js +30 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js +24 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js +106 -0
- package/dist/node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js +16 -0
- package/dist/node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.js +21 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +2922 -0
- package/dist/node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js +93 -0
- package/dist/packages/hooks/src/propTypes.js +17 -0
- package/dist/packages/hooks/src/tools.js +6 -0
- package/dist/packages/hooks/src/useDebounce.js +32 -0
- package/dist/packages/hooks/src/useDesign.js +12 -0
- package/dist/packages/hooks/src/useElementScreenshot.js +136 -0
- package/dist/packages/hooks/src/useIsScroll.js +12 -0
- package/dist/packages/hooks/src/usePriorityValue.js +45 -0
- package/dist/packages/utils/src/calc.js +14 -0
- package/dist/packages/utils/src/check.js +10 -0
- package/dist/packages/utils/src/install.js +11 -0
- package/dist/packages/utils/src/is.js +64 -0
- package/dist/packages/utils/src/merge.js +13 -0
- package/dist/packages/utils/src/stateHandler.js +33 -0
- package/dist/packages/utils/src/string.js +6 -0
- package/dist/packages/utils/src/testid-helper.js +14 -0
- package/dist/packages/utils/src/tool.js +181 -0
- package/dist/plugins/default/renderCellContent.js +39 -28
- package/dist/plugins/vxeTable/switchStatus.js +37 -26
- package/package.json +1 -1
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { useDataPermissionOptions as j } from "./useDataPermissionOptions.js";
|
|
2
|
-
import
|
|
2
|
+
import "axios";
|
|
3
3
|
import { ElSelectV2 as q } from "element-plus";
|
|
4
|
+
import { isFunction as E } from "../packages/utils/src/is.js";
|
|
5
|
+
import "vue";
|
|
6
|
+
import "xe-utils";
|
|
7
|
+
import "dayjs";
|
|
8
|
+
import "dayjs/plugin/utc";
|
|
9
|
+
import "dayjs/plugin/timezone";
|
|
10
|
+
import "../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
11
|
+
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
12
|
+
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
13
|
+
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
|
+
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
4
15
|
import { omit as y } from "lodash-es";
|
|
5
|
-
const
|
|
16
|
+
const m = "all", T = { label: "全部", value: m }, D = [
|
|
6
17
|
"platformId",
|
|
7
18
|
"shopId",
|
|
8
19
|
"purchasePlaceId",
|
|
@@ -22,34 +33,34 @@ const u = "all", T = { label: "全部", value: u }, D = [
|
|
|
22
33
|
businessType: "业务线",
|
|
23
34
|
lockUserId: "锁单人"
|
|
24
35
|
};
|
|
25
|
-
function k(
|
|
26
|
-
return typeof
|
|
36
|
+
function k(n) {
|
|
37
|
+
return typeof n == "string" && n.toLowerCase() === m.toLowerCase();
|
|
27
38
|
}
|
|
28
|
-
function w(
|
|
29
|
-
return Array.isArray(
|
|
39
|
+
function w(n) {
|
|
40
|
+
return Array.isArray(n) ? n : n == null || n === "" ? [] : [n];
|
|
30
41
|
}
|
|
31
|
-
function J(
|
|
32
|
-
return [T].concat(
|
|
42
|
+
function J(n = []) {
|
|
43
|
+
return [T].concat(n);
|
|
33
44
|
}
|
|
34
|
-
function K(
|
|
35
|
-
return
|
|
45
|
+
function K(n, c, i, b) {
|
|
46
|
+
return n ? E(n) ? n(c, i, b) : n : {};
|
|
36
47
|
}
|
|
37
|
-
function Q(
|
|
48
|
+
function Q(n, c, i, b) {
|
|
38
49
|
var C;
|
|
39
|
-
c == null || c(
|
|
40
|
-
const a = b(),
|
|
41
|
-
i == null || i(
|
|
50
|
+
c == null || c(n);
|
|
51
|
+
const a = b(), p = (C = a.values) == null ? void 0 : C[a.fieldName];
|
|
52
|
+
i == null || i(p, a);
|
|
42
53
|
}
|
|
43
|
-
function W(
|
|
44
|
-
const i =
|
|
45
|
-
(o,
|
|
54
|
+
function W(n = {}, c = D) {
|
|
55
|
+
const i = n.scene || "list", b = c.reduce(
|
|
56
|
+
(o, t) => (t === "userId" || (o[t] = A(t).showAll ?? !1), o),
|
|
46
57
|
{}
|
|
47
58
|
), { dataSource: a } = j({
|
|
48
59
|
codes: c,
|
|
49
|
-
dataSource:
|
|
60
|
+
dataSource: n.dataSource,
|
|
50
61
|
showAll: b
|
|
51
62
|
});
|
|
52
|
-
function
|
|
63
|
+
function p(o) {
|
|
53
64
|
return A(o).fieldName || z[o];
|
|
54
65
|
}
|
|
55
66
|
function C(o) {
|
|
@@ -59,19 +70,19 @@ function W(t = {}, c = D) {
|
|
|
59
70
|
return A(o).label || G[o];
|
|
60
71
|
}
|
|
61
72
|
function A(o) {
|
|
62
|
-
var
|
|
63
|
-
return ((
|
|
73
|
+
var t;
|
|
74
|
+
return ((t = n.fieldConfigs) == null ? void 0 : t[o]) || {};
|
|
64
75
|
}
|
|
65
|
-
function M(o,
|
|
76
|
+
function M(o, t) {
|
|
66
77
|
const e = A(o).dependencies;
|
|
67
|
-
if (!
|
|
68
|
-
if (!e) return
|
|
78
|
+
if (!t) return e;
|
|
79
|
+
if (!e) return t;
|
|
69
80
|
const s = {
|
|
70
|
-
...
|
|
81
|
+
...t,
|
|
71
82
|
...e
|
|
72
83
|
};
|
|
73
|
-
if (
|
|
74
|
-
const l =
|
|
84
|
+
if (t && e) {
|
|
85
|
+
const l = t.triggerFields, r = e.triggerFields;
|
|
75
86
|
s.triggerFields = r ?? l;
|
|
76
87
|
}
|
|
77
88
|
return s;
|
|
@@ -83,27 +94,27 @@ function W(t = {}, c = D) {
|
|
|
83
94
|
return a.value[o] || [];
|
|
84
95
|
}
|
|
85
96
|
function _(o) {
|
|
86
|
-
return w(o).some((
|
|
97
|
+
return w(o).some((t) => k(t));
|
|
87
98
|
}
|
|
88
99
|
function O(o) {
|
|
89
|
-
const
|
|
90
|
-
return i === "action" && (
|
|
100
|
+
const t = _(o), e = Array.isArray(o) ? o.length > 1 : !1;
|
|
101
|
+
return i === "action" && (t || e);
|
|
91
102
|
}
|
|
92
103
|
function B(o) {
|
|
93
|
-
const
|
|
104
|
+
const t = F("shopId"), e = w(o);
|
|
94
105
|
if (!e.length)
|
|
95
|
-
return i === "action" ? [] :
|
|
106
|
+
return i === "action" ? [] : t;
|
|
96
107
|
if (O(o)) return [];
|
|
97
|
-
const s =
|
|
108
|
+
const s = t.filter((r) => e.includes(r.platformId));
|
|
98
109
|
return !s.some((r) => k(r.value)) || s.length <= 1 ? s : J(s.filter((r) => !k(r.value)));
|
|
99
110
|
}
|
|
100
|
-
function x(o,
|
|
101
|
-
const r =
|
|
111
|
+
function x(o, t, e, s, l) {
|
|
112
|
+
const r = p(o), I = l ? s.filter((u) => {
|
|
102
113
|
var h;
|
|
103
|
-
return (h =
|
|
104
|
-
}) || [] : s.find((
|
|
114
|
+
return (h = t[r]) == null ? void 0 : h.includes(u.value);
|
|
115
|
+
}) || [] : s.find((u) => u.value === t[r]);
|
|
105
116
|
return {
|
|
106
|
-
values:
|
|
117
|
+
values: t,
|
|
107
118
|
actions: e,
|
|
108
119
|
fieldName: r,
|
|
109
120
|
dataType: o,
|
|
@@ -111,19 +122,19 @@ function W(t = {}, c = D) {
|
|
|
111
122
|
currentOption: I
|
|
112
123
|
};
|
|
113
124
|
}
|
|
114
|
-
function N(o,
|
|
115
|
-
const r = A(o), I = K(r.componentProps,
|
|
125
|
+
function N(o, t, e, s, l) {
|
|
126
|
+
const r = A(o), I = K(r.componentProps, t, e, s), u = P(o), { onChange: h, ...d } = I, f = E(r.customOptions) ? r.customOptions(t, s) : s;
|
|
116
127
|
return {
|
|
117
|
-
multiple:
|
|
128
|
+
multiple: u,
|
|
118
129
|
component: q,
|
|
119
|
-
...
|
|
120
|
-
options:
|
|
130
|
+
...d,
|
|
131
|
+
options: f,
|
|
121
132
|
onChange(g) {
|
|
122
133
|
Q(
|
|
123
134
|
g,
|
|
124
135
|
l,
|
|
125
136
|
r.onChange,
|
|
126
|
-
() => x(o,
|
|
137
|
+
() => x(o, t, e, f, u)
|
|
127
138
|
);
|
|
128
139
|
}
|
|
129
140
|
};
|
|
@@ -131,16 +142,16 @@ function W(t = {}, c = D) {
|
|
|
131
142
|
function L(o) {
|
|
132
143
|
return {
|
|
133
144
|
component: "TtApiComponent",
|
|
134
|
-
fieldName:
|
|
145
|
+
fieldName: p(o),
|
|
135
146
|
label: S(o),
|
|
136
147
|
rules: C(o),
|
|
137
148
|
dependencies: M(o),
|
|
138
149
|
componentProps: (e, s) => {
|
|
139
150
|
var h;
|
|
140
|
-
const l = F(o), r =
|
|
141
|
-
return N(o, e, s, l, (
|
|
142
|
-
const
|
|
143
|
-
I && (
|
|
151
|
+
const l = F(o), r = p(o), I = P(o), u = ((h = e[r]) == null ? void 0 : h.at(-1)) !== m;
|
|
152
|
+
return N(o, e, s, l, (d) => {
|
|
153
|
+
const f = e[r];
|
|
154
|
+
I && (u && (d == null ? void 0 : d.at(-1)) === m ? e[r] = [m] : e[r] = f == null ? void 0 : f.filter((g) => g !== m));
|
|
144
155
|
});
|
|
145
156
|
}
|
|
146
157
|
};
|
|
@@ -149,38 +160,38 @@ function W(t = {}, c = D) {
|
|
|
149
160
|
// 平台
|
|
150
161
|
platformId: {
|
|
151
162
|
component: "TtApiComponent",
|
|
152
|
-
fieldName:
|
|
163
|
+
fieldName: p("platformId"),
|
|
153
164
|
label: S("platformId"),
|
|
154
165
|
rules: C("platformId"),
|
|
155
|
-
componentProps: (o,
|
|
156
|
-
var
|
|
157
|
-
const e = "platformId", s =
|
|
158
|
-
return N(e, o,
|
|
166
|
+
componentProps: (o, t) => {
|
|
167
|
+
var d;
|
|
168
|
+
const e = "platformId", s = p(e), l = p("shopId"), r = P(e), I = P("shopId"), u = F(e), h = ((d = o[s]) == null ? void 0 : d.at(-1)) !== m;
|
|
169
|
+
return N(e, o, t, u, (f) => {
|
|
159
170
|
const g = o[s];
|
|
160
|
-
r && (h && (
|
|
171
|
+
r && (h && (f == null ? void 0 : f.at(-1)) === m ? o[s] = [m] : o[s] = g == null ? void 0 : g.filter((V) => V !== m)), o[l] = I ? [] : void 0;
|
|
161
172
|
});
|
|
162
173
|
}
|
|
163
174
|
},
|
|
164
175
|
// 店铺
|
|
165
176
|
shopId: {
|
|
166
177
|
component: "TtApiComponent",
|
|
167
|
-
fieldName:
|
|
178
|
+
fieldName: p("shopId"),
|
|
168
179
|
label: S("shopId"),
|
|
169
|
-
componentProps: (o,
|
|
180
|
+
componentProps: (o, t) => {
|
|
170
181
|
var h;
|
|
171
|
-
const e = "shopId", s =
|
|
172
|
-
return N(e, o,
|
|
173
|
-
const
|
|
174
|
-
I && (
|
|
182
|
+
const e = "shopId", s = p(e), l = o[p("platformId")], r = B(l), I = P(e), u = ((h = o[s]) == null ? void 0 : h.at(-1)) !== m;
|
|
183
|
+
return N(e, o, t, r, (d) => {
|
|
184
|
+
const f = o[s];
|
|
185
|
+
I && (u && (d == null ? void 0 : d.at(-1)) === m ? o[s] = [m] : o[s] = f == null ? void 0 : f.filter((g) => g !== m));
|
|
175
186
|
});
|
|
176
187
|
},
|
|
177
188
|
dependencies: M("shopId", {
|
|
178
|
-
triggerFields: [
|
|
189
|
+
triggerFields: [p("platformId")],
|
|
179
190
|
disabled(o) {
|
|
180
|
-
return O(o[
|
|
191
|
+
return O(o[p("platformId")]);
|
|
181
192
|
},
|
|
182
193
|
rules(o) {
|
|
183
|
-
return O(o[
|
|
194
|
+
return O(o[p("platformId")]) ? null : C("shopId") || null;
|
|
184
195
|
}
|
|
185
196
|
})
|
|
186
197
|
},
|
|
@@ -190,10 +201,10 @@ function W(t = {}, c = D) {
|
|
|
190
201
|
};
|
|
191
202
|
function R() {
|
|
192
203
|
return Object.keys(U).reduce(
|
|
193
|
-
(o,
|
|
204
|
+
(o, t) => {
|
|
194
205
|
var l;
|
|
195
|
-
const e = U[
|
|
196
|
-
return o[
|
|
206
|
+
const e = U[t], s = (l = n.fieldConfigs) == null ? void 0 : l[t];
|
|
207
|
+
return o[t] = {
|
|
197
208
|
...e,
|
|
198
209
|
...y(s, ["componentProps", "rules"])
|
|
199
210
|
}, o;
|
|
@@ -206,8 +217,8 @@ function W(t = {}, c = D) {
|
|
|
206
217
|
dataSource: a
|
|
207
218
|
};
|
|
208
219
|
}
|
|
209
|
-
function
|
|
210
|
-
const
|
|
220
|
+
function po() {
|
|
221
|
+
const n = {
|
|
211
222
|
options: {},
|
|
212
223
|
codes: [...D]
|
|
213
224
|
}, c = {
|
|
@@ -215,47 +226,47 @@ function H() {
|
|
|
215
226
|
* @description 渲染查询场景
|
|
216
227
|
*/
|
|
217
228
|
list() {
|
|
218
|
-
return
|
|
229
|
+
return n.options.scene = "list", c;
|
|
219
230
|
},
|
|
220
231
|
/**
|
|
221
232
|
* @description 渲染新增编辑场景
|
|
222
233
|
*/
|
|
223
234
|
action() {
|
|
224
|
-
return
|
|
235
|
+
return n.options.scene = "action", c;
|
|
225
236
|
},
|
|
226
237
|
/**
|
|
227
238
|
* @param scene 场景值 list为查询 action为新增编辑等操作
|
|
228
239
|
* @returns FormSchemasLinkBuilder
|
|
229
240
|
*/
|
|
230
241
|
scene(i) {
|
|
231
|
-
return
|
|
242
|
+
return n.options.scene = i, c;
|
|
232
243
|
},
|
|
233
244
|
/**
|
|
234
245
|
* @param codes 接口请求所需要的入参,需要什么数据源就传什么入参
|
|
235
246
|
* @returns FormSchemasLinkBuilder
|
|
236
247
|
*/
|
|
237
248
|
codes(i) {
|
|
238
|
-
return
|
|
249
|
+
return n.codes = [...i], c;
|
|
239
250
|
},
|
|
240
251
|
dataSource(i) {
|
|
241
|
-
return
|
|
252
|
+
return n.options.dataSource = i, c;
|
|
242
253
|
},
|
|
243
254
|
field(i, b) {
|
|
244
255
|
var a;
|
|
245
|
-
return
|
|
246
|
-
...
|
|
256
|
+
return n.options.fieldConfigs = {
|
|
257
|
+
...n.options.fieldConfigs,
|
|
247
258
|
[i]: {
|
|
248
|
-
...((a =
|
|
259
|
+
...((a = n.options.fieldConfigs) == null ? void 0 : a[i]) || {},
|
|
249
260
|
...b
|
|
250
261
|
}
|
|
251
262
|
}, c;
|
|
252
263
|
},
|
|
253
264
|
build() {
|
|
254
|
-
return W(
|
|
265
|
+
return W(n.options, n.codes);
|
|
255
266
|
}
|
|
256
267
|
};
|
|
257
268
|
return c;
|
|
258
269
|
}
|
|
259
270
|
export {
|
|
260
|
-
|
|
271
|
+
po as useFormSchemasLink
|
|
261
272
|
};
|
|
@@ -1,69 +1,83 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
2
|
+
import "axios";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
import "dayjs";
|
|
5
|
+
import "vue";
|
|
6
|
+
import "xe-utils";
|
|
7
|
+
import "dayjs/plugin/utc";
|
|
8
|
+
import "dayjs/plugin/timezone";
|
|
9
|
+
import "../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
10
|
+
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
11
|
+
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
12
|
+
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
13
|
+
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
14
|
+
import "lodash-es";
|
|
15
|
+
import { useElementScreenshot as y } from "../packages/hooks/src/useElementScreenshot.js";
|
|
2
16
|
import { GlobalConfig as g } from "./useSetup.js";
|
|
3
|
-
function O(
|
|
4
|
-
const e =
|
|
17
|
+
function O(r = "png") {
|
|
18
|
+
const e = r === "jpeg" ? "jpg" : "png";
|
|
5
19
|
return `screenshot-${Date.now()}.${e}`;
|
|
6
20
|
}
|
|
7
|
-
function h(
|
|
8
|
-
return new File([
|
|
21
|
+
function h(r, e) {
|
|
22
|
+
return new File([r], e, { type: r.type || "image/png" });
|
|
9
23
|
}
|
|
10
|
-
function d(
|
|
24
|
+
function d(r) {
|
|
11
25
|
return new Promise((e, s) => {
|
|
12
26
|
const n = new FileReader();
|
|
13
|
-
n.onload = () => e(n.result), n.onerror = () => s(n.error ?? new Error("Blob 转 DataURL 失败")), n.readAsDataURL(
|
|
27
|
+
n.onload = () => e(n.result), n.onerror = () => s(n.error ?? new Error("Blob 转 DataURL 失败")), n.readAsDataURL(r);
|
|
14
28
|
});
|
|
15
29
|
}
|
|
16
|
-
async function x(
|
|
17
|
-
const o = `${s || e.dir || "notice"}/${Date.now()}_${
|
|
18
|
-
t.append("key", o), t.append("policy", e.policy), t.append("x-oss-signature-version", e.version), t.append("x-oss-signature", e.signature), t.append("x-oss-credential", e.x_oss_credential), t.append("x-oss-date", e.x_oss_date), t.append("x-oss-security-token", e.security_token), e.callback && t.append("callback", e.callback), t.append("success_action_status", "200"), t.append("file",
|
|
19
|
-
const
|
|
20
|
-
if (!
|
|
21
|
-
throw new Error(`OSS 上传失败: ${
|
|
30
|
+
async function x(r, e, s) {
|
|
31
|
+
const o = `${s || e.dir || "notice"}/${Date.now()}_${r.name}`, t = new FormData();
|
|
32
|
+
t.append("key", o), t.append("policy", e.policy), t.append("x-oss-signature-version", e.version), t.append("x-oss-signature", e.signature), t.append("x-oss-credential", e.x_oss_credential), t.append("x-oss-date", e.x_oss_date), t.append("x-oss-security-token", e.security_token), e.callback && t.append("callback", e.callback), t.append("success_action_status", "200"), t.append("file", r);
|
|
33
|
+
const a = await fetch(e.host, { method: "POST", body: t });
|
|
34
|
+
if (!a.ok && a.status !== 203)
|
|
35
|
+
throw new Error(`OSS 上传失败: ${a.status}`);
|
|
22
36
|
return o;
|
|
23
37
|
}
|
|
24
|
-
function k(
|
|
25
|
-
const e =
|
|
38
|
+
function k(r) {
|
|
39
|
+
const e = r ?? g.uploadOssApi;
|
|
26
40
|
if (!e)
|
|
27
41
|
throw new Error("未配置 uploadOssApi,请先通过 setup({ uploadOssApi }) 或在 options 中传入 uploadOssApi");
|
|
28
42
|
return e;
|
|
29
43
|
}
|
|
30
|
-
async function
|
|
31
|
-
const s = k(e == null ? void 0 : e.uploadOssApi), n = (e == null ? void 0 : e.format) ?? "png", o = (e == null ? void 0 : e.fileName) ?? O(n), t = h(
|
|
32
|
-
return { blob:
|
|
44
|
+
async function p(r, e) {
|
|
45
|
+
const s = k(e == null ? void 0 : e.uploadOssApi), n = (e == null ? void 0 : e.format) ?? "png", o = (e == null ? void 0 : e.fileName) ?? O(n), t = h(r, o), a = await s(t), c = await x(t, a, e == null ? void 0 : e.ossDir);
|
|
46
|
+
return { blob: r, file: t, ossKey: c };
|
|
33
47
|
}
|
|
34
|
-
function
|
|
35
|
-
const
|
|
48
|
+
function D() {
|
|
49
|
+
const r = y();
|
|
36
50
|
async function e(o, t) {
|
|
37
|
-
const
|
|
38
|
-
return
|
|
51
|
+
const a = await r.captureToBlob(o, t);
|
|
52
|
+
return p(a, t);
|
|
39
53
|
}
|
|
40
54
|
async function s(o, t) {
|
|
41
|
-
const
|
|
42
|
-
return { ...
|
|
55
|
+
const a = await r.captureToBlob(o, t), [c, i] = await Promise.all([d(a), p(a, t)]);
|
|
56
|
+
return { ...i, dataUrl: c };
|
|
43
57
|
}
|
|
44
58
|
async function n(o, t) {
|
|
45
|
-
const { ossDir:
|
|
46
|
-
...
|
|
59
|
+
const { ossDir: a, fileName: c, uploadOssApi: i, output: m, ...f } = t, u = await r.captureComponent(o, {
|
|
60
|
+
...f,
|
|
47
61
|
output: "blob"
|
|
48
62
|
}), b = {
|
|
49
63
|
format: t.format,
|
|
50
64
|
quality: t.quality,
|
|
51
|
-
ossDir:
|
|
65
|
+
ossDir: a,
|
|
52
66
|
fileName: c,
|
|
53
|
-
uploadOssApi:
|
|
54
|
-
},
|
|
55
|
-
if (
|
|
56
|
-
return
|
|
57
|
-
const w = await d(
|
|
58
|
-
return { ...
|
|
67
|
+
uploadOssApi: i
|
|
68
|
+
}, l = await p(u, b);
|
|
69
|
+
if (m === "blob")
|
|
70
|
+
return l;
|
|
71
|
+
const w = await d(u);
|
|
72
|
+
return { ...l, dataUrl: w };
|
|
59
73
|
}
|
|
60
74
|
return {
|
|
61
75
|
captureToBlob: e,
|
|
62
76
|
captureToDataUrl: s,
|
|
63
77
|
captureComponent: n,
|
|
64
|
-
isCapturing:
|
|
78
|
+
isCapturing: r.isCapturing
|
|
65
79
|
};
|
|
66
80
|
}
|
|
67
81
|
export {
|
|
68
|
-
|
|
82
|
+
D as useScreenshotOss
|
|
69
83
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function a(r) {
|
|
2
|
+
var n, f, t = "";
|
|
3
|
+
if (typeof r == "string" || typeof r == "number") t += r;
|
|
4
|
+
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
5
|
+
var o = r.length;
|
|
6
|
+
for (n = 0; n < o; n++) r[n] && (f = a(r[n])) && (t && (t += " "), t += f);
|
|
7
|
+
} else for (f in r) r[f] && (t && (t += " "), t += f);
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
function i() {
|
|
11
|
+
for (var r, n, f = 0, t = "", o = arguments.length; f < o; f++) (r = arguments[f]) && (n = a(r)) && (t && (t += " "), t += n);
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
i as clsx,
|
|
16
|
+
i as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { commonjsGlobal as F } from "../../../../../_virtual/_commonjsHelpers.js";
|
|
2
|
+
import { __module as L } from "../../../../../_virtual/aes.js";
|
|
3
|
+
import { __require as Q } from "./core.js";
|
|
4
|
+
import { __require as T } from "./enc-base64.js";
|
|
5
|
+
import { __require as Y } from "./md5.js";
|
|
6
|
+
import { __require as Z } from "./evpkdf.js";
|
|
7
|
+
import { __require as $ } from "./cipher-core.js";
|
|
8
|
+
(function(H, J) {
|
|
9
|
+
(function(d, l, V) {
|
|
10
|
+
H.exports = l(Q(), T(), Y(), Z(), $());
|
|
11
|
+
})(F, function(d) {
|
|
12
|
+
return function() {
|
|
13
|
+
var l = d, V = l.lib, A = V.BlockCipher, I = l.algo, o = [], g = [], z = [], P = [], j = [], k = [], h = [], C = [], q = [], s = [];
|
|
14
|
+
(function() {
|
|
15
|
+
for (var r = [], f = 0; f < 256; f++)
|
|
16
|
+
f < 128 ? r[f] = f << 1 : r[f] = f << 1 ^ 283;
|
|
17
|
+
for (var v = 0, i = 0, f = 0; f < 256; f++) {
|
|
18
|
+
var e = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4;
|
|
19
|
+
e = e >>> 8 ^ e & 255 ^ 99, o[v] = e, g[e] = v;
|
|
20
|
+
var _ = r[v], t = r[_], a = r[t], x = r[e] * 257 ^ e * 16843008;
|
|
21
|
+
z[v] = x << 24 | x >>> 8, P[v] = x << 16 | x >>> 16, j[v] = x << 8 | x >>> 24, k[v] = x;
|
|
22
|
+
var x = a * 16843009 ^ t * 65537 ^ _ * 257 ^ v * 16843008;
|
|
23
|
+
h[e] = x << 24 | x >>> 8, C[e] = x << 16 | x >>> 16, q[e] = x << 8 | x >>> 24, s[e] = x, v ? (v = _ ^ r[r[r[a ^ _]]], i ^= r[r[i]]) : v = i = 1;
|
|
24
|
+
}
|
|
25
|
+
})();
|
|
26
|
+
var W = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], D = I.AES = A.extend({
|
|
27
|
+
_doReset: function() {
|
|
28
|
+
var r;
|
|
29
|
+
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
30
|
+
for (var f = this._keyPriorReset = this._key, v = f.words, i = f.sigBytes / 4, e = this._nRounds = i + 6, _ = (e + 1) * 4, t = this._keySchedule = [], a = 0; a < _; a++)
|
|
31
|
+
a < i ? t[a] = v[a] : (r = t[a - 1], a % i ? i > 6 && a % i == 4 && (r = o[r >>> 24] << 24 | o[r >>> 16 & 255] << 16 | o[r >>> 8 & 255] << 8 | o[r & 255]) : (r = r << 8 | r >>> 24, r = o[r >>> 24] << 24 | o[r >>> 16 & 255] << 16 | o[r >>> 8 & 255] << 8 | o[r & 255], r ^= W[a / i | 0] << 24), t[a] = t[a - i] ^ r);
|
|
32
|
+
for (var x = this._invKeySchedule = [], n = 0; n < _; n++) {
|
|
33
|
+
var a = _ - n;
|
|
34
|
+
if (n % 4)
|
|
35
|
+
var r = t[a];
|
|
36
|
+
else
|
|
37
|
+
var r = t[a - 4];
|
|
38
|
+
n < 4 || a <= 4 ? x[n] = r : x[n] = h[o[r >>> 24]] ^ C[o[r >>> 16 & 255]] ^ q[o[r >>> 8 & 255]] ^ s[o[r & 255]];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
encryptBlock: function(r, f) {
|
|
43
|
+
this._doCryptBlock(r, f, this._keySchedule, z, P, j, k, o);
|
|
44
|
+
},
|
|
45
|
+
decryptBlock: function(r, f) {
|
|
46
|
+
var v = r[f + 1];
|
|
47
|
+
r[f + 1] = r[f + 3], r[f + 3] = v, this._doCryptBlock(r, f, this._invKeySchedule, h, C, q, s, g);
|
|
48
|
+
var v = r[f + 1];
|
|
49
|
+
r[f + 1] = r[f + 3], r[f + 3] = v;
|
|
50
|
+
},
|
|
51
|
+
_doCryptBlock: function(r, f, v, i, e, _, t, a) {
|
|
52
|
+
for (var x = this._nRounds, n = r[f] ^ v[0], u = r[f + 1] ^ v[1], p = r[f + 2] ^ v[2], m = r[f + 3] ^ v[3], c = 4, G = 1; G < x; G++) {
|
|
53
|
+
var y = i[n >>> 24] ^ e[u >>> 16 & 255] ^ _[p >>> 8 & 255] ^ t[m & 255] ^ v[c++], E = i[u >>> 24] ^ e[p >>> 16 & 255] ^ _[m >>> 8 & 255] ^ t[n & 255] ^ v[c++], N = i[p >>> 24] ^ e[m >>> 16 & 255] ^ _[n >>> 8 & 255] ^ t[u & 255] ^ v[c++], b = i[m >>> 24] ^ e[n >>> 16 & 255] ^ _[u >>> 8 & 255] ^ t[p & 255] ^ v[c++];
|
|
54
|
+
n = y, u = E, p = N, m = b;
|
|
55
|
+
}
|
|
56
|
+
var y = (a[n >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[p >>> 8 & 255] << 8 | a[m & 255]) ^ v[c++], E = (a[u >>> 24] << 24 | a[p >>> 16 & 255] << 16 | a[m >>> 8 & 255] << 8 | a[n & 255]) ^ v[c++], N = (a[p >>> 24] << 24 | a[m >>> 16 & 255] << 16 | a[n >>> 8 & 255] << 8 | a[u & 255]) ^ v[c++], b = (a[m >>> 24] << 24 | a[n >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[p & 255]) ^ v[c++];
|
|
57
|
+
r[f] = y, r[f + 1] = E, r[f + 2] = N, r[f + 3] = b;
|
|
58
|
+
},
|
|
59
|
+
keySize: 256 / 32
|
|
60
|
+
});
|
|
61
|
+
l.AES = A._createHelper(D);
|
|
62
|
+
}(), d.AES;
|
|
63
|
+
});
|
|
64
|
+
})(L);
|