@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,36 +0,0 @@
|
|
|
1
|
-
import { computed as e, toValue as t } from "vue";
|
|
2
|
-
//#region src/components/k-form/composables/useFormSchema.ts
|
|
3
|
-
function n(e, t) {
|
|
4
|
-
let { visibleWhen: n, readonlyWhen: r, disabledWhen: i, optionsFromModel: a, rulesFromModel: o, ...s } = e, c = {
|
|
5
|
-
...s,
|
|
6
|
-
rules: s.rules ? [...s.rules] : s.rules,
|
|
7
|
-
componentProps: s.componentProps ? { ...s.componentProps } : {},
|
|
8
|
-
validatePeers: s.validatePeers ? [...s.validatePeers] : s.validatePeers
|
|
9
|
-
};
|
|
10
|
-
n && (c.display = n(t)), r && (c.readonly = r(t)), i && (c.disabled = i(t));
|
|
11
|
-
let l = c.componentProps ?? {};
|
|
12
|
-
if (a && (l.options = a(t)), c.componentProps = l, o) {
|
|
13
|
-
let e = o(t);
|
|
14
|
-
c.rules = [...c.rules ?? [], ...e];
|
|
15
|
-
}
|
|
16
|
-
return c;
|
|
17
|
-
}
|
|
18
|
-
function r(r, i, a = {}) {
|
|
19
|
-
let { excludeHidden: o = !1 } = a;
|
|
20
|
-
return e(() => {
|
|
21
|
-
let e = t(i), a = t(r).map((t) => n(t, e));
|
|
22
|
-
return o ? a.filter((e) => e.display !== !1) : a;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function i(e, t) {
|
|
26
|
-
return e.map((e) => {
|
|
27
|
-
if (!(e.id in t)) return e;
|
|
28
|
-
let n = t[e.id] ?? !0;
|
|
29
|
-
return {
|
|
30
|
-
...e,
|
|
31
|
-
visibleWhen: (t) => (e.visibleWhen ? e.visibleWhen(t) : e.display !== !1) && n
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
export { i as mapFieldVisibility, n as resolveSchemaField, r as useFormSchema };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { DICT_KEY as e } from "../../k-table/types.js";
|
|
2
|
-
import { resolveFormItemRules as t } from "../utils/formRules.js";
|
|
3
|
-
import { computed as n, inject as r } from "vue";
|
|
4
|
-
import { cloneDeep as i } from "lodash-es";
|
|
5
|
-
//#region src/components/k-form/composables/useKFormFields.ts
|
|
6
|
-
function a(a) {
|
|
7
|
-
let o = r(e, null), s = n(() => a.formConfigs.value.filter((e) => e.display === void 0 || e.display)), c = n(() => a.layout.value.hideLabel ? s.value.map((e) => {
|
|
8
|
-
let t = i(e);
|
|
9
|
-
return t.componentProps ||= {}, typeof t.component == "string" && [
|
|
10
|
-
"Input",
|
|
11
|
-
"Select",
|
|
12
|
-
"TreeSelect",
|
|
13
|
-
"Cascader"
|
|
14
|
-
].includes(t.component) ? (t.componentProps.placeholder = t.componentProps.placeholder || t.label, t.label = "") : t.component === "DatePicker" && (t.label = ""), t;
|
|
15
|
-
}) : s.value);
|
|
16
|
-
function l(e) {
|
|
17
|
-
let { dict: t, componentProps: n = {} } = e, r = n.options ?? [];
|
|
18
|
-
return t && o?.getGroupOptions ? o.getGroupOptions(t) : r.map((e) => ({
|
|
19
|
-
label: String(e.label ?? ""),
|
|
20
|
-
value: e.value,
|
|
21
|
-
disabled: !!e.disabled
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
function u(e) {
|
|
25
|
-
return e.display === !1 || e.readonly === !0 || a.formReadonly?.value ? [] : t(e);
|
|
26
|
-
}
|
|
27
|
-
function d(e) {
|
|
28
|
-
return e.componentProps?.style;
|
|
29
|
-
}
|
|
30
|
-
function f(e) {
|
|
31
|
-
if (e.display === !1) return "none";
|
|
32
|
-
}
|
|
33
|
-
function p(e) {
|
|
34
|
-
return e.readonly === !0 || a.formReadonly?.value ? !0 : (e.componentProps ?? {}).readonly === !0;
|
|
35
|
-
}
|
|
36
|
-
function m(e) {
|
|
37
|
-
return e.disabled === !0 || (e.componentProps ?? {}).disabled === !0;
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
normalizedConfigs: c,
|
|
41
|
-
getFieldOptions: l,
|
|
42
|
-
resolveItemRules: u,
|
|
43
|
-
itemStyle: d,
|
|
44
|
-
itemDisplay: f,
|
|
45
|
-
isItemReadonly: p,
|
|
46
|
-
isItemDisabled: m
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
//#endregion
|
|
50
|
-
export { a as useKFormFields };
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { computed as e, reactive as t, watch as n } from "vue";
|
|
2
|
-
import { cloneDeep as r } from "lodash-es";
|
|
3
|
-
//#region src/components/k-form/composables/useKFormModel.ts
|
|
4
|
-
function i(e) {
|
|
5
|
-
let { componentProps: t = {}, component: n } = e, i = t.value, a = t.type ?? "";
|
|
6
|
-
if (i !== void 0) return r(i);
|
|
7
|
-
if (t.multiple === !0 || n === "Checkbox" || n === "SelectMultiple" || n === "InputMixInput") return [];
|
|
8
|
-
if (n === "InputMixSelect") return {};
|
|
9
|
-
if (n === "DatePicker" && [
|
|
10
|
-
"datetimerange",
|
|
11
|
-
"daterange",
|
|
12
|
-
"monthrange"
|
|
13
|
-
].includes(a)) return [];
|
|
14
|
-
if (n !== "DatePicker") return n === "Upload" || n === "TimePicker" && a === "timerange" ? [] : "";
|
|
15
|
-
}
|
|
16
|
-
function a(e, t, n) {
|
|
17
|
-
return s(t);
|
|
18
|
-
}
|
|
19
|
-
function o(e) {
|
|
20
|
-
return e.controlled?.value === !0;
|
|
21
|
-
}
|
|
22
|
-
function s(e) {
|
|
23
|
-
if (typeof e != "object" || !e) return e;
|
|
24
|
-
if (e instanceof Date) return new Date(e.getTime());
|
|
25
|
-
if (Array.isArray(e)) return e.map(s);
|
|
26
|
-
let t = e, n = {};
|
|
27
|
-
for (let e of Object.keys(t)) n[e] = s(t[e]);
|
|
28
|
-
return n;
|
|
29
|
-
}
|
|
30
|
-
function c(e) {
|
|
31
|
-
let t = {};
|
|
32
|
-
return Object.keys(e).forEach((n) => {
|
|
33
|
-
t[n] = s(e[n]);
|
|
34
|
-
}), t;
|
|
35
|
-
}
|
|
36
|
-
function l(e, t) {
|
|
37
|
-
let n = t[e.id];
|
|
38
|
-
return n == null ? i(e) : a(e, n, t);
|
|
39
|
-
}
|
|
40
|
-
function u(u) {
|
|
41
|
-
let d = t({}), f = {}, p = null, m = e(() => {
|
|
42
|
-
let e = /* @__PURE__ */ new Map();
|
|
43
|
-
return u.formConfigs.value.forEach((t) => e.set(t.id, t)), e;
|
|
44
|
-
});
|
|
45
|
-
function h(e) {
|
|
46
|
-
return m.value.get(e) ?? {
|
|
47
|
-
id: e,
|
|
48
|
-
component: "Input"
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
let g = e(() => {
|
|
52
|
-
let e = "", t = "";
|
|
53
|
-
return u.formConfigs.value.forEach((n) => {
|
|
54
|
-
e += `${n.id}\0`, t += `${n.id}:${n.display === !1 ? 0 : 1}\0`;
|
|
55
|
-
}), {
|
|
56
|
-
fieldSignature: e,
|
|
57
|
-
displaySignature: t
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
function _() {
|
|
61
|
-
return u.modelValue?.value ?? u.data?.value ?? {};
|
|
62
|
-
}
|
|
63
|
-
function v() {
|
|
64
|
-
return {
|
|
65
|
-
..._(),
|
|
66
|
-
...c(d)
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
function y() {
|
|
70
|
-
let e = o(u) ? v() : c(d);
|
|
71
|
-
return p = e, u.onChange?.(e), e;
|
|
72
|
-
}
|
|
73
|
-
function b(e) {
|
|
74
|
-
let t = _(), n = o(u), i = {};
|
|
75
|
-
e.forEach((e) => {
|
|
76
|
-
if (e.display !== !1) {
|
|
77
|
-
i[e.id] = l(e, t);
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (n) {
|
|
81
|
-
let n = t[e.id];
|
|
82
|
-
n != null && (i[e.id] = s(n));
|
|
83
|
-
}
|
|
84
|
-
}), Object.keys(d).forEach((e) => {
|
|
85
|
-
e in i || delete d[e];
|
|
86
|
-
}), Object.assign(d, i), f = r(d);
|
|
87
|
-
}
|
|
88
|
-
function x(e, t) {
|
|
89
|
-
let n = t?.preserveFieldIds, r = n?.length ? new Set(n) : null;
|
|
90
|
-
m.value.forEach((t, n) => {
|
|
91
|
-
if (r?.has(n) || !(n in e)) return;
|
|
92
|
-
let o = e[n];
|
|
93
|
-
if (o == null) {
|
|
94
|
-
d[n] = i(h(n));
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
d[n] = a(t, o, e);
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
function S(e) {
|
|
101
|
-
let t = _(), n = [];
|
|
102
|
-
if (e.forEach((e) => {
|
|
103
|
-
e.display !== !1 && d[e.id] === void 0 && (d[e.id] = l(e, t), n.push(e.id));
|
|
104
|
-
}), n.length) {
|
|
105
|
-
if (o(u)) {
|
|
106
|
-
let e = {};
|
|
107
|
-
if (n.forEach((n) => {
|
|
108
|
-
n in t || (e[n] = s(d[n]));
|
|
109
|
-
}), Object.keys(e).length) {
|
|
110
|
-
let n = {
|
|
111
|
-
...t,
|
|
112
|
-
...e
|
|
113
|
-
};
|
|
114
|
-
p = n, u.onChange?.(n);
|
|
115
|
-
}
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
y();
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function C(e) {
|
|
122
|
-
let t = {}, n = _();
|
|
123
|
-
Object.keys(e).forEach((r) => {
|
|
124
|
-
if (!m.value.has(r)) return;
|
|
125
|
-
let o = h(r), s = e[r];
|
|
126
|
-
if (s == null) {
|
|
127
|
-
t[r] = i(o);
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
t[r] = a(o, s, {
|
|
131
|
-
...n,
|
|
132
|
-
...e
|
|
133
|
-
});
|
|
134
|
-
}), Object.assign(d, t), y();
|
|
135
|
-
}
|
|
136
|
-
function w(e, t) {
|
|
137
|
-
if (Object.is(d[e.id], t)) return;
|
|
138
|
-
d[e.id] = t;
|
|
139
|
-
let n = y();
|
|
140
|
-
(e.onChange ?? e.componentProps?.onChange)?.(t, e), o(u) && x({
|
|
141
|
-
...n,
|
|
142
|
-
[e.id]: d[e.id]
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
function T(e) {
|
|
146
|
-
return (e?.length ? e : Object.keys(d)).reduce((e, t) => (t in d && (e[t] = s(d[t])), e), {});
|
|
147
|
-
}
|
|
148
|
-
function E() {
|
|
149
|
-
let e = {};
|
|
150
|
-
return u.formConfigs.value.forEach((t) => {
|
|
151
|
-
t.display !== !1 && d[t.id] !== void 0 && (e[t.id] = s(d[t.id]));
|
|
152
|
-
}), e;
|
|
153
|
-
}
|
|
154
|
-
function D() {
|
|
155
|
-
Object.keys(d).forEach((e) => {
|
|
156
|
-
e in f || delete d[e];
|
|
157
|
-
}), Object.assign(d, r(f)), y();
|
|
158
|
-
}
|
|
159
|
-
function O() {
|
|
160
|
-
f = r(d);
|
|
161
|
-
}
|
|
162
|
-
function k(e) {
|
|
163
|
-
e.forEach((e) => {
|
|
164
|
-
let t = o(u) ? i(h(e)) : f[e] ?? "";
|
|
165
|
-
d[e] = s(t);
|
|
166
|
-
}), y();
|
|
167
|
-
}
|
|
168
|
-
return n(g, (e, t) => {
|
|
169
|
-
if (!t || e.fieldSignature !== t.fieldSignature) {
|
|
170
|
-
b(u.formConfigs.value);
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
e.displaySignature !== t.displaySignature && S(u.formConfigs.value);
|
|
174
|
-
}, { immediate: !0 }), n(() => u.data?.value, (e) => {
|
|
175
|
-
o(u) || e && Object.keys(e).length && C(e);
|
|
176
|
-
}, { deep: !0 }), n(() => u.modelValue?.value, (e) => {
|
|
177
|
-
!o(u) || !e || e !== p && x(e);
|
|
178
|
-
}, {
|
|
179
|
-
deep: !0,
|
|
180
|
-
immediate: !0
|
|
181
|
-
}), {
|
|
182
|
-
formModel: d,
|
|
183
|
-
initFormModel: b,
|
|
184
|
-
setFieldsValue: C,
|
|
185
|
-
updateFieldValue: w,
|
|
186
|
-
getFieldsValue: T,
|
|
187
|
-
getVisibleFieldsValue: E,
|
|
188
|
-
resetFormModel: D,
|
|
189
|
-
resetFieldsValue: k,
|
|
190
|
-
rebuildFirsthandModel: O
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
//#endregion
|
|
194
|
-
export { u as useKFormModel };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import e from "./Cascader.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
import './Cascader.vue_vue_type_style_index_0_scoped_ed0da536_lang.css';/* empty css */
|
|
3
|
-
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
//#region src/components/k-form/formComponent/Cascader.vue
|
|
5
|
-
var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-ed0da536"]]);
|
|
6
|
-
//#endregion
|
|
7
|
-
export { n as default };
|
package/dist/components/k-form/formComponent/Cascader.vue_vue_type_script_setup_true_lang.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { findCascaderReadonlyText as e, toCascaderValue as t } from "../utils/fieldValue.js";
|
|
2
|
-
import { computed as n, createBlock as r, createElementBlock as i, defineComponent as a, openBlock as o, toDisplayString as s, unref as c } from "vue";
|
|
3
|
-
import { ElCascader as l } from "element-plus";
|
|
4
|
-
//#region src/components/k-form/formComponent/Cascader.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var u = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "k-form-cascader__readonly"
|
|
8
|
-
}, d = /*@__PURE__*/ a({
|
|
9
|
-
name: "KFormCascader",
|
|
10
|
-
__name: "Cascader",
|
|
11
|
-
props: {
|
|
12
|
-
modelValue: {},
|
|
13
|
-
options: {},
|
|
14
|
-
readonly: { type: Boolean },
|
|
15
|
-
disabled: { type: Boolean },
|
|
16
|
-
props: {},
|
|
17
|
-
cascaderProps: {},
|
|
18
|
-
placeholder: {},
|
|
19
|
-
clearable: { type: Boolean },
|
|
20
|
-
separator: {}
|
|
21
|
-
},
|
|
22
|
-
emits: ["update:modelValue"],
|
|
23
|
-
setup(a, { emit: d }) {
|
|
24
|
-
let f = a, p = d, m = n(() => t(f.modelValue)), h = n(() => f.cascaderProps ?? f.props), g = n(() => e(f.options, f.modelValue, h.value, f.separator ?? " / "));
|
|
25
|
-
return (e, t) => a.readonly ? (o(), i("span", u, s(g.value), 1)) : (o(), r(c(l), {
|
|
26
|
-
key: 1,
|
|
27
|
-
"model-value": m.value,
|
|
28
|
-
options: a.options ?? [],
|
|
29
|
-
props: h.value,
|
|
30
|
-
placeholder: a.placeholder,
|
|
31
|
-
clearable: a.clearable ?? !0,
|
|
32
|
-
disabled: a.disabled,
|
|
33
|
-
"onUpdate:modelValue": t[0] ||= (e) => p("update:modelValue", e)
|
|
34
|
-
}, null, 8, [
|
|
35
|
-
"model-value",
|
|
36
|
-
"options",
|
|
37
|
-
"props",
|
|
38
|
-
"placeholder",
|
|
39
|
-
"clearable",
|
|
40
|
-
"disabled"
|
|
41
|
-
]));
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
//#endregion
|
|
45
|
-
export { d as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.k-form-cascader__readonly[data-v-ed0da536]{color:var(--k-color-text-regular);font-size:var(--k-form-control-font-size)}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
-
import t from "./CheckBox.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
import './CheckBox.vue_vue_type_style_index_0_scoped_fca64c11_lang.css';/* empty css */
|
|
4
|
-
//#region src/components/k-form/formComponent/CheckBox.vue
|
|
5
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-fca64c11"]]);
|
|
6
|
-
//#endregion
|
|
7
|
-
export { n as default };
|
package/dist/components/k-form/formComponent/CheckBox.vue_vue_type_script_setup_true_lang.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { toCheckboxGroupValue as e, toScalarValue as t } from "../utils/fieldValue.js";
|
|
2
|
-
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createTextVNode as s, createVNode as c, defineComponent as l, openBlock as u, ref as d, renderList as f, toDisplayString as p, unref as m, watch as h, withCtx as g } from "vue";
|
|
3
|
-
import { ElCheckbox as _, ElCheckboxGroup as v, ElTooltip as y } from "element-plus";
|
|
4
|
-
//#region src/components/k-form/formComponent/CheckBox.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var b = { class: "k-form-checkbox" }, x = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "k-form-checkbox__readonly"
|
|
8
|
-
}, S = /*@__PURE__*/ l({
|
|
9
|
-
name: "KFormCheckbox",
|
|
10
|
-
__name: "CheckBox",
|
|
11
|
-
props: {
|
|
12
|
-
modelValue: {},
|
|
13
|
-
options: {},
|
|
14
|
-
readonly: { type: Boolean },
|
|
15
|
-
disabled: { type: Boolean },
|
|
16
|
-
showSelectAll: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: !1
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
emits: ["update:modelValue"],
|
|
22
|
-
setup(l, { emit: S }) {
|
|
23
|
-
function C(e) {
|
|
24
|
-
return e.tooltip ?? "";
|
|
25
|
-
}
|
|
26
|
-
function w(e) {
|
|
27
|
-
return C(e) === "";
|
|
28
|
-
}
|
|
29
|
-
let T = l, E = S, D = d([]), O = d(!1), k = d(!1), A = r(() => (T.options ?? []).map((e) => e.value)), j = r(() => {
|
|
30
|
-
let e = (T.options ?? []).filter((e) => D.value.includes(e.value)).map((e) => e.label);
|
|
31
|
-
return e.length ? e.join(", ") : "--";
|
|
32
|
-
});
|
|
33
|
-
h(() => T.modelValue, (t) => {
|
|
34
|
-
D.value = e(t), M(D.value);
|
|
35
|
-
}, { immediate: !0 });
|
|
36
|
-
function M(e) {
|
|
37
|
-
let t = A.value.length, n = e.length;
|
|
38
|
-
O.value = t > 0 && n === t, k.value = n > 0 && n < t;
|
|
39
|
-
}
|
|
40
|
-
function N(e) {
|
|
41
|
-
let t = e === !0 ? [...A.value] : [];
|
|
42
|
-
D.value = t, k.value = !1, E("update:modelValue", t);
|
|
43
|
-
}
|
|
44
|
-
function P(e) {
|
|
45
|
-
D.value = e, M(e), E("update:modelValue", e);
|
|
46
|
-
}
|
|
47
|
-
return (e, r) => (u(), o("div", b, [l.readonly ? (u(), o("span", x, p(j.value), 1)) : (u(), o(n, { key: 1 }, [l.showSelectAll ? (u(), i(m(_), {
|
|
48
|
-
key: 0,
|
|
49
|
-
modelValue: O.value,
|
|
50
|
-
"onUpdate:modelValue": r[0] ||= (e) => O.value = e,
|
|
51
|
-
indeterminate: k.value,
|
|
52
|
-
disabled: l.disabled,
|
|
53
|
-
onChange: N
|
|
54
|
-
}, {
|
|
55
|
-
default: g(() => [...r[1] ||= [s(" 全选 ", -1)]]),
|
|
56
|
-
_: 1
|
|
57
|
-
}, 8, [
|
|
58
|
-
"modelValue",
|
|
59
|
-
"indeterminate",
|
|
60
|
-
"disabled"
|
|
61
|
-
])) : a("", !0), c(m(v), {
|
|
62
|
-
"model-value": D.value,
|
|
63
|
-
disabled: l.disabled,
|
|
64
|
-
"onUpdate:modelValue": P
|
|
65
|
-
}, {
|
|
66
|
-
default: g(() => [(u(!0), o(n, null, f(l.options, (e) => (u(), i(m(y), {
|
|
67
|
-
key: String(e.value),
|
|
68
|
-
content: C(e),
|
|
69
|
-
disabled: w(e),
|
|
70
|
-
placement: "top-start"
|
|
71
|
-
}, {
|
|
72
|
-
default: g(() => [c(m(_), {
|
|
73
|
-
value: m(t)(e.value),
|
|
74
|
-
disabled: e.disabled
|
|
75
|
-
}, {
|
|
76
|
-
default: g(() => [s(p(e.label), 1)]),
|
|
77
|
-
_: 2
|
|
78
|
-
}, 1032, ["value", "disabled"])]),
|
|
79
|
-
_: 2
|
|
80
|
-
}, 1032, ["content", "disabled"]))), 128))]),
|
|
81
|
-
_: 1
|
|
82
|
-
}, 8, ["model-value", "disabled"])], 64))]));
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
//#endregion
|
|
86
|
-
export { S as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.k-form-checkbox[data-v-fca64c11] .el-checkbox.is-bordered+.el-checkbox.is-bordered{margin-left:0}.k-form-checkbox__readonly[data-v-fca64c11]{color:var(--k-color-text-regular);font-size:var(--k-form-control-font-size)}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
-
import t from "./DatePicker.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
import './DatePicker.vue_vue_type_style_index_0_scoped_578e2613_lang.css';/* empty css */
|
|
4
|
-
//#region src/components/k-form/formComponent/DatePicker.vue
|
|
5
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-578e2613"]]);
|
|
6
|
-
//#endregion
|
|
7
|
-
export { n as default };
|
package/dist/components/k-form/formComponent/DatePicker.vue_vue_type_script_setup_true_lang.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { DATE_PICKER_VALUES_KEY as e } from "../constants.js";
|
|
2
|
-
import { formatReadonlyText as t, toDatePickerType as n, toDatePickerValue as r } from "../utils/fieldValue.js";
|
|
3
|
-
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, defineComponent as c, inject as l, normalizeClass as u, openBlock as d, toDisplayString as f, unref as p } from "vue";
|
|
4
|
-
import { ElDatePicker as m } from "element-plus";
|
|
5
|
-
import h from "dayjs";
|
|
6
|
-
//#region src/components/k-form/formComponent/DatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var g = ["innerHTML"], _ = {
|
|
8
|
-
key: 2,
|
|
9
|
-
class: "k-form-date-picker__readonly"
|
|
10
|
-
}, v = ["innerHTML"], y = /*@__PURE__*/ c({
|
|
11
|
-
name: "KFormDatePicker",
|
|
12
|
-
inheritAttrs: !1,
|
|
13
|
-
__name: "DatePicker",
|
|
14
|
-
props: {
|
|
15
|
-
modelValue: {},
|
|
16
|
-
options: {},
|
|
17
|
-
readonly: { type: Boolean },
|
|
18
|
-
disabled: { type: Boolean },
|
|
19
|
-
type: { default: "date" },
|
|
20
|
-
prepend: { default: "" },
|
|
21
|
-
append: { default: "" },
|
|
22
|
-
limitTime: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: !1
|
|
25
|
-
},
|
|
26
|
-
datePickerValues: { default: void 0 },
|
|
27
|
-
dateDisabled: {
|
|
28
|
-
type: [Array, Function],
|
|
29
|
-
default: void 0
|
|
30
|
-
},
|
|
31
|
-
minDate: {
|
|
32
|
-
type: [
|
|
33
|
-
String,
|
|
34
|
-
Date,
|
|
35
|
-
Function
|
|
36
|
-
],
|
|
37
|
-
default: void 0
|
|
38
|
-
},
|
|
39
|
-
maxDate: {
|
|
40
|
-
type: [
|
|
41
|
-
String,
|
|
42
|
-
Date,
|
|
43
|
-
Function
|
|
44
|
-
],
|
|
45
|
-
default: void 0
|
|
46
|
-
},
|
|
47
|
-
placeholder: { default: void 0 },
|
|
48
|
-
startPlaceholder: { default: void 0 },
|
|
49
|
-
endPlaceholder: { default: void 0 },
|
|
50
|
-
valueFormat: { default: void 0 }
|
|
51
|
-
},
|
|
52
|
-
emits: ["update:modelValue"],
|
|
53
|
-
setup(c, { emit: y }) {
|
|
54
|
-
let b = c, x = y, S = l(e, null), C = i(() => b.datePickerValues ?? S?.value ?? {}), w = i(() => r(b.modelValue)), T = i(() => n(b.type)), E = i(() => T.value === "datetimerange" ? "k-form-date-picker--datetimerange" : ""), D = (e, t) => h(e instanceof Date ? e : String(e)).format(t), O = i(() => {
|
|
55
|
-
if (!b.modelValue) return t(b.modelValue);
|
|
56
|
-
let e = T.value.includes("datetime") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
57
|
-
if (Array.isArray(b.modelValue)) return b.modelValue.map((t) => D(t, e)).join(" - ");
|
|
58
|
-
let n = h(b.modelValue instanceof Date ? b.modelValue : String(b.modelValue));
|
|
59
|
-
return n.isValid() ? n.format(e) : t(b.modelValue);
|
|
60
|
-
}), k = i(() => {
|
|
61
|
-
if (!b.limitTime) return;
|
|
62
|
-
let e = h().hour();
|
|
63
|
-
return () => Array.from({ length: 24 }, (e, t) => t).filter((t) => t < e);
|
|
64
|
-
});
|
|
65
|
-
function A(e) {
|
|
66
|
-
let t = new Date(e.getTime());
|
|
67
|
-
return t.setHours(0, 0, 0, 0), t;
|
|
68
|
-
}
|
|
69
|
-
function j(e) {
|
|
70
|
-
if (e == null) return null;
|
|
71
|
-
if (e === "today") return A(/* @__PURE__ */ new Date());
|
|
72
|
-
if (typeof e == "function") {
|
|
73
|
-
let t = e();
|
|
74
|
-
return t instanceof Date && !Number.isNaN(t.getTime()) ? A(t) : null;
|
|
75
|
-
}
|
|
76
|
-
return e instanceof Date && !Number.isNaN(e.getTime()) ? A(e) : null;
|
|
77
|
-
}
|
|
78
|
-
function M(e) {
|
|
79
|
-
if (e.date !== void 0) return j(e.date);
|
|
80
|
-
if (e.id) {
|
|
81
|
-
let t = C.value[`kitDate-${e.id}`];
|
|
82
|
-
if (!t) return null;
|
|
83
|
-
if (t instanceof Date) return A(t);
|
|
84
|
-
let n = h(t);
|
|
85
|
-
return n.isValid() ? A(n.toDate()) : null;
|
|
86
|
-
}
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
function N(e, t, n) {
|
|
90
|
-
return n === ">=" ? e >= t : n === ">" ? e > t : n === "<=" ? e <= t : n === "<" ? e < t : n === "==" && e === t;
|
|
91
|
-
}
|
|
92
|
-
function P(e) {
|
|
93
|
-
let t = A(e).getTime(), n = j(b.minDate);
|
|
94
|
-
if (n && t < n.getTime()) return !0;
|
|
95
|
-
let r = j(b.maxDate);
|
|
96
|
-
if (r && t > r.getTime()) return !0;
|
|
97
|
-
let i = b.dateDisabled;
|
|
98
|
-
return !i || (typeof i == "function" && (i = i()), !i.length) ? !1 : i.some((e) => {
|
|
99
|
-
let n = M(e);
|
|
100
|
-
return n ? N(t, n.getTime(), e.condition) : !1;
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
function F(e) {
|
|
104
|
-
x("update:modelValue", e);
|
|
105
|
-
}
|
|
106
|
-
return (e, t) => (d(), s("div", { class: u(["k-form-date-picker", E.value]) }, [
|
|
107
|
-
c.prepend ? (d(), s("span", {
|
|
108
|
-
key: 0,
|
|
109
|
-
class: "k-form-date-picker__text",
|
|
110
|
-
innerHTML: c.prepend
|
|
111
|
-
}, null, 8, g)) : o("", !0),
|
|
112
|
-
c.readonly ? (d(), s("span", _, f(O.value), 1)) : (d(), a(p(m), {
|
|
113
|
-
key: 1,
|
|
114
|
-
"model-value": w.value,
|
|
115
|
-
type: T.value,
|
|
116
|
-
"unlink-panels": "",
|
|
117
|
-
placeholder: c.placeholder,
|
|
118
|
-
"start-placeholder": c.startPlaceholder,
|
|
119
|
-
"end-placeholder": c.endPlaceholder,
|
|
120
|
-
"value-format": c.valueFormat,
|
|
121
|
-
disabled: c.disabled,
|
|
122
|
-
"disabled-date": P,
|
|
123
|
-
"disabled-hours": k.value,
|
|
124
|
-
"onUpdate:modelValue": F
|
|
125
|
-
}, null, 8, [
|
|
126
|
-
"model-value",
|
|
127
|
-
"type",
|
|
128
|
-
"placeholder",
|
|
129
|
-
"start-placeholder",
|
|
130
|
-
"end-placeholder",
|
|
131
|
-
"value-format",
|
|
132
|
-
"disabled",
|
|
133
|
-
"disabled-hours"
|
|
134
|
-
])),
|
|
135
|
-
c.append ? (d(), s("span", {
|
|
136
|
-
key: 3,
|
|
137
|
-
class: "k-form-date-picker__text",
|
|
138
|
-
innerHTML: c.append
|
|
139
|
-
}, null, 8, v)) : o("", !0)
|
|
140
|
-
], 2));
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
//#endregion
|
|
144
|
-
export { y as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.k-form-date-picker[data-v-578e2613]{align-items:center;gap:8px;width:100%;max-width:100%;display:flex}.k-form-date-picker[data-v-578e2613] .el-date-editor{width:100%}.k-form-date-picker--datetimerange[data-v-578e2613]{width:fit-content;max-width:100%;display:inline-flex}.k-form-date-picker--datetimerange[data-v-578e2613] .el-date-editor.el-date-editor--datetimerange{flex:none;max-width:100%;width:fit-content!important;min-width:unset!important}.k-form-date-picker--datetimerange[data-v-578e2613] .el-date-editor--datetimerange .el-input__wrapper{padding-left:6px;padding-right:4px}.k-form-date-picker--datetimerange[data-v-578e2613] .el-date-editor--datetimerange .el-range-input{width:150px;min-width:0;max-width:150px;font-size:var(--k-form-control-font-size);flex:0 0 150px}.k-form-date-picker--datetimerange[data-v-578e2613] .el-date-editor--datetimerange .el-range-separator{font-size:var(--k-form-control-font-size);flex-shrink:0;padding:0 1px}.k-form-date-picker--datetimerange[data-v-578e2613] .el-date-editor--datetimerange .el-range__icon{margin-right:-4px}.k-form-date-picker--datetimerange[data-v-578e2613] .el-date-editor--datetimerange .el-range__close-icon{margin-left:-4px}.k-form-date-picker__text[data-v-578e2613]{color:var(--k-color-text-regular);font-size:var(--k-form-control-font-size);white-space:nowrap;flex-shrink:0}.k-form-date-picker__readonly[data-v-578e2613]{color:var(--k-color-text-regular);font-size:var(--k-form-control-font-size);word-break:break-all}
|
package/dist/components/k-form/formComponent/Fallback.vue_vue_type_script_setup_true_lang.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { toStringValue as e } from "../utils/fieldValue.js";
|
|
2
|
-
import { computed as t, createBlock as n, defineComponent as r, openBlock as i, unref as a } from "vue";
|
|
3
|
-
import { ElInput as o } from "element-plus";
|
|
4
|
-
//#region src/components/k-form/formComponent/Fallback.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var s = /*@__PURE__*/ r({
|
|
6
|
-
name: "KFormFallback",
|
|
7
|
-
__name: "Fallback",
|
|
8
|
-
props: {
|
|
9
|
-
modelValue: {},
|
|
10
|
-
componentType: {}
|
|
11
|
-
},
|
|
12
|
-
setup(r) {
|
|
13
|
-
let s = r, c = t(() => `[${s.componentType ?? "Unknown"}] 待迁移`), l = t(() => e(s.modelValue));
|
|
14
|
-
return (e, t) => (i(), n(a(o), {
|
|
15
|
-
"model-value": l.value,
|
|
16
|
-
disabled: "",
|
|
17
|
-
placeholder: c.value
|
|
18
|
-
}, null, 8, ["model-value", "placeholder"]));
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
//#endregion
|
|
22
|
-
export { s as default };
|