@dazhicheng/ui 1.6.40 → 1.6.42
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 +18 -18
- 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-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 +244 -263
- 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/modal-z-index.d.ts +0 -7
- package/dist/components/tt-modal/src/utils/modal-z-index.js +14 -16
- package/dist/components/tt-modal/src/utils/resolve-modal-target.d.ts +0 -13
- package/dist/components/tt-modal/src/utils/resolve-modal-target.js +75 -104
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +181 -208
- 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/packages/hooks/src/propTypes.js +1 -1
- package/dist/plugins/vxeTable/switchStatus.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
- /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,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as se, useTemplateRef as
|
|
1
|
+
import { defineComponent as se, useTemplateRef as z, ref as m, computed as h, watch as I, nextTick as K, createElementBlock as f, openBlock as s, normalizeClass as n, createElementVNode as k, createCommentVNode as O, createVNode as p, createBlock as M, unref as i, withCtx as d, createTextVNode as b, normalizeStyle as P, Fragment as H, renderList as V, toDisplayString as E } from "vue";
|
|
2
2
|
import { TtButton as ne } from "../../../tt-button/index.js";
|
|
3
|
-
import { TtText as
|
|
3
|
+
import { TtText as S } from "../../../tt-text/index.js";
|
|
4
4
|
import { Search as ie } from "@element-plus/icons-vue";
|
|
5
5
|
import { useResizeObserver as ue } from "@vueuse/core";
|
|
6
|
-
import { ElInput as de, ElIcon as
|
|
7
|
-
import { DEFAULT_PANEL_SELECT_SEPARATORS as
|
|
8
|
-
const he = ["data-virtual-index", "data-flash-seed"],
|
|
6
|
+
import { ElInput as de, ElIcon as ce, ElCheckbox as F, ElScrollbar as fe } from "element-plus";
|
|
7
|
+
import { DEFAULT_PANEL_SELECT_SEPARATORS as pe, splitPanelSelectText as ve } from "../common.js";
|
|
8
|
+
const he = ["data-virtual-index", "data-flash-seed"], Y = 2, be = /* @__PURE__ */ se({
|
|
9
9
|
name: "PanelMiddle",
|
|
10
10
|
__name: "PanelMiddle",
|
|
11
11
|
props: {
|
|
@@ -24,163 +24,163 @@ const he = ["data-virtual-index", "data-flash-seed"], K = 2, _e = /* @__PURE__ *
|
|
|
24
24
|
groupIndeterminateMap: {},
|
|
25
25
|
scrollToGroupValue: { default: void 0 },
|
|
26
26
|
pasteSearch: { type: Boolean, default: !1 },
|
|
27
|
-
separator: { default: () => [...
|
|
27
|
+
separator: { default: () => [...pe] },
|
|
28
28
|
showAll: { type: Boolean },
|
|
29
29
|
middlePlaceholder: {}
|
|
30
30
|
},
|
|
31
31
|
emits: ["update:keyword", "checkAll", "allCheck", "groupCheck", "optionCheck", "optionsCheck"],
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
34
|
-
let
|
|
35
|
-
const
|
|
32
|
+
setup(l, { expose: W, emit: j }) {
|
|
33
|
+
const t = l, v = j, g = z("scrollbarRef"), T = z("searchInputRef"), J = m(), $ = m(0), D = m(0), w = m(""), x = m(), G = m(0), R = m(!1);
|
|
34
|
+
let A;
|
|
35
|
+
const Q = h(() => t.rows.length * t.rowHeight), X = h(() => Math.max(1, Math.ceil(D.value / t.rowHeight))), y = h(() => Math.max(0, Math.floor($.value / t.rowHeight) - Y)), Z = h(() => Math.min(t.rows.length, y.value + X.value + Y * 2)), _ = h(() => y.value * t.rowHeight), ee = h(() => t.rows.slice(y.value, Z.value)), le = h(() => {
|
|
36
36
|
var e;
|
|
37
|
-
return ((e =
|
|
38
|
-
}),
|
|
39
|
-
() =>
|
|
37
|
+
return ((e = t.rows[0]) == null ? void 0 : e.type) === "group";
|
|
38
|
+
}), te = h(
|
|
39
|
+
() => t.rows.filter((e) => e.type === "options").flatMap((e) => e.options).filter((e) => !e.disabled)
|
|
40
40
|
);
|
|
41
|
-
|
|
42
|
-
() =>
|
|
41
|
+
I(
|
|
42
|
+
() => t.keyword,
|
|
43
43
|
(e) => {
|
|
44
|
-
|
|
44
|
+
w.value = e;
|
|
45
45
|
},
|
|
46
46
|
{ immediate: !0 }
|
|
47
47
|
);
|
|
48
|
-
function
|
|
48
|
+
function B() {
|
|
49
49
|
var a;
|
|
50
|
-
const e = (a =
|
|
51
|
-
e && (
|
|
50
|
+
const e = (a = g.value) == null ? void 0 : a.wrapRef;
|
|
51
|
+
e && (J.value = e, D.value = e.clientHeight, $.value = e.scrollTop);
|
|
52
52
|
}
|
|
53
53
|
ue(
|
|
54
54
|
() => {
|
|
55
55
|
var e;
|
|
56
|
-
return (e =
|
|
56
|
+
return (e = g.value) == null ? void 0 : e.wrapRef;
|
|
57
57
|
},
|
|
58
|
-
() =>
|
|
58
|
+
() => B()
|
|
59
59
|
);
|
|
60
|
-
function
|
|
60
|
+
function L() {
|
|
61
61
|
var a;
|
|
62
|
-
const e = (a =
|
|
63
|
-
e && (
|
|
62
|
+
const e = (a = g.value) == null ? void 0 : a.wrapRef;
|
|
63
|
+
e && ($.value = e.scrollTop);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
function ae(e) {
|
|
66
|
+
x.value = void 0, G.value += 1, requestAnimationFrame(() => {
|
|
67
|
+
x.value = e, A && clearTimeout(A), A = setTimeout(() => {
|
|
68
|
+
x.value = void 0;
|
|
69
69
|
}, 1400);
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
async function
|
|
73
|
-
var
|
|
74
|
-
await
|
|
75
|
-
const a =
|
|
72
|
+
async function N(e) {
|
|
73
|
+
var c;
|
|
74
|
+
await K(), B();
|
|
75
|
+
const a = t.rows.findIndex((r) => r.type === "group" && r.group.value === e);
|
|
76
76
|
if (a < 0) return;
|
|
77
|
-
const o = a *
|
|
78
|
-
(
|
|
79
|
-
|
|
77
|
+
const o = a * t.rowHeight;
|
|
78
|
+
(c = g.value) == null || c.setScrollTop(o), requestAnimationFrame(() => {
|
|
79
|
+
L(), ae(e);
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
var
|
|
84
|
-
if (
|
|
82
|
+
function oe(e) {
|
|
83
|
+
var q;
|
|
84
|
+
if (t.disabled)
|
|
85
85
|
return;
|
|
86
86
|
e.preventDefault();
|
|
87
|
-
const a = ((
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
const a = ((q = e.clipboardData) == null ? void 0 : q.getData("text")) || "";
|
|
88
|
+
w.value = a.trim(), t.pasteSearch ? v("update:keyword", w.value) : (R.value = !0, requestAnimationFrame(() => {
|
|
89
|
+
R.value = !1;
|
|
90
90
|
}));
|
|
91
|
-
const o = ve(a,
|
|
91
|
+
const o = ve(a, t.separator), c = () => {
|
|
92
92
|
requestAnimationFrame(() => {
|
|
93
|
-
var
|
|
94
|
-
const
|
|
95
|
-
|
|
93
|
+
var U;
|
|
94
|
+
const u = (U = T.value) == null ? void 0 : U.input;
|
|
95
|
+
u == null || u.focus(), u == null || u.select();
|
|
96
96
|
});
|
|
97
97
|
};
|
|
98
98
|
if (!o.length) {
|
|
99
|
-
|
|
99
|
+
c();
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
|
-
const
|
|
103
|
-
if (!
|
|
104
|
-
|
|
102
|
+
const r = new Set(o), C = te.value.filter((u) => r.has(u.label) || r.has(String(u.value))).map((u) => u.value);
|
|
103
|
+
if (!C.length) {
|
|
104
|
+
c();
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
|
-
if (
|
|
108
|
-
|
|
107
|
+
if (t.multiple) {
|
|
108
|
+
v("optionsCheck", C, !0), c();
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
v("optionCheck", C.at(-1), !0), c();
|
|
112
112
|
}
|
|
113
113
|
function re(e) {
|
|
114
|
-
|
|
114
|
+
w.value = e, !R.value && v("update:keyword", e);
|
|
115
115
|
}
|
|
116
|
-
return
|
|
117
|
-
() =>
|
|
116
|
+
return I(
|
|
117
|
+
() => t.scrollToGroupValue,
|
|
118
118
|
async (e) => {
|
|
119
|
-
e !== void 0 && await
|
|
119
|
+
e !== void 0 && await N(e);
|
|
120
120
|
},
|
|
121
121
|
{ flush: "post" }
|
|
122
|
-
),
|
|
123
|
-
() =>
|
|
122
|
+
), I(
|
|
123
|
+
() => t.rows.length,
|
|
124
124
|
async () => {
|
|
125
|
-
await
|
|
125
|
+
await K(), B();
|
|
126
126
|
},
|
|
127
127
|
{ immediate: !0 }
|
|
128
|
-
),
|
|
129
|
-
scrollToGroup:
|
|
128
|
+
), W({
|
|
129
|
+
scrollToGroup: N,
|
|
130
130
|
inputFocus: () => {
|
|
131
131
|
var e, a;
|
|
132
|
-
(a = (e =
|
|
132
|
+
(a = (e = T.value) == null ? void 0 : e.focus) == null || a.call(e);
|
|
133
133
|
}
|
|
134
|
-
}), (e, a) => (
|
|
135
|
-
class:
|
|
134
|
+
}), (e, a) => (s(), f("div", {
|
|
135
|
+
class: n(`${l.prefixCls}__list`)
|
|
136
136
|
}, [
|
|
137
|
-
|
|
138
|
-
class:
|
|
137
|
+
k("div", {
|
|
138
|
+
class: n(`${l.prefixCls}__toolbar`)
|
|
139
139
|
}, [
|
|
140
|
-
|
|
140
|
+
p(i(de), {
|
|
141
141
|
ref_key: "searchInputRef",
|
|
142
|
-
ref:
|
|
143
|
-
"model-value":
|
|
144
|
-
class:
|
|
145
|
-
placeholder:
|
|
142
|
+
ref: T,
|
|
143
|
+
"model-value": w.value,
|
|
144
|
+
class: n(`${l.prefixCls}__search`),
|
|
145
|
+
placeholder: t.middlePlaceholder,
|
|
146
146
|
clearable: "",
|
|
147
147
|
"onUpdate:modelValue": re,
|
|
148
|
-
onPaste:
|
|
148
|
+
onPaste: oe
|
|
149
149
|
}, {
|
|
150
|
-
prefix:
|
|
151
|
-
|
|
152
|
-
default:
|
|
153
|
-
|
|
150
|
+
prefix: d(() => [
|
|
151
|
+
p(i(ce), null, {
|
|
152
|
+
default: d(() => [
|
|
153
|
+
p(i(ie))
|
|
154
154
|
]),
|
|
155
155
|
_: 1
|
|
156
156
|
})
|
|
157
157
|
]),
|
|
158
158
|
_: 1
|
|
159
159
|
}, 8, ["model-value", "class", "placeholder"]),
|
|
160
|
-
|
|
160
|
+
l.multiple ? (s(), M(i(ne), {
|
|
161
161
|
key: 0,
|
|
162
|
-
disabled:
|
|
162
|
+
disabled: l.disabled,
|
|
163
163
|
plain: "",
|
|
164
|
-
onClick: a[0] || (a[0] = () =>
|
|
164
|
+
onClick: a[0] || (a[0] = () => v("checkAll", !0))
|
|
165
165
|
}, {
|
|
166
|
-
default:
|
|
167
|
-
|
|
166
|
+
default: d(() => [...a[2] || (a[2] = [
|
|
167
|
+
k("span", null, "全选", -1)
|
|
168
168
|
])]),
|
|
169
169
|
_: 1
|
|
170
|
-
}, 8, ["disabled"])) :
|
|
170
|
+
}, 8, ["disabled"])) : O("", !0)
|
|
171
171
|
], 2),
|
|
172
|
-
|
|
172
|
+
t.showAll ? (s(), f("div", {
|
|
173
173
|
key: 0,
|
|
174
|
-
class:
|
|
174
|
+
class: n([`${l.prefixCls}__panel-head`, le.value ? "is-standalone" : ""])
|
|
175
175
|
}, [
|
|
176
|
-
|
|
177
|
-
disabled:
|
|
178
|
-
"model-value":
|
|
179
|
-
onChange: a[1] || (a[1] = (o) =>
|
|
176
|
+
p(i(F), {
|
|
177
|
+
disabled: l.disabled,
|
|
178
|
+
"model-value": t.allChecked,
|
|
179
|
+
onChange: a[1] || (a[1] = (o) => v("allCheck", !!o))
|
|
180
180
|
}, {
|
|
181
|
-
default:
|
|
182
|
-
|
|
183
|
-
default:
|
|
181
|
+
default: d(() => [
|
|
182
|
+
p(i(S), null, {
|
|
183
|
+
default: d(() => [...a[3] || (a[3] = [
|
|
184
184
|
b("全部", -1)
|
|
185
185
|
])]),
|
|
186
186
|
_: 1
|
|
@@ -188,81 +188,81 @@ const he = ["data-virtual-index", "data-flash-seed"], K = 2, _e = /* @__PURE__ *
|
|
|
188
188
|
]),
|
|
189
189
|
_: 1
|
|
190
190
|
}, 8, ["disabled", "model-value"])
|
|
191
|
-
], 2)) :
|
|
192
|
-
|
|
193
|
-
class:
|
|
191
|
+
], 2)) : O("", !0),
|
|
192
|
+
k("div", {
|
|
193
|
+
class: n(`${l.prefixCls}__checkbox-group`)
|
|
194
194
|
}, [
|
|
195
|
-
|
|
195
|
+
p(i(fe), {
|
|
196
196
|
ref_key: "scrollbarRef",
|
|
197
|
-
ref:
|
|
198
|
-
class:
|
|
199
|
-
onScroll:
|
|
197
|
+
ref: g,
|
|
198
|
+
class: n(`${l.prefixCls}__middle-scrollbar`),
|
|
199
|
+
onScroll: L
|
|
200
200
|
}, {
|
|
201
|
-
default:
|
|
202
|
-
|
|
203
|
-
class:
|
|
204
|
-
style:
|
|
201
|
+
default: d(() => [
|
|
202
|
+
k("div", {
|
|
203
|
+
class: n(`${l.prefixCls}__middle-virtual-host`),
|
|
204
|
+
style: P({ height: `${Q.value}px` })
|
|
205
205
|
}, [
|
|
206
|
-
|
|
207
|
-
style:
|
|
206
|
+
k("div", {
|
|
207
|
+
style: P({ transform: `translateY(${_.value}px)` })
|
|
208
208
|
}, [
|
|
209
|
-
(
|
|
209
|
+
(s(!0), f(H, null, V(ee.value, (o, c) => (s(), f("div", {
|
|
210
210
|
key: o.key,
|
|
211
|
-
style:
|
|
212
|
-
class:
|
|
213
|
-
`${
|
|
214
|
-
o.type === "group" ? `${
|
|
211
|
+
style: P({ height: `${l.rowHeight}px` }),
|
|
212
|
+
class: n([
|
|
213
|
+
`${l.prefixCls}__middle-row`,
|
|
214
|
+
o.type === "group" ? `${l.prefixCls}__middle-group` : `${l.prefixCls}__middle-options`,
|
|
215
215
|
o.type === "options" && o.isLast ? "is-last" : "",
|
|
216
|
-
o.type === "options" &&
|
|
217
|
-
|
|
216
|
+
o.type === "options" && y.value + c === 0 && !t.showAll ? "is-first" : "",
|
|
217
|
+
x.value === o.group.value ? `${l.prefixCls}__group-flash` : ""
|
|
218
218
|
]),
|
|
219
|
-
"data-virtual-index":
|
|
220
|
-
"data-flash-seed":
|
|
219
|
+
"data-virtual-index": y.value + c,
|
|
220
|
+
"data-flash-seed": G.value
|
|
221
221
|
}, [
|
|
222
|
-
o.type === "group" ? (
|
|
222
|
+
o.type === "group" ? (s(), f("div", {
|
|
223
223
|
key: 0,
|
|
224
|
-
class:
|
|
224
|
+
class: n(`${l.prefixCls}__panel-head`)
|
|
225
225
|
}, [
|
|
226
|
-
|
|
226
|
+
t.multiple ? (s(), M(i(F), {
|
|
227
227
|
key: 0,
|
|
228
|
-
"model-value":
|
|
229
|
-
indeterminate:
|
|
230
|
-
disabled:
|
|
231
|
-
onChange: (
|
|
228
|
+
"model-value": l.groupCheckedMap[String(o.group.value)],
|
|
229
|
+
indeterminate: l.groupIndeterminateMap[String(o.group.value)],
|
|
230
|
+
disabled: l.disabled,
|
|
231
|
+
onChange: (r) => v("groupCheck", o.group.value, !!r)
|
|
232
232
|
}, {
|
|
233
|
-
default:
|
|
234
|
-
|
|
235
|
-
default:
|
|
236
|
-
b(
|
|
233
|
+
default: d(() => [
|
|
234
|
+
p(i(S), null, {
|
|
235
|
+
default: d(() => [
|
|
236
|
+
b(E(o.group.label), 1)
|
|
237
237
|
]),
|
|
238
238
|
_: 2
|
|
239
239
|
}, 1024)
|
|
240
240
|
]),
|
|
241
241
|
_: 2
|
|
242
|
-
}, 1032, ["model-value", "indeterminate", "disabled", "onChange"])) : (
|
|
243
|
-
default:
|
|
244
|
-
b(
|
|
242
|
+
}, 1032, ["model-value", "indeterminate", "disabled", "onChange"])) : (s(), M(i(S), { key: 1 }, {
|
|
243
|
+
default: d(() => [
|
|
244
|
+
b(E(o.group.label), 1)
|
|
245
245
|
]),
|
|
246
246
|
_: 2
|
|
247
247
|
}, 1024))
|
|
248
|
-
], 2)) : (
|
|
248
|
+
], 2)) : (s(), f("div", {
|
|
249
249
|
key: 1,
|
|
250
|
-
class:
|
|
250
|
+
class: n(`${l.prefixCls}__option-row`)
|
|
251
251
|
}, [
|
|
252
|
-
(
|
|
253
|
-
key:
|
|
254
|
-
class:
|
|
252
|
+
(s(!0), f(H, null, V(o.options, (r) => (s(), f("div", {
|
|
253
|
+
key: r.value,
|
|
254
|
+
class: n(`${l.prefixCls}__option-cell`)
|
|
255
255
|
}, [
|
|
256
|
-
|
|
257
|
-
"model-value":
|
|
258
|
-
disabled:
|
|
259
|
-
class:
|
|
260
|
-
onChange: (
|
|
256
|
+
p(i(F), {
|
|
257
|
+
"model-value": t.selectedValueSet.has(r.value),
|
|
258
|
+
disabled: l.disabled || r.disabled,
|
|
259
|
+
class: n(`${l.prefixCls}__option`),
|
|
260
|
+
onChange: (C) => v("optionCheck", r.value, !!C)
|
|
261
261
|
}, {
|
|
262
|
-
default:
|
|
263
|
-
|
|
264
|
-
default:
|
|
265
|
-
b(
|
|
262
|
+
default: d(() => [
|
|
263
|
+
p(i(S), { "tool-tip-line": 2 }, {
|
|
264
|
+
default: d(() => [
|
|
265
|
+
b(E(r.label), 1)
|
|
266
266
|
]),
|
|
267
267
|
_: 2
|
|
268
268
|
}, 1024)
|
|
@@ -270,9 +270,9 @@ const he = ["data-virtual-index", "data-flash-seed"], K = 2, _e = /* @__PURE__ *
|
|
|
270
270
|
_: 2
|
|
271
271
|
}, 1032, ["model-value", "disabled", "class", "onChange"])
|
|
272
272
|
], 2))), 128)),
|
|
273
|
-
(
|
|
274
|
-
key: `empty-${o.key}-${
|
|
275
|
-
class:
|
|
273
|
+
(s(!0), f(H, null, V(l.optionPerRow - o.options.length, (r) => (s(), f("div", {
|
|
274
|
+
key: `empty-${o.key}-${r}`,
|
|
275
|
+
class: n(`${l.prefixCls}__option-cell`)
|
|
276
276
|
}, null, 2))), 128))
|
|
277
277
|
], 2))
|
|
278
278
|
], 14, he))), 128))
|
|
@@ -286,5 +286,5 @@ const he = ["data-virtual-index", "data-flash-seed"], K = 2, _e = /* @__PURE__ *
|
|
|
286
286
|
}
|
|
287
287
|
});
|
|
288
288
|
export {
|
|
289
|
-
|
|
289
|
+
be as default
|
|
290
290
|
};
|
|
@@ -23,8 +23,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
23
23
|
readonly maxHeight?: number | string | undefined;
|
|
24
24
|
readonly native?: boolean | undefined;
|
|
25
25
|
readonly wrapStyle?: import('vue').StyleValue;
|
|
26
|
-
readonly wrapClass?:
|
|
27
|
-
readonly viewClass?:
|
|
26
|
+
readonly wrapClass?: import('element-plus/es/utils/typescript.mjs').ClassValue;
|
|
27
|
+
readonly viewClass?: import('element-plus/es/utils/typescript.mjs').ClassValue;
|
|
28
28
|
readonly viewStyle?: import('vue').StyleValue;
|
|
29
29
|
readonly noresize?: boolean | undefined;
|
|
30
30
|
readonly tag?: (keyof HTMLElementTagNameMap | (string & {})) | undefined;
|
|
@@ -41,9 +41,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
41
41
|
}) => any) | undefined | undefined;
|
|
42
42
|
readonly "onEnd-reached"?: ((direction: import('element-plus').ScrollbarDirection) => any) | undefined | undefined;
|
|
43
43
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
44
|
-
$attrs:
|
|
45
|
-
[x: string]: unknown;
|
|
46
|
-
};
|
|
44
|
+
$attrs: import('vue').Attrs;
|
|
47
45
|
$refs: {
|
|
48
46
|
[x: string]: unknown;
|
|
49
47
|
};
|
|
@@ -87,8 +85,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
87
85
|
tag: keyof HTMLElementTagNameMap | (string & {});
|
|
88
86
|
distance: number;
|
|
89
87
|
wrapStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
90
|
-
wrapClass: string | string[];
|
|
91
|
-
viewClass: string | string[];
|
|
88
|
+
wrapClass: string | false | Record<string, any> | import('element-plus/es/utils/typescript.mjs').ClassValue[] | null;
|
|
89
|
+
viewClass: string | false | Record<string, any> | import('element-plus/es/utils/typescript.mjs').ClassValue[] | null;
|
|
92
90
|
viewStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
93
91
|
minSize: number;
|
|
94
92
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
@@ -118,8 +116,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
118
116
|
tag: keyof HTMLElementTagNameMap | (string & {});
|
|
119
117
|
distance: number;
|
|
120
118
|
wrapStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
121
|
-
wrapClass: string | string[];
|
|
122
|
-
viewClass: string | string[];
|
|
119
|
+
wrapClass: string | false | Record<string, any> | import('element-plus/es/utils/typescript.mjs').ClassValue[] | null;
|
|
120
|
+
viewClass: string | false | Record<string, any> | import('element-plus/es/utils/typescript.mjs').ClassValue[] | null;
|
|
123
121
|
viewStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
124
122
|
minSize: number;
|
|
125
123
|
}> & Omit<Readonly<import('element-plus').ScrollbarProps> & Readonly<{
|
|
@@ -128,8 +126,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
128
126
|
scrollLeft: number;
|
|
129
127
|
}) => any) | undefined;
|
|
130
128
|
"onEnd-reached"?: ((direction: import('element-plus').ScrollbarDirection) => any) | undefined;
|
|
131
|
-
}>, "height" | "tabindex" | "tag" | "handleScroll" | "maxHeight" | "scrollTo" | "update" | "distance" | "wrapStyle" | "wrapClass" | "viewClass" | "viewStyle" | "minSize" | "wrapRef" | "setScrollTop" | "setScrollLeft"> &
|
|
132
|
-
wrapRef:
|
|
129
|
+
}>, "height" | "tabindex" | "tag" | "handleScroll" | "maxHeight" | "scrollTo" | "update" | "distance" | "wrapStyle" | "wrapClass" | "viewClass" | "viewStyle" | "minSize" | "wrapRef" | "setScrollTop" | "setScrollLeft"> & {
|
|
130
|
+
wrapRef: HTMLDivElement | undefined;
|
|
133
131
|
update: () => void;
|
|
134
132
|
scrollTo: {
|
|
135
133
|
(xCord: number, yCord?: number): void;
|
|
@@ -138,7 +136,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
138
136
|
setScrollTop: (value: number) => void;
|
|
139
137
|
setScrollLeft: (value: number) => void;
|
|
140
138
|
handleScroll: () => void;
|
|
141
|
-
}
|
|
139
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
142
140
|
$slots: {
|
|
143
141
|
default?: (props: {}) => any;
|
|
144
142
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { TtButton as
|
|
4
|
-
import { TtIcon as
|
|
1
|
+
import { defineComponent as V, ref as p, computed as o, watch as H, nextTick as N, createElementBlock as d, openBlock as m, normalizeClass as n, createElementVNode as x, createVNode as i, unref as s, withCtx as h, createTextVNode as y, normalizeStyle as g, Fragment as I, renderList as A, createCommentVNode as P, toDisplayString as Y } from "vue";
|
|
2
|
+
import $ from "../../../../assets/svg/close.svg.js";
|
|
3
|
+
import { TtButton as _ } from "../../../tt-button/index.js";
|
|
4
|
+
import { TtIcon as k } from "../../../tt-icon/index.js";
|
|
5
5
|
import { TtText as D } from "../../../tt-text/index.js";
|
|
6
6
|
import { useResizeObserver as F } from "@vueuse/core";
|
|
7
7
|
import { ElScrollbar as L } from "element-plus";
|
|
8
|
-
const
|
|
8
|
+
const r = 34, R = 8, X = /* @__PURE__ */ V({
|
|
9
9
|
name: "PanelRight",
|
|
10
10
|
__name: "PanelRight",
|
|
11
11
|
props: {
|
|
@@ -15,91 +15,91 @@ const n = 34, _ = 8, X = /* @__PURE__ */ M({
|
|
|
15
15
|
disabled: { type: Boolean }
|
|
16
16
|
},
|
|
17
17
|
emits: ["clearAll", "remove"],
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
() => Math.min(
|
|
21
|
-
),
|
|
18
|
+
setup(t, { emit: T }) {
|
|
19
|
+
const c = t, C = T, u = p(), f = p(0), b = p(0), O = o(() => c.selectedOptions.length * r), S = o(() => Math.max(1, Math.ceil(b.value / r))), v = o(() => Math.max(0, Math.floor(f.value / r) - R)), z = o(
|
|
20
|
+
() => Math.min(c.selectedOptions.length, v.value + S.value + R * 2)
|
|
21
|
+
), B = o(() => v.value * r), E = o(() => c.selectedOptions.slice(v.value, z.value));
|
|
22
22
|
function w() {
|
|
23
23
|
var l;
|
|
24
|
-
const e = (l =
|
|
25
|
-
e && (b.value = e.clientHeight,
|
|
24
|
+
const e = (l = u.value) == null ? void 0 : l.wrapRef;
|
|
25
|
+
e && (b.value = e.clientHeight, f.value = e.scrollTop);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function M() {
|
|
28
28
|
var l;
|
|
29
|
-
const e = (l =
|
|
30
|
-
e && (
|
|
29
|
+
const e = (l = u.value) == null ? void 0 : l.wrapRef;
|
|
30
|
+
e && (f.value = e.scrollTop);
|
|
31
31
|
}
|
|
32
|
-
return
|
|
33
|
-
() =>
|
|
32
|
+
return H(
|
|
33
|
+
() => c.selectedOptions.length,
|
|
34
34
|
async () => {
|
|
35
|
-
await
|
|
35
|
+
await N(), w();
|
|
36
36
|
},
|
|
37
37
|
{ immediate: !0 }
|
|
38
38
|
), F(
|
|
39
39
|
() => {
|
|
40
40
|
var e;
|
|
41
|
-
return (e =
|
|
41
|
+
return (e = u.value) == null ? void 0 : e.wrapRef;
|
|
42
42
|
},
|
|
43
43
|
() => w()
|
|
44
|
-
), (e, l) => (
|
|
45
|
-
class:
|
|
44
|
+
), (e, l) => (m(), d("div", {
|
|
45
|
+
class: n(`${t.prefixCls}__right`)
|
|
46
46
|
}, [
|
|
47
|
-
|
|
48
|
-
class:
|
|
47
|
+
x("div", {
|
|
48
|
+
class: n(`${t.prefixCls}__selected-actions`)
|
|
49
49
|
}, [
|
|
50
|
-
|
|
51
|
-
disabled:
|
|
50
|
+
i(s(_), {
|
|
51
|
+
disabled: t.disabled,
|
|
52
52
|
class: "w-full",
|
|
53
53
|
plain: "",
|
|
54
|
-
onClick: l[0] || (l[0] = (
|
|
54
|
+
onClick: l[0] || (l[0] = (a) => C("clearAll"))
|
|
55
55
|
}, {
|
|
56
56
|
default: h(() => [
|
|
57
|
-
|
|
57
|
+
i(s(k), {
|
|
58
58
|
class: "mr-[4px]",
|
|
59
59
|
size: 14,
|
|
60
60
|
"is-custom-svg": "",
|
|
61
|
-
icon:
|
|
61
|
+
icon: s($)
|
|
62
62
|
}, null, 8, ["icon"]),
|
|
63
|
-
l[1] || (l[1] =
|
|
63
|
+
l[1] || (l[1] = y(" 取消全选 ", -1))
|
|
64
64
|
]),
|
|
65
65
|
_: 1
|
|
66
66
|
}, 8, ["disabled"])
|
|
67
67
|
], 2),
|
|
68
|
-
|
|
68
|
+
i(s(L), {
|
|
69
69
|
ref_key: "scrollbarRef",
|
|
70
|
-
ref:
|
|
71
|
-
class:
|
|
72
|
-
onScroll:
|
|
70
|
+
ref: u,
|
|
71
|
+
class: n(`${t.prefixCls}__selected-list ${t.prefixCls}__right-scrollbar`),
|
|
72
|
+
onScroll: M
|
|
73
73
|
}, {
|
|
74
74
|
default: h(() => [
|
|
75
|
-
|
|
76
|
-
style: g({ height: `${
|
|
75
|
+
x("div", {
|
|
76
|
+
style: g({ height: `${O.value}px` })
|
|
77
77
|
}, [
|
|
78
|
-
|
|
79
|
-
style: g({ transform: `translateY(${
|
|
78
|
+
x("div", {
|
|
79
|
+
style: g({ transform: `translateY(${B.value}px)` })
|
|
80
80
|
}, [
|
|
81
|
-
(
|
|
82
|
-
key:
|
|
83
|
-
style: g({ height: `${
|
|
84
|
-
class:
|
|
81
|
+
(m(!0), d(I, null, A(E.value, (a) => (m(), d("div", {
|
|
82
|
+
key: a.value,
|
|
83
|
+
style: g({ height: `${r}px` }),
|
|
84
|
+
class: n(`${t.prefixCls}__selected-item`)
|
|
85
85
|
}, [
|
|
86
|
-
|
|
86
|
+
i(s(D), null, {
|
|
87
87
|
default: h(() => [
|
|
88
|
-
|
|
88
|
+
y(Y(a.label), 1)
|
|
89
89
|
]),
|
|
90
90
|
_: 2
|
|
91
91
|
}, 1024),
|
|
92
|
-
!
|
|
92
|
+
!t.disabled && !a.disabled ? (m(), d("span", {
|
|
93
93
|
key: 0,
|
|
94
|
-
class:
|
|
94
|
+
class: n(`${t.prefixCls}__selected-item-close`)
|
|
95
95
|
}, [
|
|
96
|
-
|
|
96
|
+
i(s(k), {
|
|
97
97
|
size: 14,
|
|
98
98
|
"is-custom-svg": "",
|
|
99
|
-
icon:
|
|
100
|
-
onClick: (j) => C("remove",
|
|
99
|
+
icon: s($),
|
|
100
|
+
onClick: (j) => C("remove", a.value)
|
|
101
101
|
}, null, 8, ["icon", "onClick"])
|
|
102
|
-
], 2)) :
|
|
102
|
+
], 2)) : P("", !0)
|
|
103
103
|
], 6))), 128))
|
|
104
104
|
], 4)
|
|
105
105
|
], 4)
|