@aplus-frontend/ui 7.7.2 → 7.7.4
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/es/index.mjs +62 -60
- package/es/src/ap-field/checkbox/index.vue.mjs +18 -8
- package/es/src/ap-field/number/index.vue.mjs +19 -19
- package/es/src/ap-field/radio/index.vue.mjs +24 -24
- package/es/src/ap-field/rate/index.vue.mjs +10 -10
- package/es/src/ap-field/select/index.vue.mjs +74 -71
- package/es/src/ap-field/slider/index.vue.d.ts +4 -2
- package/es/src/ap-field/slider/index.vue.mjs +12 -12
- package/es/src/ap-field/switch/index.vue.mjs +20 -20
- package/es/src/ap-field/text/index.vue2.mjs +23 -23
- package/es/src/ap-field/text/password.vue.mjs +9 -9
- package/es/src/ap-field/text-area/index.vue.mjs +24 -20
- package/es/src/ap-field/tree-select/index.vue.mjs +17 -17
- package/es/src/ap-form/ap-form.vue2.mjs +64 -64
- package/es/src/ap-form/drawer-form/index.vue.mjs +41 -41
- package/es/src/ap-form/item/index.vue.mjs +64 -64
- package/es/src/ap-form/items/number/index.vue.mjs +10 -10
- package/es/src/ap-form/items/radio/index.vue.mjs +3 -3
- package/es/src/ap-form/items/select/index.vue.mjs +5 -5
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/index.vue2.mjs +6 -6
- package/es/src/ap-form/items/text/password.vue.mjs +7 -7
- package/es/src/ap-form/items/text-area/index.vue.mjs +5 -5
- package/es/src/ap-form/items/tree-select/index.vue.mjs +7 -7
- package/es/src/ap-form/search-form/index.vue.mjs +63 -63
- package/es/src/ap-form/style/item.mjs +17 -10
- package/es/src/ap-list/index.vue.mjs +6 -6
- package/es/src/ap-table/constants.d.ts +1 -1
- package/es/src/business/ap-descriptions/index.d.ts +1 -0
- package/es/src/business/ap-descriptions/index.mjs +4 -0
- package/es/src/business/ap-value-select-card/style/index.mjs +1 -1
- package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/es/src/editable-table/form-item.vue.mjs +64 -64
- package/es/src/editable-table/index.vue.mjs +66 -66
- package/es/src/editable-table/style/index.mjs +5 -5
- package/es/src/index.mjs +46 -44
- package/es/src/scroll-bar/index.vue.d.ts +7 -7
- package/es/src/scroll-bar/index.vue.mjs +21 -21
- package/es/src/scroll-bar/internal.vue.d.ts +4 -4
- package/es/src/scroll-bar/internal.vue.mjs +20 -20
- package/es/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
- package/es/src/scroll-view/hooks/use-scroll-wrapper.mjs +13 -13
- package/es/src/scroll-view/index.vue.d.ts +25 -25
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/rate/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +4 -2
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +1 -1
- package/lib/src/business/ap-descriptions/index.d.ts +1 -0
- package/lib/src/business/ap-descriptions/index.js +1 -1
- package/lib/src/business/ap-value-select-card/style/index.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/style/index.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/scroll-bar/index.vue.d.ts +7 -7
- package/lib/src/scroll-bar/index.vue.js +1 -1
- package/lib/src/scroll-bar/internal.vue.d.ts +4 -4
- package/lib/src/scroll-bar/internal.vue.js +1 -1
- package/lib/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
- package/lib/src/scroll-view/hooks/use-scroll-wrapper.js +1 -1
- package/lib/src/scroll-view/index.vue.d.ts +25 -25
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Table as
|
|
1
|
+
import { defineComponent as W, useSlots as H, shallowRef as $, ref as q, watch as b, unref as s, createBlock as J, openBlock as Q, withCtx as p, createVNode as w, mergeProps as X, createSlots as Y, renderList as Z, renderSlot as M, normalizeProps as ee, guardReactiveProps as te } from "vue";
|
|
2
|
+
import { Table as ae } from "@aplus-frontend/antdv";
|
|
3
3
|
import { ApForm as m } from "../ap-form/index.mjs";
|
|
4
|
-
import { isEqual as
|
|
4
|
+
import { isEqual as ne, isArray as c, isUndefined as oe, isNumber as h, cloneDeep as le, omit as v } from "lodash-unified";
|
|
5
5
|
import "../config-provider/index.mjs";
|
|
6
6
|
import "../hooks/index.mjs";
|
|
7
7
|
import "../utils/index.mjs";
|
|
8
|
-
import { scrollToRowIndex as
|
|
9
|
-
import
|
|
10
|
-
import { useDevWarning as
|
|
11
|
-
import
|
|
12
|
-
import { useNamespace as
|
|
13
|
-
import { useControllableValue as
|
|
14
|
-
import { useGlobalConfig as
|
|
15
|
-
import { isDef as
|
|
16
|
-
const
|
|
8
|
+
import { scrollToRowIndex as se } from "./utils.mjs";
|
|
9
|
+
import re from "./hooks/use-get-columns.mjs";
|
|
10
|
+
import { useDevWarning as ue } from "../utils/warning.mjs";
|
|
11
|
+
import ie from "./style/index.mjs";
|
|
12
|
+
import { useNamespace as de } from "../config-provider/hooks/use-namespace.mjs";
|
|
13
|
+
import { useControllableValue as fe } from "../hooks/useControllableValue.mjs";
|
|
14
|
+
import { useGlobalConfig as pe } from "../config-provider/hooks/use-global-config.mjs";
|
|
15
|
+
import { isDef as x } from "../utils/is.mjs";
|
|
16
|
+
const Se = /* @__PURE__ */ W({
|
|
17
17
|
name: "EditableTable",
|
|
18
18
|
__name: "index",
|
|
19
19
|
props: {
|
|
@@ -113,41 +113,41 @@ const Ve = /* @__PURE__ */ H({
|
|
|
113
113
|
onFieldChange: {}
|
|
114
114
|
},
|
|
115
115
|
emits: ["update:value"],
|
|
116
|
-
setup(
|
|
117
|
-
expose:
|
|
118
|
-
emit:
|
|
116
|
+
setup(y, {
|
|
117
|
+
expose: C,
|
|
118
|
+
emit: R
|
|
119
119
|
}) {
|
|
120
|
-
const t =
|
|
121
|
-
|
|
120
|
+
const t = y;
|
|
121
|
+
ue("EditableTable")(!1, "breaking", "EditableTable has been EOL, Please use EditableAgGrid(https://aplus.aplnk.com/aplus-ui/components/ag-grid/editable/) instead.");
|
|
122
122
|
const {
|
|
123
|
-
b:
|
|
124
|
-
} =
|
|
123
|
+
b: F
|
|
124
|
+
} = de("editable-table"), B = ie("editable-table"), T = H(), E = R, g = $(), {
|
|
125
125
|
value: i,
|
|
126
|
-
updateValue:
|
|
127
|
-
} =
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
updateValue: V
|
|
127
|
+
} = fe(t, E), r = q(), S = pe("valueTypeMap"), f = m.useWatch(t.name, r);
|
|
128
|
+
b(() => f.value, (e) => {
|
|
129
|
+
V(e), t.onChange?.(e);
|
|
130
130
|
}, {
|
|
131
131
|
deep: !0,
|
|
132
132
|
flush: "post"
|
|
133
|
-
}),
|
|
134
|
-
e !== s(f) && (
|
|
133
|
+
}), b(i, (e) => {
|
|
134
|
+
e !== s(f) && (ne(e, s(f)) || r.value?.setFieldValue(t.name, e));
|
|
135
135
|
}, {
|
|
136
136
|
deep: !0
|
|
137
137
|
});
|
|
138
|
-
const
|
|
139
|
-
function
|
|
138
|
+
const D = re(t, S);
|
|
139
|
+
function L() {
|
|
140
140
|
r.value?.resetFields();
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function _(e) {
|
|
143
143
|
return e ? (c(e) ? e : [e]).map((n) => c(n) ? [t.name, ...n] : [t.name, n]) : void 0;
|
|
144
144
|
}
|
|
145
|
-
async function
|
|
146
|
-
return (await r.value?.validateFields(
|
|
145
|
+
async function k(e, l) {
|
|
146
|
+
return (await r.value?.validateFields(_(e), l))?.[t.name];
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function N(e, l) {
|
|
149
149
|
const n = s(i)?.length || 0;
|
|
150
|
-
if (
|
|
150
|
+
if (x(t.maxLength) && n >= t.maxLength)
|
|
151
151
|
return;
|
|
152
152
|
const a = {
|
|
153
153
|
...e || {}
|
|
@@ -157,14 +157,14 @@ const Ve = /* @__PURE__ */ H({
|
|
|
157
157
|
o[u] = [a];
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
oe(l) ? o[u].push(a) : o[u].splice(l, 0, a);
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function A(e, l = "suffix") {
|
|
164
164
|
const n = s(i)?.length || 0, a = h(e) ? e : e.length;
|
|
165
|
-
if (
|
|
165
|
+
if (x(t.maxLength) && n + a > t.maxLength)
|
|
166
166
|
return;
|
|
167
|
-
const o = h(e) ? new Array(e).fill(0).map(() => ({})) :
|
|
167
|
+
const o = h(e) ? new Array(e).fill(0).map(() => ({})) : le(e);
|
|
168
168
|
r.value?.setFieldValue?.(t.name, o, !0, (u, d) => {
|
|
169
169
|
if (!u[d]) {
|
|
170
170
|
u[d] = [...o];
|
|
@@ -173,28 +173,28 @@ const Ve = /* @__PURE__ */ H({
|
|
|
173
173
|
l === "suffix" ? u[d].push(...o) : u[d].unshift(...o);
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function I(e) {
|
|
177
177
|
const l = new Set(h(e) ? [e] : e);
|
|
178
178
|
r.value?.setFieldValue?.(t.name, void 0, !0, (n, a) => {
|
|
179
179
|
n[a] = n[a].filter((o, u) => !l.has(u));
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function P(e) {
|
|
183
183
|
const l = new Set(c(e) ? e : [e]);
|
|
184
184
|
l.size !== 0 && r.value?.setFieldValue?.(t.name, void 0, !0, (n, a) => {
|
|
185
185
|
n[a] = n[a].filter((o) => !l.has(o[t.rowKey]));
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function z() {
|
|
189
189
|
return s(i);
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function K(e) {
|
|
192
192
|
r.value?.setFieldValue(t.name, e);
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function O(e) {
|
|
195
195
|
return s(i)?.[e];
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function j(e, l, n = !0) {
|
|
198
198
|
r.value?.setFieldValue?.(t.name, void 0, !0, (a, o) => {
|
|
199
199
|
!a[o] || !a[o][e] || (a[o][e] = {
|
|
200
200
|
...n ? a[o][e] : {},
|
|
@@ -202,27 +202,27 @@ const Ve = /* @__PURE__ */ H({
|
|
|
202
202
|
});
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function G(e, l) {
|
|
206
206
|
const n = e === "end" ? i.value.length - 1 : e;
|
|
207
|
-
|
|
207
|
+
se(n, g.value?.$el, l);
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function U() {
|
|
210
210
|
r.value?.setFieldValue?.(t.name, []);
|
|
211
211
|
}
|
|
212
|
-
return
|
|
213
|
-
resetFields:
|
|
214
|
-
validateFields:
|
|
215
|
-
add:
|
|
216
|
-
remove:
|
|
217
|
-
getRowData:
|
|
218
|
-
getRowsData:
|
|
219
|
-
setRowData:
|
|
220
|
-
addMultiple:
|
|
221
|
-
scrollTo:
|
|
222
|
-
clear:
|
|
223
|
-
setTableData:
|
|
224
|
-
removeByKey:
|
|
225
|
-
}), (e, l) => (
|
|
212
|
+
return C({
|
|
213
|
+
resetFields: L,
|
|
214
|
+
validateFields: k,
|
|
215
|
+
add: N,
|
|
216
|
+
remove: I,
|
|
217
|
+
getRowData: O,
|
|
218
|
+
getRowsData: z,
|
|
219
|
+
setRowData: j,
|
|
220
|
+
addMultiple: A,
|
|
221
|
+
scrollTo: G,
|
|
222
|
+
clear: U,
|
|
223
|
+
setTableData: K,
|
|
224
|
+
removeByKey: P
|
|
225
|
+
}), (e, l) => (Q(), J(s(m), {
|
|
226
226
|
ref_key: "formRef",
|
|
227
227
|
ref: r,
|
|
228
228
|
"initial-values": {
|
|
@@ -233,17 +233,17 @@ const Ve = /* @__PURE__ */ H({
|
|
|
233
233
|
name: e.name,
|
|
234
234
|
"no-style": ""
|
|
235
235
|
}, {
|
|
236
|
-
default: p(() => [w(s(
|
|
236
|
+
default: p(() => [w(s(ae), X(s(v)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange"]), {
|
|
237
237
|
ref_key: "tableRef",
|
|
238
238
|
ref: g,
|
|
239
|
-
class: [s(
|
|
240
|
-
columns: s(
|
|
239
|
+
class: [s(F)(), s(B)],
|
|
240
|
+
columns: s(D),
|
|
241
241
|
"data-source": s(i)
|
|
242
|
-
}),
|
|
242
|
+
}), Y({
|
|
243
243
|
_: 2
|
|
244
|
-
}, [
|
|
244
|
+
}, [Z(s(v)(T, ["headerCell"]), (n, a) => ({
|
|
245
245
|
name: a,
|
|
246
|
-
fn: p((o) => [
|
|
246
|
+
fn: p((o) => [M(e.$slots, a, ee(te(o || {})))])
|
|
247
247
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
248
248
|
_: 3
|
|
249
249
|
}, 8, ["name"])]),
|
|
@@ -252,5 +252,5 @@ const Ve = /* @__PURE__ */ H({
|
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
254
|
export {
|
|
255
|
-
|
|
255
|
+
Se as default
|
|
256
256
|
};
|
|
@@ -62,14 +62,14 @@ const n = (a) => {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
},
|
|
65
|
+
}, i = l(
|
|
66
66
|
"EditableTable",
|
|
67
67
|
(a) => [n(a)],
|
|
68
|
-
{
|
|
69
|
-
editableTableHeaderBg:
|
|
70
|
-
}
|
|
68
|
+
(a) => ({
|
|
69
|
+
editableTableHeaderBg: a.tableHeaderBg
|
|
70
|
+
})
|
|
71
71
|
);
|
|
72
72
|
export {
|
|
73
|
-
|
|
73
|
+
i as default,
|
|
74
74
|
n as genEditableTableStyle
|
|
75
75
|
};
|
package/es/src/index.mjs
CHANGED
|
@@ -135,31 +135,32 @@ import { NeedNameKeyDefault as pp } from "./business/ap-upload/apUploadTypes.mjs
|
|
|
135
135
|
import { default as mp } from "./business/ap-upload/apUpload.vue.mjs";
|
|
136
136
|
import { ApDownLoadNeedNameKeyDefault as lp } from "./business/ap-download/interface.mjs";
|
|
137
137
|
import { default as xp } from "./business/ap-download/ap-download.vue.mjs";
|
|
138
|
-
import {
|
|
139
|
-
import {
|
|
140
|
-
import {
|
|
141
|
-
import { default as Ip } from "./editable-table/
|
|
142
|
-
import {
|
|
143
|
-
import {
|
|
144
|
-
import { default as Gp } from "./scroll-bar/
|
|
145
|
-
import { default as hp } from "./scroll-
|
|
146
|
-
import { default as Pp } from "./
|
|
147
|
-
import { default as Np } from "./
|
|
148
|
-
import { default as yp } from "./
|
|
149
|
-
import {
|
|
150
|
-
import {
|
|
151
|
-
import {
|
|
152
|
-
import { default as Up } from "./ap-grid/
|
|
153
|
-
import { default as _p } from "./ap-grid/editable/
|
|
154
|
-
import { default as Hp } from "./
|
|
155
|
-
import { default as Wp } from "./text/
|
|
156
|
-
import { default as Jp } from "./
|
|
157
|
-
import { default as Xp } from "./
|
|
158
|
-
import { default as Zp } from "./ag-grid/
|
|
159
|
-
import { default as ea } from "./ag-grid/editable/
|
|
138
|
+
import { formatString as Ap } from "./business/ap-descriptions/formatter/utils.mjs";
|
|
139
|
+
import { default as ip } from "./business/ap-descriptions/ap-descriptions.vue.mjs";
|
|
140
|
+
import { useTablePaging as cp } from "./ap-table/hooks/use-table-paging.mjs";
|
|
141
|
+
import { default as Ip } from "./editable-table/index.vue.mjs";
|
|
142
|
+
import { default as Tp } from "./editable-table/form-item.vue.mjs";
|
|
143
|
+
import { ensureRangeValue as bp } from "./scroll-bar/utils/index.mjs";
|
|
144
|
+
import { default as Gp } from "./scroll-bar/index.vue.mjs";
|
|
145
|
+
import { default as hp } from "./scroll-bar/internal.vue.mjs";
|
|
146
|
+
import { default as Pp } from "./scroll-view/index.vue.mjs";
|
|
147
|
+
import { default as Np } from "./portal/index.vue.mjs";
|
|
148
|
+
import { default as yp } from "./full-screen/index.vue.mjs";
|
|
149
|
+
import { default as wp } from "./resize-observer/index.vue.mjs";
|
|
150
|
+
import { ROW_SELECTION_FIELD as Bp } from "./ap-grid/constants.mjs";
|
|
151
|
+
import { toTreeArray as kp } from "./ap-grid/utils/to-tree-array.mjs";
|
|
152
|
+
import { default as Up } from "./ap-grid/index.vue.mjs";
|
|
153
|
+
import { default as _p } from "./ap-grid/editable/index.vue.mjs";
|
|
154
|
+
import { default as Hp } from "./ap-grid/editable/form-item.vue.mjs";
|
|
155
|
+
import { default as Wp } from "./text/index.vue.mjs";
|
|
156
|
+
import { default as Jp } from "./text/group.vue.mjs";
|
|
157
|
+
import { default as Xp } from "./mask/index.vue.mjs";
|
|
158
|
+
import { default as Zp } from "./ag-grid/index.vue.mjs";
|
|
159
|
+
import { default as ea } from "./ag-grid/editable/index.vue.mjs";
|
|
160
|
+
import { default as ra } from "./ag-grid/editable/form-item.vue.mjs";
|
|
160
161
|
export {
|
|
161
162
|
I as APConfigProvider,
|
|
162
|
-
|
|
163
|
+
Zp as AgGrid,
|
|
163
164
|
Jo as ApActionButton,
|
|
164
165
|
Uo as ApActionGroup,
|
|
165
166
|
P as ApActionItem,
|
|
@@ -175,7 +176,7 @@ export {
|
|
|
175
176
|
br as ApCard,
|
|
176
177
|
Xo as ApConfirmButton,
|
|
177
178
|
Et as ApCopy,
|
|
178
|
-
|
|
179
|
+
ip as ApDescriptions,
|
|
179
180
|
lp as ApDownLoadNeedNameKeyDefault,
|
|
180
181
|
xp as ApDownload,
|
|
181
182
|
Ht as ApDraggableGrid,
|
|
@@ -224,7 +225,7 @@ export {
|
|
|
224
225
|
to as ApFormProvider,
|
|
225
226
|
ze as ApFormSearchForm,
|
|
226
227
|
Qe as ApFormSet,
|
|
227
|
-
|
|
228
|
+
Up as ApGrid,
|
|
228
229
|
wr as ApImage,
|
|
229
230
|
Br as ApInputRadio,
|
|
230
231
|
Bt as ApKeepAlive,
|
|
@@ -249,8 +250,8 @@ export {
|
|
|
249
250
|
lr as ApTableModal,
|
|
250
251
|
ep as ApTag,
|
|
251
252
|
rp as ApTagGroup,
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
Wp as ApText,
|
|
254
|
+
Jp as ApTextGroup,
|
|
254
255
|
Xr as ApTitle,
|
|
255
256
|
mr as ApTransformDataHelper,
|
|
256
257
|
mp as ApUpload,
|
|
@@ -263,25 +264,25 @@ export {
|
|
|
263
264
|
Ae as ConfigProvider,
|
|
264
265
|
q as DEFAULT_NAMESPACE,
|
|
265
266
|
J as DEFAULT_UIMODE,
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
267
|
+
ea as EditableAgGrid,
|
|
268
|
+
ra as EditableAgGridFormItem,
|
|
269
|
+
_p as EditableGrid,
|
|
270
|
+
Hp as EditableGridFormItem,
|
|
271
|
+
Ip as EditableTable,
|
|
272
|
+
Tp as EditableTableFormItem,
|
|
273
|
+
yp as FullScreen,
|
|
273
274
|
pr as Highlight,
|
|
274
|
-
|
|
275
|
+
hp as InternalScrollBar,
|
|
275
276
|
O as LoadingBar,
|
|
276
277
|
kt as LruCacher,
|
|
277
|
-
|
|
278
|
+
Xp as Mask,
|
|
278
279
|
pp as NeedNameKeyDefault,
|
|
279
|
-
|
|
280
|
-
|
|
280
|
+
Np as Portal,
|
|
281
|
+
Bp as ROW_SELECTION_FIELD,
|
|
281
282
|
Zo as Render,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
283
|
+
wp as ResizeObserver,
|
|
284
|
+
Gp as ScrollBar,
|
|
285
|
+
Pp as ScrollView,
|
|
285
286
|
z as Splitter,
|
|
286
287
|
er as TimeAgo,
|
|
287
288
|
D as adminToken,
|
|
@@ -293,11 +294,12 @@ export {
|
|
|
293
294
|
j as configProviderProps,
|
|
294
295
|
yr as convertExportField,
|
|
295
296
|
fe as defaultNamespace,
|
|
296
|
-
|
|
297
|
+
bp as ensureRangeValue,
|
|
297
298
|
at as flattenColumns,
|
|
298
299
|
wt as forceStopTags,
|
|
299
300
|
mt as formatDataIndex,
|
|
300
301
|
ft as formatNumber,
|
|
302
|
+
Ap as formatString,
|
|
301
303
|
se as globalConfigCached,
|
|
302
304
|
Nr as handleExportDownload,
|
|
303
305
|
_t as isNameMatches,
|
|
@@ -306,7 +308,7 @@ export {
|
|
|
306
308
|
Vr as locales,
|
|
307
309
|
le as namespaceContextKey,
|
|
308
310
|
Z as provideGlobalConfig,
|
|
309
|
-
|
|
311
|
+
kp as toTreeArray,
|
|
310
312
|
pe as translate,
|
|
311
313
|
Jt as useAgGridModal,
|
|
312
314
|
Xt as useAgGridSelectModal,
|
|
@@ -319,7 +321,7 @@ export {
|
|
|
319
321
|
et as usePageListApGrid,
|
|
320
322
|
Zr as usePageListApTable,
|
|
321
323
|
xr as useTableModal,
|
|
322
|
-
|
|
324
|
+
cp as useTablePaging,
|
|
323
325
|
Ar as useTableSelectModal,
|
|
324
326
|
rr as useTimeAgo
|
|
325
327
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScrollBarProps, ScrollBarDirection, InternalScrollBarProps } from './interface';
|
|
2
|
-
import { DefineComponent, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, Ref, GlobalComponents, GlobalDirectives } from 'vue';
|
|
2
|
+
import { DefineComponent, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, Ref, ShallowRef, GlobalComponents, GlobalDirectives } from 'vue';
|
|
3
3
|
declare function handleBarScroll(percent: number): void;
|
|
4
4
|
declare const _default: DefineComponent<ScrollBarProps, {
|
|
5
5
|
currentScroll: ComputedRef<number | undefined>;
|
|
@@ -16,9 +16,9 @@ declare const _default: DefineComponent<ScrollBarProps, {
|
|
|
16
16
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
17
17
|
barRef: CreateComponentPublicInstanceWithMixins<Readonly< InternalScrollBarProps> & Readonly<{}>, {
|
|
18
18
|
currentScroll: Ref<number, number>;
|
|
19
|
-
container:
|
|
20
|
-
bar:
|
|
21
|
-
track:
|
|
19
|
+
container: ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
20
|
+
bar: ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
21
|
+
track: ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
22
22
|
scroll: (percent: number) => void;
|
|
23
23
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
24
24
|
scroll: number;
|
|
@@ -40,9 +40,9 @@ declare const _default: DefineComponent<ScrollBarProps, {
|
|
|
40
40
|
Defaults: {};
|
|
41
41
|
}, Readonly< InternalScrollBarProps> & Readonly<{}>, {
|
|
42
42
|
currentScroll: Ref<number, number>;
|
|
43
|
-
container:
|
|
44
|
-
bar:
|
|
45
|
-
track:
|
|
43
|
+
container: ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
44
|
+
bar: ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
45
|
+
track: ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
46
46
|
scroll: (percent: number) => void;
|
|
47
47
|
}, {}, {}, {}, {
|
|
48
48
|
scroll: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, toRef as z, shallowRef as g, ref as x, watchEffect as _, unref as a, watch as k, computed as s, createBlock as C, createCommentVNode as R, openBlock as B, mergeProps as L } from "vue";
|
|
2
2
|
import "./internal.vue2.mjs";
|
|
3
|
-
import { omit as
|
|
4
|
-
import { getScrollable as u, ensureRangeValue as
|
|
5
|
-
import { useResizeObserver as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
3
|
+
import { omit as w } from "lodash-unified";
|
|
4
|
+
import { getScrollable as u, ensureRangeValue as y } from "./utils/index.mjs";
|
|
5
|
+
import { useResizeObserver as E } from "@vueuse/core";
|
|
6
|
+
import N from "./internal.vue.mjs";
|
|
7
|
+
const j = /* @__PURE__ */ b({
|
|
8
8
|
name: "ScrollBar",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -24,9 +24,9 @@ const W = /* @__PURE__ */ z({
|
|
|
24
24
|
onScroll: {},
|
|
25
25
|
onScrollEnd: {}
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const r =
|
|
29
|
-
function
|
|
27
|
+
setup(p, { expose: S }) {
|
|
28
|
+
const r = p, o = z(r, "scrollContainer"), l = g(), n = x(r.barLength);
|
|
29
|
+
function m() {
|
|
30
30
|
if (!o.value || !l.value) return;
|
|
31
31
|
const { totalSize: e, visibleSize: t, distance: c } = u(
|
|
32
32
|
o.value,
|
|
@@ -39,19 +39,19 @@ const W = /* @__PURE__ */ z({
|
|
|
39
39
|
o.value,
|
|
40
40
|
r.direction
|
|
41
41
|
);
|
|
42
|
-
n.value =
|
|
42
|
+
n.value = y(
|
|
43
43
|
e / (t + r.extraSize || 1) * 100
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
E(o, () => {
|
|
47
47
|
f();
|
|
48
|
-
}),
|
|
48
|
+
}), _(
|
|
49
49
|
() => {
|
|
50
50
|
const e = a(o.value);
|
|
51
|
-
e && (f(), e.addEventListener("scroll",
|
|
51
|
+
e && (f(), e.addEventListener("scroll", m));
|
|
52
52
|
},
|
|
53
53
|
{ flush: "post" }
|
|
54
|
-
),
|
|
54
|
+
), k(
|
|
55
55
|
() => r.barLength,
|
|
56
56
|
(e) => {
|
|
57
57
|
n.value = e;
|
|
@@ -60,29 +60,29 @@ const W = /* @__PURE__ */ z({
|
|
|
60
60
|
function d(e) {
|
|
61
61
|
const t = a(o);
|
|
62
62
|
if (!t) return;
|
|
63
|
-
const { totalSize: c, visibleSize: i, topOrLeft:
|
|
63
|
+
const { totalSize: c, visibleSize: i, topOrLeft: v } = u(
|
|
64
64
|
t,
|
|
65
65
|
r.direction
|
|
66
66
|
);
|
|
67
67
|
if (c <= i) return;
|
|
68
|
-
const h = `scroll${
|
|
68
|
+
const h = `scroll${v}`;
|
|
69
69
|
t[h] = e * (c + r.extraSize - i) / 100;
|
|
70
70
|
}
|
|
71
|
-
return
|
|
71
|
+
return S({
|
|
72
72
|
currentScroll: s(() => a(l.value?.currentScroll)),
|
|
73
73
|
scroll: d,
|
|
74
74
|
visible: s(() => n.value < 100),
|
|
75
75
|
rootElement: s(() => a(l.value?.container))
|
|
76
|
-
}), (e, t) => n.value !== 100 ? (B(),
|
|
76
|
+
}), (e, t) => n.value !== 100 ? (B(), C(N, L({
|
|
77
77
|
key: 0,
|
|
78
78
|
ref_key: "barRef",
|
|
79
79
|
ref: l
|
|
80
|
-
}, a(
|
|
80
|
+
}, a(w)(r, ["onScroll", "extraSize", "scrollContainer"]), {
|
|
81
81
|
"bar-length": n.value,
|
|
82
82
|
onScroll: d
|
|
83
|
-
}), null, 16, ["bar-length"])) :
|
|
83
|
+
}), null, 16, ["bar-length"])) : R("", !0);
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
export {
|
|
87
|
-
|
|
87
|
+
j as default
|
|
88
88
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { InternalScrollBarProps, ScrollBarDirection } from './interface';
|
|
2
|
-
import { DefineComponent, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DefineComponent, Ref, ShallowRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
declare function scroll(percent: number): void;
|
|
4
4
|
declare const _default: DefineComponent<InternalScrollBarProps, {
|
|
5
5
|
currentScroll: Ref<number, number>;
|
|
6
|
-
container:
|
|
7
|
-
bar:
|
|
8
|
-
track:
|
|
6
|
+
container: ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
7
|
+
bar: ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
8
|
+
track: ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
9
9
|
scroll: typeof scroll;
|
|
10
10
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<InternalScrollBarProps> & Readonly<{}>, {
|
|
11
11
|
scroll: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as V, ref as
|
|
1
|
+
import { defineComponent as V, shallowRef as h, ref as W, toRef as f, watch as z, watchEffect as A, unref as o, createElementBlock as N, openBlock as U, normalizeStyle as X, normalizeClass as b, createElementVNode as E } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
|
-
import { useTrack as
|
|
3
|
+
import { useTrack as Y } from "./hooks/use-track.mjs";
|
|
4
4
|
import { ensureRangeValue as L } from "./utils/index.mjs";
|
|
5
|
-
import
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
const
|
|
5
|
+
import I from "./style/index.mjs";
|
|
6
|
+
import { useNamespace as j } from "../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
const O = /* @__PURE__ */ V({
|
|
8
8
|
__name: "internal",
|
|
9
9
|
props: {
|
|
10
10
|
direction: { default: "vertical" },
|
|
@@ -22,14 +22,14 @@ const K = /* @__PURE__ */ V({
|
|
|
22
22
|
onScrollEnd: {}
|
|
23
23
|
},
|
|
24
24
|
setup(C, { expose: D }) {
|
|
25
|
-
const t = C, m =
|
|
25
|
+
const t = C, m = h(), i = h(), l = h(), { b: M, e: k, m: R, em: c, cssVar: B } = j("scroll-bar"), P = I("scroll-bar"), n = W(t.scroll), { handleMouseDown: v } = Y({
|
|
26
26
|
currentScroll: n,
|
|
27
27
|
track: i,
|
|
28
28
|
bar: l,
|
|
29
|
-
type:
|
|
30
|
-
trackSpeed:
|
|
31
|
-
barLength:
|
|
32
|
-
disabled:
|
|
29
|
+
type: f(t, "direction"),
|
|
30
|
+
trackSpeed: f(t, "trackSpeed"),
|
|
31
|
+
barLength: f(t, "barLength"),
|
|
32
|
+
disabled: f(t, "disabled"),
|
|
33
33
|
onDown: (e) => {
|
|
34
34
|
t.onScrollStart?.(e);
|
|
35
35
|
},
|
|
@@ -40,17 +40,17 @@ const K = /* @__PURE__ */ V({
|
|
|
40
40
|
t.onScroll?.(e);
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
z(
|
|
44
44
|
() => t.scroll,
|
|
45
45
|
(e) => {
|
|
46
46
|
n.value = e;
|
|
47
47
|
}
|
|
48
|
-
),
|
|
48
|
+
), A(() => {
|
|
49
49
|
if (!o(l)) return;
|
|
50
50
|
const e = `${(100 - t.barLength) * n.value / t.barLength}%`, r = `${t.barLength}%`;
|
|
51
51
|
t.direction === "vertical" ? (l.value.style.height = r, l.value.style.transform = `translate3d(0, ${e}, 0)`) : (l.value.style.width = r, l.value.style.transform = `translate3d(${e}, 0, 0)`);
|
|
52
52
|
});
|
|
53
|
-
let
|
|
53
|
+
let p, s, d;
|
|
54
54
|
function T(e) {
|
|
55
55
|
if (t.disabled || e.button !== 0) return;
|
|
56
56
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -59,13 +59,13 @@ const K = /* @__PURE__ */ V({
|
|
|
59
59
|
return;
|
|
60
60
|
document.addEventListener("pointermove", g), document.addEventListener("pointerup", S);
|
|
61
61
|
const u = r.getBoundingClientRect(), y = a.getBoundingClientRect();
|
|
62
|
-
t.direction === "vertical" ? (
|
|
62
|
+
t.direction === "vertical" ? (p = u.height, s = y.top - u.top, d = e.clientY) : (p = u.width, s = y.left - u.left, d = e.clientX), t.onScrollStart?.(o(n));
|
|
63
63
|
}
|
|
64
64
|
function g(e) {
|
|
65
65
|
e.stopPropagation(), e.preventDefault();
|
|
66
66
|
let r;
|
|
67
67
|
t.direction === "vertical" ? r = s + e.clientY - d : r = s + e.clientX - d;
|
|
68
|
-
const a = r /
|
|
68
|
+
const a = r / p / (100 - t.barLength) * 1e4;
|
|
69
69
|
n.value = L(a), t.onScroll?.(o(n));
|
|
70
70
|
}
|
|
71
71
|
function S(e) {
|
|
@@ -83,12 +83,12 @@ const K = /* @__PURE__ */ V({
|
|
|
83
83
|
bar: l,
|
|
84
84
|
track: i,
|
|
85
85
|
scroll: $
|
|
86
|
-
}), (e, r) => (
|
|
86
|
+
}), (e, r) => (U(), N("div", {
|
|
87
87
|
ref_key: "container",
|
|
88
88
|
ref: m,
|
|
89
|
-
class: b([o(M)(), o(
|
|
90
|
-
style:
|
|
91
|
-
o(
|
|
89
|
+
class: b([o(M)(), o(R)(e.direction), o(P)]),
|
|
90
|
+
style: X(
|
|
91
|
+
o(B)(
|
|
92
92
|
{
|
|
93
93
|
"bar-color": e.barColor,
|
|
94
94
|
"track-color": e.trackColor,
|
|
@@ -126,5 +126,5 @@ const K = /* @__PURE__ */ V({
|
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
128
|
export {
|
|
129
|
-
|
|
129
|
+
O as default
|
|
130
130
|
};
|