@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
package/dist/components/k-form/formComponent/TimePicker.vue_vue_type_script_setup_true_lang.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { formatReadonlyText as e, toTimePickerType as t, toTimePickerValue as n } from "../utils/fieldValue.js";
|
|
2
|
-
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, defineComponent as s, openBlock as c, toDisplayString as l, unref as u } from "vue";
|
|
3
|
-
import { ElTimePicker as d } from "element-plus";
|
|
4
|
-
import f from "dayjs";
|
|
5
|
-
//#region src/components/k-form/formComponent/TimePicker.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var p = { class: "k-form-time-picker" }, m = ["innerHTML"], h = {
|
|
7
|
-
key: 1,
|
|
8
|
-
class: "k-form-time-picker__side k-form-time-picker__side--left"
|
|
9
|
-
}, g = {
|
|
10
|
-
key: 2,
|
|
11
|
-
class: "k-form-time-picker__readonly"
|
|
12
|
-
}, _ = {
|
|
13
|
-
key: 4,
|
|
14
|
-
class: "k-form-time-picker__side k-form-time-picker__side--right"
|
|
15
|
-
}, v = ["innerHTML"], y = /*@__PURE__*/ s({
|
|
16
|
-
name: "KFormTimePicker",
|
|
17
|
-
inheritAttrs: !1,
|
|
18
|
-
__name: "TimePicker",
|
|
19
|
-
props: {
|
|
20
|
-
modelValue: {},
|
|
21
|
-
options: {},
|
|
22
|
-
readonly: { type: Boolean },
|
|
23
|
-
disabled: { type: Boolean },
|
|
24
|
-
type: { default: "time" },
|
|
25
|
-
prepend: { default: "" },
|
|
26
|
-
append: { default: "" },
|
|
27
|
-
leftText: { default: "" },
|
|
28
|
-
rightText: { default: "" },
|
|
29
|
-
limitTime: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: !1
|
|
32
|
-
},
|
|
33
|
-
placeholder: { default: "请选择时间" },
|
|
34
|
-
startPlaceholder: { default: void 0 },
|
|
35
|
-
endPlaceholder: { default: void 0 },
|
|
36
|
-
valueFormat: { default: "HH:mm:ss" },
|
|
37
|
-
format: { default: void 0 },
|
|
38
|
-
clearable: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: !0
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
emits: ["update:modelValue"],
|
|
44
|
-
setup(s, { emit: y }) {
|
|
45
|
-
let b = s, x = y, S = r(() => n(b.modelValue)), C = r(() => t(b.type)), w = r(() => C.value === "timerange"), T = (t, n) => {
|
|
46
|
-
let r = f(t instanceof Date ? t : String(t));
|
|
47
|
-
return r.isValid() ? r.format(n) : e(t);
|
|
48
|
-
}, E = r(() => {
|
|
49
|
-
if (!b.modelValue) return e(b.modelValue);
|
|
50
|
-
let t = b.valueFormat || "HH:mm:ss";
|
|
51
|
-
return Array.isArray(b.modelValue) ? b.modelValue.map((e) => T(e, t)).join(" - ") : T(b.modelValue, t);
|
|
52
|
-
}), D = r(() => {
|
|
53
|
-
if (!b.limitTime) return;
|
|
54
|
-
let e = f().hour();
|
|
55
|
-
return () => Array.from({ length: 24 }, (e, t) => t).filter((t) => t < e);
|
|
56
|
-
}), O = r(() => {
|
|
57
|
-
if (b.limitTime) return (e) => {
|
|
58
|
-
let t = f();
|
|
59
|
-
return e > t.hour() ? [] : e < t.hour() ? Array.from({ length: 60 }, (e, t) => t) : Array.from({ length: 60 }, (e, t) => t).filter((e) => e < t.minute());
|
|
60
|
-
};
|
|
61
|
-
}), k = r(() => {
|
|
62
|
-
if (b.limitTime) return (e, t) => {
|
|
63
|
-
let n = f();
|
|
64
|
-
return e > n.hour() || e === n.hour() && t > n.minute() ? [] : e < n.hour() || e === n.hour() && t < n.minute() ? Array.from({ length: 60 }, (e, t) => t) : Array.from({ length: 60 }, (e, t) => t).filter((e) => e < n.second());
|
|
65
|
-
};
|
|
66
|
-
});
|
|
67
|
-
function A(e) {
|
|
68
|
-
x("update:modelValue", e);
|
|
69
|
-
}
|
|
70
|
-
return (e, t) => (c(), o("div", p, [
|
|
71
|
-
s.prepend ? (c(), o("span", {
|
|
72
|
-
key: 0,
|
|
73
|
-
class: "k-form-time-picker__text",
|
|
74
|
-
innerHTML: s.prepend
|
|
75
|
-
}, null, 8, m)) : a("", !0),
|
|
76
|
-
s.leftText ? (c(), o("span", h, l(s.leftText), 1)) : a("", !0),
|
|
77
|
-
s.readonly ? (c(), o("span", g, l(E.value), 1)) : (c(), i(u(d), {
|
|
78
|
-
key: 3,
|
|
79
|
-
"model-value": S.value,
|
|
80
|
-
"is-range": w.value,
|
|
81
|
-
placeholder: s.placeholder,
|
|
82
|
-
"start-placeholder": s.startPlaceholder,
|
|
83
|
-
"end-placeholder": s.endPlaceholder,
|
|
84
|
-
"value-format": s.valueFormat,
|
|
85
|
-
format: s.format,
|
|
86
|
-
disabled: s.disabled,
|
|
87
|
-
clearable: s.clearable,
|
|
88
|
-
"disabled-hours": D.value,
|
|
89
|
-
"disabled-minutes": O.value,
|
|
90
|
-
"disabled-seconds": k.value,
|
|
91
|
-
"onUpdate:modelValue": A
|
|
92
|
-
}, null, 8, [
|
|
93
|
-
"model-value",
|
|
94
|
-
"is-range",
|
|
95
|
-
"placeholder",
|
|
96
|
-
"start-placeholder",
|
|
97
|
-
"end-placeholder",
|
|
98
|
-
"value-format",
|
|
99
|
-
"format",
|
|
100
|
-
"disabled",
|
|
101
|
-
"clearable",
|
|
102
|
-
"disabled-hours",
|
|
103
|
-
"disabled-minutes",
|
|
104
|
-
"disabled-seconds"
|
|
105
|
-
])),
|
|
106
|
-
s.rightText ? (c(), o("span", _, l(s.rightText), 1)) : a("", !0),
|
|
107
|
-
s.append ? (c(), o("span", {
|
|
108
|
-
key: 5,
|
|
109
|
-
class: "k-form-time-picker__text",
|
|
110
|
-
innerHTML: s.append
|
|
111
|
-
}, null, 8, v)) : a("", !0)
|
|
112
|
-
]));
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
//#endregion
|
|
116
|
-
export { y as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.k-form-time-picker[data-v-8680ec2d]{align-items:center;gap:8px;width:100%;max-width:100%;display:flex}.k-form-time-picker[data-v-8680ec2d] .el-date-editor{width:100%}.k-form-time-picker__text[data-v-8680ec2d],.k-form-time-picker__side[data-v-8680ec2d]{color:var(--k-color-text-regular);font-size:var(--k-form-control-font-size);white-space:nowrap;flex-shrink:0}.k-form-time-picker__side--left[data-v-8680ec2d]{margin-right:2px}.k-form-time-picker__side--right[data-v-8680ec2d]{margin-left:2px}.k-form-time-picker__readonly[data-v-8680ec2d]{color:var(--k-color-text-regular);font-size:var(--k-form-control-font-size);word-break:break-all}
|
package/dist/components/k-form/formComponent/TreeSelect.vue_vue_type_script_setup_true_lang.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { findTreeSelectLabel as e, formatReadonlyText as t, toScalarValue as n, toTreeSelectData as r } from "../utils/fieldValue.js";
|
|
2
|
-
import { computed as i, createBlock as a, createElementBlock as o, defineComponent as s, openBlock as c, toDisplayString as l, unref as u } from "vue";
|
|
3
|
-
import { ElTreeSelect as d } from "element-plus";
|
|
4
|
-
//#region src/components/k-form/formComponent/TreeSelect.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var f = { class: "k-form-tree-select" }, p = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "k-form-input__readonly"
|
|
8
|
-
}, m = /*@__PURE__*/ s({
|
|
9
|
-
name: "KFormTreeSelect",
|
|
10
|
-
__name: "TreeSelect",
|
|
11
|
-
props: {
|
|
12
|
-
modelValue: {},
|
|
13
|
-
options: {},
|
|
14
|
-
readonly: { type: Boolean },
|
|
15
|
-
disabled: { type: Boolean },
|
|
16
|
-
data: { default: () => [] },
|
|
17
|
-
placeholder: { default: void 0 },
|
|
18
|
-
clearable: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: !0
|
|
21
|
-
},
|
|
22
|
-
filterable: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: !0
|
|
25
|
-
},
|
|
26
|
-
checkStrictly: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: !0
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
emits: ["update:modelValue"],
|
|
32
|
-
setup(s, { emit: m }) {
|
|
33
|
-
let h = s, g = m, _ = i(() => n(h.modelValue)), v = i(() => r(h.data)), y = i(() => e(v.value, _.value) ?? t(_.value));
|
|
34
|
-
return (e, t) => (c(), o("div", f, [s.readonly ? (c(), o("div", p, l(y.value), 1)) : (c(), a(u(d), {
|
|
35
|
-
key: 1,
|
|
36
|
-
"model-value": _.value,
|
|
37
|
-
data: v.value,
|
|
38
|
-
placeholder: s.placeholder,
|
|
39
|
-
clearable: s.clearable,
|
|
40
|
-
filterable: s.filterable,
|
|
41
|
-
"check-strictly": s.checkStrictly,
|
|
42
|
-
disabled: s.disabled,
|
|
43
|
-
"render-after-expand": !1,
|
|
44
|
-
"onUpdate:modelValue": t[0] ||= (e) => g("update:modelValue", e)
|
|
45
|
-
}, null, 8, [
|
|
46
|
-
"model-value",
|
|
47
|
-
"data",
|
|
48
|
-
"placeholder",
|
|
49
|
-
"clearable",
|
|
50
|
-
"filterable",
|
|
51
|
-
"check-strictly",
|
|
52
|
-
"disabled"
|
|
53
|
-
]))]));
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
//#endregion
|
|
57
|
-
export { m as default };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import e from "../../k-upload/KUpload.js";
|
|
2
|
-
import { computed as t, createBlock as n, defineComponent as r, mergeProps as i, openBlock as a } from "vue";
|
|
3
|
-
//#region src/components/k-form/formComponent/Upload.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var o = /*@__PURE__*/ r({
|
|
5
|
-
name: "KFormUpload",
|
|
6
|
-
inheritAttrs: !1,
|
|
7
|
-
__name: "Upload",
|
|
8
|
-
props: {
|
|
9
|
-
modelValue: {},
|
|
10
|
-
options: {},
|
|
11
|
-
readonly: { type: Boolean },
|
|
12
|
-
disabled: { type: Boolean },
|
|
13
|
-
listType: { default: "text" },
|
|
14
|
-
action: { default: "" },
|
|
15
|
-
limit: { default: 1 },
|
|
16
|
-
maxSize: { default: 10 },
|
|
17
|
-
btnText: { default: "点击上传" },
|
|
18
|
-
templateCode: { default: "" },
|
|
19
|
-
templateDownloadUrl: { default: "" },
|
|
20
|
-
templateBtnText: { default: "模版下载" },
|
|
21
|
-
fileTips: { default: "" },
|
|
22
|
-
showSuccMessage: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: !0
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
emits: ["update:modelValue"],
|
|
28
|
-
setup(r, { emit: o }) {
|
|
29
|
-
let s = r, c = o, l = t(() => Array.isArray(s.modelValue) ? s.modelValue : []);
|
|
30
|
-
function u(e) {
|
|
31
|
-
c("update:modelValue", e);
|
|
32
|
-
}
|
|
33
|
-
return (t, r) => (a(), n(e, i(t.$attrs, {
|
|
34
|
-
"model-value": l.value,
|
|
35
|
-
"list-type": s.listType,
|
|
36
|
-
action: s.action,
|
|
37
|
-
limit: s.limit,
|
|
38
|
-
"max-size": s.maxSize,
|
|
39
|
-
disabled: s.disabled === !0 || s.readonly === !0,
|
|
40
|
-
"btn-text": s.btnText,
|
|
41
|
-
"template-code": s.templateCode,
|
|
42
|
-
"template-download-url": s.templateDownloadUrl,
|
|
43
|
-
"template-btn-text": s.templateBtnText,
|
|
44
|
-
"file-tips": s.fileTips,
|
|
45
|
-
"show-succ-message": s.showSuccMessage,
|
|
46
|
-
"onUpdate:modelValue": u
|
|
47
|
-
}), null, 16, [
|
|
48
|
-
"model-value",
|
|
49
|
-
"list-type",
|
|
50
|
-
"action",
|
|
51
|
-
"limit",
|
|
52
|
-
"max-size",
|
|
53
|
-
"disabled",
|
|
54
|
-
"btn-text",
|
|
55
|
-
"template-code",
|
|
56
|
-
"template-download-url",
|
|
57
|
-
"template-btn-text",
|
|
58
|
-
"file-tips",
|
|
59
|
-
"show-succ-message"
|
|
60
|
-
]));
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
//#endregion
|
|
64
|
-
export { o as default };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import e from "./Cascader.js";
|
|
2
|
-
import t from "./CheckBox.js";
|
|
3
|
-
import n from "./DatePicker.js";
|
|
4
|
-
import r from "./Fallback.js";
|
|
5
|
-
import i from "./Input.js";
|
|
6
|
-
import a from "./InputMixInput.js";
|
|
7
|
-
import o from "./Select.js";
|
|
8
|
-
import s from "./InputMixSelect.js";
|
|
9
|
-
import c from "./InputNumber.js";
|
|
10
|
-
import l from "./Radio.js";
|
|
11
|
-
import u from "./RadioInput.js";
|
|
12
|
-
import d from "./ScrollSelect.js";
|
|
13
|
-
import f from "./SelectMultiple.js";
|
|
14
|
-
import p from "./Tag.js";
|
|
15
|
-
import m from "./Text.js";
|
|
16
|
-
import h from "./TimePicker.js";
|
|
17
|
-
import g from "./TreeSelect.js";
|
|
18
|
-
import _ from "./Upload.js";
|
|
19
|
-
import { defineAsyncComponent as v } from "vue";
|
|
20
|
-
//#region src/components/k-form/formComponent/componentRegistry.ts
|
|
21
|
-
var y = v(() => import("./Editor.js")), b = {
|
|
22
|
-
Input: i,
|
|
23
|
-
Text: m,
|
|
24
|
-
Select: o,
|
|
25
|
-
SelectMultiple: f,
|
|
26
|
-
DatePicker: n,
|
|
27
|
-
Radio: l,
|
|
28
|
-
Checkbox: t,
|
|
29
|
-
InputNumber: c,
|
|
30
|
-
KInputNumber: c,
|
|
31
|
-
Cascader: e,
|
|
32
|
-
TreeSelect: g,
|
|
33
|
-
InputMixInput: a,
|
|
34
|
-
InputMixSelect: s,
|
|
35
|
-
RadioInput: u,
|
|
36
|
-
ScrollSelect: d,
|
|
37
|
-
Upload: _,
|
|
38
|
-
Tag: p,
|
|
39
|
-
TimePicker: h,
|
|
40
|
-
Editor: y
|
|
41
|
-
};
|
|
42
|
-
function x(e) {
|
|
43
|
-
return b[e] ?? r;
|
|
44
|
-
}
|
|
45
|
-
function S(e) {
|
|
46
|
-
Object.assign(b, e);
|
|
47
|
-
}
|
|
48
|
-
//#endregion
|
|
49
|
-
export { b as FORM_COMPONENT_MAP, S as registerFormComponents, x as resolveFormComponent };
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
//#region src/components/k-form/utils/fieldValue.ts
|
|
2
|
-
var e = [
|
|
3
|
-
"year",
|
|
4
|
-
"month",
|
|
5
|
-
"date",
|
|
6
|
-
"dates",
|
|
7
|
-
"datetime",
|
|
8
|
-
"week",
|
|
9
|
-
"datetimerange",
|
|
10
|
-
"daterange",
|
|
11
|
-
"monthrange",
|
|
12
|
-
"yearrange"
|
|
13
|
-
];
|
|
14
|
-
function t(e) {
|
|
15
|
-
return typeof e == "string" || typeof e == "number" ? e : String(e);
|
|
16
|
-
}
|
|
17
|
-
function n(e) {
|
|
18
|
-
if (e != null) return typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? e : String(e);
|
|
19
|
-
}
|
|
20
|
-
function r(e) {
|
|
21
|
-
return e == null ? "" : String(e);
|
|
22
|
-
}
|
|
23
|
-
function i(e) {
|
|
24
|
-
return Array.isArray(e) ? e.filter((e) => typeof e == "string" || typeof e == "number") : [];
|
|
25
|
-
}
|
|
26
|
-
function a(e) {
|
|
27
|
-
if (typeof e == "number" && !Number.isNaN(e)) return e;
|
|
28
|
-
if (e == null || e === "") return;
|
|
29
|
-
let t = Number(e);
|
|
30
|
-
return Number.isNaN(t) ? void 0 : t;
|
|
31
|
-
}
|
|
32
|
-
function o(e) {
|
|
33
|
-
if (e != null) return e instanceof Date || typeof e == "string" || Array.isArray(e) && e.length === 2 && (e.every((e) => e instanceof Date) || e.every((e) => typeof e == "string")) ? e : String(e);
|
|
34
|
-
}
|
|
35
|
-
function s(t) {
|
|
36
|
-
return t && e.includes(t) ? t : "date";
|
|
37
|
-
}
|
|
38
|
-
function c(e) {
|
|
39
|
-
if (e != null && e !== "") return e instanceof Date || typeof e == "string" || Array.isArray(e) && e.length === 2 && (e.every((e) => e instanceof Date) || e.every((e) => typeof e == "string")) ? e : String(e);
|
|
40
|
-
}
|
|
41
|
-
function l(e) {
|
|
42
|
-
return e === "timerange" ? "timerange" : "time";
|
|
43
|
-
}
|
|
44
|
-
function u(e) {
|
|
45
|
-
return e == null || typeof e == "string" || typeof e == "number" ? e : Array.isArray(e) ? e.filter((e) => typeof e == "string" || typeof e == "number") : typeof e == "object" ? e : String(e);
|
|
46
|
-
}
|
|
47
|
-
function d(e) {
|
|
48
|
-
return Array.isArray(e) ? e : [];
|
|
49
|
-
}
|
|
50
|
-
function f(e, t) {
|
|
51
|
-
let r = n(t);
|
|
52
|
-
if (r !== void 0) for (let t of e) {
|
|
53
|
-
let e = t.value ?? t.id;
|
|
54
|
-
if (e != null && String(e) === String(r)) {
|
|
55
|
-
let e = t.label;
|
|
56
|
-
return e == null ? void 0 : String(e);
|
|
57
|
-
}
|
|
58
|
-
let n = t.children;
|
|
59
|
-
if (Array.isArray(n)) {
|
|
60
|
-
let e = f(n, r);
|
|
61
|
-
if (e) return e;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function p(e, t, n, r = " / ") {
|
|
66
|
-
let i = u(t);
|
|
67
|
-
if (i == null || i === "") return m(t);
|
|
68
|
-
let a = n?.value ?? "value", o = n?.label ?? "label", s = n?.children ?? "children", c = Array.isArray(i) ? i : [i], l = [], d = Array.isArray(e) ? e : [];
|
|
69
|
-
for (let e of c) {
|
|
70
|
-
let t = d.find((t) => t != null && String(t[a]) === String(e));
|
|
71
|
-
if (!t) return l.length ? [...l, ...c.slice(l.length).map(String)].join(r) : m(Array.isArray(i) ? c.join(r) : i);
|
|
72
|
-
let n = t[o];
|
|
73
|
-
l.push(String(n != null && n !== "" ? n : e));
|
|
74
|
-
let u = t[s];
|
|
75
|
-
d = Array.isArray(u) ? u : [];
|
|
76
|
-
}
|
|
77
|
-
return l.length ? l.join(r) : m(t);
|
|
78
|
-
}
|
|
79
|
-
function m(e, t = "--") {
|
|
80
|
-
return e == null || e === "" ? t : String(e);
|
|
81
|
-
}
|
|
82
|
-
//#endregion
|
|
83
|
-
export { p as findCascaderReadonlyText, f as findTreeSelectLabel, m as formatReadonlyText, u as toCascaderValue, i as toCheckboxGroupValue, s as toDatePickerType, o as toDatePickerValue, a as toNumberValue, t as toOptionValue, n as toScalarValue, r as toStringValue, l as toTimePickerType, c as toTimePickerValue, d as toTreeSelectData };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
//#region src/components/k-form/utils/formRules.ts
|
|
2
|
-
var e = {
|
|
3
|
-
number: /^\d+$/,
|
|
4
|
-
phone: /^1\d{10}$/,
|
|
5
|
-
money: /^(0|[1-9]\d*)(\.\d{1,2})?$/,
|
|
6
|
-
percentage: /^(?!0(?:\.00?)?$)(?:100(?:\.00?)?|\d{0,2}(?:\.\d{1,2})?)$/
|
|
7
|
-
};
|
|
8
|
-
function t(e, t) {
|
|
9
|
-
return {
|
|
10
|
-
validator: (n, r, i) => {
|
|
11
|
-
if (r === "" || r == null) {
|
|
12
|
-
i();
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
i(e.test(String(r)) ? void 0 : Error(t));
|
|
16
|
-
},
|
|
17
|
-
trigger: "blur"
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function n(e) {
|
|
21
|
-
return {
|
|
22
|
-
validator: (t, n, r) => {
|
|
23
|
-
let i = Array.isArray(n) ? n : [], a = String(i[0] ?? "").trim(), o = String(i[1] ?? "").trim();
|
|
24
|
-
if (!a || !o) {
|
|
25
|
-
r(Error(e));
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
r();
|
|
29
|
-
},
|
|
30
|
-
trigger: ["change", "blur"]
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function r(r) {
|
|
34
|
-
let i = [...r.rules ?? []];
|
|
35
|
-
if (typeof r.component != "string") return i;
|
|
36
|
-
let a = r.componentProps?.type;
|
|
37
|
-
if (r.component === "Input" && a === "number" && i.push(t(e.number, "请输入合法的正整数")), r.component === "Input" && a === "phone" && i.push(t(e.phone, "请输入正常的手机号")), r.component === "Input" && a === "money" && i.push(t(e.money, "请输入正确金额数值")), r.component === "Input" && a === "percentage" && i.push(t(e.percentage, "请输入正确的数据范围:0.01 ~ 100")), r.component === "InputMixInput") {
|
|
38
|
-
let e = i.find((e) => e.required);
|
|
39
|
-
e && i.push(n(String(e.message || "请完整填写")));
|
|
40
|
-
}
|
|
41
|
-
return i;
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
export { r as resolveFormItemRules };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { resolveFormComponent as e } from "../formComponent/componentRegistry.js";
|
|
2
|
-
//#region src/components/k-form/utils/resolveFormFieldComponent.ts
|
|
3
|
-
function t(e) {
|
|
4
|
-
return typeof e == "string";
|
|
5
|
-
}
|
|
6
|
-
function n(e) {
|
|
7
|
-
return typeof e == "object" || typeof e == "function";
|
|
8
|
-
}
|
|
9
|
-
function r(t) {
|
|
10
|
-
return n(t) ? t : e(t);
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
export { t as isBuiltinFormComponentType, n as isCustomFormComponent, r as resolveFormFieldComponent };
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import e from "../k-button/KButton.js";
|
|
2
|
-
import { Transition as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, normalizeClass as u, normalizeStyle as d, openBlock as f, ref as p, renderSlot as m, toDisplayString as h, unref as g, useSlots as _, withCtx as v } from "vue";
|
|
3
|
-
import { ElIcon as y } from "element-plus";
|
|
4
|
-
import { Loading as b } from "@element-plus/icons-vue";
|
|
5
|
-
//#region src/components/k-handle-page/KHandlePage.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var x = { class: "k-handle-page" }, S = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "k-handle-page__header"
|
|
9
|
-
}, C = { class: "k-handle-page__body" }, w = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "k-handle-page__loading",
|
|
12
|
-
role: "status",
|
|
13
|
-
"aria-live": "polite",
|
|
14
|
-
"aria-busy": "true",
|
|
15
|
-
"aria-label": "加载中"
|
|
16
|
-
}, T = { class: "k-handle-page__loading-inner" }, E = {
|
|
17
|
-
key: 1,
|
|
18
|
-
class: "k-handle-page__footer"
|
|
19
|
-
}, D = /*@__PURE__*/ l({
|
|
20
|
-
name: "KHandlePage",
|
|
21
|
-
inheritAttrs: !1,
|
|
22
|
-
__name: "KHandlePage",
|
|
23
|
-
props: {
|
|
24
|
-
showFooter: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: !0
|
|
27
|
-
},
|
|
28
|
-
showSubmit: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: !0
|
|
31
|
-
},
|
|
32
|
-
cancelText: {
|
|
33
|
-
type: [String, Boolean],
|
|
34
|
-
default: "取消"
|
|
35
|
-
},
|
|
36
|
-
submitText: {
|
|
37
|
-
type: [String, Boolean],
|
|
38
|
-
default: "确定"
|
|
39
|
-
},
|
|
40
|
-
submitLoading: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: !1
|
|
43
|
-
},
|
|
44
|
-
loading: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: !1
|
|
47
|
-
},
|
|
48
|
-
onSubmit: {
|
|
49
|
-
type: Function,
|
|
50
|
-
default: void 0
|
|
51
|
-
},
|
|
52
|
-
gap: { default: 16 }
|
|
53
|
-
},
|
|
54
|
-
emits: ["cancel", "submit"],
|
|
55
|
-
setup(l, { emit: D }) {
|
|
56
|
-
let O = l, k = D, A = _(), j = p(!1), M = n(() => ({ gap: typeof O.gap == "number" ? `${O.gap}px` : O.gap })), N = n(() => O.cancelText === !1 ? "" : O.cancelText || "取消"), P = n(() => O.submitText === !1 ? "" : O.submitText || "确定"), F = n(() => O.cancelText !== !1), I = n(() => O.showSubmit && O.submitText !== !1), L = n(() => O.submitLoading || O.loading || j.value), R = n(() => !!A.header);
|
|
57
|
-
async function z() {
|
|
58
|
-
if (!L.value) {
|
|
59
|
-
if (O.onSubmit) {
|
|
60
|
-
j.value = !0;
|
|
61
|
-
try {
|
|
62
|
-
await O.onSubmit();
|
|
63
|
-
} catch {} finally {
|
|
64
|
-
j.value = !1;
|
|
65
|
-
}
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
k("submit");
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return (n, p) => (f(), a("div", x, [
|
|
72
|
-
R.value ? (f(), a("header", S, [m(n.$slots, "header")])) : i("", !0),
|
|
73
|
-
o("div", C, [c(t, { name: "k-handle-page-loading" }, {
|
|
74
|
-
default: v(() => [l.loading ? (f(), a("div", w, [o("div", T, [c(g(y), {
|
|
75
|
-
class: "k-handle-page__loading-icon is-loading",
|
|
76
|
-
size: 32
|
|
77
|
-
}, {
|
|
78
|
-
default: v(() => [c(g(b))]),
|
|
79
|
-
_: 1
|
|
80
|
-
}), p[1] ||= o("span", { class: "k-handle-page__loading-text" }, "加载中...", -1)])])) : i("", !0)]),
|
|
81
|
-
_: 1
|
|
82
|
-
}), o("div", {
|
|
83
|
-
class: u(["k-handle-page__content", { "k-handle-page__content--loading": l.loading }]),
|
|
84
|
-
style: d(M.value)
|
|
85
|
-
}, [m(n.$slots, "default")], 6)]),
|
|
86
|
-
l.showFooter ? (f(), a("footer", E, [m(n.$slots, "footer", {}, () => [F.value ? (f(), r(e, {
|
|
87
|
-
key: 0,
|
|
88
|
-
onClick: p[0] ||= (e) => k("cancel")
|
|
89
|
-
}, {
|
|
90
|
-
default: v(() => [s(h(N.value), 1)]),
|
|
91
|
-
_: 1
|
|
92
|
-
})) : i("", !0), I.value ? (f(), r(e, {
|
|
93
|
-
key: 1,
|
|
94
|
-
type: "primary",
|
|
95
|
-
loading: L.value,
|
|
96
|
-
onClick: z
|
|
97
|
-
}, {
|
|
98
|
-
default: v(() => [s(h(P.value), 1)]),
|
|
99
|
-
_: 1
|
|
100
|
-
}, 8, ["loading"])) : i("", !0)])])) : i("", !0)
|
|
101
|
-
]));
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
//#endregion
|
|
105
|
-
export { D as default };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { onMounted as e, ref as t, toValue as n } from "vue";
|
|
2
|
-
//#region src/components/k-handle-page/useHandlePageInit.ts
|
|
3
|
-
function r(r, i) {
|
|
4
|
-
let a = t(!1);
|
|
5
|
-
async function o() {
|
|
6
|
-
(n(i?.skipLoading) ?? !1) || (a.value = !0);
|
|
7
|
-
try {
|
|
8
|
-
await r();
|
|
9
|
-
} finally {
|
|
10
|
-
a.value = !1;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return i?.immediate !== !1 && e(() => {
|
|
14
|
-
o();
|
|
15
|
-
}), {
|
|
16
|
-
pageLoading: a,
|
|
17
|
-
runInit: o
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
export { r as useHandlePageInit };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
-
import t from "./KIcon.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
import './KIcon.vue_vue_type_style_index_0_scoped_6fd081ab_lang.css';/* empty css */
|
|
4
|
-
//#region src/components/k-icon/KIcon.vue
|
|
5
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-6fd081ab"]]);
|
|
6
|
-
//#endregion
|
|
7
|
-
export { n as default };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { resolveLucideIcon as e } from "./resolveLucideIcon.js";
|
|
2
|
-
import { computed as t, createBlock as n, createCommentVNode as r, defineComponent as i, openBlock as a, resolveDynamicComponent as o } from "vue";
|
|
3
|
-
//#region src/components/k-icon/KIcon.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var s = /*@__PURE__*/ i({
|
|
5
|
-
name: "KIcon",
|
|
6
|
-
__name: "KIcon",
|
|
7
|
-
props: {
|
|
8
|
-
name: { default: "" },
|
|
9
|
-
size: { default: 18 },
|
|
10
|
-
strokeWidth: { default: 2 }
|
|
11
|
-
},
|
|
12
|
-
setup(i) {
|
|
13
|
-
let s = i, c = t(() => e(s.name));
|
|
14
|
-
return (e, t) => c.value ? (a(), n(o(c.value), {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "k-icon",
|
|
17
|
-
size: i.size,
|
|
18
|
-
"stroke-width": i.strokeWidth
|
|
19
|
-
}, null, 8, ["size", "stroke-width"])) : r("", !0);
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
//#endregion
|
|
23
|
-
export { s as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.k-icon[data-v-6fd081ab]{vertical-align:middle;flex-shrink:0;display:inline-block}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { createLucideStubComponent as e } from "../../utils/createStubComponent.js";
|
|
2
|
-
import * as t from "lucide-vue-next";
|
|
3
|
-
//#region src/components/k-icon/resolveLucideIcon.ts
|
|
4
|
-
var n = /* @__PURE__ */ new Map();
|
|
5
|
-
function r(e) {
|
|
6
|
-
return e.split("-").filter(Boolean).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
7
|
-
}
|
|
8
|
-
function i(e) {
|
|
9
|
-
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
10
|
-
}
|
|
11
|
-
function a(i) {
|
|
12
|
-
if (!i || i === "#") return e(i);
|
|
13
|
-
let a = i.trim();
|
|
14
|
-
if (n.has(a)) return n.get(a) ?? e(i);
|
|
15
|
-
let o = t[r(a)], s = typeof o == "function" ? o : null;
|
|
16
|
-
return n.set(a, s), s ?? e(i);
|
|
17
|
-
}
|
|
18
|
-
var o = /* @__PURE__ */ new Set(["createLucideIcon"]), s = null;
|
|
19
|
-
function c() {
|
|
20
|
-
if (s) return s;
|
|
21
|
-
let e = /* @__PURE__ */ new Set(), n = [];
|
|
22
|
-
for (let [r, a] of Object.entries(t)) o.has(r) || r.endsWith("Icon") || typeof a == "function" && (e.has(a) || (e.add(a), n.push(i(r))));
|
|
23
|
-
return s = n.sort((e, t) => e.localeCompare(t)), s;
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { c as getAllLucideKebabNames, i as pascalToKebab, a as resolveLucideIcon, r as toLucidePascalName };
|