@kayak-sj/design 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/components-CgiuwHwW.css +1 -0
- package/dist/{components/k-form/formComponent/Editor.vue_vue_type_script_setup_true_lang.js → chunks/Editor-CNxCYFmc.js} +4 -3
- package/dist/chunks/ImageCutter-B4uKMA_8.js +41 -0
- package/dist/chunks/KEditor-C882CuWG.js +331 -0
- package/dist/{_virtual/_plugin-vue_export-helper.js → chunks/_plugin-vue_export-helper-B3ysoDQm.js} +1 -1
- package/dist/chunks/components-Cj9QZ2w0.js +4962 -0
- package/dist/chunks/editorValue-DSKvW8ty.js +65 -0
- package/dist/components/index.js +3 -91
- package/dist/components/k-dialog/KDialog.d.ts +6 -6
- package/dist/components/k-dialog/KDialog.d.ts.map +1 -1
- package/dist/components/k-echarts/KEcharts.d.ts +2 -2
- package/dist/components/k-echarts/index.js +479 -2
- package/dist/components/k-editor/KEditor.d.ts +4 -4
- package/dist/components/k-editor/index.js +3 -3
- package/dist/components/k-form/KForm.d.ts +3 -3
- package/dist/components/k-form/KForm.d.ts.map +1 -1
- package/dist/components/k-form/formComponent/DatePicker.d.ts +1 -1
- package/dist/components/k-form/formComponent/DatePicker.d.ts.map +1 -1
- package/dist/components/k-form/formComponent/Input.d.ts +2 -2
- package/dist/components/k-form/formComponent/Input.d.ts.map +1 -1
- package/dist/components/k-form/formComponent/TimePicker.d.ts +1 -1
- package/dist/components/k-form/formComponent/TimePicker.d.ts.map +1 -1
- package/dist/components/k-form/formComponent/TreeSelect.d.ts +1 -1
- package/dist/components/k-form/formComponent/TreeSelect.d.ts.map +1 -1
- package/dist/components/k-link-button/KLinkButton.d.ts +1 -1
- package/dist/components/k-link-button/KLinkButton.d.ts.map +1 -1
- package/dist/components/k-table/KTable.d.ts +1 -1
- package/dist/components/k-upload/KUpload.d.ts +5 -5
- package/dist/index.js +212 -41
- package/package.json +3 -3
- package/dist/_virtual/_rolldown/runtime.js +0 -11
- package/dist/components/k-button/KButton.js +0 -5
- package/dist/components/k-button/KButton.vue_vue_type_script_setup_true_lang.js +0 -15
- package/dist/components/k-card/KCard.js +0 -5
- package/dist/components/k-card/KCard.vue_vue_type_script_setup_true_lang.js +0 -23
- package/dist/components/k-dialog/KDialog.js +0 -5
- package/dist/components/k-dialog/KDialog.vue_vue_type_script_setup_true_lang.js +0 -129
- package/dist/components/k-dialog/KDialogHeader.js +0 -5
- package/dist/components/k-dialog/KDialogHeader.vue_vue_type_script_setup_true_lang.js +0 -42
- package/dist/components/k-echarts/KEcharts.js +0 -7
- package/dist/components/k-echarts/KEcharts.vue_vue_type_script_setup_true_lang.js +0 -45
- package/dist/components/k-echarts/composables/useKEcharts.js +0 -117
- package/dist/components/k-echarts/constants/echartEvents.js +0 -4
- package/dist/components/k-echarts/themes/customed.js +0 -285
- package/dist/components/k-echarts/themes/registerThemes.js +0 -7
- package/dist/components/k-echarts/utils/buildChartOptions.js +0 -23
- package/dist/components/k-echarts/utils/createToggleFeature.js +0 -12
- package/dist/components/k-editor/KEditor.js +0 -7
- package/dist/components/k-editor/KEditor.vue_vue_type_script_setup_true_lang.js +0 -96
- package/dist/components/k-editor/composables/useEditorImageUpload.js +0 -60
- package/dist/components/k-editor/composables/useKEditor.js +0 -98
- package/dist/components/k-editor/composables/useKEditorConfig.js +0 -46
- package/dist/components/k-editor/utils/editorValue.js +0 -37
- package/dist/components/k-editor/utils/registerPreviewMenu.js +0 -38
- package/dist/components/k-editor/utils/sanitizePasteHtml.js +0 -8
- package/dist/components/k-form/KForm.js +0 -5
- package/dist/components/k-form/KForm.vue_vue_type_script_setup_true_lang.js +0 -248
- package/dist/components/k-form/KFormField.js +0 -5
- package/dist/components/k-form/KFormField.vue_vue_type_script_setup_true_lang.js +0 -50
- package/dist/components/k-form/composables/useFormSchema.js +0 -36
- package/dist/components/k-form/composables/useKFormFields.js +0 -50
- package/dist/components/k-form/composables/useKFormModel.js +0 -194
- package/dist/components/k-form/composables/useKFormTemplateRef.js +0 -7
- package/dist/components/k-form/constants.js +0 -4
- package/dist/components/k-form/formComponent/Cascader.js +0 -7
- package/dist/components/k-form/formComponent/Cascader.vue_vue_type_script_setup_true_lang.js +0 -45
- package/dist/components/k-form/formComponent/Cascader.vue_vue_type_style_index_0_scoped_ed0da536_lang.css +0 -1
- package/dist/components/k-form/formComponent/CheckBox.js +0 -7
- package/dist/components/k-form/formComponent/CheckBox.vue_vue_type_script_setup_true_lang.js +0 -86
- package/dist/components/k-form/formComponent/CheckBox.vue_vue_type_style_index_0_scoped_fca64c11_lang.css +0 -1
- package/dist/components/k-form/formComponent/DatePicker.js +0 -7
- package/dist/components/k-form/formComponent/DatePicker.vue_vue_type_script_setup_true_lang.js +0 -144
- package/dist/components/k-form/formComponent/DatePicker.vue_vue_type_style_index_0_scoped_578e2613_lang.css +0 -1
- package/dist/components/k-form/formComponent/Editor.js +0 -5
- package/dist/components/k-form/formComponent/Fallback.js +0 -5
- package/dist/components/k-form/formComponent/Fallback.vue_vue_type_script_setup_true_lang.js +0 -22
- package/dist/components/k-form/formComponent/Input.js +0 -5
- package/dist/components/k-form/formComponent/Input.vue_vue_type_script_setup_true_lang.js +0 -93
- package/dist/components/k-form/formComponent/InputMixInput.js +0 -7
- package/dist/components/k-form/formComponent/InputMixInput.vue_vue_type_script_setup_true_lang.js +0 -108
- package/dist/components/k-form/formComponent/InputMixInput.vue_vue_type_style_index_0_scoped_6fdf6265_lang.css +0 -1
- package/dist/components/k-form/formComponent/InputMixSelect.js +0 -7
- package/dist/components/k-form/formComponent/InputMixSelect.vue_vue_type_script_setup_true_lang.js +0 -185
- package/dist/components/k-form/formComponent/InputMixSelect.vue_vue_type_style_index_0_scoped_1f46ef39_lang.css +0 -1
- package/dist/components/k-form/formComponent/InputNumber.js +0 -7
- package/dist/components/k-form/formComponent/InputNumber.vue_vue_type_script_setup_true_lang.js +0 -63
- package/dist/components/k-form/formComponent/InputNumber.vue_vue_type_style_index_0_scoped_acdc4199_lang.css +0 -1
- package/dist/components/k-form/formComponent/Radio.js +0 -7
- package/dist/components/k-form/formComponent/Radio.vue_vue_type_script_setup_true_lang.js +0 -50
- package/dist/components/k-form/formComponent/Radio.vue_vue_type_style_index_0_scoped_e0ff32b0_lang.css +0 -1
- package/dist/components/k-form/formComponent/RadioInput.js +0 -7
- package/dist/components/k-form/formComponent/RadioInput.vue_vue_type_script_setup_true_lang.js +0 -130
- package/dist/components/k-form/formComponent/RadioInput.vue_vue_type_style_index_0_scoped_1543c319_lang.css +0 -1
- package/dist/components/k-form/formComponent/ScrollSelect.js +0 -7
- package/dist/components/k-form/formComponent/ScrollSelect.vue_vue_type_script_setup_true_lang.js +0 -132
- package/dist/components/k-form/formComponent/ScrollSelect.vue_vue_type_style_index_0_scoped_dc0bba37_lang.css +0 -1
- package/dist/components/k-form/formComponent/Select.js +0 -7
- package/dist/components/k-form/formComponent/Select.vue_vue_type_script_setup_true_lang.js +0 -81
- package/dist/components/k-form/formComponent/Select.vue_vue_type_style_index_0_scoped_20fc23b7_lang.css +0 -1
- package/dist/components/k-form/formComponent/SelectMultiple.js +0 -7
- package/dist/components/k-form/formComponent/SelectMultiple.vue_vue_type_script_setup_true_lang.js +0 -84
- package/dist/components/k-form/formComponent/SelectMultiple.vue_vue_type_style_index_0_scoped_e6ca06e1_lang.css +0 -1
- package/dist/components/k-form/formComponent/Tag.js +0 -7
- package/dist/components/k-form/formComponent/Tag.vue_vue_type_script_setup_true_lang.js +0 -86
- package/dist/components/k-form/formComponent/Tag.vue_vue_type_style_index_0_scoped_9961a98a_lang.css +0 -1
- package/dist/components/k-form/formComponent/Text.js +0 -7
- package/dist/components/k-form/formComponent/Text.vue_vue_type_script_setup_true_lang.js +0 -19
- package/dist/components/k-form/formComponent/Text.vue_vue_type_style_index_0_scoped_9dc35114_lang.css +0 -1
- package/dist/components/k-form/formComponent/TimePicker.js +0 -7
- package/dist/components/k-form/formComponent/TimePicker.vue_vue_type_script_setup_true_lang.js +0 -116
- package/dist/components/k-form/formComponent/TimePicker.vue_vue_type_style_index_0_scoped_8680ec2d_lang.css +0 -1
- package/dist/components/k-form/formComponent/TreeSelect.js +0 -5
- package/dist/components/k-form/formComponent/TreeSelect.vue_vue_type_script_setup_true_lang.js +0 -57
- package/dist/components/k-form/formComponent/Upload.js +0 -5
- package/dist/components/k-form/formComponent/Upload.vue_vue_type_script_setup_true_lang.js +0 -64
- package/dist/components/k-form/formComponent/componentRegistry.js +0 -49
- package/dist/components/k-form/utils/fieldValue.js +0 -83
- package/dist/components/k-form/utils/formRules.js +0 -44
- package/dist/components/k-form/utils/resolveFormFieldComponent.js +0 -13
- package/dist/components/k-handle-page/KHandlePage.js +0 -5
- package/dist/components/k-handle-page/KHandlePage.vue_vue_type_script_setup_true_lang.js +0 -105
- package/dist/components/k-handle-page/useHandlePageInit.js +0 -21
- package/dist/components/k-icon/KIcon.js +0 -7
- package/dist/components/k-icon/KIcon.vue_vue_type_script_setup_true_lang.js +0 -23
- package/dist/components/k-icon/KIcon.vue_vue_type_style_index_0_scoped_6fd081ab_lang.css +0 -1
- package/dist/components/k-icon/resolveLucideIcon.js +0 -26
- package/dist/components/k-link-button/KLinkButton.js +0 -5
- package/dist/components/k-link-button/KLinkButton.vue_vue_type_script_setup_true_lang.js +0 -58
- package/dist/components/k-long-page/KLongPage.js +0 -7
- package/dist/components/k-long-page/KLongPage.vue_vue_type_script_setup_true_lang.js +0 -72
- package/dist/components/k-long-page/KLongPage.vue_vue_type_style_index_0_scoped_ac934c5d_lang.css +0 -1
- package/dist/components/k-long-page/KLongPagePanel.js +0 -7
- package/dist/components/k-long-page/KLongPagePanel.vue_vue_type_script_setup_true_lang.js +0 -18
- package/dist/components/k-long-page/KLongPagePanel.vue_vue_type_style_index_0_scoped_9d6e7832_lang.css +0 -1
- package/dist/components/k-long-page/composables/useLongPageNavDrag.js +0 -32
- package/dist/components/k-long-page/icons/icon-base-2.js +0 -4
- package/dist/components/k-long-page/icons/icon-base.js +0 -4
- package/dist/components/k-long-page/icons/icon-notice-2.js +0 -4
- package/dist/components/k-long-page/icons/icon-notice.js +0 -4
- package/dist/components/k-long-page/icons/icon-price-2.js +0 -4
- package/dist/components/k-long-page/icons/icon-price.js +0 -4
- package/dist/components/k-long-page/icons/icon-restrict-2.js +0 -4
- package/dist/components/k-long-page/icons/icon-restrict.js +0 -4
- package/dist/components/k-long-page/icons/icon-setup-2.js +0 -4
- package/dist/components/k-long-page/icons/icon-setup.js +0 -4
- package/dist/components/k-long-page/navConfigs.js +0 -23
- package/dist/components/k-pagination/KPagination.js +0 -5
- package/dist/components/k-pagination/KPagination.vue_vue_type_script_setup_true_lang.js +0 -36
- package/dist/components/k-panel/KPanel.js +0 -5
- package/dist/components/k-panel/KPanel.vue_vue_type_script_setup_true_lang.js +0 -47
- package/dist/components/k-panel-query/KPanelQuery.js +0 -5
- package/dist/components/k-panel-query/KPanelQuery.vue_vue_type_script_setup_true_lang.js +0 -151
- package/dist/components/k-panel-query/KPanelQueryActions.js +0 -5
- package/dist/components/k-panel-query/KPanelQueryActions.vue_vue_type_script_setup_true_lang.js +0 -45
- package/dist/components/k-panel-query/KPanelQueryForm.js +0 -5
- package/dist/components/k-panel-query/KPanelQueryForm.vue_vue_type_script_setup_true_lang.js +0 -55
- package/dist/components/k-panel-query/KPanelQueryItem.js +0 -5
- package/dist/components/k-panel-query/KPanelQueryItem.vue_vue_type_script_setup_true_lang.js +0 -63
- package/dist/components/k-table/KTable.js +0 -7
- package/dist/components/k-table/KTable.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/k-table/KTable.vue_vue_type_style_index_0_scoped_9ecd6487_lang.css +0 -1
- package/dist/components/k-table/KTableColumn.js +0 -7
- package/dist/components/k-table/KTableColumn.vue_vue_type_script_setup_true_lang.js +0 -154
- package/dist/components/k-table/KTableColumn.vue_vue_type_style_index_0_scoped_578909bc_lang.css +0 -1
- package/dist/components/k-table/KTableColumnSelector.js +0 -7
- package/dist/components/k-table/KTableColumnSelector.vue_vue_type_script_setup_true_lang.js +0 -59
- package/dist/components/k-table/KTableColumnSelector.vue_vue_type_style_index_0_scoped_e0b3cf31_lang.css +0 -1
- package/dist/components/k-table/KTableToolbar.js +0 -7
- package/dist/components/k-table/KTableToolbar.vue_vue_type_script_setup_true_lang.js +0 -60
- package/dist/components/k-table/KTableToolbar.vue_vue_type_style_index_0_scoped_bff19ed1_lang.css +0 -1
- package/dist/components/k-table/composables/useColumnDisplay.js +0 -103
- package/dist/components/k-table/composables/useKTable.js +0 -179
- package/dist/components/k-table/composables/useKTableCrossPageSelection.js +0 -58
- package/dist/components/k-table/composables/useKTableTemplateRef.js +0 -7
- package/dist/components/k-table/composables/useTableColumns.js +0 -61
- package/dist/components/k-table/composables/useTableData.js +0 -47
- package/dist/components/k-table/composables/useTablePagination.js +0 -52
- package/dist/components/k-table/composables/useTableRadio.js +0 -28
- package/dist/components/k-table/composables/useTableRowSort.js +0 -35
- package/dist/components/k-table/composables/useTableTreeLoad.js +0 -32
- package/dist/components/k-table/dictOptions.js +0 -9
- package/dist/components/k-table/kTableProps.js +0 -17
- package/dist/components/k-table/report/convertDownloadCol.js +0 -11
- package/dist/components/k-table/report/exportKTableReport.js +0 -19
- package/dist/components/k-table/report/mergeQueryConfig.js +0 -31
- package/dist/components/k-table/report/pickExportColumns.js +0 -7
- package/dist/components/k-table/report/useExportKTableReport.js +0 -29
- package/dist/components/k-table/types.js +0 -20
- package/dist/components/k-table/utils/columnIdentity.js +0 -6
- package/dist/components/k-table/utils/formatCellValue.js +0 -30
- package/dist/components/k-table/utils/rowKey.js +0 -10
- package/dist/components/k-upload/KUpload.js +0 -7
- package/dist/components/k-upload/KUpload.vue_vue_type_script_setup_true_lang.js +0 -355
- package/dist/components/k-upload/KUpload.vue_vue_type_style_index_0_scoped_6050c2c6_lang.css +0 -1
- package/dist/components/k-upload/components/ImageCutter.js +0 -7
- package/dist/components/k-upload/components/ImageCutter.vue_vue_type_script_setup_true_lang.js +0 -40
- package/dist/components/k-upload/components/UploadFileItem.js +0 -7
- package/dist/components/k-upload/components/UploadFileItem.vue_vue_type_script_setup_true_lang.js +0 -73
- package/dist/components/k-upload/components/UploadFileItem.vue_vue_type_style_index_0_scoped_01959ada_lang.css +0 -1
- package/dist/components/k-upload/components/UploadInlineActions.js +0 -7
- package/dist/components/k-upload/components/UploadInlineActions.vue_vue_type_script_setup_true_lang.js +0 -39
- package/dist/components/k-upload/components/UploadInlineActions.vue_vue_type_style_index_0_scoped_55d9c320_lang.css +0 -1
- package/dist/components/k-upload/components/UploadMediaDialog.js +0 -7
- package/dist/components/k-upload/components/UploadMediaDialog.vue_vue_type_script_setup_true_lang.js +0 -44
- package/dist/components/k-upload/components/UploadMediaDialog.vue_vue_type_style_index_0_scoped_b9720661_lang.css +0 -1
- package/dist/components/k-upload/components/UploadTipArea.js +0 -7
- package/dist/components/k-upload/components/UploadTipArea.vue_vue_type_script_setup_true_lang.js +0 -26
- package/dist/components/k-upload/components/UploadTipArea.vue_vue_type_style_index_0_scoped_f2b7df65_lang.css +0 -1
- package/dist/components/k-upload/composables/useImagePreview.js +0 -23
- package/dist/components/k-upload/composables/useMediaPreview.js +0 -20
- package/dist/components/k-upload/composables/useUploadFileList.js +0 -46
- package/dist/components/k-upload/composables/useUploadRequest.js +0 -43
- package/dist/components/k-upload/composables/useUploadValidation.js +0 -22
- package/dist/components/k-upload/resolveUploadAction.js +0 -13
- package/dist/components/k-upload/utils/uploadFileValue.js +0 -44
- package/dist/config/uploadConfig.js +0 -29
- package/dist/theme/index.js +0 -22
- package/dist/utils/createStubComponent.js +0 -43
- package/dist/utils/validators.js +0 -152
- /package/dist/{components/k-upload/components/ImageCutter.vue_vue_type_style_index_0_scoped_900b5e3b_lang.css → assets/ImageCutter-B771uShK.css} +0 -0
- /package/dist/{components/k-editor/KEditor.vue_vue_type_style_index_0_scoped_b9ef08e0_lang.css → assets/KEditor-LzsE5URl.css} +0 -0
- /package/dist/{components/k-echarts/KEcharts.vue_vue_type_style_index_0_scoped_d6da558a_lang.css → assets/index-DMxcQQBQ.css} +0 -0
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { getColumnIdentity as e } from "../utils/columnIdentity.js";
|
|
2
|
-
import { computed as t, nextTick as n, onMounted as r, ref as i, toValue as a, watch as o } from "vue";
|
|
3
|
-
import { cloneDeep as s } from "lodash-es";
|
|
4
|
-
import { useLocalStorage as c } from "@vueuse/core";
|
|
5
|
-
//#region src/components/k-table/composables/useColumnDisplay.ts
|
|
6
|
-
var l = "kayak_table_column_display";
|
|
7
|
-
function u(e) {
|
|
8
|
-
return e.type === "selection" || e.type === "index" || e.type === "radio" || e.type === "expand" || e.required === !0;
|
|
9
|
-
}
|
|
10
|
-
function d(e) {
|
|
11
|
-
return !(e.type === "radio" || e.type === "expand" || e.children?.length);
|
|
12
|
-
}
|
|
13
|
-
function f(f) {
|
|
14
|
-
let p = i({}), m = i(""), h = c(l, {}), g = t(() => !!a(f.enableColumnCache)), _ = t(() => a(f.columns).filter((e) => d(e)));
|
|
15
|
-
function v() {
|
|
16
|
-
return a(f.tableKey) || m.value;
|
|
17
|
-
}
|
|
18
|
-
function y() {
|
|
19
|
-
let t = {};
|
|
20
|
-
return a(f.columns).forEach((n, r) => {
|
|
21
|
-
d(n) && (t[e(n, r)] = !0);
|
|
22
|
-
}), t;
|
|
23
|
-
}
|
|
24
|
-
function b() {
|
|
25
|
-
if (!g.value) return null;
|
|
26
|
-
let e = v();
|
|
27
|
-
return e ? h.value[e] ?? null : null;
|
|
28
|
-
}
|
|
29
|
-
function x() {
|
|
30
|
-
if (!g.value) return;
|
|
31
|
-
let e = v();
|
|
32
|
-
e && (h.value = {
|
|
33
|
-
...h.value,
|
|
34
|
-
[e]: p.value
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function S() {
|
|
38
|
-
if (!g.value) return;
|
|
39
|
-
let e = v();
|
|
40
|
-
if (!e) return;
|
|
41
|
-
let t = { ...h.value };
|
|
42
|
-
delete t[e], h.value = t;
|
|
43
|
-
}
|
|
44
|
-
function C(t, n) {
|
|
45
|
-
let r = a(f.columns), i = r.findIndex((e) => e === t || e.prop && e.prop === t.prop && e.type === t.type);
|
|
46
|
-
return i >= 0 ? e(r[i], i) : e(t, n);
|
|
47
|
-
}
|
|
48
|
-
function w() {
|
|
49
|
-
m.value = a(f.tableKey) || `table_${Math.random().toString(36).slice(2, 11)}`;
|
|
50
|
-
let e = b();
|
|
51
|
-
p.value = e ? s(e) : y();
|
|
52
|
-
}
|
|
53
|
-
function T() {
|
|
54
|
-
n(() => f.onLayout?.());
|
|
55
|
-
}
|
|
56
|
-
function E(e, t) {
|
|
57
|
-
p.value = {
|
|
58
|
-
...p.value,
|
|
59
|
-
[e]: t
|
|
60
|
-
}, x(), f.onDisplayChange?.(p.value), T();
|
|
61
|
-
}
|
|
62
|
-
function D(e, t, n) {
|
|
63
|
-
E(C(e, t), n);
|
|
64
|
-
}
|
|
65
|
-
function O() {
|
|
66
|
-
S(), p.value = y(), f.onDisplayChange?.(p.value), T();
|
|
67
|
-
}
|
|
68
|
-
let k = t(() => {
|
|
69
|
-
let e = a(f.renderColumns);
|
|
70
|
-
return g.value ? e.filter((e, t) => {
|
|
71
|
-
if (u(e)) return !0;
|
|
72
|
-
let n = C(e, t);
|
|
73
|
-
return p.value[n] !== !1;
|
|
74
|
-
}) : e;
|
|
75
|
-
}), A = t(() => _.value.map((t, n) => {
|
|
76
|
-
let r = e(t, n);
|
|
77
|
-
return {
|
|
78
|
-
column: t,
|
|
79
|
-
key: r,
|
|
80
|
-
label: t.label || "未命名列",
|
|
81
|
-
checked: p.value[r] !== !1,
|
|
82
|
-
disabled: u(t)
|
|
83
|
-
};
|
|
84
|
-
}));
|
|
85
|
-
return o(() => a(f.columns), () => {
|
|
86
|
-
let e = y();
|
|
87
|
-
Object.keys(e).forEach((e) => {
|
|
88
|
-
p.value[e] === void 0 && (p.value[e] = !0);
|
|
89
|
-
});
|
|
90
|
-
}, { deep: !0 }), r(() => {
|
|
91
|
-
w();
|
|
92
|
-
}), {
|
|
93
|
-
columnDisplay: p,
|
|
94
|
-
displayableColumns: _,
|
|
95
|
-
visibleColumns: k,
|
|
96
|
-
selectorItems: A,
|
|
97
|
-
setColumnVisible: D,
|
|
98
|
-
setColumnVisibleByKey: E,
|
|
99
|
-
resetColumnDisplay: O
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
//#endregion
|
|
103
|
-
export { l as TABLE_COLUMN_DISPLAY_KEY, f as useColumnDisplay };
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { normalizeColumns as e } from "./useTableColumns.js";
|
|
2
|
-
import { getColumnIdentity as t } from "../utils/columnIdentity.js";
|
|
3
|
-
import { useColumnDisplay as n } from "./useColumnDisplay.js";
|
|
4
|
-
import { useTableData as r } from "./useTableData.js";
|
|
5
|
-
import { useTablePagination as i } from "./useTablePagination.js";
|
|
6
|
-
import { useTableRadio as a } from "./useTableRadio.js";
|
|
7
|
-
import { useTableRowSort as o } from "./useTableRowSort.js";
|
|
8
|
-
import { useTableTreeLoad as s } from "./useTableTreeLoad.js";
|
|
9
|
-
import { computed as c, onMounted as l, ref as u } from "vue";
|
|
10
|
-
//#region src/components/k-table/composables/useKTable.ts
|
|
11
|
-
function d(d) {
|
|
12
|
-
let { props: f, emit: p, attrs: m, slots: h, tableRef: g, queryRef: _ } = d, v = u({}), y = u(0), b = c(() => !!f.action), x = c(() => !!f.query?.form?.formConfigs?.length), S = c(() => !!h.header);
|
|
13
|
-
function C(e) {
|
|
14
|
-
let t = { ...e };
|
|
15
|
-
v.value = f.convertParams ? f.convertParams(t) : t;
|
|
16
|
-
}
|
|
17
|
-
let w = c(() => {
|
|
18
|
-
let t = e(f.columns, f.selectionShow);
|
|
19
|
-
return f.disabled && (t = t.filter((e) => e.type !== "operates" && e.prop !== "operates")), t;
|
|
20
|
-
}), T = n({
|
|
21
|
-
columns: () => f.columns,
|
|
22
|
-
renderColumns: w,
|
|
23
|
-
enableColumnCache: () => f.enableColumnCache,
|
|
24
|
-
tableKey: () => f.tableKey,
|
|
25
|
-
onDisplayChange: (e) => p("column-display-change", e),
|
|
26
|
-
onLayout: () => g.value?.doLayout()
|
|
27
|
-
}), E = a({
|
|
28
|
-
columns: () => f.columns,
|
|
29
|
-
rowKey: () => f.rowKey
|
|
30
|
-
}), D = s({
|
|
31
|
-
tableRef: g,
|
|
32
|
-
rowKey: () => f.rowKey,
|
|
33
|
-
load: () => f.load
|
|
34
|
-
}), O = i({
|
|
35
|
-
pagination: () => f.pagination,
|
|
36
|
-
hasAction: b
|
|
37
|
-
}), k = r({
|
|
38
|
-
action: f.action,
|
|
39
|
-
params: () => f.params,
|
|
40
|
-
queryParams: v,
|
|
41
|
-
responseConfig: () => f.responseConfig,
|
|
42
|
-
pagination: O,
|
|
43
|
-
initialLoading: !!(f.action && f.initTable),
|
|
44
|
-
onDataLoaded: (e, t) => p("data-loaded", e, t)
|
|
45
|
-
}), A = c(() => f.enableColumnCache ? T.visibleColumns.value : w.value), j = c(() => A.value.map((e, n) => t(e, n)).join("|")), M = c(() => !!(f.addButton || f.selectionShow || S.value || f.enableColumnCache)), N = c(() => b.value ? k.tableData.value : f.data), P = c(() => f.loading === void 0 ? b.value ? k.loading.value : !1 : f.loading), F = c(() => P.value || !!(b.value && f.initTable && !k.loaded.value)), I = c(() => {
|
|
46
|
-
let e = { ...m };
|
|
47
|
-
b.value && "data" in e && delete e.data, f.load && delete e.load;
|
|
48
|
-
let t = {
|
|
49
|
-
data: N.value,
|
|
50
|
-
rowKey: f.rowKey,
|
|
51
|
-
border: !0,
|
|
52
|
-
stripe: !0,
|
|
53
|
-
maxHeight: f.maxHeight,
|
|
54
|
-
...e
|
|
55
|
-
};
|
|
56
|
-
return f.load && (t.load = D.wrapLoad(f.load)), E.hasRadioColumn.value && t.highlightCurrentRow === void 0 && (t.highlightCurrentRow = m["highlight-current-row"] !== !1), t;
|
|
57
|
-
});
|
|
58
|
-
o({
|
|
59
|
-
enabled: () => f.sort,
|
|
60
|
-
disabled: () => f.disabled,
|
|
61
|
-
tableRef: g,
|
|
62
|
-
rebindKey: () => j.value,
|
|
63
|
-
onSortEnd: (e) => {
|
|
64
|
-
let t = [...N.value];
|
|
65
|
-
if (e.oldIndex == null || e.newIndex == null) return;
|
|
66
|
-
let [n] = t.splice(e.oldIndex, 1);
|
|
67
|
-
t.splice(e.newIndex, 0, n), p("sort-end", e, t);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
function L() {
|
|
71
|
-
b.value && k.fetchData();
|
|
72
|
-
}
|
|
73
|
-
l(() => {
|
|
74
|
-
!f.initTable || !f.action || (x.value && C(_.value?.getParams() ?? {}), k.fetchData());
|
|
75
|
-
});
|
|
76
|
-
function R(e) {
|
|
77
|
-
y.value = e.length, p("selection-change", e);
|
|
78
|
-
}
|
|
79
|
-
function z() {
|
|
80
|
-
g.value?.setCurrentRow();
|
|
81
|
-
}
|
|
82
|
-
function B(e) {
|
|
83
|
-
C(e), O.resetPage(), f.clearCurrentRowOnQuery && z(), p("query", v.value), L();
|
|
84
|
-
}
|
|
85
|
-
function V() {
|
|
86
|
-
p("reset"), f.selectionShow && Q(), f.clearCurrentRowOnReset && z();
|
|
87
|
-
}
|
|
88
|
-
function H(e) {
|
|
89
|
-
O.setCurrentPage(e), p("page-change", e), L();
|
|
90
|
-
}
|
|
91
|
-
function U(e) {
|
|
92
|
-
O.setPageSize(e), p("size-change", e), L();
|
|
93
|
-
}
|
|
94
|
-
function W() {
|
|
95
|
-
p("add");
|
|
96
|
-
}
|
|
97
|
-
function G(e, t, n) {
|
|
98
|
-
p("operate-click", e, t, n);
|
|
99
|
-
}
|
|
100
|
-
function K(e) {
|
|
101
|
-
if (!E.hasRadioColumn.value) return;
|
|
102
|
-
let t = E.selectRow(e);
|
|
103
|
-
t && p("radio-change", t, E.radioSelected.value);
|
|
104
|
-
}
|
|
105
|
-
function q(e) {
|
|
106
|
-
K(e);
|
|
107
|
-
}
|
|
108
|
-
function J(e, t) {
|
|
109
|
-
T.setColumnVisibleByKey(e, t);
|
|
110
|
-
}
|
|
111
|
-
function Y() {
|
|
112
|
-
return g.value;
|
|
113
|
-
}
|
|
114
|
-
function X() {
|
|
115
|
-
return _.value;
|
|
116
|
-
}
|
|
117
|
-
function Z() {
|
|
118
|
-
return g.value?.getSelectionRows() ?? [];
|
|
119
|
-
}
|
|
120
|
-
function Q() {
|
|
121
|
-
g.value?.clearSelection(), y.value = 0;
|
|
122
|
-
}
|
|
123
|
-
function $(e, t) {
|
|
124
|
-
g.value?.toggleRowSelection(e, t);
|
|
125
|
-
}
|
|
126
|
-
async function ee(e = !1) {
|
|
127
|
-
b.value && await k.refresh(e);
|
|
128
|
-
}
|
|
129
|
-
function te() {
|
|
130
|
-
E.clearRadioSelection(), g.value?.setCurrentRow();
|
|
131
|
-
}
|
|
132
|
-
function ne(e) {
|
|
133
|
-
E.setRadioSelection(e);
|
|
134
|
-
}
|
|
135
|
-
function re() {
|
|
136
|
-
return E.getRadioSelection();
|
|
137
|
-
}
|
|
138
|
-
function ie(e) {
|
|
139
|
-
D.refreshTree(e);
|
|
140
|
-
}
|
|
141
|
-
return {
|
|
142
|
-
showQuery: x,
|
|
143
|
-
showToolbar: M,
|
|
144
|
-
hasHeaderSlot: S,
|
|
145
|
-
renderColumns: A,
|
|
146
|
-
tableProps: I,
|
|
147
|
-
tableLoading: P,
|
|
148
|
-
showLoadingEmpty: F,
|
|
149
|
-
columnSelectorItems: T.selectorItems,
|
|
150
|
-
paginationBind: O.bindProps,
|
|
151
|
-
indexOffset: O.indexOffset,
|
|
152
|
-
selectedCount: y,
|
|
153
|
-
radioSelected: E.radioSelected,
|
|
154
|
-
getColumnIdentity: t,
|
|
155
|
-
handleSelectionChange: R,
|
|
156
|
-
handleQuery: B,
|
|
157
|
-
handleQueryReset: V,
|
|
158
|
-
handlePageChange: H,
|
|
159
|
-
handleSizeChange: U,
|
|
160
|
-
handleAdd: W,
|
|
161
|
-
handleOperateClick: G,
|
|
162
|
-
handleRowClick: q,
|
|
163
|
-
handleRadioChange: K,
|
|
164
|
-
handleColumnVisibleChange: J,
|
|
165
|
-
resetColumnDisplay: T.resetColumnDisplay,
|
|
166
|
-
getTableRef: Y,
|
|
167
|
-
getQueryRef: X,
|
|
168
|
-
getSelection: Z,
|
|
169
|
-
clearSelection: Q,
|
|
170
|
-
toggleRowSelection: $,
|
|
171
|
-
refresh: ee,
|
|
172
|
-
clearRadioSelection: te,
|
|
173
|
-
setRadioSelection: ne,
|
|
174
|
-
getRadioSelection: re,
|
|
175
|
-
refreshTree: ie
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
//#endregion
|
|
179
|
-
export { d as useKTable };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { getRowKeyValue as e } from "../utils/rowKey.js";
|
|
2
|
-
import { useKTableTemplateRef as t } from "./useKTableTemplateRef.js";
|
|
3
|
-
import { nextTick as n, shallowRef as r, toValue as i } from "vue";
|
|
4
|
-
//#region src/components/k-table/composables/useKTableCrossPageSelection.ts
|
|
5
|
-
function a(a) {
|
|
6
|
-
let o = r([]), s = r([]), c = r(!1), l = t(a.tableRefKey ?? "tableRef");
|
|
7
|
-
function u() {
|
|
8
|
-
return a.tableRef == null ? l.value : i(a.tableRef);
|
|
9
|
-
}
|
|
10
|
-
function d(t) {
|
|
11
|
-
return String(e(t, i(a.rowKey)));
|
|
12
|
-
}
|
|
13
|
-
function f(e) {
|
|
14
|
-
o.value = [...e];
|
|
15
|
-
}
|
|
16
|
-
function p() {
|
|
17
|
-
o.value = [];
|
|
18
|
-
}
|
|
19
|
-
function m() {
|
|
20
|
-
s.value = [];
|
|
21
|
-
}
|
|
22
|
-
function h(e) {
|
|
23
|
-
s.value = e;
|
|
24
|
-
let t = new Set(o.value.map(d));
|
|
25
|
-
if (i(a.mode) === "single") {
|
|
26
|
-
let n = e.find((e) => t.has(d(e)));
|
|
27
|
-
n && u()?.setRadioSelection(n);
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
c.value = !0, n(async () => {
|
|
31
|
-
let r = u();
|
|
32
|
-
e.forEach((e) => {
|
|
33
|
-
t.has(d(e)) && r?.toggleRowSelection(e, !0);
|
|
34
|
-
}), await n(), c.value = !1;
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function g(e) {
|
|
38
|
-
if (c.value) return;
|
|
39
|
-
let t = new Set(s.value.map(d));
|
|
40
|
-
o.value = [...o.value.filter((e) => !t.has(d(e))), ...e];
|
|
41
|
-
}
|
|
42
|
-
function _(e) {
|
|
43
|
-
o.value = [e];
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
selection: o,
|
|
47
|
-
pageRows: s,
|
|
48
|
-
tableRef: l,
|
|
49
|
-
setSelection: f,
|
|
50
|
-
clearSelection: p,
|
|
51
|
-
resetPageRows: m,
|
|
52
|
-
onDataLoaded: h,
|
|
53
|
-
onSelectionChange: g,
|
|
54
|
-
onRadioChange: _
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
//#endregion
|
|
58
|
-
export { a as useKTableCrossPageSelection };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { DICT_KEY as e } from "../types.js";
|
|
2
|
-
import { getRowField as t } from "../utils/rowKey.js";
|
|
3
|
-
import { formatCellValue as n } from "../utils/formatCellValue.js";
|
|
4
|
-
import { inject as r } from "vue";
|
|
5
|
-
//#region src/components/k-table/composables/useTableColumns.ts
|
|
6
|
-
var i = [
|
|
7
|
-
"prop",
|
|
8
|
-
"label",
|
|
9
|
-
"width",
|
|
10
|
-
"minWidth",
|
|
11
|
-
"align",
|
|
12
|
-
"headerAlign",
|
|
13
|
-
"fixed",
|
|
14
|
-
"sortable",
|
|
15
|
-
"sortMethod",
|
|
16
|
-
"sortBy",
|
|
17
|
-
"sortOrders",
|
|
18
|
-
"resizable",
|
|
19
|
-
"formatter",
|
|
20
|
-
"showOverflowTooltip",
|
|
21
|
-
"className",
|
|
22
|
-
"labelClassName",
|
|
23
|
-
"selectable",
|
|
24
|
-
"reserveSelection",
|
|
25
|
-
"filters",
|
|
26
|
-
"filterMethod",
|
|
27
|
-
"filteredValue"
|
|
28
|
-
];
|
|
29
|
-
function a(e, t = !1) {
|
|
30
|
-
let n = e.some((e) => e.type === "selection"), r = e;
|
|
31
|
-
return t && !n && (r = [{
|
|
32
|
-
type: "selection",
|
|
33
|
-
width: 50,
|
|
34
|
-
align: "center"
|
|
35
|
-
}, ...r]), r.map((e) => e.prop === "operates" && !e.type ? {
|
|
36
|
-
...e,
|
|
37
|
-
type: "operates"
|
|
38
|
-
} : e);
|
|
39
|
-
}
|
|
40
|
-
function o(e) {
|
|
41
|
-
let t = {
|
|
42
|
-
minWidth: e.minWidth ?? "110",
|
|
43
|
-
align: e.align ?? "center",
|
|
44
|
-
headerAlign: e.headerAlign ?? "center"
|
|
45
|
-
};
|
|
46
|
-
for (let n of i) e[n] !== void 0 && (t[n] = e[n]);
|
|
47
|
-
return e.type === "index" && !t.label && (t.label = "序号"), e.type === "expand" && (t.width = e.width ?? 50, delete t.minWidth), e.type !== "selection" && e.type !== "index" && e.type !== "operates" && e.type !== "radio" && e.type !== "expand" && (t.showOverflowTooltip = e.showOverflowTooltip ?? !0), t;
|
|
48
|
-
}
|
|
49
|
-
function s(i = "--") {
|
|
50
|
-
let a = r(e, null);
|
|
51
|
-
function o(e, r, o) {
|
|
52
|
-
let s = e.prop ? t(r, e.prop) : void 0, l = e.dict && a && !c(s) ? a.getLabel(e.dict, s) : void 0;
|
|
53
|
-
return n(e, r, o, i, l);
|
|
54
|
-
}
|
|
55
|
-
return { getCellDisplayValue: o };
|
|
56
|
-
}
|
|
57
|
-
function c(e) {
|
|
58
|
-
return e === "" || e == null;
|
|
59
|
-
}
|
|
60
|
-
//#endregion
|
|
61
|
-
export { o as convertColumnBind, a as normalizeColumns, s as useCellValue };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_RESPONSE_CONFIG as e } from "../types.js";
|
|
2
|
-
import { ref as t, toValue as n } from "vue";
|
|
3
|
-
//#region src/components/k-table/composables/useTableData.ts
|
|
4
|
-
function r(r) {
|
|
5
|
-
let i = t([]), a = t(r.initialLoading ?? !1), o = t(!1), s = t(!1);
|
|
6
|
-
function c() {
|
|
7
|
-
return {
|
|
8
|
-
...e,
|
|
9
|
-
...n(r.responseConfig)
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
function l() {
|
|
13
|
-
let e = c(), { currentPage: t, pageSize: i } = r.pagination.state.value;
|
|
14
|
-
return {
|
|
15
|
-
...n(r.params) ?? {},
|
|
16
|
-
...n(r.queryParams) ?? {},
|
|
17
|
-
[e.page]: String(t),
|
|
18
|
-
[e.limit]: String(i)
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function u(e) {
|
|
22
|
-
let t = e ?? {}, n = c(), a = t[n.list] ?? [], o = Number(t[n.total] ?? t.total ?? 0);
|
|
23
|
-
i.value = a, r.pagination.setTotal(o), r.onDataLoaded?.(a, o), a.length === 0 && r.pagination.state.value.currentPage > 1 && (r.pagination.setCurrentPage(r.pagination.state.value.currentPage - 1), d());
|
|
24
|
-
}
|
|
25
|
-
async function d() {
|
|
26
|
-
if (!(!r.action || s.value)) {
|
|
27
|
-
s.value = !0, a.value = !0;
|
|
28
|
-
try {
|
|
29
|
-
u(await r.action(l()));
|
|
30
|
-
} finally {
|
|
31
|
-
a.value = !1, o.value = !0, s.value = !1;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
async function f(e = !1) {
|
|
36
|
-
e && r.pagination.resetPage(), await d();
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
tableData: i,
|
|
40
|
-
loading: a,
|
|
41
|
-
loaded: o,
|
|
42
|
-
fetchData: d,
|
|
43
|
-
refresh: f
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
//#endregion
|
|
47
|
-
export { r as useTableData };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_PAGINATION as e } from "../types.js";
|
|
2
|
-
import { computed as t, ref as n, toValue as r, watch as i } from "vue";
|
|
3
|
-
//#region src/components/k-table/composables/useTablePagination.ts
|
|
4
|
-
function a(a) {
|
|
5
|
-
let o = r(a.pagination), s = n({
|
|
6
|
-
total: o?.total ?? e.total,
|
|
7
|
-
currentPage: o?.currentPage ?? e.currentPage,
|
|
8
|
-
pageSize: o?.pageSize ?? e.pageSize,
|
|
9
|
-
pageSizes: o?.pageSizes ?? [...e.pageSizes],
|
|
10
|
-
layout: o?.layout ?? e.layout
|
|
11
|
-
}), c = t(() => ({
|
|
12
|
-
total: s.value.total,
|
|
13
|
-
currentPage: s.value.currentPage,
|
|
14
|
-
pageSize: s.value.pageSize,
|
|
15
|
-
pageSizes: s.value.pageSizes,
|
|
16
|
-
layout: s.value.layout
|
|
17
|
-
})), l = t(() => (s.value.currentPage - 1) * s.value.pageSize);
|
|
18
|
-
i(() => {
|
|
19
|
-
let e = r(a.pagination);
|
|
20
|
-
return [
|
|
21
|
-
e?.total,
|
|
22
|
-
e?.currentPage,
|
|
23
|
-
e?.pageSize,
|
|
24
|
-
a.hasAction.value
|
|
25
|
-
];
|
|
26
|
-
}, ([e, t, n, r]) => {
|
|
27
|
-
t !== void 0 && (s.value.currentPage = t), n !== void 0 && (s.value.pageSize = n), !r && e !== void 0 && (s.value.total = e);
|
|
28
|
-
});
|
|
29
|
-
function u(e) {
|
|
30
|
-
s.value.total = e;
|
|
31
|
-
}
|
|
32
|
-
function d(e) {
|
|
33
|
-
s.value.currentPage = e;
|
|
34
|
-
}
|
|
35
|
-
function f(e) {
|
|
36
|
-
s.value.pageSize = e;
|
|
37
|
-
}
|
|
38
|
-
function p() {
|
|
39
|
-
s.value.currentPage = 1;
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
state: s,
|
|
43
|
-
bindProps: c,
|
|
44
|
-
indexOffset: l,
|
|
45
|
-
setTotal: u,
|
|
46
|
-
setCurrentPage: d,
|
|
47
|
-
setPageSize: f,
|
|
48
|
-
resetPage: p
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
//#endregion
|
|
52
|
-
export { a as useTablePagination };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { getRowKeyValue as e } from "../utils/rowKey.js";
|
|
2
|
-
import { computed as t, ref as n, toValue as r } from "vue";
|
|
3
|
-
//#region src/components/k-table/composables/useTableRadio.ts
|
|
4
|
-
function i(i) {
|
|
5
|
-
let a = n(""), o = t(() => r(i.columns).some((e) => e.type === "radio"));
|
|
6
|
-
function s(t) {
|
|
7
|
-
return a.value = t ? e(t, r(i.rowKey)) : "", t;
|
|
8
|
-
}
|
|
9
|
-
function c() {
|
|
10
|
-
a.value = "";
|
|
11
|
-
}
|
|
12
|
-
function l(t) {
|
|
13
|
-
a.value = e(t, r(i.rowKey));
|
|
14
|
-
}
|
|
15
|
-
function u() {
|
|
16
|
-
return a.value;
|
|
17
|
-
}
|
|
18
|
-
return {
|
|
19
|
-
radioSelected: a,
|
|
20
|
-
hasRadioColumn: o,
|
|
21
|
-
selectRow: s,
|
|
22
|
-
clearRadioSelection: c,
|
|
23
|
-
setRadioSelection: l,
|
|
24
|
-
getRadioSelection: u
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
export { i as useTableRadio };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { nextTick as e, onBeforeUnmount as t, toValue as n, watch as r } from "vue";
|
|
2
|
-
import i from "sortablejs";
|
|
3
|
-
//#region src/components/k-table/composables/useTableRowSort.ts
|
|
4
|
-
function a(a) {
|
|
5
|
-
let o = null;
|
|
6
|
-
function s() {
|
|
7
|
-
o?.destroy(), o = null;
|
|
8
|
-
}
|
|
9
|
-
function c() {
|
|
10
|
-
if (s(), !n(a.enabled)) return;
|
|
11
|
-
let e = a.tableRef.value?.$el?.querySelector(".el-table__body-wrapper tbody");
|
|
12
|
-
e && (o = i.create(e, {
|
|
13
|
-
disabled: n(a.disabled),
|
|
14
|
-
animation: 300,
|
|
15
|
-
handle: ".sort-handle",
|
|
16
|
-
filter: ".ignore-elements",
|
|
17
|
-
preventOnFilter: !0,
|
|
18
|
-
onEnd: (e) => a.onSortEnd(e)
|
|
19
|
-
}));
|
|
20
|
-
}
|
|
21
|
-
return r(() => [
|
|
22
|
-
n(a.enabled),
|
|
23
|
-
n(a.rebindKey),
|
|
24
|
-
a.tableRef.value
|
|
25
|
-
], () => {
|
|
26
|
-
e(c);
|
|
27
|
-
}, { flush: "post" }), r(() => n(a.disabled), (e) => {
|
|
28
|
-
o && o.option("disabled", e);
|
|
29
|
-
}), t(s), {
|
|
30
|
-
initSortable: () => e(c),
|
|
31
|
-
destroySortable: s
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
35
|
-
export { a as useTableRowSort };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { getRowKeyValue as e } from "../utils/rowKey.js";
|
|
2
|
-
import { toValue as t } from "vue";
|
|
3
|
-
//#region src/components/k-table/composables/useTableTreeLoad.ts
|
|
4
|
-
function n(n) {
|
|
5
|
-
let r = /* @__PURE__ */ new Map();
|
|
6
|
-
function i(i) {
|
|
7
|
-
return (a, o, s) => {
|
|
8
|
-
let c = e(a, t(n.rowKey));
|
|
9
|
-
c != null && r.set(c, {
|
|
10
|
-
row: a,
|
|
11
|
-
treeNode: o,
|
|
12
|
-
resolve: s
|
|
13
|
-
}), i(a, o, s);
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
function a(e) {
|
|
17
|
-
let i = t(n.load), a = r.get(e);
|
|
18
|
-
if (!a || !i) return;
|
|
19
|
-
let o = n.tableRef.value?.store?.states?.lazyTreeNodeMap;
|
|
20
|
-
o && e != null && (o[String(e)] = []), i(a.row, a.treeNode, a.resolve);
|
|
21
|
-
}
|
|
22
|
-
function o() {
|
|
23
|
-
r.clear();
|
|
24
|
-
}
|
|
25
|
-
return {
|
|
26
|
-
wrapLoad: i,
|
|
27
|
-
refreshTree: a,
|
|
28
|
-
clearTreeCache: o
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
export { n as useTableTreeLoad };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var e = {
|
|
2
|
-
hidePagination: !1,
|
|
3
|
-
initTable: !0,
|
|
4
|
-
nullValueFormat: "--",
|
|
5
|
-
selectionShow: !1,
|
|
6
|
-
rowKey: "id",
|
|
7
|
-
maxHeight: 560,
|
|
8
|
-
addButton: !1,
|
|
9
|
-
disabled: !1,
|
|
10
|
-
enableColumnCache: !0,
|
|
11
|
-
tableKey: "",
|
|
12
|
-
sort: !1,
|
|
13
|
-
data: () => [],
|
|
14
|
-
sortFilter: () => []
|
|
15
|
-
};
|
|
16
|
-
//#endregion
|
|
17
|
-
export { e as K_TABLE_WITH_DEFAULTS };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region src/components/k-table/report/convertDownloadCol.ts
|
|
2
|
-
function e(e) {
|
|
3
|
-
return e.filter((e) => e.type !== "expand").map((e) => ({
|
|
4
|
-
sTitle: e.label ?? "",
|
|
5
|
-
mDataProp: e.prop ?? "",
|
|
6
|
-
dict: e.dict ?? "",
|
|
7
|
-
show: ""
|
|
8
|
-
}));
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
export { e as convertDownloadCol };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { convertDownloadCol as e } from "./convertDownloadCol.js";
|
|
2
|
-
import { pickExportColumns as t } from "./pickExportColumns.js";
|
|
3
|
-
//#region src/components/k-table/report/exportKTableReport.ts
|
|
4
|
-
function n(n) {
|
|
5
|
-
let r = n.tableRef.value?.getQueryRef()?.getParams() ?? {}, i = n.convertParams ? n.convertParams(r) : r, a = t(n.columns, n);
|
|
6
|
-
return n.exportApi({
|
|
7
|
-
globColumnlist: e(a),
|
|
8
|
-
jsondata: i
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
function r(n) {
|
|
12
|
-
let r = t(n.columns, n);
|
|
13
|
-
return n.exportApi({
|
|
14
|
-
globColumnlist: e(r),
|
|
15
|
-
jsondata: n.jsondata
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { n as exportKTableReport, r as exportKTableReportData };
|