@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,10 +1,10 @@
|
|
|
1
|
-
import { getCustomClass as
|
|
2
|
-
import { createVNode as
|
|
3
|
-
import { useResizeObserver as
|
|
4
|
-
import { isUndefined as
|
|
5
|
-
import { LocaleService as
|
|
6
|
-
import { getHierarchyRow as
|
|
7
|
-
const
|
|
1
|
+
import { getCustomClass as St, withInstall as bt } from "../common/index.esm.js";
|
|
2
|
+
import { createVNode as g, defineComponent as It, ref as h, computed as C, onMounted as Bt, nextTick as Dt, onUnmounted as Ot, watch as ce, createTextVNode as Rt } from "vue";
|
|
3
|
+
import { useResizeObserver as Ft } from "@vueuse/core";
|
|
4
|
+
import { isUndefined as b } from "lodash-es";
|
|
5
|
+
import { LocaleService as xt } from "../locale/index.esm.js";
|
|
6
|
+
import { getHierarchyRow as Ht, useIdentify as Gt, useGroupData as jt, useFilter as Pt, useHierarchy as Vt, useLoading as Nt, useDataView as kt, useSelection as _t, useSelectHierarchyItem as Tt, usePagination as zt, useDataViewContainerStyle as Mt, useCommandColumn as At, useSettingColumn as Lt, useColumn as Et, useSort as Wt, useGroupColumn as Ut, useRow as qt, useEdit as Yt, useVisualDataBound as $t, useVisualDataCell as Jt, useVisualDataRow as Kt, useVisualData as Qt, useCellPosition as Xt, useSidebar as Zt, useVirtualScroll as ea, useFitColumn as ta, useFilterHistory as aa, useColumnFilter as la, useDragColumn as na, getColumnHeader as oa, getSidebar as ia, getDisableMask as ua, getHorizontalScrollbar as ra, getVerticalScrollbar as sa, getEmpty as da, getPagination as ca, getSummary as fa } from "../data-view/index.esm.js";
|
|
7
|
+
const Ia = {
|
|
8
8
|
/** 启用分页 */
|
|
9
9
|
enable: { type: Boolean, default: !1 },
|
|
10
10
|
/** 当前页码 */
|
|
@@ -25,7 +25,7 @@ const Ba = {
|
|
|
25
25
|
sizeLimits: { type: Array, default: [10, 20, 30, 50, 100] },
|
|
26
26
|
/** 总记录数 */
|
|
27
27
|
total: { type: Number, default: 0 }
|
|
28
|
-
},
|
|
28
|
+
}, Ba = {
|
|
29
29
|
/** 启用排序 */
|
|
30
30
|
enable: { type: Boolean, default: !1 },
|
|
31
31
|
/** 排序字段集合 */
|
|
@@ -34,7 +34,7 @@ const Ba = {
|
|
|
34
34
|
mode: { type: String, default: "client" },
|
|
35
35
|
/** 多列排序 */
|
|
36
36
|
multiSort: { type: Boolean, default: !1 }
|
|
37
|
-
},
|
|
37
|
+
}, Da = {
|
|
38
38
|
/** 自定义分组合计内容 */
|
|
39
39
|
customGroupRow: { type: Function, default: () => {
|
|
40
40
|
} },
|
|
@@ -58,7 +58,7 @@ const Ba = {
|
|
|
58
58
|
showSummary: { type: Boolean, default: !1 },
|
|
59
59
|
/** 显示合计行位置; */
|
|
60
60
|
summaryPosition: { type: String, default: "separate" }
|
|
61
|
-
},
|
|
61
|
+
}, Oa = {
|
|
62
62
|
/** 启用筛选 */
|
|
63
63
|
enable: { type: Boolean, default: !1 },
|
|
64
64
|
/** DataGrid筛选风格 */
|
|
@@ -70,7 +70,7 @@ const Ba = {
|
|
|
70
70
|
}, Ra = {
|
|
71
71
|
/** 允许折行显示列标题 */
|
|
72
72
|
wrapHeadings: { type: Boolean, default: !1 }
|
|
73
|
-
},
|
|
73
|
+
}, Fa = {
|
|
74
74
|
/** 自定义行样式 */
|
|
75
75
|
customRowStyle: { type: Function, default: () => {
|
|
76
76
|
} },
|
|
@@ -85,7 +85,7 @@ const Ba = {
|
|
|
85
85
|
showHovering: { type: Boolean, default: !0 },
|
|
86
86
|
/** 禁止数据折行 */
|
|
87
87
|
wrapContent: { type: Boolean, default: !1 }
|
|
88
|
-
},
|
|
88
|
+
}, xa = {
|
|
89
89
|
/** 显示合计信息 */
|
|
90
90
|
enable: { type: Boolean, default: !1 },
|
|
91
91
|
/** 合计行自定义样式,对启用合计行模板无效 */
|
|
@@ -97,7 +97,7 @@ const Ba = {
|
|
|
97
97
|
mode: { type: String, default: "client" },
|
|
98
98
|
/** 合计行显示位置, top: 顶部 bottom: 底部, both: 顶部与底部同时显示 */
|
|
99
99
|
position: { type: String, default: "bottom" }
|
|
100
|
-
},
|
|
100
|
+
}, Ha = {
|
|
101
101
|
/** 自动列宽。设为true后,所有列将填满表格并不会出现横向滚动条。 */
|
|
102
102
|
fitColumns: { type: Boolean, default: !1 },
|
|
103
103
|
/** 自动适配列宽度模式 */
|
|
@@ -109,17 +109,17 @@ const Ba = {
|
|
|
109
109
|
resizeColumn: { type: Boolean, default: !0 },
|
|
110
110
|
/** 双击表头列自适应内容宽度 */
|
|
111
111
|
resizeColumnOnDoubleClick: { type: Boolean, default: !0 }
|
|
112
|
-
},
|
|
112
|
+
}, Ga = {
|
|
113
113
|
/** 编辑时选中文本 */
|
|
114
114
|
selectOnEditing: { type: Boolean, default: !1 },
|
|
115
115
|
/** 编辑模式; row:整行编辑,cell: 单元格编辑 */
|
|
116
116
|
editMode: { type: String, default: "cell" }
|
|
117
|
-
},
|
|
117
|
+
}, ja = {
|
|
118
118
|
/** show loading */
|
|
119
119
|
show: { type: Boolean, default: !1 },
|
|
120
120
|
/** message on display when loading */
|
|
121
|
-
message: { type: String, default: `${
|
|
122
|
-
},
|
|
121
|
+
message: { type: String, default: `${xt.getLocaleValue("datagrid.loadingMessage")}...` }
|
|
122
|
+
}, ma = {
|
|
123
123
|
/** 自定义样式 */
|
|
124
124
|
customClass: { type: String, default: "" },
|
|
125
125
|
/** 排序配置 */
|
|
@@ -268,379 +268,376 @@ const Ba = {
|
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
270
|
/** 自动高度 **/
|
|
271
|
-
autoHeight: { type: Boolean, default: !1 }
|
|
272
|
-
/** 是否可见, 为了适配低代码表单,该属性不应该属于表格组件的行为 */
|
|
273
|
-
/** 复选框位置 */
|
|
274
|
-
checkboxPosition: { type: String, default: "after-expand" }
|
|
271
|
+
autoHeight: { type: Boolean, default: !1 }
|
|
275
272
|
};
|
|
276
|
-
function
|
|
273
|
+
function ya(a, c, fe, T, I, v, y, B, z, n, D, M, V, o, O, J, A) {
|
|
277
274
|
const {
|
|
278
|
-
calculateCellPositionInRow:
|
|
279
|
-
} =
|
|
280
|
-
columnContext:
|
|
281
|
-
hasLeftFixedColumn:
|
|
282
|
-
hasRightFixedColumn:
|
|
283
|
-
} =
|
|
284
|
-
gridDataStyle:
|
|
285
|
-
leftFixedGridDataStyle:
|
|
286
|
-
rightFixedGridDataStyle:
|
|
287
|
-
} =
|
|
288
|
-
renderDataRow:
|
|
289
|
-
} =
|
|
290
|
-
function
|
|
291
|
-
const
|
|
292
|
-
return
|
|
275
|
+
calculateCellPositionInRow: L
|
|
276
|
+
} = v, {
|
|
277
|
+
columnContext: p,
|
|
278
|
+
hasLeftFixedColumn: E,
|
|
279
|
+
hasRightFixedColumn: K
|
|
280
|
+
} = y, {
|
|
281
|
+
gridDataStyle: Q,
|
|
282
|
+
leftFixedGridDataStyle: l,
|
|
283
|
+
rightFixedGridDataStyle: X
|
|
284
|
+
} = o, {
|
|
285
|
+
renderDataRow: u
|
|
286
|
+
} = Ht(a, c, p, A, B, z, n, D, M, V, o, O, J), G = [u];
|
|
287
|
+
function N(d, ee) {
|
|
288
|
+
const te = L(d);
|
|
289
|
+
return A.value.filter((R) => R.visible !== !1).map((R, U) => G[R.type](R, te, ee, U));
|
|
293
290
|
}
|
|
294
|
-
function
|
|
295
|
-
return
|
|
296
|
-
ref:
|
|
291
|
+
function w() {
|
|
292
|
+
return g("div", {
|
|
293
|
+
ref: T,
|
|
297
294
|
class: "fv-grid-content-left-fixed"
|
|
298
|
-
}, [
|
|
295
|
+
}, [g("div", {
|
|
299
296
|
class: "fv-grid-data",
|
|
300
|
-
style:
|
|
301
|
-
}, [p
|
|
297
|
+
style: l.value
|
|
298
|
+
}, [N(p.value.leftColumns.filter((d) => d.visible), "left")])]);
|
|
302
299
|
}
|
|
303
|
-
function
|
|
304
|
-
return
|
|
305
|
-
ref:
|
|
300
|
+
function Z() {
|
|
301
|
+
return g("div", {
|
|
302
|
+
ref: fe,
|
|
306
303
|
class: "fv-grid-content-primary"
|
|
307
|
-
}, [
|
|
304
|
+
}, [g("div", {
|
|
308
305
|
class: "fv-grid-data",
|
|
309
|
-
style:
|
|
310
|
-
}, [p
|
|
306
|
+
style: Q.value
|
|
307
|
+
}, [N(p.value.primaryColumns.filter((d) => d.visible), "primary")])]);
|
|
311
308
|
}
|
|
312
|
-
function
|
|
313
|
-
return
|
|
314
|
-
ref:
|
|
309
|
+
function S() {
|
|
310
|
+
return g("div", {
|
|
311
|
+
ref: I,
|
|
315
312
|
class: "fv-grid-content-right-fixed"
|
|
316
|
-
}, [
|
|
313
|
+
}, [g("div", {
|
|
317
314
|
class: "fv-grid-data",
|
|
318
|
-
style:
|
|
319
|
-
}, [p
|
|
315
|
+
style: X.value
|
|
316
|
+
}, [N(p.value.rightColumns.filter((d) => d.visible), "right")])]);
|
|
320
317
|
}
|
|
321
|
-
function
|
|
322
|
-
const
|
|
323
|
-
return
|
|
318
|
+
function W() {
|
|
319
|
+
const d = [];
|
|
320
|
+
return E.value && d.push(w()), d.push(Z()), K.value && d.push(S()), d;
|
|
324
321
|
}
|
|
325
322
|
return {
|
|
326
|
-
renderDataArea:
|
|
323
|
+
renderDataArea: W
|
|
327
324
|
};
|
|
328
325
|
}
|
|
329
|
-
const
|
|
326
|
+
const va = /* @__PURE__ */ It({
|
|
330
327
|
name: "FTreeGrid",
|
|
331
|
-
props:
|
|
328
|
+
props: ma,
|
|
332
329
|
emits: ["selectionChange", "clickRow", "expandNode", "unSelectItem", "dblclickNode", "doubleClickRow", "unSelectItem", "selectItem", "filterChanged", "sortChanged", "selectionUpdate"],
|
|
333
|
-
setup(a,
|
|
334
|
-
var
|
|
335
|
-
const T =
|
|
336
|
-
idField:
|
|
337
|
-
} = y,
|
|
338
|
-
collapseField:
|
|
339
|
-
} =
|
|
340
|
-
showLoading:
|
|
341
|
-
renderLoading:
|
|
342
|
-
} =
|
|
343
|
-
dataView:
|
|
344
|
-
} = l, u =
|
|
345
|
-
showSelection:
|
|
346
|
-
selectedValues:
|
|
347
|
-
} = u,
|
|
348
|
-
shouldRenderPagination:
|
|
349
|
-
} =
|
|
350
|
-
containerStyleObject:
|
|
351
|
-
} =
|
|
352
|
-
applyCommands:
|
|
353
|
-
} =
|
|
354
|
-
|
|
330
|
+
setup(a, c) {
|
|
331
|
+
var Ce, we;
|
|
332
|
+
const T = ((Ce = a.rowOption) == null ? void 0 : Ce.height) || 28, I = h(20), v = h(a.columns), y = Gt(a), {
|
|
333
|
+
idField: B
|
|
334
|
+
} = y, z = h(), n = h(), D = h(), M = h(), V = h(), o = h([]), O = h(!1), J = h(((we = a.rowOption) == null ? void 0 : we.wrapContent) || !1), A = jt(a, y), L = Pt(a, c), p = Vt(a), {
|
|
335
|
+
collapseField: E
|
|
336
|
+
} = p, {
|
|
337
|
+
showLoading: K,
|
|
338
|
+
renderLoading: Q
|
|
339
|
+
} = Nt(a, z), l = kt(a, /* @__PURE__ */ new Map(), L, p, y), {
|
|
340
|
+
dataView: X
|
|
341
|
+
} = l, u = _t(a, l, y, o, c), {
|
|
342
|
+
showSelection: G,
|
|
343
|
+
selectedValues: N
|
|
344
|
+
} = u, w = Tt(a, o, l, y, u, c), Z = C(() => a.disabled), S = C(() => a.virtualized ? Math.min(l.dataView.value.length, I.value) : l.dataView.value.length), W = zt(a, l), {
|
|
345
|
+
shouldRenderPagination: d
|
|
346
|
+
} = W, {
|
|
347
|
+
containerStyleObject: ee
|
|
348
|
+
} = Mt(a), te = At(a), {
|
|
349
|
+
applyCommands: R
|
|
350
|
+
} = te;
|
|
351
|
+
R(v);
|
|
355
352
|
const {
|
|
356
|
-
applyColumnSetting:
|
|
357
|
-
removeColumnSetting:
|
|
358
|
-
} =
|
|
359
|
-
a.showSetting &&
|
|
360
|
-
const
|
|
361
|
-
applyColumnSorter:
|
|
362
|
-
columnContext:
|
|
363
|
-
updateColumnRenderContext:
|
|
364
|
-
} =
|
|
365
|
-
|
|
366
|
-
const
|
|
367
|
-
getVisualData:
|
|
368
|
-
} =
|
|
353
|
+
applyColumnSetting: U,
|
|
354
|
+
removeColumnSetting: be
|
|
355
|
+
} = Lt(a);
|
|
356
|
+
a.showSetting && U(v);
|
|
357
|
+
const k = Et(a, c), ae = Wt(a), {
|
|
358
|
+
applyColumnSorter: me,
|
|
359
|
+
columnContext: q,
|
|
360
|
+
updateColumnRenderContext: Ie
|
|
361
|
+
} = k;
|
|
362
|
+
me(l, ae);
|
|
363
|
+
const le = Ut(a, q), j = qt(a, c, u, y), P = Yt(a, c, y, j, o), ne = $t(a), Be = Jt(a, P, ne), De = Kt(a, l, P, p, y, ne, Be), oe = Qt(a, v, l, S, 0, De), {
|
|
364
|
+
getVisualData: Y
|
|
365
|
+
} = oe, Oe = Xt(a, q), ie = Zt(a, u), {
|
|
369
366
|
sidebarWidth: Re
|
|
370
|
-
} =
|
|
371
|
-
onWheel:
|
|
372
|
-
dataGridWidth:
|
|
373
|
-
viewPortHeight:
|
|
374
|
-
viewPortWidth:
|
|
375
|
-
resetScroll:
|
|
376
|
-
updateVisibleRowsOnLatestVisibleScope:
|
|
377
|
-
} = f,
|
|
378
|
-
calculateColumnsSize:
|
|
379
|
-
} =
|
|
367
|
+
} = ie, f = ea(a, l, o, q, oe, S, 0, Re), {
|
|
368
|
+
onWheel: Fe,
|
|
369
|
+
dataGridWidth: ye,
|
|
370
|
+
viewPortHeight: ve,
|
|
371
|
+
viewPortWidth: $,
|
|
372
|
+
resetScroll: ue,
|
|
373
|
+
updateVisibleRowsOnLatestVisibleScope: xe
|
|
374
|
+
} = f, ge = ta(a, q, n, $, le), {
|
|
375
|
+
calculateColumnsSize: _
|
|
376
|
+
} = ge, he = aa(), He = la(n, V, l, he, f), Ge = na(a, c, k, l, le, A, f), je = C(() => {
|
|
380
377
|
const e = {
|
|
381
378
|
"fv-grid": !0,
|
|
382
379
|
"fv-grid-bordered": a.showBorder,
|
|
383
380
|
"fv-grid-horizontal-bordered": a.showHorizontalLines,
|
|
384
381
|
"fv-datagrid-strip": a.showStripe
|
|
385
382
|
};
|
|
386
|
-
return
|
|
387
|
-
}),
|
|
383
|
+
return St(e, a.customClass);
|
|
384
|
+
}), Pe = C(() => ({
|
|
388
385
|
"fv-grid-content": !0,
|
|
389
|
-
"fv-grid-content-hover":
|
|
390
|
-
"fv-grid-wrap-content":
|
|
386
|
+
"fv-grid-content-hover": O.value,
|
|
387
|
+
"fv-grid-wrap-content": J.value
|
|
391
388
|
})), {
|
|
392
|
-
renderDataArea:
|
|
393
|
-
} =
|
|
394
|
-
renderGridHeader:
|
|
395
|
-
renderGridColumnResizeOverlay:
|
|
396
|
-
shouldShowHeader:
|
|
397
|
-
} =
|
|
398
|
-
renderDataGridSidebar:
|
|
399
|
-
} =
|
|
400
|
-
renderDisableMask:
|
|
401
|
-
} =
|
|
402
|
-
renderHorizontalScrollbar:
|
|
389
|
+
renderDataArea: Ve
|
|
390
|
+
} = ya(a, c, D, M, V, Oe, k, l, P, p, j, u, w, f, oe, ne, o), {
|
|
391
|
+
renderGridHeader: Ne,
|
|
392
|
+
renderGridColumnResizeOverlay: ke,
|
|
393
|
+
shouldShowHeader: _e
|
|
394
|
+
} = oa(a, c, n, M, V, k, l, Ge, He, L, he, ge, le, u, ie, ae, f, $, o), {
|
|
395
|
+
renderDataGridSidebar: Te
|
|
396
|
+
} = ia(a, j, u, ie, f), {
|
|
397
|
+
renderDisableMask: ze
|
|
398
|
+
} = ua(), {
|
|
399
|
+
renderHorizontalScrollbar: Me
|
|
403
400
|
} = ra(a, n, f), {
|
|
404
|
-
renderVerticalScrollbar:
|
|
405
|
-
} =
|
|
406
|
-
function
|
|
401
|
+
renderVerticalScrollbar: Ae
|
|
402
|
+
} = sa(a, n, f);
|
|
403
|
+
function Le() {
|
|
407
404
|
var e, t, i;
|
|
408
405
|
if (n.value && n.value.clientHeight > 0 && ((e = n.value) == null ? void 0 : e.clientWidth) > 0) {
|
|
409
|
-
const
|
|
410
|
-
|
|
406
|
+
const s = Math.ceil(n.value.clientHeight / T);
|
|
407
|
+
s > I.value && (I.value = s, xe()), ve.value = ((t = D.value) == null ? void 0 : t.clientHeight) || 0, ye.value = ((i = n.value) == null ? void 0 : i.clientWidth) || 0;
|
|
411
408
|
}
|
|
412
|
-
n.value && (n.value.clientHeight > 0 || n.value.clientWidth > 0) &&
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
n.value && (
|
|
416
|
-
n.value && (
|
|
417
|
-
})),
|
|
418
|
-
}),
|
|
419
|
-
}),
|
|
420
|
-
n.value &&
|
|
409
|
+
n.value && (n.value.clientHeight > 0 || n.value.clientWidth > 0) && _();
|
|
410
|
+
}
|
|
411
|
+
Bt(() => {
|
|
412
|
+
n.value && (I.value = Math.max(Math.ceil(n.value.clientHeight / T), I.value), o.value = Y(0, S.value + 0 - 1), Ft(n.value, Le), _(), Dt(() => {
|
|
413
|
+
n.value && (ye.value = n.value.clientWidth), D.value && ($.value = D.value.clientWidth, ve.value = D.value.clientHeight);
|
|
414
|
+
})), K.value && Q();
|
|
415
|
+
}), Ot(() => {
|
|
416
|
+
}), ce($, () => {
|
|
417
|
+
n.value && _();
|
|
421
418
|
});
|
|
422
|
-
function
|
|
423
|
-
l.collapseTo(e), l.reOrderVisibleIndex(),
|
|
419
|
+
function Ee(e) {
|
|
420
|
+
l.collapseTo(e), l.reOrderVisibleIndex(), ue();
|
|
424
421
|
}
|
|
425
|
-
function
|
|
426
|
-
l.expandTo(e), l.reOrderVisibleIndex(),
|
|
422
|
+
function We(e) {
|
|
423
|
+
l.expandTo(e), l.reOrderVisibleIndex(), ue();
|
|
427
424
|
}
|
|
428
|
-
function
|
|
425
|
+
function re() {
|
|
429
426
|
const e = u.getSelectionRow();
|
|
430
427
|
return e ? e.dataIndex - 1 : -1;
|
|
431
428
|
}
|
|
432
|
-
function
|
|
433
|
-
const t = e !== void 0 ? e :
|
|
434
|
-
return o.value =
|
|
429
|
+
function Ue(e) {
|
|
430
|
+
const t = e !== void 0 ? e : re(), i = l.insertNewDataItem(t === -1 ? 0 : t);
|
|
431
|
+
return o.value = Y(0, S.value + 0 - 1), i;
|
|
435
432
|
}
|
|
436
|
-
function
|
|
437
|
-
const e =
|
|
438
|
-
l.insertNewChildDataItem(e), o.value =
|
|
433
|
+
function qe() {
|
|
434
|
+
const e = re();
|
|
435
|
+
l.insertNewChildDataItem(e), o.value = Y(0, S.value + 0 - 1);
|
|
439
436
|
}
|
|
440
|
-
function
|
|
441
|
-
const i = o.value.find((m) => m.raw[
|
|
442
|
-
l.insertNewChildDataItems(e,
|
|
437
|
+
function Ye(e, t) {
|
|
438
|
+
const i = o.value.find((m) => m.raw[B.value] === t), s = i ? i.dataIndex - 1 : -1;
|
|
439
|
+
l.insertNewChildDataItems(e, s);
|
|
443
440
|
}
|
|
444
|
-
function
|
|
445
|
-
const e =
|
|
446
|
-
l.removeHierarchyDataItem(e), o.value =
|
|
441
|
+
function $e() {
|
|
442
|
+
const e = re(), t = w.getNextSelectableHierarchyItemId(e);
|
|
443
|
+
l.removeHierarchyDataItem(e), o.value = Y(0, S.value + 0 - 1), t && w.selectItemById(t);
|
|
444
|
+
}
|
|
445
|
+
function Je(e) {
|
|
446
|
+
P.onEditingRow(e);
|
|
447
447
|
}
|
|
448
448
|
function Ke(e) {
|
|
449
|
-
|
|
449
|
+
P.acceptEditingRow(e);
|
|
450
450
|
}
|
|
451
451
|
function Qe(e) {
|
|
452
|
-
|
|
453
|
-
}
|
|
454
|
-
function Xe(e) {
|
|
455
|
-
_.cancelEditingRow(e);
|
|
452
|
+
P.cancelEditingRow(e);
|
|
456
453
|
}
|
|
457
|
-
function
|
|
458
|
-
e && (
|
|
454
|
+
function se(e) {
|
|
455
|
+
e && (v.value = e, R(v), Ie(v.value), me(l, ae), _());
|
|
459
456
|
}
|
|
460
|
-
|
|
461
|
-
|
|
457
|
+
ce(() => a.columns, (e) => {
|
|
458
|
+
se(e);
|
|
462
459
|
});
|
|
463
|
-
function
|
|
464
|
-
e && (l.load(e), l.reOrderVisibleIndex(), t != null && t.keepScrollPosition ? f.scrollTo(f.offsetY.value) :
|
|
460
|
+
function Xe(e, t) {
|
|
461
|
+
e && (l.load(e), l.reOrderVisibleIndex(), t != null && t.keepScrollPosition ? f.scrollTo(f.offsetY.value) : ue());
|
|
465
462
|
}
|
|
466
|
-
function
|
|
467
|
-
|
|
463
|
+
function de(e) {
|
|
464
|
+
j.activeRowById(e);
|
|
468
465
|
}
|
|
469
|
-
function
|
|
466
|
+
function Ze(e, t = {
|
|
470
467
|
isCurrent: !0
|
|
471
468
|
}) {
|
|
472
|
-
t != null && t.isCurrent &&
|
|
469
|
+
t != null && t.isCurrent && de(e), w.selectItemById(e);
|
|
473
470
|
}
|
|
474
|
-
function
|
|
471
|
+
function et(e) {
|
|
475
472
|
const t = o.value.find((i) => i.raw[y.idField.value] === e);
|
|
476
|
-
t &&
|
|
473
|
+
t && j.clickRowItem(t);
|
|
477
474
|
}
|
|
478
|
-
function
|
|
479
|
-
|
|
475
|
+
function tt(e) {
|
|
476
|
+
w.selectItemByIds(e);
|
|
480
477
|
}
|
|
481
|
-
function
|
|
478
|
+
function at() {
|
|
482
479
|
return u.getSelectedItems();
|
|
483
480
|
}
|
|
484
|
-
function
|
|
481
|
+
function pe() {
|
|
485
482
|
u.clearSelection();
|
|
486
483
|
}
|
|
487
|
-
function
|
|
484
|
+
function lt() {
|
|
488
485
|
u.emptyCurrentRowId();
|
|
489
486
|
}
|
|
490
|
-
const
|
|
491
|
-
renderEmpty:
|
|
492
|
-
} =
|
|
493
|
-
function
|
|
487
|
+
const nt = C(() => !o.value || !o.value.length), {
|
|
488
|
+
renderEmpty: ot
|
|
489
|
+
} = da(a, c);
|
|
490
|
+
function it() {
|
|
494
491
|
return u.getSelectionRow();
|
|
495
492
|
}
|
|
496
|
-
function
|
|
493
|
+
function ut(e, t = {
|
|
497
494
|
clearCurrent: !0
|
|
498
495
|
}) {
|
|
499
|
-
t != null && t.clearCurrent &&
|
|
496
|
+
t != null && t.clearCurrent && de(""), w.unSelectItemByIds(e);
|
|
500
497
|
}
|
|
501
498
|
function rt() {
|
|
502
499
|
return u.currentSelectedDataId.value;
|
|
503
500
|
}
|
|
504
|
-
function
|
|
505
|
-
const
|
|
506
|
-
if (
|
|
507
|
-
if (Object.keys(
|
|
508
|
-
Object.prototype.hasOwnProperty.call(t,
|
|
501
|
+
function st(e, t, i) {
|
|
502
|
+
const s = X.value.find((m) => m[B.value] === e);
|
|
503
|
+
if (s) {
|
|
504
|
+
if (Object.keys(s).forEach((r) => {
|
|
505
|
+
Object.prototype.hasOwnProperty.call(t, r) && (s[r] = t[r]);
|
|
509
506
|
}), i) {
|
|
510
507
|
const {
|
|
511
|
-
collapseField:
|
|
512
|
-
disabledField:
|
|
513
|
-
checkedField:
|
|
514
|
-
visibleField:
|
|
508
|
+
collapseField: r,
|
|
509
|
+
disabledField: F,
|
|
510
|
+
checkedField: x,
|
|
511
|
+
visibleField: H
|
|
515
512
|
} = i;
|
|
516
|
-
|
|
513
|
+
r && !b(t[r]) && (s.__fv_collapse__ = t[r]), x && !b(t[x]) && (s.__fv_checked__ = t[x]), F && !b(t[F]) && (s.__fv_disabled__ = t[F]), H && !b(t[H]) && (s.__fv_visible__ = t[H]);
|
|
517
514
|
}
|
|
518
|
-
const m = o.value.find((
|
|
515
|
+
const m = o.value.find((r) => r.raw[B.value] === e), Se = o.value.findIndex((r) => r.raw[B.value] === e);
|
|
519
516
|
if (m) {
|
|
520
|
-
if (m.raw =
|
|
521
|
-
m.data[
|
|
517
|
+
if (m.raw = s, Object.keys(m.data).forEach((r) => {
|
|
518
|
+
m.data[r].updateData(s);
|
|
522
519
|
}), i) {
|
|
523
520
|
const {
|
|
524
|
-
collapseField:
|
|
525
|
-
disabledField:
|
|
526
|
-
checkedField:
|
|
527
|
-
visibleField:
|
|
521
|
+
collapseField: r,
|
|
522
|
+
disabledField: F,
|
|
523
|
+
checkedField: x,
|
|
524
|
+
visibleField: H
|
|
528
525
|
} = i;
|
|
529
|
-
|
|
526
|
+
r && !b(t[r]) && (m.collapse = t[r]), x && !b(t[x]) && (m.checked = t[x]), F && !b(t[F]) && (m.disabled = t[F]), H && !b(t[H]) && (m.visible = t[H]);
|
|
530
527
|
}
|
|
531
|
-
o.value = [...o.value.slice(0,
|
|
528
|
+
o.value = [...o.value.slice(0, Se), m, ...o.value.slice(Se + 1)], l.updateSummary();
|
|
532
529
|
}
|
|
533
530
|
}
|
|
534
531
|
}
|
|
535
|
-
function
|
|
532
|
+
function dt(e) {
|
|
536
533
|
return Object.prototype.hasOwnProperty.call(e, "raw") ? l.hasRealChildren(e.raw) : l.hasRealChildren(e);
|
|
537
534
|
}
|
|
538
|
-
function
|
|
539
|
-
const t = l.dataView.value.find((i) => i[
|
|
540
|
-
return t ? t[
|
|
535
|
+
function ct(e) {
|
|
536
|
+
const t = l.dataView.value.find((i) => i[B.value] === e);
|
|
537
|
+
return t ? t[E.value] : "";
|
|
541
538
|
}
|
|
542
|
-
function
|
|
543
|
-
return
|
|
539
|
+
function ft() {
|
|
540
|
+
return E.value;
|
|
544
541
|
}
|
|
545
|
-
|
|
546
|
-
e !== t && (e ?
|
|
542
|
+
ce(() => a.showSetting, (e, t) => {
|
|
543
|
+
e !== t && (e ? U(v) : be(v), se(v.value));
|
|
547
544
|
});
|
|
548
|
-
function
|
|
545
|
+
function mt(e) {
|
|
549
546
|
return o.value.filter((t) => e.includes(t.raw[a.idField]));
|
|
550
547
|
}
|
|
551
|
-
function
|
|
552
|
-
const t = y.idField.value, i = o.value.find((
|
|
553
|
-
i &&
|
|
554
|
-
}
|
|
555
|
-
function
|
|
556
|
-
u.keepSelectingOnPaging.value ||
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
activeRowById:
|
|
560
|
-
addNewDataItem:
|
|
561
|
-
addNewChildDataItem:
|
|
562
|
-
addChildrenToNode:
|
|
563
|
-
collapseTo:
|
|
564
|
-
expandTo:
|
|
565
|
-
removeDataItem:
|
|
566
|
-
editDataItem:
|
|
567
|
-
acceptDataItem:
|
|
568
|
-
cancelDataItem:
|
|
569
|
-
updateColumns:
|
|
570
|
-
updateDataSource:
|
|
571
|
-
selectItemById:
|
|
572
|
-
selectItemByIds:
|
|
573
|
-
getSelectedItems:
|
|
574
|
-
clearSelection:
|
|
575
|
-
getSelectionRow:
|
|
576
|
-
clickRowItemById:
|
|
577
|
-
unSelectItemByIds:
|
|
548
|
+
function yt(e) {
|
|
549
|
+
const t = y.idField.value, i = o.value.find((s) => s.raw[t] === e);
|
|
550
|
+
i && j.changeRow(i);
|
|
551
|
+
}
|
|
552
|
+
function vt() {
|
|
553
|
+
u.keepSelectingOnPaging.value || pe(), l.updateVisibleDataSummary(o.value);
|
|
554
|
+
}
|
|
555
|
+
c.expose({
|
|
556
|
+
activeRowById: de,
|
|
557
|
+
addNewDataItem: Ue,
|
|
558
|
+
addNewChildDataItem: qe,
|
|
559
|
+
addChildrenToNode: Ye,
|
|
560
|
+
collapseTo: Ee,
|
|
561
|
+
expandTo: We,
|
|
562
|
+
removeDataItem: $e,
|
|
563
|
+
editDataItem: Je,
|
|
564
|
+
acceptDataItem: Ke,
|
|
565
|
+
cancelDataItem: Qe,
|
|
566
|
+
updateColumns: se,
|
|
567
|
+
updateDataSource: Xe,
|
|
568
|
+
selectItemById: Ze,
|
|
569
|
+
selectItemByIds: tt,
|
|
570
|
+
getSelectedItems: at,
|
|
571
|
+
clearSelection: pe,
|
|
572
|
+
getSelectionRow: it,
|
|
573
|
+
clickRowItemById: et,
|
|
574
|
+
unSelectItemByIds: ut,
|
|
578
575
|
getCurrentRowId: rt,
|
|
579
|
-
reassignRowData:
|
|
580
|
-
hasChildren:
|
|
581
|
-
getCollapseField:
|
|
582
|
-
getCollapseStatusById:
|
|
583
|
-
getVisibleDataByIds:
|
|
584
|
-
selectRowById:
|
|
585
|
-
updateDerivedData:
|
|
586
|
-
emptyCurrentRowId:
|
|
587
|
-
calculateColumnsSize:
|
|
576
|
+
reassignRowData: st,
|
|
577
|
+
hasChildren: dt,
|
|
578
|
+
getCollapseField: ft,
|
|
579
|
+
getCollapseStatusById: ct,
|
|
580
|
+
getVisibleDataByIds: mt,
|
|
581
|
+
selectRowById: yt,
|
|
582
|
+
updateDerivedData: vt,
|
|
583
|
+
emptyCurrentRowId: lt,
|
|
584
|
+
calculateColumnsSize: _
|
|
588
585
|
});
|
|
589
|
-
const
|
|
586
|
+
const gt = C(() => {
|
|
590
587
|
const e = {};
|
|
591
588
|
return f.shouldShowHorizontalScrollbar.value && (e.paddingBottom = "10px"), f.shouldShowVirticalScrollbar.value && (e.paddingRight = "10px"), e;
|
|
592
|
-
}),
|
|
593
|
-
...
|
|
589
|
+
}), ht = C(() => ({
|
|
590
|
+
...ee.value,
|
|
594
591
|
borderRadius: "5px"
|
|
595
592
|
})), {
|
|
596
|
-
renderDataGridPagination:
|
|
597
|
-
} =
|
|
593
|
+
renderDataGridPagination: ga
|
|
594
|
+
} = ca(a, c, l, f, W, u), pt = C(() => ({
|
|
598
595
|
"d-flex": !0,
|
|
599
|
-
"justify-content-between":
|
|
600
|
-
"justify-content-end":
|
|
596
|
+
"justify-content-between": d.value && G.value,
|
|
597
|
+
"justify-content-end": d.value && !G.value,
|
|
601
598
|
"position-relative": !0
|
|
602
|
-
})),
|
|
599
|
+
})), Ct = C(() => ({
|
|
603
600
|
"d-flex": !0,
|
|
604
601
|
"align-items-center": !0
|
|
605
602
|
})), {
|
|
606
|
-
renderDataGridSummary:
|
|
607
|
-
} =
|
|
608
|
-
return () =>
|
|
609
|
-
ref:
|
|
610
|
-
class:
|
|
611
|
-
style:
|
|
612
|
-
onWheel:
|
|
613
|
-
}, [n.value &&
|
|
603
|
+
renderDataGridSummary: wt
|
|
604
|
+
} = fa(a, l, k);
|
|
605
|
+
return () => g("div", {
|
|
606
|
+
ref: z,
|
|
607
|
+
class: je.value,
|
|
608
|
+
style: ht.value,
|
|
609
|
+
onWheel: Fe
|
|
610
|
+
}, [n.value && _e.value && Ne(), g("div", {
|
|
614
611
|
ref: n,
|
|
615
|
-
class:
|
|
616
|
-
onMouseover: () =>
|
|
617
|
-
onMouseleave: () =>
|
|
612
|
+
class: Pe.value,
|
|
613
|
+
onMouseover: () => O.value = !0,
|
|
614
|
+
onMouseleave: () => O.value = !1,
|
|
618
615
|
onTouchstart: (e) => {
|
|
619
|
-
e.stopPropagation(),
|
|
616
|
+
e.stopPropagation(), O.value = !0, f.onTouchstartScrollThumb(e, n);
|
|
620
617
|
},
|
|
621
618
|
onTouchend: (e) => {
|
|
622
|
-
|
|
619
|
+
O.value = !1;
|
|
623
620
|
},
|
|
624
|
-
style:
|
|
625
|
-
}, [n.value &&
|
|
621
|
+
style: gt.value
|
|
622
|
+
}, [n.value && Te(o), n.value && Ve(), n.value && nt.value && ot(), n.value && Me(), n.value && Ae()]), n.value && wt(), G.value && g("div", {
|
|
623
|
+
class: pt.value
|
|
624
|
+
}, [G.value && g("div", {
|
|
626
625
|
class: Ct.value
|
|
627
|
-
}, [N.value
|
|
628
|
-
class: wt.value
|
|
629
|
-
}, [h("div", null, ["已选:" + te.value.length, Rt(" 条")])])]), _e(), ae.value && Me()]);
|
|
626
|
+
}, [g("div", null, ["已选:" + N.value.length, Rt(" 条")])])]), ke(), Z.value && ze()]);
|
|
630
627
|
}
|
|
631
|
-
}),
|
|
628
|
+
}), Pa = bt(va);
|
|
632
629
|
export {
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
630
|
+
va as FTreeGrid,
|
|
631
|
+
Ha as columnOptions,
|
|
632
|
+
Pa as default,
|
|
633
|
+
Ga as editOptions,
|
|
634
|
+
Oa as filterOptions,
|
|
635
|
+
Da as groupOptions,
|
|
639
636
|
Ra as headerOptions,
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
637
|
+
ja as loadingOptions,
|
|
638
|
+
Ia as paginationOptions,
|
|
639
|
+
Fa as rowOptions,
|
|
640
|
+
Ba as sortOptions,
|
|
641
|
+
xa as summaryOptions,
|
|
642
|
+
ma as treeGridProps
|
|
646
643
|
};
|