@dazhicheng/ui 1.6.41 → 1.6.43
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/assets/svg/download.svg.js +1 -1
- package/dist/components/tt-api-component/index.vue2.js +73 -73
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-button/index.d.ts +91 -105
- package/dist/components/tt-button/index.vue.d.ts +52 -60
- package/dist/components/tt-button/index.vue2.js +1 -1
- package/dist/components/tt-drawer/index.d.ts +352 -326
- package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +196 -184
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +1 -1
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +1 -1
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-empty/index.d.ts +4 -4
- package/dist/components/tt-empty/index.js +1 -1
- package/dist/components/tt-form/index.js +1 -1
- package/dist/components/tt-form/src/components/FormActions.vue2.js +1 -1
- package/dist/components/tt-form/src/components/FormElInput.vue.d.ts +106 -110
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue.js +12 -12
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +164 -164
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +34 -34
- package/dist/components/tt-form/src/form-render/expandable.js +20 -25
- package/dist/components/tt-form/src/form-render/form.vue2.js +1 -1
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +1 -1
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +124 -124
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +99 -99
- package/dist/components/tt-form/src/index.vue.d.ts +8 -12
- package/dist/components/tt-form/src/index.vue2.js +1 -1
- package/dist/components/tt-form-item-error-tooltip/index.d.ts +30 -126
- package/dist/components/tt-form-item-error-tooltip/index.vue.d.ts +15 -63
- package/dist/components/tt-icon/components/AddIcon.vue.js +6 -6
- package/dist/components/tt-icon/components/SubIcon.vue.js +6 -6
- package/dist/components/tt-icon/index.d.ts +4 -4
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-icon/index.vue2.js +28 -28
- package/dist/components/tt-image/index.d.ts +29 -29
- package/dist/components/tt-image/src/components/ImageViewer.d.ts +20 -20
- package/dist/components/tt-image/tt-image.d.ts +29 -29
- package/dist/components/tt-input-textarea/index.vue.d.ts +424 -440
- package/dist/components/tt-input-textarea/index.vue.js +153 -153
- package/dist/components/tt-keep-alive/core/Suspense.d.ts +3 -0
- package/dist/components/tt-keep-alive/core/Suspense.js +10 -0
- package/dist/components/tt-keep-alive/core/apiAsyncComponent.d.ts +2 -0
- package/dist/components/tt-keep-alive/core/apiAsyncComponent.js +6 -0
- package/dist/components/tt-keep-alive/core/component.d.ts +2 -0
- package/dist/components/tt-keep-alive/core/component.js +7 -0
- package/dist/components/tt-keep-alive/core/componentPublicInstance.d.ts +5 -0
- package/dist/components/tt-keep-alive/core/devtools.d.ts +2 -0
- package/dist/components/tt-keep-alive/core/errorHandling.d.ts +17 -0
- package/dist/components/tt-keep-alive/core/errorHandling.js +4 -0
- package/dist/components/tt-keep-alive/core/renderer.d.ts +32 -0
- package/dist/components/tt-keep-alive/core/renderer.js +8 -0
- package/dist/components/tt-keep-alive/core/shapeFlags.d.ts +13 -0
- package/dist/components/tt-keep-alive/core/vnode.d.ts +6 -0
- package/dist/components/tt-keep-alive/core/vnode.js +8 -0
- package/dist/components/tt-keep-alive/index.d.ts +26 -0
- package/dist/components/tt-keep-alive/index.js +139 -0
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/components/tt-loading/src/loading.vue2.js +22 -22
- package/dist/components/tt-log/index.vue.js +1 -1
- package/dist/components/tt-modal/index.d.ts +182 -162
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts +54 -54
- package/dist/components/tt-modal/src/RenderModal.vue.js +236 -228
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +1 -1
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +26 -22
- package/dist/components/tt-modal/src/utils/resolve-modal-target.js +57 -53
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +123 -123
- package/dist/components/tt-panel-select/src/components/PanelLeft.vue.js +24 -24
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +63 -67
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +145 -145
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.d.ts +10 -12
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +48 -48
- package/dist/components/tt-panel-select/src/index.vue.d.ts +63 -67
- package/dist/components/tt-panel-select/src/index.vue.js +137 -137
- package/dist/components/tt-radio-group/index.vue.js +1 -1
- package/dist/components/tt-select/src/Select.vue.d.ts +8 -12
- package/dist/components/tt-select/src/Select.vue.js +1 -1
- package/dist/components/tt-select/src/components/SelectTable.vue.js +1 -1
- package/dist/components/tt-select/src/components/Table.vue.js +1 -1
- package/dist/components/tt-table/index.d.ts +20 -24
- package/dist/components/tt-table/index.js +1 -1
- package/dist/components/tt-table/src/Table.vue.d.ts +40 -48
- package/dist/components/tt-table/src/Table.vue.js +1 -1
- package/dist/components/tt-table/src/TableForm.vue.d.ts +8 -12
- package/dist/components/tt-table/src/TableForm.vue.js +1 -1
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +1 -1
- package/dist/components/tt-table/src/hooks/useSideSlot.d.ts +40 -48
- package/dist/components/tt-text/index.vue2.js +22 -22
- package/dist/components/tt-upload/index.d.ts +60 -60
- package/dist/components/tt-upload/src/TtUpload.vue.d.ts +37 -37
- package/dist/components/tt-upload/src/TtUpload.vue.js +1 -1
- package/dist/components/tt-upload/src/typing.d.ts +17 -17
- package/dist/hooks/useScreenshotOss.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +80 -78
- package/dist/node_modules/.pnpm/@vue_shared@3.5.34/node_modules/@vue/shared/dist/shared.esm-bundler.js +17 -0
- package/dist/packages/hooks/src/propTypes.js +1 -1
- package/dist/plugins/vxeTable/switchStatus.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
- /package/dist/node_modules/.pnpm/{vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_ → vue-types@5.1.3_vue@3.5.34_typescript@5.9.3_}/node_modules/vue-types/shim/index.modern.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Remix Icon by Remix Design - https://github.com/Remix-Design/RemixIcon/blob/master/License --><path fill="#888888" d="M1 14.5a6.5 6.5 0 0 1 3.064-5.519a8.001 8.001 0 0 1 15.872 0a6.5 6.5 0 0 1-2.936 12L7 21c-3.356-.274-6-3.078-6-6.5m15.848 4.487a4.5 4.5 0 0 0 2.03-8.309l-.807-.503l-.12-.942a6.001 6.001 0 0 0-11.903 0l-.12.942l-.805.503a4.5 4.5 0 0 0 2.029 8.309l.173.013h9.35zM13 12h3l-4 5l-4-5h3V8h2z"/></svg
|
|
1
|
+
const e = `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Remix Icon by Remix Design - https://github.com/Remix-Design/RemixIcon/blob/master/License --><path fill="#888888" d="M1 14.5a6.5 6.5 0 0 1 3.064-5.519a8.001 8.001 0 0 1 15.872 0a6.5 6.5 0 0 1-2.936 12L7 21c-3.356-.274-6-3.078-6-6.5m15.848 4.487a4.5 4.5 0 0 0 2.03-8.309l-.807-.503l-.12-.942a6.001 6.001 0 0 0-11.903 0l-.12.942l-.805.503a4.5 4.5 0 0 0 2.029 8.309l.173.013h9.35zM13 12h3l-4 5l-4-5h3V8h2z"/></svg>
|
|
2
2
|
`;
|
|
3
3
|
export {
|
|
4
4
|
e as default
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as H, mergeModels as D, useModel as J, useAttrs as Q, useSlots as W, ref as u, computed as
|
|
1
|
+
import { defineComponent as H, mergeModels as D, useModel as J, useAttrs as Q, useSlots as W, ref as u, computed as h, unref as t, watch as X, createBlock as Y, openBlock as E, resolveDynamicComponent as Z, mergeProps as ee, createSlots as te, renderList as ae, withCtx as w, renderSlot as oe, normalizeProps as le, guardReactiveProps as ne, createElementBlock as ie, createCommentVNode as re, normalizeClass as se, createVNode as $, nextTick as de } from "vue";
|
|
2
2
|
import { ElIcon as ue } from "element-plus";
|
|
3
3
|
import { Loading as fe } from "@element-plus/icons-vue";
|
|
4
|
-
import "../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.
|
|
5
|
-
import { useDesign as
|
|
4
|
+
import "../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.34_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
5
|
+
import { useDesign as ce } from "../../packages/hooks/src/useDesign.js";
|
|
6
6
|
import "axios";
|
|
7
|
-
import { isFunction as
|
|
7
|
+
import { isFunction as y } from "../../packages/utils/src/is.js";
|
|
8
8
|
import "dayjs";
|
|
9
9
|
import "numeral";
|
|
10
10
|
import "xe-utils";
|
|
@@ -15,9 +15,9 @@ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
|
15
15
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
16
16
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
17
17
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
18
|
-
import { isEqual as
|
|
18
|
+
import { isEqual as me, get as b, cloneDeep as x } from "lodash-es";
|
|
19
19
|
import "vue-router";
|
|
20
|
-
import { objectOmit as
|
|
20
|
+
import { objectOmit as L } from "@vueuse/core";
|
|
21
21
|
const $e = /* @__PURE__ */ H({
|
|
22
22
|
name: "ApiComponent",
|
|
23
23
|
inheritAttrs: !1,
|
|
@@ -47,120 +47,120 @@ const $e = /* @__PURE__ */ H({
|
|
|
47
47
|
modelModifiers: {}
|
|
48
48
|
}),
|
|
49
49
|
emits: /* @__PURE__ */ D(["optionsChange", "change"], ["update:modelValue"]),
|
|
50
|
-
setup(
|
|
51
|
-
const { prefixCls: T } =
|
|
50
|
+
setup(f, { expose: z, emit: M }) {
|
|
51
|
+
const { prefixCls: T } = ce("api-component"), a = f, C = M, c = J(f, "modelValue"), j = Q(), q = W(), k = u({}), v = u([]), m = u(!1), F = u(!1), S = u(!1), o = h(() => {
|
|
52
52
|
var O;
|
|
53
|
-
const { labelField: e, valueField: n, disabledField: i, childrenField: l, numberToString: r } =
|
|
54
|
-
function
|
|
55
|
-
return
|
|
56
|
-
const R =
|
|
53
|
+
const { labelField: e, valueField: n, disabledField: i, childrenField: l, numberToString: r } = a, s = t(v);
|
|
54
|
+
function P(g) {
|
|
55
|
+
return g.map((d) => {
|
|
56
|
+
const R = b(d, n);
|
|
57
57
|
return {
|
|
58
|
-
...
|
|
59
|
-
label:
|
|
58
|
+
...L(d, [e, n, i, l].filter(Boolean)),
|
|
59
|
+
label: b(d, e),
|
|
60
60
|
value: r ? `${R}` : R,
|
|
61
|
-
disabled:
|
|
62
|
-
...l && d[l] ? { children:
|
|
61
|
+
disabled: b(d, i),
|
|
62
|
+
...l && d[l] ? { children: P(d[l]) } : {}
|
|
63
63
|
};
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
const N =
|
|
66
|
+
const N = P(s), G = (O = a.options) != null && O.every((g) => Reflect.has(g, "value") && Reflect.has(g, "label")) ? a.options : P(a.options);
|
|
67
67
|
return N.length > 0 ? N : G;
|
|
68
|
-
}),
|
|
69
|
-
[
|
|
70
|
-
[
|
|
71
|
-
[`onUpdate:${
|
|
72
|
-
|
|
68
|
+
}), U = h(() => ({
|
|
69
|
+
[a.modelPropName]: t(c),
|
|
70
|
+
[a.optionsPropName]: t(o),
|
|
71
|
+
[`onUpdate:${a.modelPropName}`]: (e) => {
|
|
72
|
+
c.value = e;
|
|
73
73
|
},
|
|
74
|
-
...
|
|
75
|
-
...
|
|
76
|
-
[
|
|
74
|
+
...L(j, [`onUpdate:${a.modelPropName}`]),
|
|
75
|
+
...a.visibleEvent ? {
|
|
76
|
+
[a.visibleEvent]: I
|
|
77
77
|
} : {},
|
|
78
78
|
/**
|
|
79
79
|
* Element Plus 的 ElSelect / ElSelectV2 等:`loading` 插槽仅在 `props.loading === true` 时才会渲染,
|
|
80
80
|
* 需与内部请求态同步,否则插槽内容永远不会显示。
|
|
81
81
|
*/
|
|
82
|
-
...
|
|
82
|
+
...a.loadingSlot ? { loading: t(m) } : {}
|
|
83
83
|
}));
|
|
84
|
-
async function
|
|
85
|
-
const { api: e, beforeFetch: n, afterFetch: i, resultField: l } =
|
|
86
|
-
if (!(!e || !
|
|
87
|
-
if (
|
|
88
|
-
|
|
84
|
+
async function p() {
|
|
85
|
+
const { api: e, beforeFetch: n, afterFetch: i, resultField: l } = a;
|
|
86
|
+
if (!(!e || !y(e))) {
|
|
87
|
+
if (m.value) {
|
|
88
|
+
S.value = !0;
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
v.value = [];
|
|
92
92
|
try {
|
|
93
|
-
|
|
93
|
+
m.value = !0;
|
|
94
94
|
let r = t(V);
|
|
95
|
-
n &&
|
|
95
|
+
n && y(n) && (r = await n(x(r)) || r);
|
|
96
96
|
let s = await e(r);
|
|
97
|
-
if (i &&
|
|
98
|
-
|
|
97
|
+
if (i && y(i) && (s = await i(s) || s), F.value = !0, Array.isArray(s)) {
|
|
98
|
+
v.value = s, A();
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
|
-
l && (
|
|
101
|
+
l && (v.value = b(s, l) || []), A();
|
|
102
102
|
} catch {
|
|
103
|
-
|
|
103
|
+
F.value = !1;
|
|
104
104
|
} finally {
|
|
105
|
-
|
|
105
|
+
m.value = !1, S.value && (S.value = !1, await de(), p());
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
async function
|
|
110
|
-
e && (
|
|
109
|
+
async function I(e) {
|
|
110
|
+
e && (a.alwaysLoad ? await p() : !a.immediate && !t(F) && await p());
|
|
111
111
|
}
|
|
112
|
-
const V =
|
|
113
|
-
...
|
|
112
|
+
const V = h(() => ({
|
|
113
|
+
...a.params,
|
|
114
114
|
...t(k)
|
|
115
115
|
}));
|
|
116
116
|
X(
|
|
117
117
|
V,
|
|
118
118
|
(e, n) => {
|
|
119
|
-
|
|
119
|
+
me(e, n) || p();
|
|
120
120
|
},
|
|
121
|
-
{ deep: !0, immediate:
|
|
121
|
+
{ deep: !0, immediate: a.immediate }
|
|
122
122
|
);
|
|
123
123
|
function A() {
|
|
124
|
-
if (
|
|
124
|
+
if (c.value === void 0 && a.autoSelect && t(o).length > 0) {
|
|
125
125
|
let e;
|
|
126
|
-
if (
|
|
127
|
-
e =
|
|
126
|
+
if (y(a.autoSelect))
|
|
127
|
+
e = a.autoSelect(t(o));
|
|
128
128
|
else
|
|
129
|
-
switch (
|
|
129
|
+
switch (a.autoSelect) {
|
|
130
130
|
case "first": {
|
|
131
|
-
e = t(
|
|
131
|
+
e = t(o)[0];
|
|
132
132
|
break;
|
|
133
133
|
}
|
|
134
134
|
case "last": {
|
|
135
|
-
e = t(
|
|
135
|
+
e = t(o)[t(o).length - 1];
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
138
|
case "one": {
|
|
139
|
-
t(
|
|
139
|
+
t(o).length === 1 && (e = t(o)[0]);
|
|
140
140
|
break;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
e && (
|
|
143
|
+
e && (c.value = e.value);
|
|
144
144
|
}
|
|
145
|
-
C("optionsChange", t(
|
|
145
|
+
C("optionsChange", t(o));
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function K(e) {
|
|
148
148
|
var n, i;
|
|
149
149
|
C(
|
|
150
150
|
"change",
|
|
151
151
|
e,
|
|
152
|
-
|
|
153
|
-
Array.isArray(e) ? (n = t(
|
|
152
|
+
x(t(o)),
|
|
153
|
+
Array.isArray(e) ? (n = t(o)) == null ? void 0 : n.filter((l) => e.some((r) => r === l.value)) : (i = t(o)) == null ? void 0 : i.find((l) => l.value === e)
|
|
154
154
|
);
|
|
155
155
|
}
|
|
156
|
-
const B = u(null),
|
|
157
|
-
() => Object.keys(q).filter((e) => e !==
|
|
156
|
+
const B = u(null), _ = h(
|
|
157
|
+
() => Object.keys(q).filter((e) => e !== a.loadingSlot)
|
|
158
158
|
);
|
|
159
159
|
return z({
|
|
160
160
|
/** 获取options数据 */
|
|
161
|
-
getOptions: () => t(
|
|
161
|
+
getOptions: () => t(o),
|
|
162
162
|
/** 获取当前值 */
|
|
163
|
-
getValue: () => t(
|
|
163
|
+
getValue: () => t(c),
|
|
164
164
|
/**
|
|
165
165
|
* 获取被包装组件的实例
|
|
166
166
|
*/
|
|
@@ -170,24 +170,24 @@ const $e = /* @__PURE__ */ H({
|
|
|
170
170
|
k.value = e;
|
|
171
171
|
},
|
|
172
172
|
/** 手动请求数据 */
|
|
173
|
-
reload:
|
|
174
|
-
}), (e, n) => (E(), Y(Z(
|
|
173
|
+
reload: p
|
|
174
|
+
}), (e, n) => (E(), Y(Z(f.component), ee({
|
|
175
175
|
ref_key: "componentRef",
|
|
176
176
|
ref: B
|
|
177
|
-
},
|
|
177
|
+
}, U.value, {
|
|
178
178
|
placeholder: e.$attrs.placeholder,
|
|
179
|
-
onChange:
|
|
179
|
+
onChange: K
|
|
180
180
|
}), te({ _: 2 }, [
|
|
181
|
-
|
|
181
|
+
ae(_.value, (i) => ({
|
|
182
182
|
name: i,
|
|
183
|
-
fn:
|
|
184
|
-
|
|
183
|
+
fn: w((l) => [
|
|
184
|
+
oe(e.$slots, i, le(ne(l || {})), void 0, !0)
|
|
185
185
|
])
|
|
186
186
|
})),
|
|
187
|
-
|
|
188
|
-
name:
|
|
189
|
-
fn:
|
|
190
|
-
|
|
187
|
+
f.loadingSlot ? {
|
|
188
|
+
name: f.loadingSlot,
|
|
189
|
+
fn: w(() => [
|
|
190
|
+
m.value ? (E(), ie("div", {
|
|
191
191
|
key: 0,
|
|
192
192
|
class: se(`${t(T)}__dropdown-loading`)
|
|
193
193
|
}, [
|
|
@@ -195,7 +195,7 @@ const $e = /* @__PURE__ */ H({
|
|
|
195
195
|
class: "is-loading",
|
|
196
196
|
size: 20
|
|
197
197
|
}, {
|
|
198
|
-
default:
|
|
198
|
+
default: w(() => [
|
|
199
199
|
$(t(fe))
|
|
200
200
|
]),
|
|
201
201
|
_: 1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TtArea.vue3.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-116cb5cb"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|