@farris/ui-vue 1.7.2-beta.1 → 1.7.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +155 -148
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +226 -224
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +225 -223
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +76 -71
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +169 -167
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.esm.js +3691 -3043
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +2015 -1352
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +407 -430
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3082 -3196
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3364 -2713
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +66 -64
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1176 -524
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +182 -180
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +531 -455
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +2352 -1700
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +8 -3
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/filter-bar/index.esm.js +422 -413
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +8 -3
- package/components/filter-condition-editor/index.umd.cjs +1 -1
- package/components/image/index.esm.js +363 -354
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +189 -187
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +388 -389
- package/components/list-view/index.umd.cjs +5 -5
- package/components/mapping-editor/index.esm.js +1465 -1488
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +180 -173
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +815 -811
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +429 -420
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +4746 -4085
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/schema-selector/index.esm.js +1401 -1402
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/section/index.esm.js +102 -100
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +8 -3
- package/components/sort-condition-editor/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +537 -538
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +280 -283
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +200 -202
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +533 -519
- package/components/uploader/index.umd.cjs +2 -2
- package/designer/data-grid/index.esm.js +3806 -3905
- package/designer/data-grid/index.umd.cjs +9 -9
- package/designer/drawer/index.esm.js +188 -186
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1562 -1073
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +9793 -8613
- package/designer/farris-designer.all.umd.cjs +8 -8
- package/designer/list-view/index.esm.js +564 -564
- package/designer/list-view/index.umd.cjs +6 -6
- package/designer/radio-group/index.esm.js +236 -229
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +178 -171
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +3154 -2508
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +193 -186
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/tree-grid/index.esm.js +444 -447
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +60126 -59649
- package/farris.all.umd.cjs +30 -30
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/components.d.ts +1 -1
- package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
- package/types/data-grid/index.d.ts +2 -5
- package/types/data-grid/src/data-grid.component.d.ts +1 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +0 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
- package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +2 -3
- package/types/data-view/composition/visualization/use-visual-data-row.d.ts +1 -2
- package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
- package/types/dynamic-form/designer.d.ts +0 -1
- package/types/dynamic-form/index.d.ts +4 -3
- package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
- package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
- package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
- package/types/dynamic-form/src/response-form.props.d.ts +13 -1
- package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -0
- package/types/dynamic-resolver/src/types.d.ts +1 -0
- package/types/dynamic-view/index.d.ts +43 -3
- package/types/dynamic-view/src/components/maps.d.ts +6 -6
- package/types/dynamic-view/src/composition/index.d.ts +5 -0
- package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
- package/types/language-textbox/index.d.ts +3 -3
- package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
- package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/property-panel/src/property-panel.component.d.ts +3 -3
- package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
- package/types/tree-grid/src/tree-grid.props.d.ts +0 -1
- package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
- package/types/tree-view/src/tree-view.props.d.ts +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ref as g, computed as R, createVNode as
|
|
2
|
-
import { resolveAppearance as
|
|
3
|
-
import { getCustomStyle as
|
|
4
|
-
import { useFilter as
|
|
1
|
+
import { ref as g, computed as R, createVNode as u, Fragment as U, watch as j, withModifiers as Ae, withDirectives as He, vModelText as Ee, defineComponent as N, onMounted as ee, inject as Q } from "vue";
|
|
2
|
+
import { resolveAppearance as ue, createPropsResolver as ce, getPropsResolverGenerator as je } from "../dynamic-resolver/index.esm.js";
|
|
3
|
+
import { getCustomStyle as ae, getCustomClass as Z, FormSchemaEntityFieldType$Type as Y, withInstall as $e } from "../common/index.esm.js";
|
|
4
|
+
import { useFilter as Ge, useIdentify as Ne, useHierarchy as _e, useGroupData as ze, useDataView as Ue, useSelection as We, usePagination as qe, useRow as De, useEdit as Ke, useVisualDataBound as Xe, useVisualDataCell as Ye, useVisualDataRow as Je, useVisualGroupRow as Qe, useVisualSummaryRow as Ze, useVisualData as et, useSidebar as tt, useColumn as nt, useVirtualScroll as lt, getPagination as it } from "../data-view/index.esm.js";
|
|
5
5
|
import { LocaleService as te } from "../locale/index.esm.js";
|
|
6
6
|
import { FCheckbox as ne } from "../checkbox/index.esm.js";
|
|
7
|
-
import
|
|
8
|
-
import { isUndefined as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useDesignerComponent as
|
|
12
|
-
import { InputBaseProperty as
|
|
13
|
-
const
|
|
14
|
-
["appearance",
|
|
15
|
-
]),
|
|
7
|
+
import at from "../button-edit/index.esm.js";
|
|
8
|
+
import { isUndefined as ot } from "lodash-es";
|
|
9
|
+
import st from "../list-view/index.esm.js";
|
|
10
|
+
import rt from "../../designer/button-edit/index.esm.js";
|
|
11
|
+
import { useDesignerComponent as fe } from "../designer-canvas/index.esm.js";
|
|
12
|
+
import { InputBaseProperty as dt } from "../property-panel/index.esm.js";
|
|
13
|
+
const ut = /* @__PURE__ */ new Map([
|
|
14
|
+
["appearance", ue]
|
|
15
|
+
]), ct = "https://json-schema.org/draft/2020-12/schema", ft = "https://farris-design.gitee.io/order.schema.json", mt = "order", vt = "A Farris Component", gt = "object", ht = {
|
|
16
16
|
id: {
|
|
17
17
|
description: "The unique identifier for a order",
|
|
18
18
|
type: "string"
|
|
@@ -104,22 +104,22 @@ const mt = /* @__PURE__ */ new Map([
|
|
|
104
104
|
type: "string",
|
|
105
105
|
default: ""
|
|
106
106
|
}
|
|
107
|
-
},
|
|
107
|
+
}, yt = [
|
|
108
108
|
"id",
|
|
109
109
|
"type"
|
|
110
|
-
],
|
|
111
|
-
$schema:
|
|
112
|
-
$id:
|
|
113
|
-
title:
|
|
114
|
-
description:
|
|
115
|
-
type:
|
|
116
|
-
properties:
|
|
117
|
-
required:
|
|
110
|
+
], pt = {
|
|
111
|
+
$schema: ct,
|
|
112
|
+
$id: ft,
|
|
113
|
+
title: mt,
|
|
114
|
+
description: vt,
|
|
115
|
+
type: gt,
|
|
116
|
+
properties: ht,
|
|
117
|
+
required: yt
|
|
118
118
|
};
|
|
119
|
-
function
|
|
119
|
+
function bt(e, t, n) {
|
|
120
120
|
return t;
|
|
121
121
|
}
|
|
122
|
-
const
|
|
122
|
+
const Ct = "order", St = "A Farris Component", wt = "object", Ft = {
|
|
123
123
|
basic: {
|
|
124
124
|
description: "Basic Infomation",
|
|
125
125
|
title: "基本信息",
|
|
@@ -201,17 +201,17 @@ const Ft = "order", It = "A Farris Component", Vt = "object", kt = {
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
},
|
|
205
|
-
title:
|
|
206
|
-
description:
|
|
207
|
-
type:
|
|
208
|
-
categories:
|
|
204
|
+
}, It = {
|
|
205
|
+
title: Ct,
|
|
206
|
+
description: St,
|
|
207
|
+
type: wt,
|
|
208
|
+
categories: Ft
|
|
209
209
|
}, le = {
|
|
210
210
|
/** 排序列数据源 */
|
|
211
211
|
dataSource: { type: Array, default: [] },
|
|
212
212
|
/** 当前排序数组 */
|
|
213
213
|
items: { type: Array, default: [] }
|
|
214
|
-
},
|
|
214
|
+
}, oe = ce(le, pt, ut, bt, It), Vt = {
|
|
215
215
|
/** 列集合 */
|
|
216
216
|
columns: {
|
|
217
217
|
type: Array,
|
|
@@ -279,54 +279,54 @@ const Ft = "order", It = "A Farris Component", Vt = "object", kt = {
|
|
|
279
279
|
/** 分页 */
|
|
280
280
|
pagination: { type: Object, default: { enable: !1, size: 20 } }
|
|
281
281
|
};
|
|
282
|
-
function
|
|
283
|
-
function n(
|
|
284
|
-
const
|
|
285
|
-
let
|
|
286
|
-
for (;
|
|
287
|
-
|
|
288
|
-
return
|
|
289
|
-
}
|
|
290
|
-
function l(
|
|
291
|
-
const
|
|
292
|
-
return n(
|
|
293
|
-
const
|
|
294
|
-
let
|
|
295
|
-
for (;
|
|
296
|
-
const
|
|
297
|
-
if (
|
|
282
|
+
function kt(e, t) {
|
|
283
|
+
function n(o) {
|
|
284
|
+
const c = [];
|
|
285
|
+
let F = o.nextNode();
|
|
286
|
+
for (; F; )
|
|
287
|
+
c.push(F), F = o.nextNode();
|
|
288
|
+
return c;
|
|
289
|
+
}
|
|
290
|
+
function l(o, c) {
|
|
291
|
+
const F = document.createTreeWalker(o, NodeFilter.SHOW_TEXT);
|
|
292
|
+
return n(F).map((y) => ({ textNode: y, text: (y.textContent || "").toLocaleLowerCase() })).map(({ textNode: y, text: p }) => {
|
|
293
|
+
const C = [];
|
|
294
|
+
let x = 0;
|
|
295
|
+
for (; x < p.length; ) {
|
|
296
|
+
const V = p.indexOf(c, x);
|
|
297
|
+
if (V === -1)
|
|
298
298
|
break;
|
|
299
|
-
|
|
299
|
+
C.push(V), x = V + c.length;
|
|
300
300
|
}
|
|
301
|
-
return
|
|
302
|
-
const
|
|
303
|
-
return
|
|
301
|
+
return C.map((V) => {
|
|
302
|
+
const i = new Range();
|
|
303
|
+
return i.setStart(y, V), i.setEnd(y, V + c.length), i;
|
|
304
304
|
});
|
|
305
305
|
}).flat();
|
|
306
306
|
}
|
|
307
|
-
function
|
|
308
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
307
|
+
function d(o) {
|
|
308
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !o || !t))
|
|
309
309
|
return;
|
|
310
|
-
const
|
|
311
|
-
CSS.highlights.set("search-result",
|
|
310
|
+
const c = l(t.value, o.toLocaleLowerCase()), F = new Highlight(...c);
|
|
311
|
+
CSS.highlights.set("search-result", F);
|
|
312
312
|
}
|
|
313
|
-
return { search:
|
|
313
|
+
return { search: d };
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
const I = g(e.size),
|
|
317
|
-
var m,
|
|
318
|
-
return ((m = e.selection) == null ? void 0 : m.multiSelect) && ((
|
|
315
|
+
function se(e, t, n, l, d, o, c, F, T, b) {
|
|
316
|
+
const I = g(e.size), y = g(e.textField), p = g(e.titleField), C = g(e.disableField), x = R(() => {
|
|
317
|
+
var m, B;
|
|
318
|
+
return ((m = e.selection) == null ? void 0 : m.multiSelect) && ((B = e.selection) == null ? void 0 : B.showCheckbox);
|
|
319
319
|
}), {
|
|
320
|
-
onMouseenterItem:
|
|
321
|
-
onMouseoverItem:
|
|
322
|
-
onMouseoutItem:
|
|
323
|
-
} =
|
|
324
|
-
getKey:
|
|
325
|
-
listViewItemClass:
|
|
326
|
-
listViewItemStyle:
|
|
327
|
-
onCheckItem:
|
|
328
|
-
onClickItem:
|
|
329
|
-
} =
|
|
320
|
+
onMouseenterItem: V,
|
|
321
|
+
onMouseoverItem: i,
|
|
322
|
+
onMouseoutItem: r
|
|
323
|
+
} = o, {
|
|
324
|
+
getKey: a,
|
|
325
|
+
listViewItemClass: s,
|
|
326
|
+
listViewItemStyle: S,
|
|
327
|
+
onCheckItem: v,
|
|
328
|
+
onClickItem: f
|
|
329
|
+
} = c, O = R(() => {
|
|
330
330
|
const m = {
|
|
331
331
|
"text-overflow": "ellipsis",
|
|
332
332
|
overflow: "hidden",
|
|
@@ -337,260 +337,260 @@ function re(e, t, n, l, u, r, f, h, k, T) {
|
|
|
337
337
|
...m
|
|
338
338
|
};
|
|
339
339
|
});
|
|
340
|
-
function
|
|
341
|
-
return m.checked =
|
|
342
|
-
class:
|
|
343
|
-
id:
|
|
344
|
-
key:
|
|
345
|
-
style:
|
|
346
|
-
onClick: (E) =>
|
|
347
|
-
onMouseenter: (E) =>
|
|
348
|
-
onMouseover: (E) =>
|
|
349
|
-
onMouseout: (E) =>
|
|
350
|
-
}, [
|
|
340
|
+
function k(m, B, H) {
|
|
341
|
+
return m.checked = F.findIndexInSelectedItems(m) > -1, u("li", {
|
|
342
|
+
class: s(m, B),
|
|
343
|
+
id: a(m, B),
|
|
344
|
+
key: a(m, B),
|
|
345
|
+
style: S(m, B),
|
|
346
|
+
onClick: (E) => f(m, B, E),
|
|
347
|
+
onMouseenter: (E) => V(E, m, B),
|
|
348
|
+
onMouseover: (E) => i(E, m, B),
|
|
349
|
+
onMouseout: (E) => r(E, m, B)
|
|
350
|
+
}, [x.value && u("div", {
|
|
351
351
|
class: "f-list-select",
|
|
352
352
|
onClick: (E) => E.stopPropagation()
|
|
353
|
-
}, [
|
|
354
|
-
id: "list-" +
|
|
353
|
+
}, [u(ne, {
|
|
354
|
+
id: "list-" + a(m, B),
|
|
355
355
|
customClass: "listview-checkbox float-left",
|
|
356
|
-
disabled: m[
|
|
356
|
+
disabled: m[C.value],
|
|
357
357
|
checked: m.checked,
|
|
358
358
|
"onUpdate:checked": (E) => m.checked = E,
|
|
359
359
|
onChange: (E) => {
|
|
360
|
-
|
|
360
|
+
v(m, B, !E.checked);
|
|
361
361
|
}
|
|
362
|
-
}, null)]),
|
|
362
|
+
}, null)]), u("div", {
|
|
363
363
|
class: "f-list-content"
|
|
364
|
-
}, [
|
|
364
|
+
}, [u("div", {
|
|
365
365
|
class: e.itemContentClass,
|
|
366
366
|
style: O.value,
|
|
367
|
-
title: m.raw[
|
|
368
|
-
}, [m.raw[
|
|
367
|
+
title: m.raw[p.value] || m.raw[y.value]
|
|
368
|
+
}, [m.raw[y.value]])])]);
|
|
369
369
|
}
|
|
370
370
|
return {
|
|
371
|
-
renderItem:
|
|
371
|
+
renderItem: k
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
const I = g(e.multiSelect),
|
|
376
|
-
onMouseenterItem:
|
|
377
|
-
onMouseoverItem:
|
|
378
|
-
onMouseoutItem:
|
|
379
|
-
} =
|
|
380
|
-
getKey:
|
|
381
|
-
listViewItemClass:
|
|
382
|
-
listViewItemStyle:
|
|
383
|
-
onCheckItem:
|
|
384
|
-
onClickItem:
|
|
385
|
-
updateSelectedItems:
|
|
386
|
-
} =
|
|
387
|
-
function
|
|
388
|
-
return e.contentTemplate ?
|
|
389
|
-
item:
|
|
374
|
+
function Tt(e, t, n, l, d, o, c, F, T, b) {
|
|
375
|
+
const I = g(e.multiSelect), y = g(e.disableField), p = g(e.textField), {
|
|
376
|
+
onMouseenterItem: C,
|
|
377
|
+
onMouseoverItem: x,
|
|
378
|
+
onMouseoutItem: V
|
|
379
|
+
} = o, {
|
|
380
|
+
getKey: i,
|
|
381
|
+
listViewItemClass: r,
|
|
382
|
+
listViewItemStyle: a,
|
|
383
|
+
onCheckItem: s,
|
|
384
|
+
onClickItem: S,
|
|
385
|
+
updateSelectedItems: v
|
|
386
|
+
} = c;
|
|
387
|
+
function f(k, m, B) {
|
|
388
|
+
return e.contentTemplate ? u(U, null, [e.contentTemplate({
|
|
389
|
+
item: k.raw,
|
|
390
390
|
index: m,
|
|
391
|
-
selectedItem:
|
|
392
|
-
})]) : t.slots.content ?
|
|
393
|
-
item:
|
|
391
|
+
selectedItem: B
|
|
392
|
+
})]) : t.slots.content ? u(U, null, [t.slots.content && t.slots.content({
|
|
393
|
+
item: k.raw,
|
|
394
394
|
index: m,
|
|
395
|
-
selectedItem:
|
|
396
|
-
})]) :
|
|
395
|
+
selectedItem: B
|
|
396
|
+
})]) : u("div", {
|
|
397
397
|
style: "margin: 10px 0;"
|
|
398
|
-
}, [
|
|
399
|
-
}
|
|
400
|
-
function O(
|
|
401
|
-
return
|
|
402
|
-
class:
|
|
403
|
-
id:
|
|
404
|
-
key:
|
|
405
|
-
style:
|
|
406
|
-
onClick: (H) =>
|
|
407
|
-
onMouseenter: (H) =>
|
|
408
|
-
onMouseover: (H) =>
|
|
409
|
-
onMouseout: (H) =>
|
|
410
|
-
}, [I.value &&
|
|
398
|
+
}, [k.raw[p.value || "name"]]);
|
|
399
|
+
}
|
|
400
|
+
function O(k, m, B) {
|
|
401
|
+
return u("li", {
|
|
402
|
+
class: r(k, m),
|
|
403
|
+
id: i(k, m),
|
|
404
|
+
key: i(k, m),
|
|
405
|
+
style: a(k, m),
|
|
406
|
+
onClick: (H) => S(k, m, H),
|
|
407
|
+
onMouseenter: (H) => C(H, k, m),
|
|
408
|
+
onMouseover: (H) => x(H, k, m),
|
|
409
|
+
onMouseout: (H) => V(H, k, m)
|
|
410
|
+
}, [I.value && u("div", {
|
|
411
411
|
class: "f-list-select",
|
|
412
412
|
onClick: (H) => H.stopPropagation()
|
|
413
|
-
}, [
|
|
414
|
-
id: "list-" +
|
|
413
|
+
}, [u(ne, {
|
|
414
|
+
id: "list-" + i(k, m),
|
|
415
415
|
customClass: "listview-checkbox",
|
|
416
|
-
disabled:
|
|
417
|
-
checked:
|
|
418
|
-
"onUpdate:checked": (H) =>
|
|
416
|
+
disabled: k[y.value],
|
|
417
|
+
checked: k.checked,
|
|
418
|
+
"onUpdate:checked": (H) => k.checked = H,
|
|
419
419
|
onChange: (H) => {
|
|
420
|
-
|
|
420
|
+
s(k, m, !H.checked), v();
|
|
421
421
|
}
|
|
422
|
-
}, null)]),
|
|
422
|
+
}, null)]), u("div", {
|
|
423
423
|
class: "f-list-content"
|
|
424
|
-
}, [
|
|
424
|
+
}, [f(k, m, B)])]);
|
|
425
425
|
}
|
|
426
426
|
return {
|
|
427
427
|
renderItem: O
|
|
428
428
|
};
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
const I = g(e.multiSelect),
|
|
432
|
-
onMouseenterItem:
|
|
433
|
-
onMouseoverItem:
|
|
434
|
-
onMouseoutItem:
|
|
435
|
-
} =
|
|
436
|
-
getKey:
|
|
437
|
-
listViewItemClass:
|
|
438
|
-
onCheckItem:
|
|
439
|
-
onClickItem:
|
|
440
|
-
} =
|
|
441
|
-
dragstart:
|
|
442
|
-
dragenter:
|
|
443
|
-
dragover:
|
|
430
|
+
function xt(e, t, n, l, d, o, c, F, T, b) {
|
|
431
|
+
const I = g(e.multiSelect), y = g(e.disableField), p = g(e.textField), {
|
|
432
|
+
onMouseenterItem: C,
|
|
433
|
+
onMouseoverItem: x,
|
|
434
|
+
onMouseoutItem: V
|
|
435
|
+
} = o, {
|
|
436
|
+
getKey: i,
|
|
437
|
+
listViewItemClass: r,
|
|
438
|
+
onCheckItem: a,
|
|
439
|
+
onClickItem: s
|
|
440
|
+
} = c, {
|
|
441
|
+
dragstart: S,
|
|
442
|
+
dragenter: v,
|
|
443
|
+
dragover: f,
|
|
444
444
|
dragend: O
|
|
445
445
|
} = l, {
|
|
446
|
-
removeItem:
|
|
447
|
-
} =
|
|
446
|
+
removeItem: k
|
|
447
|
+
} = T, m = R(() => ({
|
|
448
448
|
margin: I.value ? "10px 0" : "10px 0px 10px 14px"
|
|
449
449
|
}));
|
|
450
|
-
function
|
|
451
|
-
const A =
|
|
452
|
-
A.title = A.scrollWidth > A.clientWidth ?
|
|
450
|
+
function B(h, w = "") {
|
|
451
|
+
const A = h.target;
|
|
452
|
+
A.title = A.scrollWidth > A.clientWidth ? w : "";
|
|
453
453
|
}
|
|
454
|
-
function H(
|
|
455
|
-
return
|
|
454
|
+
function H(h) {
|
|
455
|
+
return u("div", {
|
|
456
456
|
style: m.value,
|
|
457
|
-
onMouseenter: (
|
|
458
|
-
}, [
|
|
457
|
+
onMouseenter: (w) => B(w, h.raw[p.value || "name"])
|
|
458
|
+
}, [h.raw[p.value || "name"]]);
|
|
459
459
|
}
|
|
460
460
|
function E() {
|
|
461
461
|
return t.slots.itemContent ? t.slots.itemContent : H;
|
|
462
462
|
}
|
|
463
|
-
const
|
|
464
|
-
function
|
|
465
|
-
return
|
|
466
|
-
class:
|
|
467
|
-
id:
|
|
468
|
-
key:
|
|
469
|
-
onClick: (M) =>
|
|
470
|
-
onMouseenter: (M) =>
|
|
471
|
-
onMouseover: (M) =>
|
|
472
|
-
onMouseout: (M) =>
|
|
463
|
+
const G = E();
|
|
464
|
+
function P(h, w, A) {
|
|
465
|
+
return u("li", {
|
|
466
|
+
class: r(h, w),
|
|
467
|
+
id: i(h, w),
|
|
468
|
+
key: i(h, w),
|
|
469
|
+
onClick: (M) => s(h, w, M),
|
|
470
|
+
onMouseenter: (M) => C(M, h, w),
|
|
471
|
+
onMouseover: (M) => x(M, h, w),
|
|
472
|
+
onMouseout: (M) => V(M, h, w),
|
|
473
473
|
draggable: "true",
|
|
474
|
-
onDragstart: (M) =>
|
|
475
|
-
onDragenter: (M) =>
|
|
476
|
-
onDragend: (M) => O(M,
|
|
477
|
-
onDragover: (M) =>
|
|
478
|
-
}, [I.value &&
|
|
474
|
+
onDragstart: (M) => S(M, h, w),
|
|
475
|
+
onDragenter: (M) => v(M, w),
|
|
476
|
+
onDragend: (M) => O(M, h),
|
|
477
|
+
onDragover: (M) => f(M)
|
|
478
|
+
}, [I.value && u("div", {
|
|
479
479
|
class: "f-list-select",
|
|
480
480
|
onClick: (M) => M.stopPropagation()
|
|
481
|
-
}, [
|
|
482
|
-
id: "list-" +
|
|
481
|
+
}, [u(ne, {
|
|
482
|
+
id: "list-" + i(h, w),
|
|
483
483
|
customClass: "listview-checkbox",
|
|
484
|
-
disabled:
|
|
485
|
-
checked:
|
|
486
|
-
"onUpdate:checked": (M) =>
|
|
487
|
-
onChange: (M) =>
|
|
488
|
-
}, null)]),
|
|
484
|
+
disabled: h[y.value] || !h.checked,
|
|
485
|
+
checked: h.checked,
|
|
486
|
+
"onUpdate:checked": (M) => h.checked = M,
|
|
487
|
+
onChange: (M) => a(h, w, !M.checked)
|
|
488
|
+
}, null)]), u("div", {
|
|
489
489
|
class: "f-list-content"
|
|
490
|
-
}, [
|
|
490
|
+
}, [G(h)]), u("div", {
|
|
491
491
|
class: "f-list-remove",
|
|
492
492
|
onClick: (M) => {
|
|
493
|
-
M.stopPropagation(),
|
|
493
|
+
M.stopPropagation(), k(w);
|
|
494
494
|
}
|
|
495
|
-
}, [
|
|
495
|
+
}, [u("div", {
|
|
496
496
|
class: "f-list-remove-icon"
|
|
497
|
-
}, [
|
|
497
|
+
}, [u("i", {
|
|
498
498
|
class: "f-icon f-icon-remove_face"
|
|
499
|
-
}, null)])]),
|
|
499
|
+
}, null)])]), u("div", {
|
|
500
500
|
class: "f-list-handle"
|
|
501
|
-
}, [
|
|
501
|
+
}, [u("div", null, [u("i", {
|
|
502
502
|
class: "f-icon f-icon-drag-vertical"
|
|
503
503
|
}, null)])])]);
|
|
504
504
|
}
|
|
505
505
|
return {
|
|
506
|
-
renderItem:
|
|
506
|
+
renderItem: P
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
|
-
function
|
|
510
|
-
var
|
|
511
|
-
const I = g(((
|
|
512
|
-
collpaseGroupIconClass:
|
|
513
|
-
} =
|
|
514
|
-
toggleGroupRow:
|
|
515
|
-
} =
|
|
516
|
-
function
|
|
517
|
-
|
|
518
|
-
}
|
|
519
|
-
function
|
|
520
|
-
return t.slots.group ?
|
|
521
|
-
item:
|
|
522
|
-
index:
|
|
523
|
-
selectedItem:
|
|
524
|
-
})]) :
|
|
509
|
+
function Ot(e, t, n, l, d, o, c, F, T, b) {
|
|
510
|
+
var i;
|
|
511
|
+
const I = g(((i = e.group) == null ? void 0 : i.groupFields) || []), {
|
|
512
|
+
collpaseGroupIconClass: y
|
|
513
|
+
} = d, {
|
|
514
|
+
toggleGroupRow: p
|
|
515
|
+
} = b;
|
|
516
|
+
function C(r, a) {
|
|
517
|
+
a.collapse = !a.collapse, n.value = p(a.collapse ? "collapse" : "expand", a, n.value);
|
|
518
|
+
}
|
|
519
|
+
function x(r, a, s) {
|
|
520
|
+
return t.slots.group ? u(U, null, [t.slots.content && t.slots.group({
|
|
521
|
+
item: r.raw,
|
|
522
|
+
index: a,
|
|
523
|
+
selectedItem: s
|
|
524
|
+
})]) : u("div", {
|
|
525
525
|
class: "f-navlookup-recentHeader",
|
|
526
|
-
onClick: (
|
|
527
|
-
}, [
|
|
526
|
+
onClick: (S) => C(S, r)
|
|
527
|
+
}, [u("div", {
|
|
528
528
|
class: "fv-grid-group-row-icon"
|
|
529
|
-
}, [
|
|
530
|
-
class:
|
|
531
|
-
}, null)]),
|
|
529
|
+
}, [u("span", {
|
|
530
|
+
class: y(r)
|
|
531
|
+
}, null)]), u("div", {
|
|
532
532
|
class: "f-navlookup-recommandLabel"
|
|
533
|
-
}, [
|
|
533
|
+
}, [r.raw[I.value[r.layer]]])]);
|
|
534
534
|
}
|
|
535
|
-
function
|
|
536
|
-
return
|
|
535
|
+
function V(r, a, s) {
|
|
536
|
+
return r.layer > -1 && x(r, a, s);
|
|
537
537
|
}
|
|
538
538
|
return {
|
|
539
|
-
renderItem:
|
|
539
|
+
renderItem: V
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
const { dataView:
|
|
544
|
-
function
|
|
545
|
-
if (
|
|
546
|
-
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(
|
|
542
|
+
function Pt(e, t, n, l) {
|
|
543
|
+
const { dataView: d } = n, { updateSelectedItems: o } = l;
|
|
544
|
+
function c(F) {
|
|
545
|
+
if (F > -1 && F < d.value.length) {
|
|
546
|
+
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(d.value[F]))
|
|
547
547
|
return;
|
|
548
|
-
const
|
|
549
|
-
|
|
548
|
+
const T = d.value.splice(F, 1);
|
|
549
|
+
o(), t.emit("removeItem", T[0]);
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
|
-
return { removeItem:
|
|
552
|
+
return { removeItem: c };
|
|
553
553
|
}
|
|
554
|
-
function
|
|
555
|
-
const I = g(e.view),
|
|
554
|
+
function Mt(e, t, n, l, d, o, c, F, T, b) {
|
|
555
|
+
const I = g(e.view), y = g(e.view === "CardView"), p = g({}), C = Pt(e, t, l, T), x = R(() => ({
|
|
556
556
|
"f-list-view-group": !0,
|
|
557
557
|
"f-list-view-group-multiselect": e.multiSelect,
|
|
558
|
-
"d-flex":
|
|
559
|
-
"flex-wrap":
|
|
560
|
-
})),
|
|
561
|
-
R(() =>
|
|
562
|
-
function
|
|
563
|
-
return I.value === "SingleView" ?
|
|
564
|
-
}
|
|
565
|
-
const
|
|
566
|
-
renderItem:
|
|
567
|
-
} =
|
|
568
|
-
renderItem:
|
|
569
|
-
} =
|
|
570
|
-
function
|
|
571
|
-
return n.value.filter((m) => m.visible !== !1).map((m,
|
|
558
|
+
"d-flex": y.value,
|
|
559
|
+
"flex-wrap": y.value
|
|
560
|
+
})), V = R(() => !!n.value && n.value.length > 0), i = R(() => n.value.length === 0);
|
|
561
|
+
R(() => i.value && !t.slots.empty);
|
|
562
|
+
function r() {
|
|
563
|
+
return I.value === "SingleView" ? se : I.value === "DraggableView" ? xt : (I.value === "ContentView" || I.value === "CardView") && (e.contentTemplate || t.slots.content) ? Tt : se;
|
|
564
|
+
}
|
|
565
|
+
const a = r(), {
|
|
566
|
+
renderItem: s
|
|
567
|
+
} = a(e, t, n, b, d, o, T, c, C, F), {
|
|
568
|
+
renderItem: S
|
|
569
|
+
} = Ot(e, t, n, b, d, o, T, c, C, F), v = [s, S];
|
|
570
|
+
function f() {
|
|
571
|
+
return n.value.filter((m) => m.visible !== !1).map((m, B) => v[m.type](m, B, p));
|
|
572
572
|
}
|
|
573
573
|
function O() {
|
|
574
|
-
return
|
|
574
|
+
return u("div", {
|
|
575
575
|
class: "f-list-view-emptydata",
|
|
576
576
|
style: "margin: 0 auto;"
|
|
577
|
-
}, [
|
|
577
|
+
}, [u("p", {
|
|
578
578
|
class: "f-empty-title"
|
|
579
579
|
}, [e.emptyTemplate ? e.emptyTemplate() : t.slots.empty ? t.slots.empty() : te.getLocaleValue("listView.emptyMessage")])]);
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
return
|
|
583
|
-
class:
|
|
581
|
+
function k() {
|
|
582
|
+
return u("ul", {
|
|
583
|
+
class: x.value,
|
|
584
584
|
style: "list-style: none;"
|
|
585
|
-
}, [
|
|
585
|
+
}, [V.value && f(), i.value && O()]);
|
|
586
586
|
}
|
|
587
587
|
return {
|
|
588
|
-
renderListArea:
|
|
588
|
+
renderListArea: k
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function Bt(e, t, n) {
|
|
592
592
|
function l() {
|
|
593
|
-
return t.slots.header &&
|
|
593
|
+
return t.slots.header && u("div", {
|
|
594
594
|
class: "f-list-view-header"
|
|
595
595
|
}, [t.slots.header()]);
|
|
596
596
|
}
|
|
@@ -598,75 +598,75 @@ function Ht(e, t, n) {
|
|
|
598
598
|
renderHeader: l
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
const l = g(e.headerClass),
|
|
603
|
-
function
|
|
604
|
-
|
|
601
|
+
function re(e, t, n) {
|
|
602
|
+
const l = g(e.headerClass), d = g(e.placeholder), o = g(""), c = R(() => !o.value), F = R(() => !!o.value);
|
|
603
|
+
function T(p) {
|
|
604
|
+
o.value = "";
|
|
605
605
|
}
|
|
606
|
-
|
|
607
|
-
e.enableHighlightSearch && n.search(
|
|
606
|
+
j(o, (p) => {
|
|
607
|
+
e.enableHighlightSearch && n.search(p), t.emit("afterSearch", p);
|
|
608
608
|
});
|
|
609
|
-
const
|
|
610
|
-
const
|
|
609
|
+
const b = R(() => {
|
|
610
|
+
const p = {
|
|
611
611
|
"form-group": !0,
|
|
612
612
|
"farris-form-group": !0
|
|
613
613
|
};
|
|
614
|
-
return l.value && l.value.split(" ").reduce((
|
|
614
|
+
return l.value && l.value.split(" ").reduce((x, V) => (x[V] = !0, x), p), p;
|
|
615
615
|
});
|
|
616
|
-
function I(
|
|
616
|
+
function I(p) {
|
|
617
617
|
}
|
|
618
|
-
function
|
|
619
|
-
return
|
|
618
|
+
function y() {
|
|
619
|
+
return u("div", {
|
|
620
620
|
class: "f-list-view-header",
|
|
621
|
-
onClick:
|
|
622
|
-
}, [
|
|
623
|
-
class:
|
|
624
|
-
}, [
|
|
621
|
+
onClick: Ae(() => I, ["prevent", "stop"])
|
|
622
|
+
}, [u("div", {
|
|
623
|
+
class: b.value
|
|
624
|
+
}, [u("div", {
|
|
625
625
|
class: "farris-input-wrap"
|
|
626
|
-
}, [
|
|
626
|
+
}, [u("div", {
|
|
627
627
|
class: "f-cmp-inputgroup"
|
|
628
|
-
}, [
|
|
628
|
+
}, [u("div", {
|
|
629
629
|
class: "input-group f-state-editable"
|
|
630
|
-
}, [
|
|
630
|
+
}, [He(u("input", {
|
|
631
631
|
class: "form-control f-utils-fill text-left",
|
|
632
|
-
"onUpdate:modelValue": (
|
|
632
|
+
"onUpdate:modelValue": (p) => o.value = p,
|
|
633
633
|
name: "input-group-value",
|
|
634
634
|
type: "text",
|
|
635
|
-
placeholder:
|
|
635
|
+
placeholder: d.value,
|
|
636
636
|
autocomplete: "off"
|
|
637
|
-
}, null), [[
|
|
637
|
+
}, null), [[Ee, o.value]]), u("div", {
|
|
638
638
|
class: "input-group-append"
|
|
639
|
-
}, [
|
|
639
|
+
}, [F.value && u("span", {
|
|
640
640
|
class: "input-group-text input-group-clear",
|
|
641
|
-
onClick: (
|
|
642
|
-
}, [
|
|
641
|
+
onClick: (p) => T()
|
|
642
|
+
}, [u("i", {
|
|
643
643
|
class: "f-icon f-icon-close-circle"
|
|
644
|
-
}, null)]),
|
|
644
|
+
}, null)]), c.value && u("span", {
|
|
645
645
|
class: "input-group-text"
|
|
646
|
-
}, [
|
|
646
|
+
}, [u("span", {
|
|
647
647
|
class: "f-icon f-icon-search"
|
|
648
648
|
}, null)])])])])])])]);
|
|
649
649
|
}
|
|
650
650
|
return {
|
|
651
|
-
renderHeader:
|
|
651
|
+
renderHeader: y
|
|
652
652
|
};
|
|
653
653
|
}
|
|
654
|
-
function
|
|
655
|
-
const e = g(""), t = g(-1), n = g(""), l = g(-1),
|
|
656
|
-
function
|
|
657
|
-
l.value =
|
|
654
|
+
function Rt() {
|
|
655
|
+
const e = g(""), t = g(-1), n = g(""), l = g(-1), d = g(!1);
|
|
656
|
+
function o(y, p, C) {
|
|
657
|
+
l.value = C;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
|
|
659
|
+
function c(y, p, C) {
|
|
660
|
+
d.value || (l.value = C);
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function F(y, p, C) {
|
|
663
663
|
l.value = -1;
|
|
664
664
|
}
|
|
665
|
-
function k() {
|
|
666
|
-
u.value = !0;
|
|
667
|
-
}
|
|
668
665
|
function T() {
|
|
669
|
-
|
|
666
|
+
d.value = !0;
|
|
667
|
+
}
|
|
668
|
+
function b() {
|
|
669
|
+
d.value = !1;
|
|
670
670
|
}
|
|
671
671
|
function I() {
|
|
672
672
|
t.value = -1, e.value = "";
|
|
@@ -676,26 +676,26 @@ function At() {
|
|
|
676
676
|
focusedItemId: n,
|
|
677
677
|
hoverIndex: l,
|
|
678
678
|
clearActiveItem: I,
|
|
679
|
-
onMouseenterItem:
|
|
680
|
-
onMouseoverItem:
|
|
681
|
-
onMouseoutItem:
|
|
682
|
-
resumeHover:
|
|
683
|
-
suspendHover:
|
|
679
|
+
onMouseenterItem: o,
|
|
680
|
+
onMouseoverItem: c,
|
|
681
|
+
onMouseoutItem: F,
|
|
682
|
+
resumeHover: b,
|
|
683
|
+
suspendHover: T
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
|
-
function
|
|
687
|
-
const
|
|
688
|
-
let
|
|
689
|
-
function
|
|
690
|
-
const
|
|
691
|
-
|
|
692
|
-
}
|
|
693
|
-
function
|
|
694
|
-
const { left: O, top:
|
|
686
|
+
function Lt(e, t, n, l) {
|
|
687
|
+
const d = g(e.idField), { dataView: o } = n, c = g(-1), F = g(!1), { activeIndex: T, focusedItemId: b, hoverIndex: I, resumeHover: y, suspendHover: p } = l;
|
|
688
|
+
let C, x = 0, V = 0;
|
|
689
|
+
function i(f, O) {
|
|
690
|
+
const k = f - x, m = O - V;
|
|
691
|
+
C.style.left = parseInt(C.style.left) + k + "px", C.style.top = parseInt(C.style.top) + m + "px", x = f, V = O;
|
|
692
|
+
}
|
|
693
|
+
function r(f) {
|
|
694
|
+
const { left: O, top: k } = f.getBoundingClientRect(), m = f.cloneNode(!0);
|
|
695
695
|
return m.className = m.className + " f-listview-drag-moving", m.style.cssText = `
|
|
696
696
|
position:absolute;
|
|
697
697
|
left:${O}px;
|
|
698
|
-
top:${document.documentElement.scrollTop ?
|
|
698
|
+
top:${document.documentElement.scrollTop ? k + document.documentElement.scrollTop : k}px;
|
|
699
699
|
z-index: 999999;
|
|
700
700
|
pointer-events: none;
|
|
701
701
|
border-radius: 10px;
|
|
@@ -704,225 +704,224 @@ function Et(e, t, n, l) {
|
|
|
704
704
|
align-items: center;
|
|
705
705
|
float: none;
|
|
706
706
|
text-align: initial;
|
|
707
|
-
width:${getComputedStyle(
|
|
708
|
-
height:${getComputedStyle(
|
|
707
|
+
width:${getComputedStyle(f).width};
|
|
708
|
+
height:${getComputedStyle(f).height};
|
|
709
709
|
`, m.children[0].style.cssText = "overflow: hidden;flex: 1 1 auto;width: 100%;", m.children[0].children[0].style.cssText = `
|
|
710
710
|
margin: 10px 0px 10px 14px;
|
|
711
711
|
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
|
712
712
|
`, m.children[1].style.cssText = "width: 30px;padding: 0 14px 0 0", m.children[2].style.cssText = "padding: 0 14px 0 0;", document.body.appendChild(m), m;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
715
|
-
if (
|
|
716
|
-
if (
|
|
714
|
+
function a(f, O, k) {
|
|
715
|
+
if (f.stopPropagation(), p(), O) {
|
|
716
|
+
if (C = r(f.target), f.dataTransfer) {
|
|
717
717
|
const m = new Image();
|
|
718
|
-
m.src = "",
|
|
718
|
+
m.src = "", f.dataTransfer.setDragImage(m, 0, 0);
|
|
719
719
|
}
|
|
720
|
-
|
|
721
|
-
|
|
720
|
+
x = f.pageX, V = f.pageY, setTimeout(() => {
|
|
721
|
+
c.value = k, F.value = !0, O.moving = !0;
|
|
722
722
|
});
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
if (
|
|
727
|
-
const
|
|
728
|
-
m.splice(
|
|
725
|
+
function s(f, O) {
|
|
726
|
+
if (f.preventDefault(), c.value !== O) {
|
|
727
|
+
const k = o.value[c.value], m = o.value;
|
|
728
|
+
m.splice(c.value, 1), m.splice(O, 0, k), c.value = O, i(f.pageX, f.pageY);
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
|
-
function
|
|
732
|
-
|
|
731
|
+
function S(f) {
|
|
732
|
+
f.preventDefault(), f.dataTransfer && (f.dataTransfer.dropEffect = "move"), i(f.pageX, f.pageY);
|
|
733
733
|
}
|
|
734
|
-
function
|
|
735
|
-
O && (O.moving = !1,
|
|
736
|
-
|
|
737
|
-
}),
|
|
734
|
+
function v(f, O) {
|
|
735
|
+
O && (O.moving = !1, C && (document.body.removeChild(C), C = null)), o.value.forEach((k, m) => {
|
|
736
|
+
k.__fv_index__ = m;
|
|
737
|
+
}), F.value = !1, y(), I.value = O.raw.__fv_index__, T.value = O.raw.__fv_index__, b.value = O.raw[d.value], t.emit("change", o.value), t.emit("activeChange", [O.raw]);
|
|
738
738
|
}
|
|
739
739
|
return {
|
|
740
|
-
dragstart:
|
|
741
|
-
dragenter:
|
|
742
|
-
dragover:
|
|
743
|
-
dragend:
|
|
744
|
-
isDragging:
|
|
740
|
+
dragstart: a,
|
|
741
|
+
dragenter: s,
|
|
742
|
+
dragover: S,
|
|
743
|
+
dragend: v,
|
|
744
|
+
isDragging: F
|
|
745
745
|
};
|
|
746
746
|
}
|
|
747
|
-
function
|
|
748
|
-
const
|
|
747
|
+
function At(e, t, n, l, d, o) {
|
|
748
|
+
const c = g(e.idField), F = g(e.disableField), T = g(e.draggable);
|
|
749
749
|
g(e.itemClass);
|
|
750
|
-
const
|
|
751
|
-
let
|
|
752
|
-
return
|
|
750
|
+
const b = g(e.selection.multiSelect ?? !1), I = g(e.selection.multiSelectMode), { isDragging: y } = l, { activeIndex: p, focusedItemId: C, hoverIndex: x } = d, { clearSelection: V, getSelectedItems: i, toggleSelectItem: r, currentSelectedDataId: a } = o, s = g(i()), S = (P) => s.value.length === 0 ? !1 : s.value.some((h) => {
|
|
751
|
+
let w = "";
|
|
752
|
+
return h.data ? w = h.data[c.value] : w = h[c.value], w === P;
|
|
753
753
|
});
|
|
754
|
-
function
|
|
755
|
-
|
|
754
|
+
function v() {
|
|
755
|
+
s.value = i();
|
|
756
756
|
}
|
|
757
|
-
function
|
|
758
|
-
return
|
|
757
|
+
function f(P, h) {
|
|
758
|
+
return P.raw[c.value] != null ? P.raw[c.value] : "";
|
|
759
759
|
}
|
|
760
|
-
function O(
|
|
761
|
-
const
|
|
760
|
+
function O(P, h) {
|
|
761
|
+
const w = {
|
|
762
762
|
"f-list-view-group-item": !0,
|
|
763
|
-
"f-list-view-draggable-item":
|
|
764
|
-
"f-un-click": !
|
|
765
|
-
"f-un-select": !!
|
|
763
|
+
"f-list-view-draggable-item": T.value,
|
|
764
|
+
"f-un-click": !P.checked,
|
|
765
|
+
"f-un-select": !!P.raw[F.value],
|
|
766
766
|
"f-listview-active": (
|
|
767
767
|
// 多选
|
|
768
|
-
|
|
769
|
-
!
|
|
768
|
+
b.value && S(f(P)) || // 单选
|
|
769
|
+
!b.value && P.raw[c.value] === a.value
|
|
770
770
|
),
|
|
771
|
-
"f-listview-hover": !
|
|
772
|
-
moving: !!
|
|
771
|
+
"f-listview-hover": !y.value && h === x.value,
|
|
772
|
+
moving: !!P.moving
|
|
773
773
|
};
|
|
774
774
|
if (typeof e.itemClass == "string")
|
|
775
|
-
return Z(
|
|
775
|
+
return Z(w, e.itemClass);
|
|
776
776
|
if (typeof e.itemClass == "function") {
|
|
777
|
-
const A = e.itemClass(
|
|
778
|
-
return Z(
|
|
777
|
+
const A = e.itemClass(P);
|
|
778
|
+
return Z(w, A);
|
|
779
779
|
}
|
|
780
|
-
return
|
|
780
|
+
return w;
|
|
781
781
|
}
|
|
782
|
-
function
|
|
783
|
-
const
|
|
782
|
+
function k(P, h) {
|
|
783
|
+
const w = {};
|
|
784
784
|
if (typeof e.itemStyle == "string")
|
|
785
|
-
return
|
|
785
|
+
return ae(w, e.itemStyle);
|
|
786
786
|
if (typeof e.itemStyle == "function") {
|
|
787
|
-
const A = e.itemStyle(
|
|
788
|
-
return
|
|
787
|
+
const A = e.itemStyle(P);
|
|
788
|
+
return ae(w, A);
|
|
789
789
|
}
|
|
790
|
-
return
|
|
790
|
+
return w;
|
|
791
791
|
}
|
|
792
|
-
const m = R(() => !
|
|
793
|
-
function P
|
|
794
|
-
|
|
792
|
+
const m = R(() => !b.value);
|
|
793
|
+
function B(P, h, w) {
|
|
794
|
+
P.checked = w, !P.raw[F.value] && (m.value && (C.value = P.raw[c.value]), r(P));
|
|
795
795
|
}
|
|
796
|
-
const H = R(() =>
|
|
797
|
-
function
|
|
798
|
-
if (
|
|
799
|
-
|
|
796
|
+
const H = R(() => b.value && I.value === "OnCheckClearByClick"), E = R(() => !b.value || b.value && (I.value === "OnCheckAndClick" || I.value === "OnClick"));
|
|
797
|
+
function G(P, h, w) {
|
|
798
|
+
if (P.raw[F.value]) {
|
|
799
|
+
w == null || w.preventDefault(), w == null || w.stopPropagation();
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
|
-
|
|
802
|
+
a.value = P.raw[c.value], C.value = P.raw[c.value], p.value = h, H.value && V(), E.value && (r(P), v()), t.emit("clickItem", { data: s.value, index: h, dataItem: P.raw }), t.emit("activeChange", s.value);
|
|
803
803
|
}
|
|
804
804
|
return {
|
|
805
|
-
getKey:
|
|
806
|
-
selectedItems:
|
|
805
|
+
getKey: f,
|
|
806
|
+
selectedItems: s,
|
|
807
807
|
listViewItemClass: O,
|
|
808
|
-
listViewItemStyle:
|
|
809
|
-
updateSelectedItems:
|
|
810
|
-
onCheckItem:
|
|
811
|
-
onClickItem:
|
|
808
|
+
listViewItemStyle: k,
|
|
809
|
+
updateSelectedItems: v,
|
|
810
|
+
onCheckItem: B,
|
|
811
|
+
onClickItem: G
|
|
812
812
|
};
|
|
813
813
|
}
|
|
814
|
-
const
|
|
814
|
+
const me = /* @__PURE__ */ N({
|
|
815
815
|
name: "FListView",
|
|
816
|
-
props:
|
|
816
|
+
props: Vt,
|
|
817
817
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectItem", "unSelectItem", "selectionChange", "removeItem", "change", "activeChange", "pageIndexChanged", "pageSizeChanged", "changed", "selectionUpdate"],
|
|
818
818
|
setup(e, t) {
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
const E = R(() => {
|
|
819
|
+
const n = g(), l = g(!0), d = g(!1), o = g([]), c = 0, F = g(e.columns), T = Ge(e, t), b = Ne(e), I = _e(e), y = ze(e, b), p = Ue(e, /* @__PURE__ */ new Map(), T, I, b), C = We(e, p, b, o, t), x = kt(e, n), V = qe(e, p), i = R(() => p.dataView.value.length), r = De(e, t, C, b), a = Ke(e, t, b, r, o), s = Xe(e), S = Ye(e, {}, s), v = Je(e, p, a, I, b, s, S), f = Qe(e, b, S, v), O = Ze(e, b, S, v), k = et(e, F, p, i, c, v, f, O), {
|
|
820
|
+
getVisualData: m
|
|
821
|
+
} = k;
|
|
822
|
+
o.value = m(0, i.value + c - 1);
|
|
823
|
+
const B = R(() => {
|
|
825
824
|
const L = {
|
|
826
825
|
"f-list-view": !0,
|
|
827
826
|
"f-list-view-multiple": e.multiSelect
|
|
828
827
|
};
|
|
829
828
|
return e.size !== "default" && (L[`${e.size}-item`] = !0), Z(L, e.customClass);
|
|
830
|
-
}),
|
|
831
|
-
function
|
|
832
|
-
return e.header === "SearchBar" ?
|
|
829
|
+
}), H = R(() => !!t.slots.footer || l.value);
|
|
830
|
+
function E() {
|
|
831
|
+
return e.header === "SearchBar" ? re : e.header === "ContentHeader" ? Bt : re;
|
|
833
832
|
}
|
|
834
|
-
const
|
|
835
|
-
renderHeader:
|
|
836
|
-
} =
|
|
837
|
-
renderListArea:
|
|
838
|
-
} =
|
|
839
|
-
function
|
|
840
|
-
|
|
833
|
+
const G = E(), {
|
|
834
|
+
renderHeader: P
|
|
835
|
+
} = G(e, t, x), h = Rt(), w = Lt(e, t, p, h), A = At(e, t, o, w, h, C), {
|
|
836
|
+
renderListArea: M
|
|
837
|
+
} = Mt(e, t, o, p, y, h, C, k, A, w);
|
|
838
|
+
function _(L) {
|
|
839
|
+
x.search(L);
|
|
841
840
|
}
|
|
842
|
-
function
|
|
843
|
-
L && (
|
|
841
|
+
function be(L) {
|
|
842
|
+
L && (p.load(L), o.value = m(0, i.value + c - 1));
|
|
844
843
|
}
|
|
845
|
-
function
|
|
846
|
-
|
|
844
|
+
function Ce() {
|
|
845
|
+
C.clearSelection(), h.clearActiveItem();
|
|
847
846
|
}
|
|
848
|
-
function
|
|
849
|
-
return
|
|
847
|
+
function Se() {
|
|
848
|
+
return A.selectedItems.value;
|
|
850
849
|
}
|
|
851
|
-
function
|
|
852
|
-
return
|
|
850
|
+
function we() {
|
|
851
|
+
return A.selectedItems.value.map((L) => L[b.idField.value]);
|
|
853
852
|
}
|
|
854
853
|
function ie(L) {
|
|
855
|
-
|
|
854
|
+
C.selectedValues.value = L, A.updateSelectedItems();
|
|
856
855
|
}
|
|
857
|
-
function
|
|
858
|
-
return
|
|
856
|
+
function Fe() {
|
|
857
|
+
return C.currentSelectedDataId.value;
|
|
859
858
|
}
|
|
860
|
-
function
|
|
861
|
-
|
|
859
|
+
function Ie(L) {
|
|
860
|
+
r.activeRowById(L);
|
|
862
861
|
}
|
|
863
|
-
function
|
|
864
|
-
const
|
|
865
|
-
z && W > -1 &&
|
|
862
|
+
function Ve(L) {
|
|
863
|
+
const $ = b.idField.value, z = o.value.find((X) => X.raw[$] === L), W = o.value.findIndex((X) => X.raw[$] === L);
|
|
864
|
+
z && W > -1 && A.onClickItem(z, W);
|
|
866
865
|
}
|
|
867
|
-
function
|
|
868
|
-
const
|
|
869
|
-
z &&
|
|
866
|
+
function ke(L) {
|
|
867
|
+
const $ = b.idField.value, z = o.value.find((W) => W.raw[$] === L);
|
|
868
|
+
z && r.changeRow(z);
|
|
870
869
|
}
|
|
871
|
-
function
|
|
872
|
-
|
|
870
|
+
function Te(L) {
|
|
871
|
+
V.updatePagination(L);
|
|
873
872
|
}
|
|
874
|
-
function
|
|
875
|
-
return
|
|
873
|
+
function xe(L) {
|
|
874
|
+
return o.value.filter(($) => L.includes($.raw[e.idField]));
|
|
876
875
|
}
|
|
877
876
|
t.expose({
|
|
878
|
-
search:
|
|
879
|
-
updateDataSource:
|
|
880
|
-
clearSelection:
|
|
881
|
-
getSelections:
|
|
877
|
+
search: _,
|
|
878
|
+
updateDataSource: be,
|
|
879
|
+
clearSelection: Ce,
|
|
880
|
+
getSelections: Se,
|
|
882
881
|
updateSelectionByIds: ie,
|
|
883
|
-
getSelectionIds:
|
|
884
|
-
activeRowById:
|
|
885
|
-
getCurrentRowId:
|
|
886
|
-
clickRowItemById:
|
|
887
|
-
updatePagination:
|
|
888
|
-
getVisibleDataByIds:
|
|
889
|
-
selectRowById:
|
|
882
|
+
getSelectionIds: we,
|
|
883
|
+
activeRowById: Ie,
|
|
884
|
+
getCurrentRowId: Fe,
|
|
885
|
+
clickRowItemById: Ve,
|
|
886
|
+
updatePagination: Te,
|
|
887
|
+
getVisibleDataByIds: xe,
|
|
888
|
+
selectRowById: ke
|
|
890
889
|
});
|
|
891
|
-
function
|
|
890
|
+
function Oe(L) {
|
|
892
891
|
e.multiSelect && (L.preventDefault(), L.stopPropagation());
|
|
893
892
|
}
|
|
894
|
-
|
|
895
|
-
L !==
|
|
893
|
+
j(() => e.selectionValues, (L, $) => {
|
|
894
|
+
L !== $ && ie(L);
|
|
896
895
|
});
|
|
897
|
-
const
|
|
898
|
-
sidebarWidth:
|
|
899
|
-
showSidebarCheckBox:
|
|
900
|
-
} =
|
|
901
|
-
applyColumnSorter:
|
|
902
|
-
columnContext:
|
|
903
|
-
updateColumnRenderContext:
|
|
904
|
-
} =
|
|
905
|
-
shouldRenderPagination:
|
|
906
|
-
} =
|
|
907
|
-
renderDataGridPagination:
|
|
908
|
-
} =
|
|
909
|
-
return () =>
|
|
910
|
-
class:
|
|
911
|
-
onClick:
|
|
912
|
-
}, [
|
|
913
|
-
ref:
|
|
896
|
+
const Pe = tt(e, C), {
|
|
897
|
+
sidebarWidth: Me,
|
|
898
|
+
showSidebarCheckBox: an
|
|
899
|
+
} = Pe, Be = nt(e, t), {
|
|
900
|
+
applyColumnSorter: on,
|
|
901
|
+
columnContext: Re,
|
|
902
|
+
updateColumnRenderContext: sn
|
|
903
|
+
} = Be, Le = lt(e, p, o, Re, k, i, c, Me, a), {
|
|
904
|
+
shouldRenderPagination: rn
|
|
905
|
+
} = V, {
|
|
906
|
+
renderDataGridPagination: dn
|
|
907
|
+
} = it(e, t, p, Le, V, C);
|
|
908
|
+
return () => u("div", {
|
|
909
|
+
class: B.value,
|
|
910
|
+
onClick: Oe
|
|
911
|
+
}, [P(), u("div", {
|
|
912
|
+
ref: n,
|
|
914
913
|
class: "f-list-view-content",
|
|
915
914
|
onMouseover: () => {
|
|
916
|
-
|
|
915
|
+
d.value = !0;
|
|
917
916
|
},
|
|
918
917
|
onMouseleave: () => {
|
|
919
|
-
|
|
918
|
+
d.value = !1;
|
|
920
919
|
}
|
|
921
|
-
}, [
|
|
920
|
+
}, [M()]), H.value && u("div", {
|
|
922
921
|
class: "f-list-view-footer"
|
|
923
922
|
}, [e.footerTemplate ? e.footerTemplate() : t.slots.footer && t.slots.footer()])]);
|
|
924
923
|
}
|
|
925
|
-
}),
|
|
924
|
+
}), Ht = {
|
|
926
925
|
/**
|
|
927
926
|
* 组件标识
|
|
928
927
|
*/
|
|
@@ -948,7 +947,7 @@ const ve = /* @__PURE__ */ _({
|
|
|
948
947
|
*/
|
|
949
948
|
customClass: { type: Object, default: {} }
|
|
950
949
|
};
|
|
951
|
-
function
|
|
950
|
+
function Et(e, t) {
|
|
952
951
|
function n(l) {
|
|
953
952
|
l.stopPropagation(), e.disabled || t.emit("click", l);
|
|
954
953
|
}
|
|
@@ -956,50 +955,50 @@ function Gt(e, t) {
|
|
|
956
955
|
onClickButton: n
|
|
957
956
|
};
|
|
958
957
|
}
|
|
959
|
-
function
|
|
958
|
+
function jt(e) {
|
|
960
959
|
const t = R(() => {
|
|
961
960
|
const l = {
|
|
962
961
|
"f-icon": !0
|
|
963
962
|
};
|
|
964
963
|
if (e.icon) {
|
|
965
|
-
const
|
|
966
|
-
|
|
964
|
+
const d = e.icon.trim().split(" ");
|
|
965
|
+
d && d.length && d.reduce((o, c) => (o[c] = !0, o), l);
|
|
967
966
|
}
|
|
968
967
|
return l;
|
|
969
968
|
}), n = R(() => !!(e.icon && e.icon.trim()));
|
|
970
969
|
return { iconClass: t, shouldShowIcon: n };
|
|
971
970
|
}
|
|
972
|
-
const
|
|
971
|
+
const ve = /* @__PURE__ */ N({
|
|
973
972
|
name: "FButton",
|
|
974
|
-
props:
|
|
973
|
+
props: Ht,
|
|
975
974
|
emits: ["click"],
|
|
976
975
|
setup(e, t) {
|
|
977
976
|
const {
|
|
978
977
|
onClickButton: n
|
|
979
|
-
} =
|
|
978
|
+
} = Et(e, t), {
|
|
980
979
|
iconClass: l,
|
|
981
|
-
shouldShowIcon:
|
|
982
|
-
} =
|
|
983
|
-
const
|
|
980
|
+
shouldShowIcon: d
|
|
981
|
+
} = jt(e), o = R(() => {
|
|
982
|
+
const c = {
|
|
984
983
|
btn: !0,
|
|
985
984
|
"btn-lg": e.size === "large",
|
|
986
985
|
"btn-md": e.size !== "large" && e.size !== "small",
|
|
987
986
|
"btn-sm": e.size === "small",
|
|
988
|
-
"btn-icontext":
|
|
987
|
+
"btn-icontext": d.value
|
|
989
988
|
};
|
|
990
|
-
return
|
|
989
|
+
return c[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((F, T) => (F[T] = e.customClass[T], F), c), c;
|
|
991
990
|
});
|
|
992
|
-
return () =>
|
|
993
|
-
class:
|
|
991
|
+
return () => u("button", {
|
|
992
|
+
class: o.value,
|
|
994
993
|
disabled: e.disabled,
|
|
995
|
-
onClick: (
|
|
996
|
-
}, [
|
|
994
|
+
onClick: (c) => n(c)
|
|
995
|
+
}, [d.value && u("i", {
|
|
997
996
|
class: l.value
|
|
998
997
|
}, null), t.slots.default && t.slots.default()]);
|
|
999
998
|
}
|
|
1000
|
-
}),
|
|
1001
|
-
["appearance",
|
|
1002
|
-
]),
|
|
999
|
+
}), ge = /* @__PURE__ */ new Map([
|
|
1000
|
+
["appearance", ue]
|
|
1001
|
+
]), $t = "https://json-schema.org/draft/2020-12/schema", Gt = "https://farris-design.gitee.io/combo-list.schema.json", Nt = "combo-list", _t = "A Farris Input Component", zt = "object", Ut = {
|
|
1003
1002
|
id: {
|
|
1004
1003
|
description: "The unique identifier for a combo list",
|
|
1005
1004
|
type: "string"
|
|
@@ -1201,36 +1200,41 @@ const ge = /* @__PURE__ */ _({
|
|
|
1201
1200
|
description: "清空事件",
|
|
1202
1201
|
type: "string",
|
|
1203
1202
|
default: ""
|
|
1203
|
+
},
|
|
1204
|
+
onDataChanged: {
|
|
1205
|
+
description: "清空事件",
|
|
1206
|
+
type: "string",
|
|
1207
|
+
default: ""
|
|
1204
1208
|
}
|
|
1205
|
-
},
|
|
1209
|
+
}, Wt = [
|
|
1206
1210
|
"type"
|
|
1207
|
-
],
|
|
1211
|
+
], qt = [
|
|
1208
1212
|
"id",
|
|
1209
1213
|
"appearance",
|
|
1210
1214
|
"binding",
|
|
1211
1215
|
"visible"
|
|
1212
|
-
],
|
|
1216
|
+
], Dt = {
|
|
1213
1217
|
onClear: "清空事件",
|
|
1214
1218
|
onChange: "值变化事件",
|
|
1215
1219
|
beforeOpen: "打开下拉面板前事件"
|
|
1216
|
-
},
|
|
1217
|
-
$schema:
|
|
1218
|
-
$id:
|
|
1219
|
-
title:
|
|
1220
|
-
description:
|
|
1221
|
-
type:
|
|
1222
|
-
properties:
|
|
1223
|
-
required:
|
|
1224
|
-
ignore:
|
|
1225
|
-
events:
|
|
1220
|
+
}, he = {
|
|
1221
|
+
$schema: $t,
|
|
1222
|
+
$id: Gt,
|
|
1223
|
+
title: Nt,
|
|
1224
|
+
description: _t,
|
|
1225
|
+
type: zt,
|
|
1226
|
+
properties: Ut,
|
|
1227
|
+
required: Wt,
|
|
1228
|
+
ignore: qt,
|
|
1229
|
+
events: Dt
|
|
1226
1230
|
};
|
|
1227
|
-
function
|
|
1231
|
+
function ye(e, t, n) {
|
|
1228
1232
|
return t;
|
|
1229
1233
|
}
|
|
1230
|
-
function
|
|
1234
|
+
function Kt() {
|
|
1231
1235
|
function e(t, n, l) {
|
|
1232
|
-
const
|
|
1233
|
-
return
|
|
1236
|
+
const d = {};
|
|
1237
|
+
return d.beforeOpen = (o) => n.call("beforeOpen", t, [o, t], l), d;
|
|
1234
1238
|
}
|
|
1235
1239
|
return {
|
|
1236
1240
|
resolve: e
|
|
@@ -1405,16 +1409,16 @@ const K = {
|
|
|
1405
1409
|
enableHighlightSearch: { type: Boolean, default: !0 },
|
|
1406
1410
|
minPanelWidth: { type: Number, default: 160 },
|
|
1407
1411
|
popupOnClick: { type: Boolean, default: !0 }
|
|
1408
|
-
},
|
|
1412
|
+
}, Xt = Object.assign({}, K, {
|
|
1409
1413
|
readonly: {}
|
|
1410
1414
|
});
|
|
1411
|
-
|
|
1412
|
-
const
|
|
1415
|
+
ce(K, he, ge, ye);
|
|
1416
|
+
const pe = je(
|
|
1413
1417
|
K,
|
|
1414
|
-
ye,
|
|
1415
1418
|
he,
|
|
1416
|
-
|
|
1417
|
-
|
|
1419
|
+
ge,
|
|
1420
|
+
ye
|
|
1421
|
+
), Yt = Kt(), Jt = {
|
|
1418
1422
|
dataSource: { type: Array, default: [] },
|
|
1419
1423
|
enableSearch: { type: Boolean, default: !1 },
|
|
1420
1424
|
idField: { type: String, default: "id" },
|
|
@@ -1435,65 +1439,65 @@ const be = Ne(
|
|
|
1435
1439
|
},
|
|
1436
1440
|
// 搜索启用高亮
|
|
1437
1441
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1438
|
-
},
|
|
1442
|
+
}, Qt = /* @__PURE__ */ N({
|
|
1439
1443
|
name: "FComboListContainer",
|
|
1440
|
-
props:
|
|
1444
|
+
props: Jt,
|
|
1441
1445
|
emits: ["selectionChange"],
|
|
1442
1446
|
setup(e, t) {
|
|
1443
|
-
const n = g(), l = g(e.dataSource),
|
|
1447
|
+
const n = g(), l = g(e.dataSource), d = g([]), o = g(e.separator), c = g(e.width), F = g(e.maxHeight), T = R(() => e.multiSelect), b = g(e.multiSelect ? String(e.selectedValues).split(o.value) : [e.selectedValues]), I = R(() => ({
|
|
1444
1448
|
enableSelectRow: !0,
|
|
1445
1449
|
multiSelect: e.multiSelect,
|
|
1446
1450
|
multiSelectMode: "OnCheckAndClick",
|
|
1447
|
-
showCheckbox:
|
|
1451
|
+
showCheckbox: T.value,
|
|
1448
1452
|
showSelectAll: !1,
|
|
1449
1453
|
showSelection: !0
|
|
1450
1454
|
}));
|
|
1451
|
-
|
|
1455
|
+
j(e.dataSource, () => {
|
|
1452
1456
|
l.value = e.dataSource;
|
|
1453
1457
|
}), R(() => e.enableSearch ? "SearchBar" : "ContentHeader");
|
|
1454
|
-
const
|
|
1455
|
-
const
|
|
1456
|
-
return
|
|
1458
|
+
const y = R(() => {
|
|
1459
|
+
const i = {};
|
|
1460
|
+
return c.value !== void 0 && (i.width = `${c.value}px`), F.value !== void 0 && F.value > 0 && (i.maxHeight = `${F.value}px`), i;
|
|
1457
1461
|
});
|
|
1458
|
-
function
|
|
1459
|
-
n.value.search(
|
|
1462
|
+
function p(i) {
|
|
1463
|
+
n.value.search(i);
|
|
1460
1464
|
}
|
|
1461
|
-
function
|
|
1462
|
-
|
|
1465
|
+
function C(i) {
|
|
1466
|
+
d.value = i.map((r) => Object.assign({}, r)), b.value = i.map((r) => r[e.idField]), t.emit("selectionChange", d.value);
|
|
1463
1467
|
}
|
|
1464
|
-
function
|
|
1468
|
+
function x(i) {
|
|
1465
1469
|
if (e.enableHighlightSearch)
|
|
1466
1470
|
return;
|
|
1467
|
-
let
|
|
1471
|
+
let r = [];
|
|
1468
1472
|
const {
|
|
1469
|
-
searchOption:
|
|
1473
|
+
searchOption: a
|
|
1470
1474
|
} = e;
|
|
1471
|
-
typeof
|
|
1475
|
+
typeof a == "function" ? r = l.value.filter((s) => a(i, s)) : r = l.value.filter((s) => s[e.valueField].indexOf(i) > -1 || s[e.textField].indexOf(i) > -1), n.value.updateDataSource(r);
|
|
1472
1476
|
}
|
|
1473
|
-
|
|
1474
|
-
e.multiSelect ?
|
|
1477
|
+
j([() => e.selectedValues], ([i]) => {
|
|
1478
|
+
e.multiSelect ? b.value = i.split(o.value) : b.value = [i];
|
|
1475
1479
|
});
|
|
1476
|
-
function
|
|
1477
|
-
n.value.activeRowById(
|
|
1480
|
+
function V(i) {
|
|
1481
|
+
n.value.activeRowById(i);
|
|
1478
1482
|
}
|
|
1479
1483
|
return ee(() => {
|
|
1480
|
-
var
|
|
1484
|
+
var i, r;
|
|
1481
1485
|
if (!e.multiSelect) {
|
|
1482
|
-
const
|
|
1483
|
-
let
|
|
1484
|
-
const
|
|
1485
|
-
if (!
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1486
|
+
const a = (i = b.value) == null ? void 0 : i[0];
|
|
1487
|
+
let s = a;
|
|
1488
|
+
const S = l.value.map((v) => v[e.valueField || e.idField]);
|
|
1489
|
+
if (!ot(a) && S.includes(a)) {
|
|
1490
|
+
const v = typeof a, f = typeof ((r = l.value[0]) == null ? void 0 : r[e.valueField || e.idField]);
|
|
1491
|
+
f === "number" && v !== f && (s = Number(a)), f === "boolean" && v !== f && (s = a === "true" ? !0 : a === "false" ? !1 : a), V(s);
|
|
1488
1492
|
}
|
|
1489
1493
|
}
|
|
1490
1494
|
}), t.expose({
|
|
1491
|
-
search:
|
|
1492
|
-
activeRowById:
|
|
1493
|
-
}), () =>
|
|
1495
|
+
search: p,
|
|
1496
|
+
activeRowById: V
|
|
1497
|
+
}), () => u("div", {
|
|
1494
1498
|
class: "f-combo-list-container",
|
|
1495
|
-
style:
|
|
1496
|
-
}, [
|
|
1499
|
+
style: y.value
|
|
1500
|
+
}, [u(st, {
|
|
1497
1501
|
ref: n,
|
|
1498
1502
|
size: "small",
|
|
1499
1503
|
itemClass: "f-combo-list-item",
|
|
@@ -1507,216 +1511,216 @@ const be = Ne(
|
|
|
1507
1511
|
multiSelect: e.multiSelect,
|
|
1508
1512
|
selection: I.value,
|
|
1509
1513
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1510
|
-
selectionValues:
|
|
1511
|
-
onSelectionUpdate:
|
|
1512
|
-
onAfterSearch:
|
|
1514
|
+
selectionValues: b.value,
|
|
1515
|
+
onSelectionUpdate: C,
|
|
1516
|
+
onAfterSearch: x
|
|
1513
1517
|
}, null)]);
|
|
1514
1518
|
}
|
|
1515
1519
|
});
|
|
1516
|
-
function
|
|
1517
|
-
const n = g(""), l = g(e.modelValue),
|
|
1518
|
-
function
|
|
1519
|
-
const
|
|
1520
|
-
return
|
|
1521
|
-
const O =
|
|
1522
|
-
return O -
|
|
1520
|
+
function Zt(e, t) {
|
|
1521
|
+
const n = g(""), l = g(e.modelValue), d = g(e.data || []), o = g(e.editable);
|
|
1522
|
+
function c(i) {
|
|
1523
|
+
const r = e.multiSelect ? String(i).split(e.separator) : [String(i)], a = r.map((v) => [v, !0]), s = new Map(a);
|
|
1524
|
+
return d.value.filter((v) => s.has(String(v[e.valueField]))).sort((v, f) => {
|
|
1525
|
+
const O = r.indexOf(v[e.valueField]), k = r.indexOf(f[e.valueField]);
|
|
1526
|
+
return O - k;
|
|
1523
1527
|
});
|
|
1524
1528
|
}
|
|
1525
|
-
function
|
|
1526
|
-
const
|
|
1527
|
-
n.value =
|
|
1529
|
+
function F(i) {
|
|
1530
|
+
const r = c(i).map((a) => a[e.textField]).join(e.separator);
|
|
1531
|
+
n.value = o.value ? r || i : r;
|
|
1528
1532
|
}
|
|
1529
|
-
function
|
|
1533
|
+
function T(i) {
|
|
1530
1534
|
if (e.multiSelect) {
|
|
1531
|
-
const
|
|
1532
|
-
return
|
|
1535
|
+
const r = i.split(e.separator).map((s) => [s, !0]), a = new Map(r);
|
|
1536
|
+
return d.value.filter((s) => a.has(s[e.textField]));
|
|
1533
1537
|
}
|
|
1534
|
-
return
|
|
1538
|
+
return d.value.filter((r) => "" + r[e.textField] === i);
|
|
1535
1539
|
}
|
|
1536
|
-
function
|
|
1537
|
-
const
|
|
1538
|
-
return
|
|
1540
|
+
function b(i) {
|
|
1541
|
+
const r = {};
|
|
1542
|
+
return r[e.idField] = i, r[e.textField] = i, [r];
|
|
1539
1543
|
}
|
|
1540
|
-
function I(
|
|
1541
|
-
let
|
|
1542
|
-
const
|
|
1543
|
-
return
|
|
1544
|
+
function I(i) {
|
|
1545
|
+
let r = T(i);
|
|
1546
|
+
const a = r && r.length > 0;
|
|
1547
|
+
return o.value && !a && (r = b(i)), r;
|
|
1544
1548
|
}
|
|
1545
|
-
function
|
|
1546
|
-
const { url:
|
|
1547
|
-
if (!
|
|
1549
|
+
function y() {
|
|
1550
|
+
const { url: i, method: r = "GET", headers: a = { "Content-Type": "application/json;charset=utf-8;" }, body: s = null } = e.remote;
|
|
1551
|
+
if (!i)
|
|
1548
1552
|
return;
|
|
1549
|
-
const
|
|
1550
|
-
let
|
|
1551
|
-
fetch(new Request(
|
|
1552
|
-
var
|
|
1553
|
-
if (
|
|
1554
|
-
return
|
|
1555
|
-
throw
|
|
1556
|
-
}).then((
|
|
1557
|
-
|
|
1558
|
-
}).catch((
|
|
1559
|
-
console.warn(
|
|
1553
|
+
const S = r.toLowerCase() === "get" ? { method: r, headers: a } : { method: r, headers: a, body: s };
|
|
1554
|
+
let v = !1;
|
|
1555
|
+
fetch(new Request(i, S)).then((f) => {
|
|
1556
|
+
var k, m;
|
|
1557
|
+
if (f.status === 200)
|
|
1558
|
+
return v = !!((m = (k = f.headers) == null ? void 0 : k.get("content-type")) != null && m.includes("application/json")), v ? f.text() : f.json();
|
|
1559
|
+
throw f.status === 405 ? new Error(te.getLocaleValue("comboList.remoteError")) : new Error(f.statusText);
|
|
1560
|
+
}).then((f) => {
|
|
1561
|
+
f.length && (d.value = v ? JSON.parse(f) : f);
|
|
1562
|
+
}).catch((f) => {
|
|
1563
|
+
console.warn(f);
|
|
1560
1564
|
});
|
|
1561
1565
|
}
|
|
1562
|
-
e.remote && (e.load ? e.load().then((
|
|
1563
|
-
|
|
1564
|
-
}).catch((
|
|
1565
|
-
console.log(
|
|
1566
|
-
}) :
|
|
1567
|
-
|
|
1568
|
-
}),
|
|
1566
|
+
e.remote && (e.load ? e.load().then((i) => {
|
|
1567
|
+
d.value = i;
|
|
1568
|
+
}).catch((i) => {
|
|
1569
|
+
console.log(i);
|
|
1570
|
+
}) : y()), j(() => e.data, () => {
|
|
1571
|
+
d.value = e.data;
|
|
1572
|
+
}), j([d], ([i], [r]) => {
|
|
1569
1573
|
if (e.modelValue != null && !e.multiSelect) {
|
|
1570
|
-
const
|
|
1571
|
-
|
|
1574
|
+
const a = i.find((s) => s[e.valueField] === l.value);
|
|
1575
|
+
a ? a[e.valueField] !== l.value ? (l.value = a[e.valueField], n.value = a[e.textField], t.emit("update:modelValue", a[e.valueField]), t.emit("change", [a], a[e.valueField])) : n.value !== a[e.textField] && (n.value = a[e.textField]) : l.value !== "" && (l.value = "", n.value = "", t.emit("update:modelValue", ""), t.emit("change", [], ""));
|
|
1572
1576
|
}
|
|
1573
|
-
}),
|
|
1574
|
-
|
|
1577
|
+
}), j(() => e.modelValue, (i, r) => {
|
|
1578
|
+
r !== i && (l.value = i, F(i));
|
|
1575
1579
|
});
|
|
1576
|
-
function
|
|
1577
|
-
|
|
1580
|
+
function p(i) {
|
|
1581
|
+
d.value = i, t.emit("dataChanged", i);
|
|
1578
1582
|
}
|
|
1579
|
-
function
|
|
1580
|
-
return
|
|
1583
|
+
function C() {
|
|
1584
|
+
return d.value;
|
|
1581
1585
|
}
|
|
1582
|
-
function
|
|
1586
|
+
function x() {
|
|
1583
1587
|
return n.value;
|
|
1584
1588
|
}
|
|
1585
|
-
function
|
|
1586
|
-
const
|
|
1587
|
-
return !e.beforeOpen || !
|
|
1589
|
+
function V() {
|
|
1590
|
+
const i = typeof e.beforeOpen == "function";
|
|
1591
|
+
return !e.beforeOpen || !i ? Promise.resolve(!0) : Promise.resolve().then(() => e.beforeOpen({ instance: { updateDataSource: p, getData: C, getDisplayText: x } })).then((r) => typeof (r == null ? void 0 : r.canOpen) == "boolean" ? r == null ? void 0 : r.canOpen : !0);
|
|
1588
1592
|
}
|
|
1589
|
-
return
|
|
1590
|
-
dataSource:
|
|
1593
|
+
return F(e.modelValue), {
|
|
1594
|
+
dataSource: d,
|
|
1591
1595
|
displayText: n,
|
|
1592
|
-
editable:
|
|
1596
|
+
editable: o,
|
|
1593
1597
|
modelValue: l,
|
|
1594
|
-
beforeOpenList:
|
|
1595
|
-
getItemsByDisplayText:
|
|
1596
|
-
getItemsByValue:
|
|
1598
|
+
beforeOpenList: V,
|
|
1599
|
+
getItemsByDisplayText: T,
|
|
1600
|
+
getItemsByValue: c,
|
|
1597
1601
|
getSelectedItemsByDisplayText: I
|
|
1598
1602
|
};
|
|
1599
1603
|
}
|
|
1600
|
-
const q = /* @__PURE__ */
|
|
1604
|
+
const q = /* @__PURE__ */ N({
|
|
1601
1605
|
name: "FComboList",
|
|
1602
1606
|
props: K,
|
|
1603
|
-
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1607
|
+
emits: ["clear", "update:modelValue", "change", "input", "dataChanged"],
|
|
1604
1608
|
setup(e, t) {
|
|
1605
|
-
const n = g(), l = g(),
|
|
1606
|
-
dataSource:
|
|
1607
|
-
displayText:
|
|
1609
|
+
const n = g(), l = g(), d = g(e.disabled || e.readonly), o = g(e.enableClear), c = g(e.enableSearch), F = g(e.readonly), {
|
|
1610
|
+
dataSource: T,
|
|
1611
|
+
displayText: b,
|
|
1608
1612
|
editable: I,
|
|
1609
|
-
modelValue:
|
|
1610
|
-
getItemsByDisplayText:
|
|
1611
|
-
getItemsByValue:
|
|
1612
|
-
beforeOpenList:
|
|
1613
|
-
} =
|
|
1614
|
-
|
|
1615
|
-
const
|
|
1616
|
-
function
|
|
1617
|
-
!
|
|
1613
|
+
modelValue: y,
|
|
1614
|
+
getItemsByDisplayText: p,
|
|
1615
|
+
getItemsByValue: C,
|
|
1616
|
+
beforeOpenList: x
|
|
1617
|
+
} = Zt(e, t), V = g(e.dropDownIcon);
|
|
1618
|
+
V.value === '<span class="f-icon f-icon-arrow-chevron-down"></span>' && (V.value = '<span id="' + e.id + '-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');
|
|
1619
|
+
const i = R(() => e.multiSelect), r = R(() => l.value ? l.value.elementRef.getBoundingClientRect().width : 0);
|
|
1620
|
+
function a() {
|
|
1621
|
+
!i.value && l.value && l.value.hidePopup();
|
|
1618
1622
|
}
|
|
1619
|
-
function
|
|
1620
|
-
|
|
1621
|
-
let
|
|
1622
|
-
|
|
1623
|
+
function s(h) {
|
|
1624
|
+
b.value = h.map((A) => A[e.textField]).join(e.separator) || y.value;
|
|
1625
|
+
let w = "";
|
|
1626
|
+
h.length === 1 ? w = h[0][e.valueField] : w = h.map((A) => A[e.valueField]).join(e.separator), y.value !== w && (y.value = w, t.emit("update:modelValue", y.value), t.emit("change", h, y.value));
|
|
1623
1627
|
}
|
|
1624
|
-
function
|
|
1625
|
-
const
|
|
1626
|
-
|
|
1628
|
+
function S() {
|
|
1629
|
+
const h = C(y.value);
|
|
1630
|
+
s(h);
|
|
1627
1631
|
}
|
|
1628
|
-
function
|
|
1629
|
-
|
|
1632
|
+
function v() {
|
|
1633
|
+
F.value || b.value;
|
|
1630
1634
|
}
|
|
1631
|
-
function
|
|
1632
|
-
var
|
|
1633
|
-
|
|
1635
|
+
function f(h) {
|
|
1636
|
+
var w;
|
|
1637
|
+
y.value = "", (w = n.value) == null || w.activeRowById(""), t.emit("clear");
|
|
1634
1638
|
}
|
|
1635
|
-
function O(
|
|
1636
|
-
var
|
|
1637
|
-
e.enableSearch && e.enableHighlightSearch && ((
|
|
1639
|
+
function O(h) {
|
|
1640
|
+
var w, A;
|
|
1641
|
+
e.enableSearch && e.enableHighlightSearch && ((w = n.value) == null || w.search(h)), (A = n.value) == null || A.activeRowById(h), t.emit("change", [y.value], y.value);
|
|
1638
1642
|
}
|
|
1639
|
-
function
|
|
1643
|
+
function k(h) {
|
|
1640
1644
|
if (e.multiSelect) {
|
|
1641
|
-
const
|
|
1645
|
+
const w = p(h);
|
|
1642
1646
|
e.viewType;
|
|
1643
|
-
const M =
|
|
1644
|
-
|
|
1645
|
-
} else
|
|
1647
|
+
const M = w.map((_) => _[e.idField || e.valueField]).join(e.separator);
|
|
1648
|
+
y.value !== M && (y.value = M, t.emit("update:modelValue", y.value), t.emit("change", w, y.value));
|
|
1649
|
+
} else h !== y.value && (y.value = h, t.emit("update:modelValue", y.value), t.emit("change", [], h));
|
|
1646
1650
|
}
|
|
1647
1651
|
function m() {
|
|
1648
|
-
return
|
|
1652
|
+
return b.value;
|
|
1649
1653
|
}
|
|
1650
|
-
function
|
|
1654
|
+
function B(h) {
|
|
1651
1655
|
const {
|
|
1652
|
-
value:
|
|
1653
|
-
} =
|
|
1654
|
-
O(
|
|
1656
|
+
value: w
|
|
1657
|
+
} = h.target;
|
|
1658
|
+
O(w), t.emit("input", w);
|
|
1655
1659
|
}
|
|
1656
1660
|
function H() {
|
|
1657
1661
|
l.value.hidePopup();
|
|
1658
1662
|
}
|
|
1659
|
-
function E(
|
|
1660
|
-
|
|
1663
|
+
function E(h) {
|
|
1664
|
+
T.value = h;
|
|
1661
1665
|
}
|
|
1662
|
-
function
|
|
1663
|
-
return
|
|
1666
|
+
function G() {
|
|
1667
|
+
return T.value;
|
|
1664
1668
|
}
|
|
1665
|
-
const
|
|
1669
|
+
const P = {
|
|
1666
1670
|
getDisplayText: m,
|
|
1667
1671
|
hidePopup: H,
|
|
1668
1672
|
updateDataSource: E,
|
|
1669
|
-
getData:
|
|
1673
|
+
getData: G
|
|
1670
1674
|
};
|
|
1671
|
-
return t.expose(
|
|
1672
|
-
|
|
1673
|
-
}), () =>
|
|
1675
|
+
return t.expose(P), j([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([h, w, A, M, _]) => {
|
|
1676
|
+
d.value = h, I.value = w, o.value = A, c.value = M, F.value = _;
|
|
1677
|
+
}), () => u(at, {
|
|
1674
1678
|
ref: l,
|
|
1675
1679
|
id: e.id,
|
|
1676
|
-
disable:
|
|
1677
|
-
readonly:
|
|
1680
|
+
disable: d.value,
|
|
1681
|
+
readonly: F.value,
|
|
1678
1682
|
forcePlaceholder: e.forcePlaceholder,
|
|
1679
1683
|
editable: I.value,
|
|
1680
|
-
buttonContent:
|
|
1684
|
+
buttonContent: V.value,
|
|
1681
1685
|
placeholder: e.placeholder === "请选择" ? te.getLocaleValue("comboList.placeholder") : e.placeholder,
|
|
1682
|
-
enableClear:
|
|
1686
|
+
enableClear: o.value,
|
|
1683
1687
|
maxLength: e.maxLength,
|
|
1684
1688
|
tabIndex: e.tabIndex,
|
|
1685
1689
|
enableTitle: e.enableTitle,
|
|
1686
1690
|
multiSelect: e.multiSelect,
|
|
1687
1691
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
1688
|
-
modelValue:
|
|
1689
|
-
"onUpdate:modelValue": (
|
|
1692
|
+
modelValue: b.value,
|
|
1693
|
+
"onUpdate:modelValue": (h) => b.value = h,
|
|
1690
1694
|
focusOnCreated: e.focusOnCreated,
|
|
1691
1695
|
selectOnCreated: e.selectOnCreated,
|
|
1692
|
-
onClear:
|
|
1693
|
-
onClick:
|
|
1694
|
-
onChange:
|
|
1695
|
-
onBlur:
|
|
1696
|
-
onInput:
|
|
1697
|
-
beforeOpen:
|
|
1696
|
+
onClear: f,
|
|
1697
|
+
onClick: v,
|
|
1698
|
+
onChange: k,
|
|
1699
|
+
onBlur: S,
|
|
1700
|
+
onInput: B,
|
|
1701
|
+
beforeOpen: x,
|
|
1698
1702
|
placement: e.placement,
|
|
1699
1703
|
popupMinWidth: e.minPanelWidth,
|
|
1700
1704
|
popupClass: "f-combo-list-wrapper",
|
|
1701
1705
|
popupOnClick: e.popupOnClick,
|
|
1702
1706
|
limitContentBySpace: !0
|
|
1703
1707
|
}, {
|
|
1704
|
-
default: () => [
|
|
1708
|
+
default: () => [u(Qt, {
|
|
1705
1709
|
ref: n,
|
|
1706
1710
|
idField: e.idField,
|
|
1707
1711
|
valueField: e.valueField,
|
|
1708
1712
|
textField: e.textField,
|
|
1709
1713
|
titleField: e.titleField,
|
|
1710
|
-
dataSource:
|
|
1711
|
-
selectedValues:
|
|
1714
|
+
dataSource: T.value,
|
|
1715
|
+
selectedValues: y.value,
|
|
1712
1716
|
separator: e.separator,
|
|
1713
1717
|
multiSelect: e.multiSelect,
|
|
1714
|
-
enableSearch:
|
|
1718
|
+
enableSearch: c.value,
|
|
1715
1719
|
maxHeight: e.maxHeight,
|
|
1716
1720
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1717
|
-
width: e.fitEditor ?
|
|
1718
|
-
onSelectionChange: (
|
|
1719
|
-
|
|
1721
|
+
width: e.fitEditor ? r.value : void 0,
|
|
1722
|
+
onSelectionChange: (h) => {
|
|
1723
|
+
s(h), a();
|
|
1720
1724
|
}
|
|
1721
1725
|
}, null)]
|
|
1722
1726
|
});
|
|
@@ -1727,12 +1731,12 @@ const q = /* @__PURE__ */ _({
|
|
|
1727
1731
|
e.editor.remote = e.editor.remote || {}, e.editor.remote[t] = n;
|
|
1728
1732
|
}
|
|
1729
1733
|
};
|
|
1730
|
-
class
|
|
1734
|
+
class en extends dt {
|
|
1731
1735
|
constructor(t, n) {
|
|
1732
1736
|
super(t, n);
|
|
1733
1737
|
}
|
|
1734
1738
|
getCommonEditorProperties(t) {
|
|
1735
|
-
var n, l,
|
|
1739
|
+
var n, l, d;
|
|
1736
1740
|
return {
|
|
1737
1741
|
viewType: {
|
|
1738
1742
|
visible: !!((n = t.editor) != null && n.multiSelect),
|
|
@@ -1748,7 +1752,7 @@ class ln extends ft {
|
|
|
1748
1752
|
refreshPanelAfterChanged: !0
|
|
1749
1753
|
},
|
|
1750
1754
|
separator: {
|
|
1751
|
-
visible: !!((l = t.editor) != null && l.multiSelect) && ((
|
|
1755
|
+
visible: !!((l = t.editor) != null && l.multiSelect) && ((d = t.editor) == null ? void 0 : d.viewType) === "text",
|
|
1752
1756
|
description: "下拉列表启用多选且数据展示类型为文本时的分隔符",
|
|
1753
1757
|
title: "分隔符",
|
|
1754
1758
|
type: "enum",
|
|
@@ -1778,14 +1782,14 @@ class ln extends ft {
|
|
|
1778
1782
|
};
|
|
1779
1783
|
}
|
|
1780
1784
|
getEditorProperties(t) {
|
|
1781
|
-
var
|
|
1785
|
+
var T, b, I, y, p, C, x, V, i, r, a, s;
|
|
1782
1786
|
const n = this;
|
|
1783
1787
|
let l = "";
|
|
1784
|
-
if (((
|
|
1785
|
-
const
|
|
1786
|
-
(
|
|
1788
|
+
if (((T = t == null ? void 0 : t.binding) == null ? void 0 : T.type) === "Form") {
|
|
1789
|
+
const S = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1790
|
+
(b = S == null ? void 0 : S.schemaField) != null && b.type && (l = S.schemaField.type.$type);
|
|
1787
1791
|
}
|
|
1788
|
-
const
|
|
1792
|
+
const d = this.getPropertyEditorParams(t, ["Variable"]), o = !t.editor.dataSourceType || t.editor.dataSourceType === "static", c = ((y = (I = this.designViewModelField) == null ? void 0 : I.type) == null ? void 0 : y.$type) === Y.StringType && ((p = t.editor) == null ? void 0 : p.type) === "combo-list" && ((C = t.editor) == null ? void 0 : C.dataSourceType) === "dynamic" && !((V = (x = t.editor) == null ? void 0 : x.remote) != null && V.url) && !((i = t.editor) != null && i.multiSelect);
|
|
1789
1793
|
return n.getComponentConfig(t, { type: "combo-list" }, {
|
|
1790
1794
|
// enableSearch: {
|
|
1791
1795
|
// description: "编辑状态下启用搜索",
|
|
@@ -1812,10 +1816,10 @@ class ln extends ft {
|
|
|
1812
1816
|
},
|
|
1813
1817
|
dataSource: {
|
|
1814
1818
|
description: "动态数据源绑定变量",
|
|
1815
|
-
visible:
|
|
1819
|
+
visible: c,
|
|
1816
1820
|
title: "数据",
|
|
1817
1821
|
editor: {
|
|
1818
|
-
...
|
|
1822
|
+
...d,
|
|
1819
1823
|
controlName: "",
|
|
1820
1824
|
enableClear: !0
|
|
1821
1825
|
},
|
|
@@ -1825,13 +1829,13 @@ class ln extends ft {
|
|
|
1825
1829
|
description: "",
|
|
1826
1830
|
title: "数据",
|
|
1827
1831
|
type: "array",
|
|
1828
|
-
visible:
|
|
1832
|
+
visible: o,
|
|
1829
1833
|
...n.getItemCollectionEditor(t, t.editor.valueField, t.editor.textField),
|
|
1830
1834
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1831
1835
|
refreshPanelAfterChanged: !0
|
|
1832
1836
|
},
|
|
1833
1837
|
url: {
|
|
1834
|
-
visible: t.editor.dataSourceType === "dynamic" && !((
|
|
1838
|
+
visible: t.editor.dataSourceType === "dynamic" && !((r = t.editor) != null && r.dataSource),
|
|
1835
1839
|
$converter: de,
|
|
1836
1840
|
description: "",
|
|
1837
1841
|
title: "服务端API",
|
|
@@ -1876,7 +1880,7 @@ class ln extends ft {
|
|
|
1876
1880
|
description: "",
|
|
1877
1881
|
title: "启用多选",
|
|
1878
1882
|
visible: !l || l === "StringType",
|
|
1879
|
-
readonly: ((
|
|
1883
|
+
readonly: ((a = t.editor) == null ? void 0 : a.dataSourceType) === "dynamic" && !!((s = t.editor) != null && s.dataSource),
|
|
1880
1884
|
type: "boolean",
|
|
1881
1885
|
refreshPanelAfterChanged: !0
|
|
1882
1886
|
},
|
|
@@ -1892,37 +1896,37 @@ class ln extends ft {
|
|
|
1892
1896
|
}
|
|
1893
1897
|
},
|
|
1894
1898
|
...this.getCommonEditorProperties(t)
|
|
1895
|
-
}, (
|
|
1896
|
-
if (!
|
|
1899
|
+
}, (S, v) => {
|
|
1900
|
+
if (!S || !v.editor)
|
|
1897
1901
|
return;
|
|
1898
|
-
const
|
|
1899
|
-
switch (
|
|
1902
|
+
const f = this;
|
|
1903
|
+
switch (S.propertyID) {
|
|
1900
1904
|
case "dataSourceType": {
|
|
1901
|
-
|
|
1905
|
+
S.propertyValue === "static" ? (v.editor.valueField = "value", v.editor.textField = "name", v.editor.remote = null) : S.propertyValue === "dynamic" && (v.editor.remote = { method: "GET" }, v.editor.valueField = "value", v.editor.textField = "name");
|
|
1902
1906
|
break;
|
|
1903
1907
|
}
|
|
1904
1908
|
case "data": {
|
|
1905
|
-
!
|
|
1909
|
+
!f.checkEnumDataReadonly(v) && v.formatter && (v.formatter.data = [...S.propertyValue]);
|
|
1906
1910
|
break;
|
|
1907
1911
|
}
|
|
1908
1912
|
case "viewType": {
|
|
1909
|
-
|
|
1913
|
+
S.propertyValue === "tag" && (v.editor.editable = !1);
|
|
1910
1914
|
break;
|
|
1911
1915
|
}
|
|
1912
1916
|
case "dataSource":
|
|
1913
|
-
|
|
1917
|
+
f.afterMutilEditorChanged(v, S);
|
|
1914
1918
|
}
|
|
1915
1919
|
});
|
|
1916
1920
|
}
|
|
1917
1921
|
getGridFieldEdtiorProperties(t, n) {
|
|
1918
|
-
var
|
|
1922
|
+
var T, b, I, y, p, C, x, V, i, r, a, s, S;
|
|
1919
1923
|
const l = this;
|
|
1920
|
-
let
|
|
1921
|
-
if (((
|
|
1922
|
-
const
|
|
1923
|
-
(
|
|
1924
|
+
let d = "";
|
|
1925
|
+
if (((T = t == null ? void 0 : t.binding) == null ? void 0 : T.type) === "Form") {
|
|
1926
|
+
const v = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1927
|
+
(b = v == null ? void 0 : v.schemaField) != null && b.type && (d = v.schemaField.type.$type);
|
|
1924
1928
|
}
|
|
1925
|
-
const
|
|
1929
|
+
const o = ((y = (I = this.designViewModelField) == null ? void 0 : I.type) == null ? void 0 : y.$type) === Y.StringType && ((p = t.editor) == null ? void 0 : p.type) === "combo-list" && ((C = t.editor) == null ? void 0 : C.dataSourceType) === "dynamic" && !((x = t.editor) != null && x.multiSelect), c = this.getPropertyEditorParams(t, ["Variable"]);
|
|
1926
1930
|
return l.getComponentConfig(t, { type: "combo-list" }, {
|
|
1927
1931
|
// editable: {
|
|
1928
1932
|
// description: "",
|
|
@@ -1950,10 +1954,10 @@ class ln extends ft {
|
|
|
1950
1954
|
},
|
|
1951
1955
|
dataSource: {
|
|
1952
1956
|
description: "动态数据源绑定变量",
|
|
1953
|
-
visible:
|
|
1957
|
+
visible: o,
|
|
1954
1958
|
title: "数据",
|
|
1955
1959
|
editor: {
|
|
1956
|
-
...
|
|
1960
|
+
...c,
|
|
1957
1961
|
controlName: "",
|
|
1958
1962
|
enableClear: !0
|
|
1959
1963
|
},
|
|
@@ -1963,8 +1967,8 @@ class ln extends ft {
|
|
|
1963
1967
|
description: "",
|
|
1964
1968
|
title: "数据",
|
|
1965
1969
|
type: "array",
|
|
1966
|
-
visible: !((
|
|
1967
|
-
...l.getItemCollectionEditor(t, (
|
|
1970
|
+
visible: !((V = t.editor) != null && V.dataSourceType) || ((i = t.editor) == null ? void 0 : i.dataSourceType) === "static",
|
|
1971
|
+
...l.getItemCollectionEditor(t, (r = t.editor) == null ? void 0 : r.valueField, (a = t.editor) == null ? void 0 : a.textField),
|
|
1968
1972
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1969
1973
|
refreshPanelAfterChanged: !0
|
|
1970
1974
|
},
|
|
@@ -1983,8 +1987,8 @@ class ln extends ft {
|
|
|
1983
1987
|
multiSelect: {
|
|
1984
1988
|
description: "",
|
|
1985
1989
|
title: "启用多选",
|
|
1986
|
-
visible:
|
|
1987
|
-
readonly: ((
|
|
1990
|
+
visible: d === "StringType",
|
|
1991
|
+
readonly: ((s = t.editor) == null ? void 0 : s.dataSourceType) === "dynamic" && !!((S = t.editor) != null && S.dataSource),
|
|
1988
1992
|
type: "boolean",
|
|
1989
1993
|
refreshPanelAfterChanged: !0
|
|
1990
1994
|
},
|
|
@@ -2000,35 +2004,35 @@ class ln extends ft {
|
|
|
2000
2004
|
}
|
|
2001
2005
|
},
|
|
2002
2006
|
...this.getCommonEditorProperties(t)
|
|
2003
|
-
}, (
|
|
2004
|
-
if (!
|
|
2007
|
+
}, (v, f) => {
|
|
2008
|
+
if (!v || !f.editor)
|
|
2005
2009
|
return;
|
|
2006
2010
|
const O = this;
|
|
2007
|
-
switch (
|
|
2011
|
+
switch (v.propertyID) {
|
|
2008
2012
|
case "dataSourceType": {
|
|
2009
|
-
|
|
2013
|
+
v.propertyValue === "static" ? (f.editor.valueField = "value", f.editor.textField = "name", f.editor.remote = null) : v.propertyValue === "dynamic" && (f.editor.remote = { method: "GET" }, f.editor.valueField = "value", f.editor.textField = "name");
|
|
2010
2014
|
break;
|
|
2011
2015
|
}
|
|
2012
2016
|
case "data": {
|
|
2013
|
-
!O.checkEnumDataReadonly(
|
|
2017
|
+
!O.checkEnumDataReadonly(f) && f.formatter && (f.formatter.data = [...v.propertyValue]);
|
|
2014
2018
|
break;
|
|
2015
2019
|
}
|
|
2016
2020
|
case "dataSource":
|
|
2017
|
-
O.afterMutilEditorChanged(
|
|
2021
|
+
O.afterMutilEditorChanged(f, v);
|
|
2018
2022
|
}
|
|
2019
2023
|
});
|
|
2020
2024
|
}
|
|
2021
2025
|
setEditorPropertyRelates(t, n, l) {
|
|
2022
2026
|
if (!t || !n.editor)
|
|
2023
2027
|
return;
|
|
2024
|
-
const
|
|
2028
|
+
const d = this;
|
|
2025
2029
|
switch (t.propertyID) {
|
|
2026
2030
|
case "dataSourceType": {
|
|
2027
2031
|
t.propertyValue === "static" && (n.editor.valueField = "value", n.editor.textField = "name", n.editor.remote = {});
|
|
2028
2032
|
break;
|
|
2029
2033
|
}
|
|
2030
2034
|
case "data": {
|
|
2031
|
-
!
|
|
2035
|
+
!d.checkEnumDataReadonly(n) && n.formatter && (n.formatter.data = [...t.propertyValue]);
|
|
2032
2036
|
break;
|
|
2033
2037
|
}
|
|
2034
2038
|
}
|
|
@@ -2037,10 +2041,10 @@ class ln extends ft {
|
|
|
2037
2041
|
* 切换绑定属性
|
|
2038
2042
|
*/
|
|
2039
2043
|
changeBindingField(t, n, l) {
|
|
2040
|
-
var
|
|
2044
|
+
var o;
|
|
2041
2045
|
super.changeBindingField(t, n);
|
|
2042
|
-
const
|
|
2043
|
-
t.editor && ((
|
|
2046
|
+
const d = l;
|
|
2047
|
+
t.editor && ((o = d == null ? void 0 : d.type) == null ? void 0 : o.$type) === Y.EnumType && (t.editor.data = d.type.enumValues || []);
|
|
2044
2048
|
}
|
|
2045
2049
|
/**
|
|
2046
2050
|
* 组装输入类控件的交互面板:包含标签超链、绑定字段值变化前后事件等。
|
|
@@ -2049,9 +2053,9 @@ class ln extends ft {
|
|
|
2049
2053
|
* @param showPosition 面板展示位置
|
|
2050
2054
|
* @param customEvent 输入控件特有的事件配置
|
|
2051
2055
|
*/
|
|
2052
|
-
getEventPropertyConfig(t, n = "card", l,
|
|
2053
|
-
const
|
|
2054
|
-
let
|
|
2056
|
+
getEventPropertyConfig(t, n = "card", l, d) {
|
|
2057
|
+
const o = this;
|
|
2058
|
+
let c = [
|
|
2055
2059
|
{
|
|
2056
2060
|
label: "onChange",
|
|
2057
2061
|
name: "值变化事件"
|
|
@@ -2065,41 +2069,41 @@ class ln extends ft {
|
|
|
2065
2069
|
name: "下拉面板前事件"
|
|
2066
2070
|
}
|
|
2067
2071
|
];
|
|
2068
|
-
l && (
|
|
2069
|
-
const
|
|
2072
|
+
l && (c = c.concat(l)), this.appendFieldValueChangeEvents(t, c);
|
|
2073
|
+
const F = o.eventsEditorUtils.formProperties(t, o.viewModelId, c);
|
|
2070
2074
|
return {
|
|
2071
2075
|
title: "事件",
|
|
2072
2076
|
hideTitle: !0,
|
|
2073
|
-
properties:
|
|
2077
|
+
properties: o.createBaseEventProperty(F),
|
|
2074
2078
|
tabId: "commands",
|
|
2075
2079
|
tabName: "交互",
|
|
2076
|
-
setPropertyRelates(I,
|
|
2077
|
-
const
|
|
2078
|
-
delete t[
|
|
2079
|
-
const
|
|
2080
|
-
|
|
2080
|
+
setPropertyRelates(I, y) {
|
|
2081
|
+
const p = I.propertyValue;
|
|
2082
|
+
delete t[o.viewModelId], p && (p.setPropertyRelates = this.setPropertyRelates, o.eventsEditorUtils.saveRelatedParameters(t, o.viewModelId, p.events, p)), d && d(I, y, p);
|
|
2083
|
+
const C = o.designViewModelUtils.getDgViewModel(o.viewModelId);
|
|
2084
|
+
C && o.designViewModelField && C.changeField(o.designViewModelField.id, { valueChanging: t.fieldValueChanging, valueChanged: t.fieldValueChanged }), t.editor.beforeOpen !== t.beforeOpen && (t.editor.beforeOpen = t.beforeOpen), t.editor.onChange !== t.onChange && (t.editor.onChange = t.onChange), t.editor.onClear !== t.onClear && (t.editor.onClear = t.onClear);
|
|
2081
2085
|
}
|
|
2082
2086
|
};
|
|
2083
2087
|
}
|
|
2084
2088
|
}
|
|
2085
|
-
function
|
|
2089
|
+
function tn(e, t) {
|
|
2086
2090
|
const n = e.schema;
|
|
2087
|
-
function l(
|
|
2088
|
-
return new
|
|
2091
|
+
function l(d, o) {
|
|
2092
|
+
return new en(d, t).getPropertyConfig(n, o);
|
|
2089
2093
|
}
|
|
2090
2094
|
return {
|
|
2091
2095
|
getPropsConfig: l
|
|
2092
2096
|
};
|
|
2093
2097
|
}
|
|
2094
|
-
const
|
|
2098
|
+
const nn = /* @__PURE__ */ N({
|
|
2095
2099
|
name: "FComboListDesign",
|
|
2096
|
-
props:
|
|
2100
|
+
props: Xt,
|
|
2097
2101
|
emits: ["clear", "update:modelValue", "change"],
|
|
2098
2102
|
setup(e, t) {
|
|
2099
|
-
const n = g(), l = Q("designer-host-service"),
|
|
2103
|
+
const n = g(), l = Q("designer-host-service"), d = Q("design-item-context"), o = tn(d, l), c = fe(n, d, o);
|
|
2100
2104
|
return ee(() => {
|
|
2101
|
-
n.value.componentInstance =
|
|
2102
|
-
}), t.expose(
|
|
2105
|
+
n.value.componentInstance = c;
|
|
2106
|
+
}), t.expose(c.value), () => u(rt, {
|
|
2103
2107
|
ref: n,
|
|
2104
2108
|
buttonContent: e.dropDownIcon,
|
|
2105
2109
|
readonly: !0,
|
|
@@ -2110,64 +2114,64 @@ const on = /* @__PURE__ */ _({
|
|
|
2110
2114
|
}, null);
|
|
2111
2115
|
}
|
|
2112
2116
|
});
|
|
2113
|
-
q.register = (e, t, n, l,
|
|
2114
|
-
e["combo-list"] = q, t["combo-list"] =
|
|
2117
|
+
q.register = (e, t, n, l, d) => {
|
|
2118
|
+
e["combo-list"] = q, t["combo-list"] = pe(d), l["combo-list"] = { callbackResolver: Yt };
|
|
2115
2119
|
};
|
|
2116
2120
|
q.registerDesigner = (e, t, n, l) => {
|
|
2117
|
-
e["combo-list"] =
|
|
2121
|
+
e["combo-list"] = nn, t["combo-list"] = pe(l);
|
|
2118
2122
|
};
|
|
2119
|
-
const D =
|
|
2123
|
+
const D = $e(q), J = /* @__PURE__ */ N({
|
|
2120
2124
|
name: "FOrder",
|
|
2121
2125
|
props: le,
|
|
2122
2126
|
emits: ["change"],
|
|
2123
2127
|
setup(e, t) {
|
|
2124
2128
|
const n = g(), l = g(e.items);
|
|
2125
|
-
function
|
|
2126
|
-
var
|
|
2127
|
-
const
|
|
2128
|
-
l.value = [...
|
|
2129
|
+
function d() {
|
|
2130
|
+
var s;
|
|
2131
|
+
const a = Array.isArray(e.items) ? e.items : [];
|
|
2132
|
+
l.value = [...a], (s = n.value) == null || s.updateDataSource(l.value);
|
|
2129
2133
|
}
|
|
2130
|
-
|
|
2131
|
-
const
|
|
2134
|
+
j(() => e.items, d);
|
|
2135
|
+
const o = g("排序列"), c = g("排序方式"), F = g("添加排序列"), T = [{
|
|
2132
2136
|
id: "asc",
|
|
2133
2137
|
name: "升序"
|
|
2134
2138
|
}, {
|
|
2135
2139
|
id: "desc",
|
|
2136
2140
|
name: "降序"
|
|
2137
|
-
}],
|
|
2141
|
+
}], b = g(/* @__PURE__ */ new Map());
|
|
2138
2142
|
function I() {
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2143
|
+
const a = l.value.map((s) => [s.id, !0]);
|
|
2144
|
+
b.value = new Map(a);
|
|
2141
2145
|
}
|
|
2142
2146
|
I();
|
|
2143
|
-
const
|
|
2147
|
+
const y = R(() => e.dataSource.map((a) => (a.disabled = b.value.has(a.id), a))), p = R(() => ({
|
|
2144
2148
|
"f-order": !0
|
|
2145
2149
|
}));
|
|
2146
|
-
function
|
|
2147
|
-
l.value = l.value.filter((
|
|
2150
|
+
function C(a) {
|
|
2151
|
+
l.value = l.value.filter((s) => s.id !== a.id), I(), t.emit("change", l.value);
|
|
2148
2152
|
}
|
|
2149
|
-
function
|
|
2153
|
+
function x() {
|
|
2150
2154
|
l.value = [...l.value, {
|
|
2151
2155
|
id: Date.now().toString(),
|
|
2152
2156
|
name: "",
|
|
2153
2157
|
order: "asc"
|
|
2154
2158
|
}], I(), t.emit("change", l.value);
|
|
2155
2159
|
}
|
|
2156
|
-
function
|
|
2157
|
-
if (
|
|
2158
|
-
const
|
|
2159
|
-
|
|
2160
|
+
function V(a) {
|
|
2161
|
+
if (a && a.length === 1) {
|
|
2162
|
+
const s = a[0], S = l.value.find((v) => v.id === s.id);
|
|
2163
|
+
S && (S.name = s.name);
|
|
2160
2164
|
}
|
|
2161
2165
|
I(), t.emit("change", l.value);
|
|
2162
2166
|
}
|
|
2163
|
-
function a
|
|
2164
|
-
if (
|
|
2165
|
-
const
|
|
2166
|
-
|
|
2167
|
+
function i(a) {
|
|
2168
|
+
if (a && a.length) {
|
|
2169
|
+
const s = /* @__PURE__ */ new Map();
|
|
2170
|
+
a.reduce((S, v) => (S.set(v.id, v), S), s), l.value = a.map((S) => s.get(S.id)), t.emit("change", l.value);
|
|
2167
2171
|
}
|
|
2168
2172
|
}
|
|
2169
|
-
function
|
|
2170
|
-
return
|
|
2173
|
+
function r() {
|
|
2174
|
+
return u(me, {
|
|
2171
2175
|
ref: n,
|
|
2172
2176
|
style: "flex:1",
|
|
2173
2177
|
data: l.value,
|
|
@@ -2175,173 +2179,173 @@ const D = _e(q), J = /* @__PURE__ */ _({
|
|
|
2175
2179
|
view: "DraggableView",
|
|
2176
2180
|
"keep-order": !0,
|
|
2177
2181
|
itemClass: "f-order-item",
|
|
2178
|
-
onRemoveItem:
|
|
2179
|
-
onChange:
|
|
2182
|
+
onRemoveItem: C,
|
|
2183
|
+
onChange: i
|
|
2180
2184
|
}, {
|
|
2181
|
-
header: () =>
|
|
2185
|
+
header: () => u("div", {
|
|
2182
2186
|
class: "f-order-header"
|
|
2183
|
-
}, [
|
|
2187
|
+
}, [u("span", {
|
|
2184
2188
|
class: "f-order-header-order-field"
|
|
2185
|
-
}, [
|
|
2189
|
+
}, [o.value]), u("span", {
|
|
2186
2190
|
class: "f-order-header-order-type"
|
|
2187
|
-
}, [
|
|
2188
|
-
itemContent: (
|
|
2191
|
+
}, [c.value])]),
|
|
2192
|
+
itemContent: (a) => u("div", {
|
|
2189
2193
|
class: "f-order-item-content"
|
|
2190
|
-
}, [
|
|
2194
|
+
}, [u(D, {
|
|
2191
2195
|
class: "f-order-item-content-order-field",
|
|
2192
|
-
data:
|
|
2196
|
+
data: y.value,
|
|
2193
2197
|
valueField: "id",
|
|
2194
2198
|
textField: "name",
|
|
2195
2199
|
idField: "id",
|
|
2196
|
-
modelValue:
|
|
2197
|
-
"onUpdate:modelValue": (
|
|
2198
|
-
onChange:
|
|
2199
|
-
onClear:
|
|
2200
|
-
}, null),
|
|
2200
|
+
modelValue: a.raw.id,
|
|
2201
|
+
"onUpdate:modelValue": (s) => a.raw.id = s,
|
|
2202
|
+
onChange: V,
|
|
2203
|
+
onClear: V
|
|
2204
|
+
}, null), u(D, {
|
|
2201
2205
|
class: "f-order-item-content-order-type",
|
|
2202
|
-
data:
|
|
2206
|
+
data: T,
|
|
2203
2207
|
valueField: "id",
|
|
2204
2208
|
textField: "name",
|
|
2205
2209
|
idField: "id",
|
|
2206
|
-
modelValue:
|
|
2207
|
-
"onUpdate:modelValue": (
|
|
2208
|
-
onChange:
|
|
2210
|
+
modelValue: a.raw.order,
|
|
2211
|
+
"onUpdate:modelValue": (s) => a.raw.order = s,
|
|
2212
|
+
onChange: V
|
|
2209
2213
|
}, null)]),
|
|
2210
|
-
footer: () =>
|
|
2214
|
+
footer: () => u("div", {
|
|
2211
2215
|
class: "f-order-footer"
|
|
2212
|
-
}, [
|
|
2216
|
+
}, [u(ve, {
|
|
2213
2217
|
type: "link",
|
|
2214
2218
|
class: "f-order-add-button",
|
|
2215
|
-
onClick:
|
|
2219
|
+
onClick: x
|
|
2216
2220
|
}, {
|
|
2217
|
-
default: () =>
|
|
2221
|
+
default: () => u(U, null, [u("span", {
|
|
2218
2222
|
class: "f-order-add-icon"
|
|
2219
|
-
}, [
|
|
2223
|
+
}, [u("i", {
|
|
2220
2224
|
class: "f-icon f-icon-add"
|
|
2221
|
-
}, null)]),
|
|
2225
|
+
}, null)]), F.value])
|
|
2222
2226
|
})])
|
|
2223
2227
|
});
|
|
2224
2228
|
}
|
|
2225
|
-
return () =>
|
|
2226
|
-
class:
|
|
2227
|
-
}, [
|
|
2229
|
+
return () => u("div", {
|
|
2230
|
+
class: p.value
|
|
2231
|
+
}, [r()]);
|
|
2228
2232
|
}
|
|
2229
|
-
}),
|
|
2233
|
+
}), ln = /* @__PURE__ */ N({
|
|
2230
2234
|
name: "FOrderDesign",
|
|
2231
2235
|
props: le,
|
|
2232
2236
|
emits: ["change"],
|
|
2233
2237
|
setup(e, t) {
|
|
2234
|
-
const n = g(e.items), l = g("排序列"),
|
|
2238
|
+
const n = g(e.items), l = g("排序列"), d = g("排序方式"), o = g("添加排序列"), c = [{
|
|
2235
2239
|
id: "asc",
|
|
2236
2240
|
name: "升序"
|
|
2237
2241
|
}, {
|
|
2238
2242
|
id: "desc",
|
|
2239
2243
|
name: "降序"
|
|
2240
|
-
}],
|
|
2244
|
+
}], F = g(/* @__PURE__ */ new Map()), T = g(), b = Q("design-item-context"), I = fe(T, b);
|
|
2241
2245
|
ee(() => {
|
|
2242
|
-
|
|
2246
|
+
T.value.componentInstance = I;
|
|
2243
2247
|
}), t.expose(I.value);
|
|
2244
|
-
function
|
|
2245
|
-
const
|
|
2246
|
-
|
|
2248
|
+
function y() {
|
|
2249
|
+
const s = n.value.map((S) => [S.id, !0]);
|
|
2250
|
+
F.value = new Map(s);
|
|
2247
2251
|
}
|
|
2248
|
-
|
|
2249
|
-
const
|
|
2252
|
+
y();
|
|
2253
|
+
const p = R(() => e.dataSource.map((s) => (s.disabled = F.value.has(s.id), s))), C = R(() => ({
|
|
2250
2254
|
"f-order": !0
|
|
2251
2255
|
}));
|
|
2252
|
-
function
|
|
2253
|
-
n.value = n.value.filter((
|
|
2256
|
+
function x(s) {
|
|
2257
|
+
n.value = n.value.filter((S) => S.id !== s.id), y(), t.emit("change", n.value);
|
|
2254
2258
|
}
|
|
2255
|
-
function
|
|
2259
|
+
function V() {
|
|
2256
2260
|
n.value = [...n.value, {
|
|
2257
2261
|
id: Date.now().toString(),
|
|
2258
2262
|
name: "",
|
|
2259
2263
|
order: "asc"
|
|
2260
|
-
}],
|
|
2264
|
+
}], y(), t.emit("change", n.value);
|
|
2261
2265
|
}
|
|
2262
|
-
function
|
|
2263
|
-
|
|
2266
|
+
function i(s) {
|
|
2267
|
+
y(), t.emit("change", n.value);
|
|
2264
2268
|
}
|
|
2265
|
-
function s
|
|
2266
|
-
if (
|
|
2267
|
-
const
|
|
2268
|
-
|
|
2269
|
+
function r(s) {
|
|
2270
|
+
if (s && s.length) {
|
|
2271
|
+
const S = /* @__PURE__ */ new Map();
|
|
2272
|
+
s.reduce((v, f) => (v.set(f.id, f), v), S), n.value = s.map((v) => S.get(v.id)), t.emit("change", n.value);
|
|
2269
2273
|
}
|
|
2270
2274
|
}
|
|
2271
|
-
function
|
|
2272
|
-
return
|
|
2275
|
+
function a() {
|
|
2276
|
+
return u(me, {
|
|
2273
2277
|
style: "flex:1",
|
|
2274
2278
|
data: n.value,
|
|
2275
2279
|
draggable: !0,
|
|
2276
2280
|
view: "DraggableView",
|
|
2277
2281
|
"keep-order": !0,
|
|
2278
2282
|
itemClass: "f-order-item",
|
|
2279
|
-
onRemoveItem:
|
|
2280
|
-
onChange:
|
|
2283
|
+
onRemoveItem: x,
|
|
2284
|
+
onChange: r
|
|
2281
2285
|
}, {
|
|
2282
|
-
header: () =>
|
|
2286
|
+
header: () => u("div", {
|
|
2283
2287
|
class: "f-order-header"
|
|
2284
|
-
}, [
|
|
2288
|
+
}, [u("span", {
|
|
2285
2289
|
class: "f-order-header-order-field"
|
|
2286
|
-
}, [l.value]),
|
|
2290
|
+
}, [l.value]), u("span", {
|
|
2287
2291
|
class: "f-order-header-order-type"
|
|
2288
|
-
}, [
|
|
2289
|
-
itemContent: (
|
|
2292
|
+
}, [d.value])]),
|
|
2293
|
+
itemContent: (s) => u("div", {
|
|
2290
2294
|
class: "f-order-item-content"
|
|
2291
|
-
}, [
|
|
2295
|
+
}, [u(D, {
|
|
2292
2296
|
class: "f-order-item-content-order-field",
|
|
2293
|
-
data:
|
|
2297
|
+
data: p.value,
|
|
2294
2298
|
valueField: "id",
|
|
2295
2299
|
textField: "name",
|
|
2296
2300
|
idField: "id",
|
|
2297
|
-
modelValue:
|
|
2298
|
-
"onUpdate:modelValue": (
|
|
2299
|
-
onChange:
|
|
2300
|
-
onClear:
|
|
2301
|
-
}, null),
|
|
2301
|
+
modelValue: s.id,
|
|
2302
|
+
"onUpdate:modelValue": (S) => s.id = S,
|
|
2303
|
+
onChange: i,
|
|
2304
|
+
onClear: i
|
|
2305
|
+
}, null), u(D, {
|
|
2302
2306
|
class: "f-order-item-content-order-type",
|
|
2303
|
-
data:
|
|
2307
|
+
data: c,
|
|
2304
2308
|
valueField: "id",
|
|
2305
2309
|
textField: "name",
|
|
2306
2310
|
idField: "id",
|
|
2307
|
-
modelValue:
|
|
2308
|
-
"onUpdate:modelValue": (
|
|
2309
|
-
onChange:
|
|
2311
|
+
modelValue: s.order,
|
|
2312
|
+
"onUpdate:modelValue": (S) => s.order = S,
|
|
2313
|
+
onChange: i
|
|
2310
2314
|
}, null)]),
|
|
2311
|
-
footer: () =>
|
|
2315
|
+
footer: () => u("div", {
|
|
2312
2316
|
class: "f-order-footer"
|
|
2313
|
-
}, [
|
|
2317
|
+
}, [u(ve, {
|
|
2314
2318
|
type: "link",
|
|
2315
2319
|
class: "f-order-add-button",
|
|
2316
|
-
onClick:
|
|
2320
|
+
onClick: V
|
|
2317
2321
|
}, {
|
|
2318
|
-
default: () =>
|
|
2322
|
+
default: () => u(U, null, [u("span", {
|
|
2319
2323
|
class: "f-order-add-icon"
|
|
2320
|
-
}, [
|
|
2324
|
+
}, [u("i", {
|
|
2321
2325
|
class: "f-icon f-icon-add"
|
|
2322
|
-
}, null)]),
|
|
2326
|
+
}, null)]), o.value])
|
|
2323
2327
|
})])
|
|
2324
2328
|
});
|
|
2325
2329
|
}
|
|
2326
|
-
return () =>
|
|
2327
|
-
ref:
|
|
2328
|
-
class:
|
|
2329
|
-
}, [
|
|
2330
|
+
return () => u("div", {
|
|
2331
|
+
ref: T,
|
|
2332
|
+
class: C.value
|
|
2333
|
+
}, [a()]);
|
|
2330
2334
|
}
|
|
2331
|
-
}),
|
|
2335
|
+
}), wn = {
|
|
2332
2336
|
install(e) {
|
|
2333
2337
|
e.component(J.name, J);
|
|
2334
2338
|
},
|
|
2335
2339
|
register(e, t, n, l) {
|
|
2336
|
-
e.order = J, t.order =
|
|
2340
|
+
e.order = J, t.order = oe;
|
|
2337
2341
|
},
|
|
2338
2342
|
registerDesigner(e, t, n) {
|
|
2339
|
-
e.order =
|
|
2343
|
+
e.order = ln, t.order = oe;
|
|
2340
2344
|
}
|
|
2341
2345
|
};
|
|
2342
2346
|
export {
|
|
2343
2347
|
J as FOrder,
|
|
2344
|
-
|
|
2348
|
+
wn as default,
|
|
2345
2349
|
le as orderProps,
|
|
2346
|
-
|
|
2350
|
+
oe as propsResolver
|
|
2347
2351
|
};
|