@fangzhongya/fang-ui 0.1.27 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/array/index.css +4 -0
- package/dist/components/array/src/index2.cjs +5 -5
- package/dist/components/array/src/index2.js +2 -2
- package/dist/components/audios/index.css +4 -0
- package/dist/components/box/index.css +4 -0
- package/dist/components/box-adjust/index.css +4 -0
- package/dist/components/box-local/index.css +4 -0
- package/dist/components/box-mask/index.css +4 -0
- package/dist/components/box-title/index.css +4 -0
- package/dist/components/buttons/index.css +4 -0
- package/dist/components/cascaders/index.css +4 -0
- package/dist/components/checks/index.css +4 -0
- package/dist/components/common/compons/components.cjs +52 -0
- package/dist/components/common/compons/components.d.ts +27 -0
- package/dist/components/common/compons/components.js +52 -0
- package/dist/components/common/compons/index.scss +23 -0
- package/dist/components/common/compons/index2.scss +23 -0
- package/dist/components/common/use.cjs +87 -16
- package/dist/components/common/use.d.ts +28 -5
- package/dist/components/common/use.js +88 -17
- package/dist/components/dates/index.css +4 -0
- package/dist/components/dates-divide/index.css +4 -0
- package/dist/components/dates-picker/index.css +4 -0
- package/dist/components/dates2/index.css +4 -0
- package/dist/components/dialogs/index.css +4 -0
- package/dist/components/edit/index.css +4 -0
- package/dist/components/edit-float/index.css +4 -0
- package/dist/components/forms/common/config.cjs +11 -1
- package/dist/components/forms/common/config.d.ts +1 -0
- package/dist/components/forms/common/config.js +11 -1
- package/dist/components/forms/index.css +10 -6
- package/dist/components/forms/index.scss +2 -1
- package/dist/components/forms/src/data.cjs +7 -0
- package/dist/components/forms/src/data.d.ts +7 -0
- package/dist/components/forms/src/data.js +7 -0
- package/dist/components/forms/src/setup.cjs +6 -13
- package/dist/components/forms/src/setup.d.ts +1 -1
- package/dist/components/forms/src/setup.js +8 -15
- package/dist/components/forms/src/util.cjs +1 -2
- package/dist/components/forms/src/util.d.ts +1 -1
- package/dist/components/forms/src/util.js +1 -2
- package/dist/components/forms/style/index2.scss +3 -1
- package/dist/components/forms-div/index.css +4 -0
- package/dist/components/forms-div/src/index2.cjs +11 -5
- package/dist/components/forms-div/src/index2.js +10 -4
- package/dist/components/forms-item/index.css +4 -0
- package/dist/components/forms-item/src/indexts.d.ts +1 -1
- package/dist/components/forms-item/src/label.cjs +16 -29
- package/dist/components/forms-item/src/label.js +17 -30
- package/dist/components/full-screen/index.css +4 -0
- package/dist/components/global-config/index.css +4 -0
- package/dist/components/history/index.css +4 -0
- package/dist/components/icon/index.css +4 -0
- package/dist/components/icon-picker/index.css +4 -0
- package/dist/components/iframe/index.css +4 -0
- package/dist/components/images/index.css +4 -0
- package/dist/components/index.cjs +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index2.scss +2 -1
- package/dist/components/input-array/index.css +4 -0
- package/dist/components/input-history/index.css +4 -0
- package/dist/components/input-num/index.css +4 -0
- package/dist/components/input-select/index.css +4 -0
- package/dist/components/inputs/index.css +4 -0
- package/dist/components/labels/index.css +4 -0
- package/dist/components/list/index.css +4 -0
- package/dist/components/list/src/data.cjs +6 -0
- package/dist/components/list/src/data.d.ts +6 -0
- package/dist/components/list/src/data.js +6 -0
- package/dist/components/list/src/index2.cjs +6 -6
- package/dist/components/list/src/index2.js +2 -2
- package/dist/components/list/src/util.cjs +12 -26
- package/dist/components/list/src/util.d.ts +1 -1
- package/dist/components/list/src/util.js +13 -27
- package/dist/components/lists/index.css +4 -0
- package/dist/components/listsp/index.css +4 -0
- package/dist/components/listspd/index.css +4 -0
- package/dist/components/menus/index.css +4 -0
- package/dist/components/no-data/index.css +4 -0
- package/dist/components/page/index.css +10 -6
- package/dist/components/paging/index.css +4 -0
- package/dist/components/popup/index.css +4 -0
- package/dist/components/retract/index.css +4 -0
- package/dist/components/right-key/index.css +4 -0
- package/dist/components/scss/common.scss +4 -0
- package/dist/components/seamless-scroll/index.css +4 -0
- package/dist/components/select-scroll/index.css +4 -0
- package/dist/components/selector/index.css +4 -0
- package/dist/components/selects/index.css +4 -0
- package/dist/components/sliders/index.css +4 -0
- package/dist/components/switchs/index.css +4 -0
- package/dist/components/tables/common/config.cjs +1 -1
- package/dist/components/tables/common/config.js +1 -1
- package/dist/components/tables/common/pagin.cjs +74 -32
- package/dist/components/tables/common/pagin.d.ts +10 -1
- package/dist/components/tables/common/pagin.js +74 -32
- package/dist/components/tables/index.css +4 -0
- package/dist/components/tables/src/column.cjs +22 -20
- package/dist/components/tables/src/column.d.ts +1 -0
- package/dist/components/tables/src/column.js +14 -12
- package/dist/components/tables/src/data.cjs +15 -0
- package/dist/components/tables/src/data.d.ts +13 -0
- package/dist/components/tables/src/data.js +15 -0
- package/dist/components/tables/src/index2.cjs +17 -9
- package/dist/components/tables/src/index2.js +11 -3
- package/dist/components/tablesp/index.css +4 -0
- package/dist/components/tablespd/index.css +4 -0
- package/dist/components/tabless/index.css +4 -0
- package/dist/components/tablesv/index.css +4 -0
- package/dist/components/tablesv/src/column.cjs +116 -112
- package/dist/components/tablesv/src/column.js +110 -106
- package/dist/components/tablesv/src/data.cjs +44 -0
- package/dist/components/tablesv/src/data.d.ts +43 -1
- package/dist/components/tablesv/src/data.js +44 -0
- package/dist/components/tablesv/src/index2.cjs +37 -14
- package/dist/components/tablesv/src/index2.js +36 -13
- package/dist/components/tablesv/style/index2.scss +3 -1
- package/dist/components/tablesvp/index.css +10 -0
- package/dist/components/tablesvp/index.scss +8 -0
- package/dist/components/tablesvp/src/index2.cjs +15 -5
- package/dist/components/tablesvp/src/index2.js +15 -5
- package/dist/components/tablesvpd/index.cjs +9 -0
- package/dist/components/tablesvpd/index.css +157 -0
- package/dist/components/tablesvpd/index.d.ts +4 -0
- package/dist/components/tablesvpd/index.js +9 -0
- package/dist/components/tablesvpd/index.scss +41 -0
- package/dist/components/tablesvpd/src/data.cjs +13 -0
- package/dist/components/tablesvpd/src/data.d.ts +18 -0
- package/dist/components/tablesvpd/src/data.js +13 -0
- package/dist/components/tablesvpd/src/index.cjs +4 -0
- package/dist/components/tablesvpd/src/index.js +4 -0
- package/dist/components/tablesvpd/src/index2.cjs +107 -0
- package/dist/components/tablesvpd/src/index2.js +107 -0
- package/dist/components/tablesvpd/style/index2.scss +4 -0
- package/dist/components/uploads/index.css +4 -0
- package/dist/components/videos/index.css +4 -0
- package/dist/components/window/index.css +4 -0
- package/dist/css/array.css +4 -0
- package/dist/css/audios.css +4 -0
- package/dist/css/box-adjust.css +4 -0
- package/dist/css/box-local.css +4 -0
- package/dist/css/box-mask.css +4 -0
- package/dist/css/box-title.css +4 -0
- package/dist/css/box.css +4 -0
- package/dist/css/buttons.css +4 -0
- package/dist/css/cascaders.css +4 -0
- package/dist/css/checks.css +4 -0
- package/dist/css/dates-divide.css +4 -0
- package/dist/css/dates-picker.css +4 -0
- package/dist/css/dates.css +4 -0
- package/dist/css/dates2.css +4 -0
- package/dist/css/dialogs.css +4 -0
- package/dist/css/edit-float.css +4 -0
- package/dist/css/edit.css +4 -0
- package/dist/css/forms-div.css +4 -0
- package/dist/css/forms-item.css +4 -0
- package/dist/css/forms.css +10 -6
- package/dist/css/full-screen.css +4 -0
- package/dist/css/global-config.css +4 -0
- package/dist/css/history.css +4 -0
- package/dist/css/icon-picker.css +4 -0
- package/dist/css/icon.css +4 -0
- package/dist/css/iframe.css +4 -0
- package/dist/css/images.css +4 -0
- package/dist/css/index.css +16 -6
- package/dist/css/input-array.css +4 -0
- package/dist/css/input-history.css +4 -0
- package/dist/css/input-num.css +4 -0
- package/dist/css/input-select.css +4 -0
- package/dist/css/inputs.css +4 -0
- package/dist/css/labels.css +4 -0
- package/dist/css/list.css +4 -0
- package/dist/css/lists.css +4 -0
- package/dist/css/listsp.css +4 -0
- package/dist/css/listspd.css +4 -0
- package/dist/css/menus.css +4 -0
- package/dist/css/no-data.css +4 -0
- package/dist/css/page.css +10 -6
- package/dist/css/paging.css +4 -0
- package/dist/css/popup.css +4 -0
- package/dist/css/retract.css +4 -0
- package/dist/css/right-key.css +4 -0
- package/dist/css/seamless-scroll.css +4 -0
- package/dist/css/select-scroll.css +4 -0
- package/dist/css/selector.css +4 -0
- package/dist/css/selects.css +4 -0
- package/dist/css/sliders.css +4 -0
- package/dist/css/switchs.css +4 -0
- package/dist/css/tables.css +4 -0
- package/dist/css/tablesp.css +4 -0
- package/dist/css/tablespd.css +4 -0
- package/dist/css/tabless.css +4 -0
- package/dist/css/tablesv.css +4 -0
- package/dist/css/tablesvp.css +10 -0
- package/dist/css/tablesvpd.css +157 -0
- package/dist/css/uploads.css +4 -0
- package/dist/css/videos.css +4 -0
- package/dist/css/window.css +4 -0
- package/dist/expand/{chunk-MC76Q3TQ.cjs → chunk-3HP2ZDNG.cjs} +3 -1
- package/dist/expand/{chunk-CV4O5V2F.js → chunk-7C25SBCF.js} +3 -1
- package/dist/expand/components.cjs +5 -5
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/hooks/compons/index.cjs +44 -0
- package/dist/hooks/compons/index.d.ts +7 -0
- package/dist/hooks/compons/index.js +44 -0
- package/dist/icons/index.json +1 -1
- package/dist/index.cjs +24 -22
- package/dist/index.css +16 -6
- package/dist/index.js +2 -0
- package/dist/type.d.ts +4 -0
- package/package.json +12 -12
- package/dist/components/common/compons.cjs +0 -76
- package/dist/components/common/compons.d.ts +0 -9
- package/dist/components/common/compons.js +0 -76
- package/dist/components/common/compons.scss +0 -26
- package/dist/components/common/compons2.scss +0 -26
|
@@ -56,6 +56,12 @@ const dataProps = {
|
|
|
56
56
|
return {};
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
+
/**
|
|
60
|
+
* @props { Boolean } isCompons 是否使用默认的配置
|
|
61
|
+
*/
|
|
62
|
+
isCompons: {
|
|
63
|
+
type: Boolean
|
|
64
|
+
},
|
|
59
65
|
/**
|
|
60
66
|
* @props { Object } compons 外部组件集合
|
|
61
67
|
*/
|
|
@@ -352,69 +358,104 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
352
358
|
return arr;
|
|
353
359
|
}
|
|
354
360
|
}
|
|
361
|
+
const selections = vue.ref([]);
|
|
355
362
|
function getSelection() {
|
|
356
|
-
return
|
|
363
|
+
return selections.value;
|
|
364
|
+
}
|
|
365
|
+
function setSelection(array) {
|
|
366
|
+
selections.value = array;
|
|
367
|
+
emit("selection", selections.value);
|
|
357
368
|
}
|
|
358
369
|
function onChange(arr) {
|
|
359
370
|
var _a2;
|
|
371
|
+
console.log("onChange");
|
|
360
372
|
if (!((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio)) {
|
|
361
|
-
|
|
362
|
-
|
|
373
|
+
setSelection(getSelectionValue(arr, paginat.current));
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
const isHighlight = vue.computed(() => {
|
|
377
|
+
const c = tableConfig.value.config || {};
|
|
378
|
+
if ((c == null ? void 0 : c.highlightCurrentRow) || c["highlight-current-row"]) {
|
|
379
|
+
return true;
|
|
380
|
+
} else {
|
|
381
|
+
return false;
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
function setSelectRow(row, is) {
|
|
385
|
+
var _a2, _b2;
|
|
386
|
+
if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio) {
|
|
387
|
+
if ((_b2 = tableConfig.value.config) == null ? void 0 : _b2.isCancelAgain) {
|
|
388
|
+
if (selections.value[0] == row) {
|
|
389
|
+
refTable.value.clearSelection();
|
|
390
|
+
refTable.value.clearCurrentRow();
|
|
391
|
+
setSelection([]);
|
|
392
|
+
} else {
|
|
393
|
+
refTable.value.clearSelection();
|
|
394
|
+
refTable.value.toggleRowSelection(row, true);
|
|
395
|
+
setSelection([row]);
|
|
396
|
+
}
|
|
397
|
+
} else {
|
|
398
|
+
refTable.value.clearSelection();
|
|
399
|
+
refTable.value.toggleRowSelection(row, true);
|
|
400
|
+
setSelection([row]);
|
|
401
|
+
}
|
|
402
|
+
} else {
|
|
403
|
+
if (is) {
|
|
404
|
+
refTable.value.toggleRowSelection(row);
|
|
405
|
+
}
|
|
363
406
|
}
|
|
364
407
|
}
|
|
365
408
|
function onRowClick(row) {
|
|
366
|
-
var _a2, _b2
|
|
367
|
-
if (
|
|
409
|
+
var _a2, _b2;
|
|
410
|
+
if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isRowSelect) {
|
|
368
411
|
const selectable = (_b2 = tableConfig.value.config) == null ? void 0 : _b2.selectable;
|
|
369
412
|
if (selectable) {
|
|
370
413
|
const index = data.list.findIndex((obj) => {
|
|
371
414
|
obj === row;
|
|
372
415
|
});
|
|
373
416
|
if (selectable(row, index)) {
|
|
374
|
-
|
|
375
|
-
refTable.value.clearSelection();
|
|
376
|
-
refTable.value.toggleRowSelection(row, true);
|
|
377
|
-
console.log("onRowClick");
|
|
378
|
-
emit("selection", [row]);
|
|
379
|
-
} else {
|
|
380
|
-
refTable.value.toggleRowSelection(row);
|
|
381
|
-
}
|
|
417
|
+
setSelectRow(row, true);
|
|
382
418
|
}
|
|
383
419
|
} else {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
} else {
|
|
390
|
-
refTable.value.toggleRowSelection(row);
|
|
391
|
-
}
|
|
420
|
+
setSelectRow(row, true);
|
|
421
|
+
}
|
|
422
|
+
} else {
|
|
423
|
+
if (!isHighlight.value) {
|
|
424
|
+
refTable.value.clearCurrentRow();
|
|
392
425
|
}
|
|
393
426
|
}
|
|
394
427
|
}
|
|
395
428
|
function empty() {
|
|
396
|
-
var _a2, _b2, _c;
|
|
429
|
+
var _a2, _b2, _c, _d;
|
|
397
430
|
if (istype.value && ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio)) {
|
|
398
431
|
(_b2 = refTable.value) == null ? void 0 : _b2.clearRadioRow();
|
|
399
432
|
}
|
|
400
433
|
(_c = refTable.value) == null ? void 0 : _c.clearSelection();
|
|
401
|
-
|
|
402
|
-
|
|
434
|
+
(_d = refTable.value) == null ? void 0 : _d.clearCurrentRow();
|
|
435
|
+
setSelection([]);
|
|
403
436
|
}
|
|
404
437
|
function onSelect(s, row) {
|
|
405
|
-
|
|
438
|
+
setSelectRow(row, false);
|
|
439
|
+
}
|
|
440
|
+
function onCellClick(row) {
|
|
441
|
+
var _a2, _b2;
|
|
406
442
|
if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio) {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
443
|
+
if ((_b2 = tableConfig.value.config) == null ? void 0 : _b2.isCancelAgain) {
|
|
444
|
+
if (selections.value[0] == row) {
|
|
445
|
+
console.log("onCellClick", row);
|
|
446
|
+
refTable.value.clearSelection();
|
|
447
|
+
refTable.value.clearCurrentRow();
|
|
448
|
+
setSelection([]);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
411
451
|
}
|
|
412
452
|
}
|
|
413
453
|
function onRadioChange(obj) {
|
|
414
454
|
var _a2;
|
|
415
455
|
if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio) {
|
|
416
|
-
|
|
417
|
-
|
|
456
|
+
vue.nextTick(() => {
|
|
457
|
+
onRowClick(obj.row);
|
|
458
|
+
});
|
|
418
459
|
}
|
|
419
460
|
}
|
|
420
461
|
function getFrontSort(ao, bo, prop) {
|
|
@@ -498,7 +539,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
498
539
|
console.log("clean");
|
|
499
540
|
(_a2 = refTable.value) == null ? void 0 : _a2.clearSelection();
|
|
500
541
|
crossPageData.value = [];
|
|
501
|
-
|
|
542
|
+
setSelection([]);
|
|
502
543
|
}
|
|
503
544
|
function getParam(param) {
|
|
504
545
|
var _a2;
|
|
@@ -726,6 +767,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
726
767
|
onListEvents,
|
|
727
768
|
onSelect,
|
|
728
769
|
onRowClick,
|
|
770
|
+
onCellClick,
|
|
729
771
|
onChange,
|
|
730
772
|
pagconfig,
|
|
731
773
|
formEvent,
|
|
@@ -57,6 +57,12 @@ export declare const dataProps: {
|
|
|
57
57
|
type: ObjectConstructor;
|
|
58
58
|
default(): {};
|
|
59
59
|
};
|
|
60
|
+
/**
|
|
61
|
+
* @props { Boolean } isCompons 是否使用默认的配置
|
|
62
|
+
*/
|
|
63
|
+
isCompons: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
};
|
|
60
66
|
/**
|
|
61
67
|
* @props { Object } compons 外部组件集合
|
|
62
68
|
*/
|
|
@@ -218,6 +224,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
218
224
|
default?: any;
|
|
219
225
|
value?: any;
|
|
220
226
|
label?: string | /*elided*/ any | undefined;
|
|
227
|
+
labelText?: string | undefined;
|
|
221
228
|
hideLabel?: boolean | undefined;
|
|
222
229
|
prop?: string | undefined;
|
|
223
230
|
slot?: string | undefined;
|
|
@@ -250,6 +257,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
250
257
|
default?: any;
|
|
251
258
|
value?: any;
|
|
252
259
|
label?: string | /*elided*/ any | undefined;
|
|
260
|
+
labelText?: string | undefined;
|
|
253
261
|
hideLabel?: boolean | undefined;
|
|
254
262
|
prop?: string | undefined;
|
|
255
263
|
slot?: string | undefined;
|
|
@@ -276,7 +284,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
276
284
|
type?: string | undefined;
|
|
277
285
|
}[]>;
|
|
278
286
|
onRadioChange: (obj: ObjAny) => void;
|
|
279
|
-
getSelection: () =>
|
|
287
|
+
getSelection: () => ObjStr[];
|
|
280
288
|
initData: (callback?: () => void) => void;
|
|
281
289
|
getData: (p?: ObjAny, callback?: (d?: ObjAny) => void) => void;
|
|
282
290
|
clean: () => void;
|
|
@@ -301,6 +309,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
301
309
|
onListEvents: (...arr: any) => void;
|
|
302
310
|
onSelect: (s: ObjAny, row: ObjStr) => void;
|
|
303
311
|
onRowClick: (row: ObjAny) => void;
|
|
312
|
+
onCellClick: (row: ObjAny) => void;
|
|
304
313
|
onChange: (arr: ObjStr[]) => void;
|
|
305
314
|
pagconfig: Ref<{
|
|
306
315
|
pageSize: number;
|
|
@@ -54,6 +54,12 @@ const dataProps = {
|
|
|
54
54
|
return {};
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
+
/**
|
|
58
|
+
* @props { Boolean } isCompons 是否使用默认的配置
|
|
59
|
+
*/
|
|
60
|
+
isCompons: {
|
|
61
|
+
type: Boolean
|
|
62
|
+
},
|
|
57
63
|
/**
|
|
58
64
|
* @props { Object } compons 外部组件集合
|
|
59
65
|
*/
|
|
@@ -350,69 +356,104 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
350
356
|
return arr;
|
|
351
357
|
}
|
|
352
358
|
}
|
|
359
|
+
const selections = ref([]);
|
|
353
360
|
function getSelection() {
|
|
354
|
-
return
|
|
361
|
+
return selections.value;
|
|
362
|
+
}
|
|
363
|
+
function setSelection(array) {
|
|
364
|
+
selections.value = array;
|
|
365
|
+
emit("selection", selections.value);
|
|
355
366
|
}
|
|
356
367
|
function onChange(arr) {
|
|
357
368
|
var _a2;
|
|
369
|
+
console.log("onChange");
|
|
358
370
|
if (!((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio)) {
|
|
359
|
-
|
|
360
|
-
|
|
371
|
+
setSelection(getSelectionValue(arr, paginat.current));
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
const isHighlight = computed(() => {
|
|
375
|
+
const c = tableConfig.value.config || {};
|
|
376
|
+
if ((c == null ? void 0 : c.highlightCurrentRow) || c["highlight-current-row"]) {
|
|
377
|
+
return true;
|
|
378
|
+
} else {
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
function setSelectRow(row, is) {
|
|
383
|
+
var _a2, _b2;
|
|
384
|
+
if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio) {
|
|
385
|
+
if ((_b2 = tableConfig.value.config) == null ? void 0 : _b2.isCancelAgain) {
|
|
386
|
+
if (selections.value[0] == row) {
|
|
387
|
+
refTable.value.clearSelection();
|
|
388
|
+
refTable.value.clearCurrentRow();
|
|
389
|
+
setSelection([]);
|
|
390
|
+
} else {
|
|
391
|
+
refTable.value.clearSelection();
|
|
392
|
+
refTable.value.toggleRowSelection(row, true);
|
|
393
|
+
setSelection([row]);
|
|
394
|
+
}
|
|
395
|
+
} else {
|
|
396
|
+
refTable.value.clearSelection();
|
|
397
|
+
refTable.value.toggleRowSelection(row, true);
|
|
398
|
+
setSelection([row]);
|
|
399
|
+
}
|
|
400
|
+
} else {
|
|
401
|
+
if (is) {
|
|
402
|
+
refTable.value.toggleRowSelection(row);
|
|
403
|
+
}
|
|
361
404
|
}
|
|
362
405
|
}
|
|
363
406
|
function onRowClick(row) {
|
|
364
|
-
var _a2, _b2
|
|
365
|
-
if (
|
|
407
|
+
var _a2, _b2;
|
|
408
|
+
if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isRowSelect) {
|
|
366
409
|
const selectable = (_b2 = tableConfig.value.config) == null ? void 0 : _b2.selectable;
|
|
367
410
|
if (selectable) {
|
|
368
411
|
const index = data.list.findIndex((obj) => {
|
|
369
412
|
obj === row;
|
|
370
413
|
});
|
|
371
414
|
if (selectable(row, index)) {
|
|
372
|
-
|
|
373
|
-
refTable.value.clearSelection();
|
|
374
|
-
refTable.value.toggleRowSelection(row, true);
|
|
375
|
-
console.log("onRowClick");
|
|
376
|
-
emit("selection", [row]);
|
|
377
|
-
} else {
|
|
378
|
-
refTable.value.toggleRowSelection(row);
|
|
379
|
-
}
|
|
415
|
+
setSelectRow(row, true);
|
|
380
416
|
}
|
|
381
417
|
} else {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
} else {
|
|
388
|
-
refTable.value.toggleRowSelection(row);
|
|
389
|
-
}
|
|
418
|
+
setSelectRow(row, true);
|
|
419
|
+
}
|
|
420
|
+
} else {
|
|
421
|
+
if (!isHighlight.value) {
|
|
422
|
+
refTable.value.clearCurrentRow();
|
|
390
423
|
}
|
|
391
424
|
}
|
|
392
425
|
}
|
|
393
426
|
function empty() {
|
|
394
|
-
var _a2, _b2, _c;
|
|
427
|
+
var _a2, _b2, _c, _d;
|
|
395
428
|
if (istype.value && ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio)) {
|
|
396
429
|
(_b2 = refTable.value) == null ? void 0 : _b2.clearRadioRow();
|
|
397
430
|
}
|
|
398
431
|
(_c = refTable.value) == null ? void 0 : _c.clearSelection();
|
|
399
|
-
|
|
400
|
-
|
|
432
|
+
(_d = refTable.value) == null ? void 0 : _d.clearCurrentRow();
|
|
433
|
+
setSelection([]);
|
|
401
434
|
}
|
|
402
435
|
function onSelect(s, row) {
|
|
403
|
-
|
|
436
|
+
setSelectRow(row, false);
|
|
437
|
+
}
|
|
438
|
+
function onCellClick(row) {
|
|
439
|
+
var _a2, _b2;
|
|
404
440
|
if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio) {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
441
|
+
if ((_b2 = tableConfig.value.config) == null ? void 0 : _b2.isCancelAgain) {
|
|
442
|
+
if (selections.value[0] == row) {
|
|
443
|
+
console.log("onCellClick", row);
|
|
444
|
+
refTable.value.clearSelection();
|
|
445
|
+
refTable.value.clearCurrentRow();
|
|
446
|
+
setSelection([]);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
409
449
|
}
|
|
410
450
|
}
|
|
411
451
|
function onRadioChange(obj) {
|
|
412
452
|
var _a2;
|
|
413
453
|
if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio) {
|
|
414
|
-
|
|
415
|
-
|
|
454
|
+
nextTick(() => {
|
|
455
|
+
onRowClick(obj.row);
|
|
456
|
+
});
|
|
416
457
|
}
|
|
417
458
|
}
|
|
418
459
|
function getFrontSort(ao, bo, prop) {
|
|
@@ -496,7 +537,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
496
537
|
console.log("clean");
|
|
497
538
|
(_a2 = refTable.value) == null ? void 0 : _a2.clearSelection();
|
|
498
539
|
crossPageData.value = [];
|
|
499
|
-
|
|
540
|
+
setSelection([]);
|
|
500
541
|
}
|
|
501
542
|
function getParam(param) {
|
|
502
543
|
var _a2;
|
|
@@ -724,6 +765,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
724
765
|
onListEvents,
|
|
725
766
|
onSelect,
|
|
726
767
|
onRowClick,
|
|
768
|
+
onCellClick,
|
|
727
769
|
onChange,
|
|
728
770
|
pagconfig,
|
|
729
771
|
formEvent,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const util = require("../common/util.cjs");
|
|
5
|
-
const index = require("../../table-column/index.cjs");
|
|
6
4
|
const use = require("../../common/use.cjs");
|
|
7
5
|
const getAttrValue = require("../../../utils/vues/getAttrValue.cjs");
|
|
8
|
-
const
|
|
6
|
+
const index = require("../../../hooks/compons/index.cjs");
|
|
9
7
|
const config = require("../common/config.cjs");
|
|
8
|
+
const util = require("../common/util.cjs");
|
|
9
|
+
const index$1 = require("../../table-column/index.cjs");
|
|
10
10
|
const noProps = ["children", "class", "minWidth", "label"];
|
|
11
11
|
function setProps(obj, props) {
|
|
12
12
|
const table = props.table;
|
|
@@ -17,19 +17,20 @@ function setProps(obj, props) {
|
|
|
17
17
|
Object.keys(obj).forEach((key) => {
|
|
18
18
|
if (!noProps.includes(key)) {
|
|
19
19
|
if (obj[key] !== "") {
|
|
20
|
-
robj[key] = obj[key];
|
|
21
20
|
if (key == "sortable") {
|
|
22
21
|
if (obj[key]) {
|
|
23
22
|
robj[key] = "custom";
|
|
24
23
|
}
|
|
24
|
+
} else {
|
|
25
|
+
robj[key] = obj[key];
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
});
|
|
29
30
|
return robj;
|
|
30
31
|
}
|
|
31
|
-
function setSslot(obj, scope, emit, slots, props,
|
|
32
|
-
const slot = use.useSetSlot(obj, scope.row, slots,
|
|
32
|
+
function setSslot(obj, scope, emit, slots, props, index$12) {
|
|
33
|
+
const slot = use.useSetSlot(obj, scope.row, slots, index$12, scope);
|
|
33
34
|
if (slot) {
|
|
34
35
|
return slot;
|
|
35
36
|
}
|
|
@@ -41,9 +42,9 @@ function setSslot(obj, scope, emit, slots, props, index2) {
|
|
|
41
42
|
obj,
|
|
42
43
|
scope.row,
|
|
43
44
|
optionss,
|
|
44
|
-
|
|
45
|
+
index.useComponsGet(config.provides.compons),
|
|
45
46
|
emit,
|
|
46
|
-
|
|
47
|
+
index$12,
|
|
47
48
|
scope
|
|
48
49
|
);
|
|
49
50
|
if (column) {
|
|
@@ -51,7 +52,7 @@ function setSslot(obj, scope, emit, slots, props, index2) {
|
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
return defaultDom(obj, scope, props,
|
|
55
|
+
return defaultDom(obj, scope, props, index$12);
|
|
55
56
|
}
|
|
56
57
|
function defaultDom(obj, scope, props, index2) {
|
|
57
58
|
var _a;
|
|
@@ -85,7 +86,7 @@ function defaultDom(obj, scope, props, index2) {
|
|
|
85
86
|
domValue ?? table.emptyDisplay ?? ""
|
|
86
87
|
);
|
|
87
88
|
}
|
|
88
|
-
function setHeader(obj, scope, slots, emit, props,
|
|
89
|
+
function setHeader(obj, scope, slots, emit, props, index$12) {
|
|
89
90
|
const optionss = props.options || {};
|
|
90
91
|
return use.useGetDomLabel(
|
|
91
92
|
obj.label,
|
|
@@ -93,17 +94,22 @@ function setHeader(obj, scope, slots, emit, props, index2) {
|
|
|
93
94
|
scope.row,
|
|
94
95
|
slots,
|
|
95
96
|
optionss,
|
|
96
|
-
|
|
97
|
+
index.useComponsGet(config.provides.compons),
|
|
97
98
|
emit,
|
|
98
|
-
|
|
99
|
+
index$12
|
|
99
100
|
);
|
|
100
101
|
}
|
|
101
|
-
function
|
|
102
|
+
function getDom(obj, emit, propss, slots, index2) {
|
|
103
|
+
return getTableColumn(obj, emit, propss, slots, index2, (scope) => {
|
|
104
|
+
return setSslot(obj, scope, emit, slots, propss, index2);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function getTableColumn(obj, emit, props, slots, index2, def) {
|
|
102
108
|
if (obj.type == "selection") {
|
|
103
109
|
def = void 0;
|
|
104
110
|
}
|
|
105
111
|
return vue.h(
|
|
106
|
-
index.TableColumn,
|
|
112
|
+
index$1.TableColumn,
|
|
107
113
|
{
|
|
108
114
|
...setProps(obj, props),
|
|
109
115
|
className: obj.class,
|
|
@@ -112,18 +118,14 @@ function getTableColumn(obj, emit, props, slots, index$1, def) {
|
|
|
112
118
|
{
|
|
113
119
|
default: def,
|
|
114
120
|
header: (scope) => {
|
|
115
|
-
return setHeader(obj, scope, slots, emit, props,
|
|
121
|
+
return setHeader(obj, scope, slots, emit, props, index2);
|
|
116
122
|
}
|
|
117
123
|
}
|
|
118
124
|
);
|
|
119
125
|
}
|
|
120
|
-
function getDom(obj, emit, props, slots, index2) {
|
|
121
|
-
return getTableColumn(obj, emit, props, slots, index2, (scope) => {
|
|
122
|
-
return setSslot(obj, scope, emit, slots, props, index2);
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
126
|
function columnRender(obj, emit, props, slots, index2) {
|
|
126
127
|
return getDom(obj, emit, props, slots, index2);
|
|
127
128
|
}
|
|
128
129
|
exports.columnRender = columnRender;
|
|
129
130
|
exports.getTableColumn = getTableColumn;
|
|
131
|
+
exports.setHeader = setHeader;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { VNode, RendererNode, RendererElement } from 'vue';
|
|
2
|
+
export declare function setHeader(obj: ListObj, scope: ObjAny, slots: ObjAny, emit: Function, props: ObjAny, index: number): any;
|
|
2
3
|
export declare function getTableColumn(obj: ListObj, emit: Function, props: ObjAny, slots: ObjAny, index: number, def?: Function): VNode<RendererNode, RendererElement, {
|
|
3
4
|
[key: string]: any;
|
|
4
5
|
}>;
|