@rdeam/qui 2.0.0
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/README.md +59 -0
- package/es/_virtual/_@oxc-project_runtime@0.127.0/helpers/defineProperty.mjs +12 -0
- package/es/_virtual/_@oxc-project_runtime@0.127.0/helpers/toPrimitive.mjs +14 -0
- package/es/_virtual/_@oxc-project_runtime@0.127.0/helpers/toPropertyKey.mjs +9 -0
- package/es/_virtual/_@oxc-project_runtime@0.127.0/helpers/typeof.mjs +11 -0
- package/es/component.d.ts +3 -0
- package/es/component.mjs +39 -0
- package/es/component.mjs.map +1 -0
- package/es/components/date-picker/index.d.ts +6 -0
- package/es/components/date-picker/index.mjs +9 -0
- package/es/components/date-picker/index.mjs.map +1 -0
- package/es/components/date-picker/src/date-picker.d.ts +19 -0
- package/es/components/date-picker/src/date-picker.mjs +28 -0
- package/es/components/date-picker/src/date-picker.mjs.map +1 -0
- package/es/components/date-picker/src/date-picker.vue.d.ts +33 -0
- package/es/components/date-picker/src/date-picker.vue.mjs +7 -0
- package/es/components/date-picker/src/date-picker.vue.mjs.map +1 -0
- package/es/components/date-picker/src/date-picker.vue_vue_type_script_setup_true_lang.mjs +42 -0
- package/es/components/date-picker/src/date-picker.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/date-picker/src/instance.d.ts +2 -0
- package/es/components/date-picker/src/instance.mjs +0 -0
- package/es/components/date-picker/style/index.d.ts +1 -0
- package/es/components/descriptions/index.d.ts +6 -0
- package/es/components/descriptions/index.mjs +9 -0
- package/es/components/descriptions/index.mjs.map +1 -0
- package/es/components/descriptions/src/descriptions.d.ts +42 -0
- package/es/components/descriptions/src/descriptions.mjs +86 -0
- package/es/components/descriptions/src/descriptions.mjs.map +1 -0
- package/es/components/descriptions/src/idescriptions.d.ts +72 -0
- package/es/components/descriptions/src/idescriptions.mjs +55 -0
- package/es/components/descriptions/src/idescriptions.mjs.map +1 -0
- package/es/components/descriptions/src/instance.d.ts +2 -0
- package/es/components/descriptions/src/instance.mjs +0 -0
- package/es/components/descriptions/style/index.d.ts +1 -0
- package/es/components/ellipsis-tag/index.d.ts +6 -0
- package/es/components/ellipsis-tag/index.mjs +9 -0
- package/es/components/ellipsis-tag/index.mjs.map +1 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.d.ts +20 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.mjs +19 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.mjs.map +1 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.vue.d.ts +51 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.vue.mjs +7 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.vue.mjs.map +1 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.vue_vue_type_script_setup_true_lang.mjs +74 -0
- package/es/components/ellipsis-tag/src/ellipsis-tag.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/ellipsis-tag/src/instance.d.ts +2 -0
- package/es/components/ellipsis-tag/src/instance.mjs +0 -0
- package/es/components/ellipsis-tag/style/index.d.ts +1 -0
- package/es/components/empty/index.d.ts +6 -0
- package/es/components/empty/index.mjs +9 -0
- package/es/components/empty/index.mjs.map +1 -0
- package/es/components/empty/src/empty.d.ts +86 -0
- package/es/components/empty/src/empty.mjs +158 -0
- package/es/components/empty/src/empty.mjs.map +1 -0
- package/es/components/empty/src/iempty.d.ts +41 -0
- package/es/components/empty/src/iempty.mjs +44 -0
- package/es/components/empty/src/iempty.mjs.map +1 -0
- package/es/components/empty/src/instance.d.ts +2 -0
- package/es/components/empty/src/instance.mjs +0 -0
- package/es/components/empty/style/index.d.ts +1 -0
- package/es/components/index.d.ts +16 -0
- package/es/components/index.mjs +33 -0
- package/es/components/jdata-viewer/index.d.ts +6 -0
- package/es/components/jdata-viewer/index.mjs +9 -0
- package/es/components/jdata-viewer/index.mjs.map +1 -0
- package/es/components/jdata-viewer/src/ijdata-viewer.d.ts +40 -0
- package/es/components/jdata-viewer/src/ijdata-viewer.mjs +43 -0
- package/es/components/jdata-viewer/src/ijdata-viewer.mjs.map +1 -0
- package/es/components/jdata-viewer/src/instance.d.ts +2 -0
- package/es/components/jdata-viewer/src/instance.mjs +0 -0
- package/es/components/jdata-viewer/src/jdata-viewer.d.ts +87 -0
- package/es/components/jdata-viewer/src/jdata-viewer.mjs +125 -0
- package/es/components/jdata-viewer/src/jdata-viewer.mjs.map +1 -0
- package/es/components/jdata-viewer/src/use-view.d.ts +7 -0
- package/es/components/jdata-viewer/src/use-view.mjs +98 -0
- package/es/components/jdata-viewer/src/use-view.mjs.map +1 -0
- package/es/components/jdata-viewer/style/index.d.ts +1 -0
- package/es/components/radio/index.d.ts +6 -0
- package/es/components/radio/index.mjs +9 -0
- package/es/components/radio/index.mjs.map +1 -0
- package/es/components/radio/src/instance.d.ts +2 -0
- package/es/components/radio/src/instance.mjs +0 -0
- package/es/components/radio/src/radio.d.ts +16 -0
- package/es/components/radio/src/radio.mjs +37 -0
- package/es/components/radio/src/radio.mjs.map +1 -0
- package/es/components/radio/src/radio.vue.d.ts +25 -0
- package/es/components/radio/src/radio.vue.mjs +7 -0
- package/es/components/radio/src/radio.vue.mjs.map +1 -0
- package/es/components/radio/src/radio.vue_vue_type_script_setup_true_lang.mjs +44 -0
- package/es/components/radio/src/radio.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/radio/style/index.d.ts +1 -0
- package/es/components/remote-search/index.d.ts +6 -0
- package/es/components/remote-search/index.mjs +9 -0
- package/es/components/remote-search/index.mjs.map +1 -0
- package/es/components/remote-search/src/instance.d.ts +2 -0
- package/es/components/remote-search/src/instance.mjs +0 -0
- package/es/components/remote-search/src/iremote-search.d.ts +26 -0
- package/es/components/remote-search/src/iremote-search.mjs +94 -0
- package/es/components/remote-search/src/iremote-search.mjs.map +1 -0
- package/es/components/remote-search/src/remote-search.d.ts +72 -0
- package/es/components/remote-search/src/remote-search.mjs +191 -0
- package/es/components/remote-search/src/remote-search.mjs.map +1 -0
- package/es/components/remote-search/style/index.d.ts +1 -0
- package/es/components/search-form/index.d.ts +6 -0
- package/es/components/search-form/index.mjs +9 -0
- package/es/components/search-form/index.mjs.map +1 -0
- package/es/components/search-form/src/components/Grid/components/GridItem.vue.d.ts +33 -0
- package/es/components/search-form/src/components/Grid/components/GridItem.vue.mjs +7 -0
- package/es/components/search-form/src/components/Grid/components/GridItem.vue.mjs.map +1 -0
- package/es/components/search-form/src/components/Grid/components/GridItem.vue_vue_type_script_setup_true_lang.mjs +54 -0
- package/es/components/search-form/src/components/Grid/components/GridItem.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/search-form/src/components/Grid/index.vue.d.ts +28 -0
- package/es/components/search-form/src/components/Grid/index.vue.mjs +7 -0
- package/es/components/search-form/src/components/Grid/index.vue.mjs.map +1 -0
- package/es/components/search-form/src/components/Grid/index.vue_vue_type_script_setup_true_lang.mjs +62 -0
- package/es/components/search-form/src/components/Grid/index.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/search-form/src/components/Grid/interface/index.d.ts +5 -0
- package/es/components/search-form/src/components/Grid/interface/index.mjs +0 -0
- package/es/components/search-form/src/components/SearchFormItem.vue.d.ts +36 -0
- package/es/components/search-form/src/components/SearchFormItem.vue.mjs +7 -0
- package/es/components/search-form/src/components/SearchFormItem.vue.mjs.map +1 -0
- package/es/components/search-form/src/components/SearchFormItem.vue_vue_type_script_lang.mjs +103 -0
- package/es/components/search-form/src/components/SearchFormItem.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/search-form/src/instance.d.ts +2 -0
- package/es/components/search-form/src/instance.mjs +0 -0
- package/es/components/search-form/src/isearch-form.d.ts +76 -0
- package/es/components/search-form/src/isearch-form.mjs +63 -0
- package/es/components/search-form/src/isearch-form.mjs.map +1 -0
- package/es/components/search-form/src/search-form.d.ts +55 -0
- package/es/components/search-form/src/search-form.mjs +319 -0
- package/es/components/search-form/src/search-form.mjs.map +1 -0
- package/es/components/search-form/style/index.d.ts +1 -0
- package/es/components/sticky-container/index.d.ts +6 -0
- package/es/components/sticky-container/index.mjs +9 -0
- package/es/components/sticky-container/index.mjs.map +1 -0
- package/es/components/sticky-container/src/instance.d.ts +2 -0
- package/es/components/sticky-container/src/instance.mjs +0 -0
- package/es/components/sticky-container/src/isticky-container.d.ts +4 -0
- package/es/components/sticky-container/src/isticky-container.mjs +8 -0
- package/es/components/sticky-container/src/isticky-container.mjs.map +1 -0
- package/es/components/sticky-container/src/sticky-container.d.ts +2 -0
- package/es/components/sticky-container/src/sticky-container.mjs +32 -0
- package/es/components/sticky-container/src/sticky-container.mjs.map +1 -0
- package/es/components/sticky-container/style/index.d.ts +1 -0
- package/es/components/table/index.d.ts +6 -0
- package/es/components/table/index.mjs +9 -0
- package/es/components/table/index.mjs.map +1 -0
- package/es/components/table/src/components/Setting.vue.d.ts +30 -0
- package/es/components/table/src/components/Setting.vue.mjs +7 -0
- package/es/components/table/src/components/Setting.vue.mjs.map +1 -0
- package/es/components/table/src/components/Setting.vue_vue_type_script_setup_true_lang.mjs +67 -0
- package/es/components/table/src/components/Setting.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/table/src/components/TableColumn.vue.d.ts +15 -0
- package/es/components/table/src/components/TableColumn.vue.mjs +7 -0
- package/es/components/table/src/components/TableColumn.vue.mjs.map +1 -0
- package/es/components/table/src/components/TableColumn.vue_vue_type_script_setup_true_lang.mjs +132 -0
- package/es/components/table/src/components/TableColumn.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/table/src/instance.d.ts +2 -0
- package/es/components/table/src/instance.mjs +0 -0
- package/es/components/table/src/table.d.ts +84 -0
- package/es/components/table/src/table.mjs +139 -0
- package/es/components/table/src/table.mjs.map +1 -0
- package/es/components/table/src/table.vue.d.ts +384 -0
- package/es/components/table/src/table.vue.mjs +7 -0
- package/es/components/table/src/table.vue.mjs.map +1 -0
- package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs +143 -0
- package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/table/src/use-controller.d.ts +10 -0
- package/es/components/table/src/use-controller.mjs +117 -0
- package/es/components/table/src/use-controller.mjs.map +1 -0
- package/es/components/table/src/use-table.d.ts +26 -0
- package/es/components/table/src/use-table.mjs +188 -0
- package/es/components/table/src/use-table.mjs.map +1 -0
- package/es/components/table/style/index.d.ts +1 -0
- package/es/components/table-editor/index.d.ts +6 -0
- package/es/components/table-editor/index.mjs +9 -0
- package/es/components/table-editor/index.mjs.map +1 -0
- package/es/components/table-editor/src/components/BaseItem.vue.d.ts +15 -0
- package/es/components/table-editor/src/components/BaseItem.vue.mjs +7 -0
- package/es/components/table-editor/src/components/BaseItem.vue.mjs.map +1 -0
- package/es/components/table-editor/src/components/BaseItem.vue_vue_type_script_lang.mjs +37 -0
- package/es/components/table-editor/src/components/BaseItem.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/table-editor/src/instance.d.ts +2 -0
- package/es/components/table-editor/src/instance.mjs +0 -0
- package/es/components/table-editor/src/table-editor.d.ts +45 -0
- package/es/components/table-editor/src/table-editor.mjs +24 -0
- package/es/components/table-editor/src/table-editor.mjs.map +1 -0
- package/es/components/table-editor/src/table-editor.vue.d.ts +82 -0
- package/es/components/table-editor/src/table-editor.vue.mjs +7 -0
- package/es/components/table-editor/src/table-editor.vue.mjs.map +1 -0
- package/es/components/table-editor/src/table-editor.vue_vue_type_script_setup_true_lang.mjs +75 -0
- package/es/components/table-editor/src/table-editor.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/table-editor/style/index.d.ts +1 -0
- package/es/components/tabs/index.d.ts +6 -0
- package/es/components/tabs/index.mjs +9 -0
- package/es/components/tabs/index.mjs.map +1 -0
- package/es/components/tabs/src/instance.d.ts +2 -0
- package/es/components/tabs/src/instance.mjs +0 -0
- package/es/components/tabs/src/itabs.d.ts +31 -0
- package/es/components/tabs/src/itabs.mjs +33 -0
- package/es/components/tabs/src/itabs.mjs.map +1 -0
- package/es/components/tabs/src/tabs.d.ts +55 -0
- package/es/components/tabs/src/tabs.mjs +58 -0
- package/es/components/tabs/src/tabs.mjs.map +1 -0
- package/es/components/tabs/style/index.d.ts +1 -0
- package/es/components/tarea-tag/index.d.ts +6 -0
- package/es/components/tarea-tag/index.mjs +9 -0
- package/es/components/tarea-tag/index.mjs.map +1 -0
- package/es/components/tarea-tag/src/instance.d.ts +2 -0
- package/es/components/tarea-tag/src/instance.mjs +0 -0
- package/es/components/tarea-tag/src/tarea-tag.d.ts +10 -0
- package/es/components/tarea-tag/src/tarea-tag.mjs +29 -0
- package/es/components/tarea-tag/src/tarea-tag.mjs.map +1 -0
- package/es/components/tarea-tag/src/tarea-tag.vue.d.ts +23 -0
- package/es/components/tarea-tag/src/tarea-tag.vue.mjs +7 -0
- package/es/components/tarea-tag/src/tarea-tag.vue.mjs.map +1 -0
- package/es/components/tarea-tag/src/tarea-tag.vue_vue_type_script_setup_true_lang.mjs +149 -0
- package/es/components/tarea-tag/src/tarea-tag.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/tarea-tag/style/index.d.ts +1 -0
- package/es/components/text-ellipsis/index.d.ts +5 -0
- package/es/components/text-ellipsis/index.mjs +9 -0
- package/es/components/text-ellipsis/index.mjs.map +1 -0
- package/es/components/text-ellipsis/src/instance.d.ts +2 -0
- package/es/components/text-ellipsis/src/instance.mjs +0 -0
- package/es/components/text-ellipsis/src/itext-ellipsis.d.ts +11 -0
- package/es/components/text-ellipsis/src/itext-ellipsis.mjs +16 -0
- package/es/components/text-ellipsis/src/itext-ellipsis.mjs.map +1 -0
- package/es/components/text-ellipsis/src/text-ellipsis.d.ts +25 -0
- package/es/components/text-ellipsis/src/text-ellipsis.mjs +115 -0
- package/es/components/text-ellipsis/src/text-ellipsis.mjs.map +1 -0
- package/es/components/text-ellipsis/src/use-window-size.d.ts +5 -0
- package/es/components/text-ellipsis/src/use-window-size.mjs +28 -0
- package/es/components/text-ellipsis/src/use-window-size.mjs.map +1 -0
- package/es/components/text-ellipsis/src/utils.d.ts +22 -0
- package/es/components/text-ellipsis/src/utils.mjs +26 -0
- package/es/components/text-ellipsis/src/utils.mjs.map +1 -0
- package/es/components/text-ellipsis/style/index.d.ts +1 -0
- package/es/components/time-line/index.d.ts +6 -0
- package/es/components/time-line/index.mjs +9 -0
- package/es/components/time-line/index.mjs.map +1 -0
- package/es/components/time-line/src/instance.d.ts +2 -0
- package/es/components/time-line/src/instance.mjs +0 -0
- package/es/components/time-line/src/time-line.d.ts +28 -0
- package/es/components/time-line/src/time-line.mjs +25 -0
- package/es/components/time-line/src/time-line.mjs.map +1 -0
- package/es/components/time-line/src/time-line.vue.d.ts +81 -0
- package/es/components/time-line/src/time-line.vue.mjs +7 -0
- package/es/components/time-line/src/time-line.vue.mjs.map +1 -0
- package/es/components/time-line/src/time-line.vue_vue_type_script_setup_true_lang.mjs +37 -0
- package/es/components/time-line/src/time-line.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/time-line/style/index.d.ts +1 -0
- package/es/components/uploader/index.d.ts +6 -0
- package/es/components/uploader/index.mjs +9 -0
- package/es/components/uploader/index.mjs.map +1 -0
- package/es/components/uploader/src/UploadInfo.vue.d.ts +30 -0
- package/es/components/uploader/src/UploadInfo.vue.mjs +7 -0
- package/es/components/uploader/src/UploadInfo.vue.mjs.map +1 -0
- package/es/components/uploader/src/UploadInfo.vue_vue_type_script_setup_true_lang.mjs +167 -0
- package/es/components/uploader/src/UploadInfo.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/uploader/src/instance.d.ts +2 -0
- package/es/components/uploader/src/instance.mjs +0 -0
- package/es/components/uploader/src/toast.d.ts +1 -0
- package/es/components/uploader/src/toast.mjs +37 -0
- package/es/components/uploader/src/toast.mjs.map +1 -0
- package/es/components/uploader/src/uploader.d.ts +32 -0
- package/es/components/uploader/src/uploader.mjs +104 -0
- package/es/components/uploader/src/uploader.mjs.map +1 -0
- package/es/components/uploader/src/uploader.vue.d.ts +98 -0
- package/es/components/uploader/src/uploader.vue.mjs +7 -0
- package/es/components/uploader/src/uploader.vue.mjs.map +1 -0
- package/es/components/uploader/src/uploader.vue_vue_type_script_setup_true_lang.mjs +48 -0
- package/es/components/uploader/src/uploader.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/es/components/uploader/src/use-uploader.d.ts +20 -0
- package/es/components/uploader/src/use-uploader.mjs +263 -0
- package/es/components/uploader/src/use-uploader.mjs.map +1 -0
- package/es/components/uploader/style/index.d.ts +1 -0
- package/es/defaults.d.ts +5 -0
- package/es/defaults.mjs +8 -0
- package/es/defaults.mjs.map +1 -0
- package/es/directives/copy/index.d.ts +3 -0
- package/es/directives/copy/index.mjs +31 -0
- package/es/directives/copy/index.mjs.map +1 -0
- package/es/directives/draggable/index.d.ts +3 -0
- package/es/directives/draggable/index.mjs +28 -0
- package/es/directives/draggable/index.mjs.map +1 -0
- package/es/directives/index.d.ts +4 -0
- package/es/directives/index.mjs +5 -0
- package/es/directives/longpress/index.d.ts +7 -0
- package/es/directives/longpress/index.mjs +32 -0
- package/es/directives/longpress/index.mjs.map +1 -0
- package/es/directives/resize-element/index.d.ts +3 -0
- package/es/directives/resize-element/index.mjs +30 -0
- package/es/directives/resize-element/index.mjs.map +1 -0
- package/es/directives/show-tip/index.d.ts +3 -0
- package/es/directives/show-tip/index.mjs +19 -0
- package/es/directives/show-tip/index.mjs.map +1 -0
- package/es/hooks/_configurable.d.ts +27 -0
- package/es/hooks/_configurable.mjs +10 -0
- package/es/hooks/_configurable.mjs.map +1 -0
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +2 -0
- package/es/hooks/toRef/index.d.ts +14 -0
- package/es/hooks/toRef/index.mjs +19 -0
- package/es/hooks/toRef/index.mjs.map +1 -0
- package/es/hooks/tryOnScopeDispose/index.d.ts +7 -0
- package/es/hooks/tryOnScopeDispose/index.mjs +18 -0
- package/es/hooks/tryOnScopeDispose/index.mjs.map +1 -0
- package/es/hooks/unrefElement/index.d.ts +12 -0
- package/es/hooks/unrefElement/index.mjs +16 -0
- package/es/hooks/unrefElement/index.mjs.map +1 -0
- package/es/hooks/use-full-screen/index.d.ts +1 -0
- package/es/hooks/use-full-screen/index.mjs +32 -0
- package/es/hooks/use-full-screen/index.mjs.map +1 -0
- package/es/hooks/useEventListener/index.d.ts +83 -0
- package/es/hooks/useEventListener/index.mjs +47 -0
- package/es/hooks/useEventListener/index.mjs.map +1 -0
- package/es/hooks/useFullscreen/index.d.ts +25 -0
- package/es/hooks/useFullscreen/index.mjs +121 -0
- package/es/hooks/useFullscreen/index.mjs.map +1 -0
- package/es/hooks/useMounted/index.d.ts +6 -0
- package/es/hooks/useMounted/index.mjs +19 -0
- package/es/hooks/useMounted/index.mjs.map +1 -0
- package/es/hooks/useSupported/index.d.ts +2 -0
- package/es/hooks/useSupported/index.mjs +14 -0
- package/es/hooks/useSupported/index.mjs.map +1 -0
- package/es/hooks/utils/filters.d.ts +84 -0
- package/es/hooks/utils/filters.mjs +141 -0
- package/es/hooks/utils/filters.mjs.map +1 -0
- package/es/hooks/utils/general.d.ts +49 -0
- package/es/hooks/utils/general.mjs +85 -0
- package/es/hooks/utils/general.mjs.map +1 -0
- package/es/hooks/utils/index.d.ts +6 -0
- package/es/hooks/utils/index.mjs +6 -0
- package/es/hooks/utils/is.d.ts +13 -0
- package/es/hooks/utils/is.mjs +29 -0
- package/es/hooks/utils/is.mjs.map +1 -0
- package/es/hooks/utils/port.d.ts +2 -0
- package/es/hooks/utils/port.mjs +17 -0
- package/es/hooks/utils/port.mjs.map +1 -0
- package/es/hooks/utils/types.d.ts +117 -0
- package/es/hooks/utils/types.mjs +0 -0
- package/es/hooks/utils/vue.d.ts +1 -0
- package/es/hooks/utils/vue.mjs +9 -0
- package/es/hooks/utils/vue.mjs.map +1 -0
- package/es/hooks/watchImmediate/index.d.ts +5 -0
- package/es/hooks/watchImmediate/index.mjs +17 -0
- package/es/hooks/watchImmediate/index.mjs.map +1 -0
- package/es/index.d.ts +8 -0
- package/es/index.mjs +47 -0
- package/es/index.mjs.map +1 -0
- package/es/make-installer.d.ts +5 -0
- package/es/make-installer.mjs +15 -0
- package/es/make-installer.mjs.map +1 -0
- package/es/share/dist/index.d.ts +60 -0
- package/es/share/dist/index.mjs +16 -0
- package/es/share/dist/index.mjs.map +1 -0
- package/es/utils/browser.d.ts +3 -0
- package/es/utils/browser.mjs +9 -0
- package/es/utils/browser.mjs.map +1 -0
- package/es/utils/console-log/index.d.ts +3 -0
- package/es/utils/console-log/index.mjs +23 -0
- package/es/utils/console-log/index.mjs.map +1 -0
- package/es/utils/create/index.d.ts +21 -0
- package/es/utils/create/index.mjs +43 -0
- package/es/utils/create/index.mjs.map +1 -0
- package/es/utils/dom/index.d.ts +2 -0
- package/es/utils/dom/index.mjs +3 -0
- package/es/utils/dom/scroll.d.ts +11 -0
- package/es/utils/dom/scroll.mjs +107 -0
- package/es/utils/dom/scroll.mjs.map +1 -0
- package/es/utils/dom/style.d.ts +5 -0
- package/es/utils/dom/style.mjs +35 -0
- package/es/utils/dom/style.mjs.map +1 -0
- package/es/utils/easings.d.ts +1 -0
- package/es/utils/easings.mjs +11 -0
- package/es/utils/easings.mjs.map +1 -0
- package/es/utils/index.d.ts +11 -0
- package/es/utils/index.mjs +14 -0
- package/es/utils/objects.d.ts +8 -0
- package/es/utils/objects.mjs +19 -0
- package/es/utils/objects.mjs.map +1 -0
- package/es/utils/raf.d.ts +2 -0
- package/es/utils/raf.mjs +8 -0
- package/es/utils/raf.mjs.map +1 -0
- package/es/utils/request/index.d.ts +25 -0
- package/es/utils/request/index.mjs +49 -0
- package/es/utils/request/index.mjs.map +1 -0
- package/es/utils/types.d.ts +10 -0
- package/es/utils/types.mjs +22 -0
- package/es/utils/types.mjs.map +1 -0
- package/es/utils/typescript.d.ts +12 -0
- package/es/utils/typescript.mjs +6 -0
- package/es/utils/typescript.mjs.map +1 -0
- package/es/utils/vue/index.d.ts +3 -0
- package/es/utils/vue/index.mjs +3 -0
- package/es/utils/vue/install.d.ts +50 -0
- package/es/utils/vue/install.mjs +74 -0
- package/es/utils/vue/install.mjs.map +1 -0
- package/es/utils/vue/props/index.d.ts +3 -0
- package/es/utils/vue/props/index.mjs +2 -0
- package/es/utils/vue/props/runtime.d.ts +29 -0
- package/es/utils/vue/props/runtime.mjs +59 -0
- package/es/utils/vue/props/runtime.mjs.map +1 -0
- package/es/utils/vue/props/types.d.ts +120 -0
- package/es/utils/vue/props/types.mjs +0 -0
- package/es/utils/vue/props/util.d.ts +8 -0
- package/es/utils/vue/props/util.mjs +0 -0
- package/es/utils/vue/typescript.d.ts +6 -0
- package/es/utils/vue/typescript.mjs +0 -0
- package/es/version.d.ts +1 -0
- package/es/version.mjs +6 -0
- package/es/version.mjs.map +1 -0
- package/global.d.ts +1 -0
- package/package.json +80 -0
- package/resolvers/index.d.mts +19 -0
- package/resolvers/index.d.ts +19 -0
- package/resolvers/index.mjs +32 -0
- package/theme-chalk/hd-date-picker.css +1 -0
- package/theme-chalk/hd-descriptions.css +1 -0
- package/theme-chalk/hd-ellipsis-tag.css +1 -0
- package/theme-chalk/hd-empty.css +2 -0
- package/theme-chalk/hd-jdata-viewer.css +1 -0
- package/theme-chalk/hd-radio.css +1 -0
- package/theme-chalk/hd-remote-search.css +1 -0
- package/theme-chalk/hd-search-form.css +1 -0
- package/theme-chalk/hd-sticky-container.css +1 -0
- package/theme-chalk/hd-table-editor.css +1 -0
- package/theme-chalk/hd-table.css +1 -0
- package/theme-chalk/hd-tabs.css +1 -0
- package/theme-chalk/hd-tarea-tag.css +1 -0
- package/theme-chalk/hd-text-ellipsis.css +1 -0
- package/theme-chalk/hd-time-line.css +1 -0
- package/theme-chalk/hd-uploader.css +1 -0
- package/theme-chalk/index.css +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-editor.vue.mjs","names":[],"sources":["../../../../../../packages/components/table-editor/src/table-editor.vue"],"sourcesContent":["<template>\n <ElTable class=\"hd-table-editor\">\n <ElTableColumn\n v-for=\"item in columns\"\n :prop=\"item.prop\"\n :label=\"item.label\"\n :width=\"item.width || ''\"\n :key=\"item.prop\"\n >\n <template #default=\"scope\">\n <slot :name=\"`${item.prop}-cell`\" :row=\"scope.row\">\n <span v-if=\"props.readonly\">{{\n item.formateText ? item.formateText(scope.row) : scope.row[item.prop] || '--'\n }}</span>\n <ElFormItem\n :label-width=\"0\"\n v-else-if=\"scope.$index > -1\"\n :prop=\"setProp ? setProp(scope, item) : `[${scope.$index}].${item.prop}`\"\n :rules=\"setRules ? setRules(scope, item) : {}\"\n >\n <slot :name=\"item.prop\" :row=\"scope.row\">\n <BaseItem\n v-if=\"getVisible(item, scope.row)\"\n v-model=\"scope.row[item.prop]\"\n :config=\"item\"\n :rowData=\"scope.row\"\n :disabled=\"getDisabled(item, scope.row)\"\n ></BaseItem>\n <span v-else>--</span>\n </slot>\n </ElFormItem>\n </slot>\n </template>\n </ElTableColumn>\n <ElTableColumn v-if=\"$slots.operate\" label=\"操作\" :width=\"operateWidth\">\n <template #default=\"scope\">\n <slot name=\"operate\" :row=\"scope.row\" :index=\"scope.$index\"></slot>\n </template>\n </ElTableColumn>\n </ElTable>\n</template>\n<script lang=\"ts\" setup>\nimport BaseItem from './components/BaseItem.vue'\nimport { ElTable, ElTableColumn, ElFormItem } from 'element-plus'\nimport { tableEditorProps, tableEditorEmits, IColumn, ITableEditorAnyObject } from './table-editor'\n\ndefineOptions({\n name: 'TableEditor',\n})\n\nconst props = defineProps(tableEditorProps)\ndefineEmits(tableEditorEmits)\n\nconst getVisible = (item: IColumn, row: ITableEditorAnyObject) => {\n return !('isHidden' in item && (item.isHidden instanceof Function ? item?.isHidden(row) : item.isHidden))\n}\nconst getDisabled = (item: IColumn, row: ITableEditorAnyObject) => {\n return (\n props.disabled || ('disabled' in item && (item.disabled instanceof Function ? item?.disabled(row) : item.disabled))\n )\n}\n</script>\n"],"mappings":""}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import BaseItem_default from "./components/BaseItem.vue.mjs";
|
|
2
|
+
import { tableEditorEmits, tableEditorProps } from "./table-editor.mjs";
|
|
3
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, defineComponent, openBlock, renderList, renderSlot, toDisplayString, unref, withCtx } from "vue";
|
|
4
|
+
import { ElFormItem, ElTable, ElTableColumn } from "element-plus";
|
|
5
|
+
//#region packages/components/table-editor/src/table-editor.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var table_editor_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "TableEditor",
|
|
8
|
+
__name: "table-editor",
|
|
9
|
+
props: tableEditorProps,
|
|
10
|
+
emits: tableEditorEmits,
|
|
11
|
+
setup(__props) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const getVisible = (item, row) => {
|
|
14
|
+
return !("isHidden" in item && (item.isHidden instanceof Function ? item === null || item === void 0 ? void 0 : item.isHidden(row) : item.isHidden));
|
|
15
|
+
};
|
|
16
|
+
const getDisabled = (item, row) => {
|
|
17
|
+
return props.disabled || "disabled" in item && (item.disabled instanceof Function ? item === null || item === void 0 ? void 0 : item.disabled(row) : item.disabled);
|
|
18
|
+
};
|
|
19
|
+
return (_ctx, _cache) => {
|
|
20
|
+
return openBlock(), createBlock(unref(ElTable), { class: "hd-table-editor" }, {
|
|
21
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (item) => {
|
|
22
|
+
return openBlock(), createBlock(unref(ElTableColumn), {
|
|
23
|
+
prop: item.prop,
|
|
24
|
+
label: item.label,
|
|
25
|
+
width: item.width || "",
|
|
26
|
+
key: item.prop
|
|
27
|
+
}, {
|
|
28
|
+
default: withCtx((scope) => [renderSlot(_ctx.$slots, `${item.prop}-cell`, { row: scope.row }, () => [props.readonly ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(item.formateText ? item.formateText(scope.row) : scope.row[item.prop] || "--"), 1)) : scope.$index > -1 ? (openBlock(), createBlock(unref(ElFormItem), {
|
|
29
|
+
key: 1,
|
|
30
|
+
"label-width": 0,
|
|
31
|
+
prop: _ctx.setProp ? _ctx.setProp(scope, item) : `[${scope.$index}].${item.prop}`,
|
|
32
|
+
rules: _ctx.setRules ? _ctx.setRules(scope, item) : {}
|
|
33
|
+
}, {
|
|
34
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, item.prop, { row: scope.row }, () => [getVisible(item, scope.row) ? (openBlock(), createBlock(BaseItem_default, {
|
|
35
|
+
key: 0,
|
|
36
|
+
modelValue: scope.row[item.prop],
|
|
37
|
+
"onUpdate:modelValue": ($event) => scope.row[item.prop] = $event,
|
|
38
|
+
config: item,
|
|
39
|
+
rowData: scope.row,
|
|
40
|
+
disabled: getDisabled(item, scope.row)
|
|
41
|
+
}, null, 8, [
|
|
42
|
+
"modelValue",
|
|
43
|
+
"onUpdate:modelValue",
|
|
44
|
+
"config",
|
|
45
|
+
"rowData",
|
|
46
|
+
"disabled"
|
|
47
|
+
])) : (openBlock(), createElementBlock("span", { key: 1 }, "--"))])]),
|
|
48
|
+
_: 2
|
|
49
|
+
}, 1032, ["prop", "rules"])) : createCommentVNode("", true)])]),
|
|
50
|
+
_: 2
|
|
51
|
+
}, 1032, [
|
|
52
|
+
"prop",
|
|
53
|
+
"label",
|
|
54
|
+
"width"
|
|
55
|
+
]);
|
|
56
|
+
}), 128)), _ctx.$slots.operate ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
57
|
+
key: 0,
|
|
58
|
+
label: "操作",
|
|
59
|
+
width: _ctx.operateWidth
|
|
60
|
+
}, {
|
|
61
|
+
default: withCtx((scope) => [renderSlot(_ctx.$slots, "operate", {
|
|
62
|
+
row: scope.row,
|
|
63
|
+
index: scope.$index
|
|
64
|
+
})]),
|
|
65
|
+
_: 3
|
|
66
|
+
}, 8, ["width"])) : createCommentVNode("", true)]),
|
|
67
|
+
_: 3
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
//#endregion
|
|
73
|
+
export { table_editor_vue_vue_type_script_setup_true_lang_default as default };
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=table-editor.vue_vue_type_script_setup_true_lang.mjs.map
|
package/es/components/table-editor/src/table-editor.vue_vue_type_script_setup_true_lang.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-editor.vue_vue_type_script_setup_true_lang.mjs","names":["columns","setProp","setRules","$slots","operateWidth"],"sources":["../../../../../../packages/components/table-editor/src/table-editor.vue"],"sourcesContent":["<template>\n <ElTable class=\"hd-table-editor\">\n <ElTableColumn\n v-for=\"item in columns\"\n :prop=\"item.prop\"\n :label=\"item.label\"\n :width=\"item.width || ''\"\n :key=\"item.prop\"\n >\n <template #default=\"scope\">\n <slot :name=\"`${item.prop}-cell`\" :row=\"scope.row\">\n <span v-if=\"props.readonly\">{{\n item.formateText ? item.formateText(scope.row) : scope.row[item.prop] || '--'\n }}</span>\n <ElFormItem\n :label-width=\"0\"\n v-else-if=\"scope.$index > -1\"\n :prop=\"setProp ? setProp(scope, item) : `[${scope.$index}].${item.prop}`\"\n :rules=\"setRules ? setRules(scope, item) : {}\"\n >\n <slot :name=\"item.prop\" :row=\"scope.row\">\n <BaseItem\n v-if=\"getVisible(item, scope.row)\"\n v-model=\"scope.row[item.prop]\"\n :config=\"item\"\n :rowData=\"scope.row\"\n :disabled=\"getDisabled(item, scope.row)\"\n ></BaseItem>\n <span v-else>--</span>\n </slot>\n </ElFormItem>\n </slot>\n </template>\n </ElTableColumn>\n <ElTableColumn v-if=\"$slots.operate\" label=\"操作\" :width=\"operateWidth\">\n <template #default=\"scope\">\n <slot name=\"operate\" :row=\"scope.row\" :index=\"scope.$index\"></slot>\n </template>\n </ElTableColumn>\n </ElTable>\n</template>\n<script lang=\"ts\" setup>\nimport BaseItem from './components/BaseItem.vue'\nimport { ElTable, ElTableColumn, ElFormItem } from 'element-plus'\nimport { tableEditorProps, tableEditorEmits, IColumn, ITableEditorAnyObject } from './table-editor'\n\ndefineOptions({\n name: 'TableEditor',\n})\n\nconst props = defineProps(tableEditorProps)\ndefineEmits(tableEditorEmits)\n\nconst getVisible = (item: IColumn, row: ITableEditorAnyObject) => {\n return !('isHidden' in item && (item.isHidden instanceof Function ? item?.isHidden(row) : item.isHidden))\n}\nconst getDisabled = (item: IColumn, row: ITableEditorAnyObject) => {\n return (\n props.disabled || ('disabled' in item && (item.disabled instanceof Function ? item?.disabled(row) : item.disabled))\n )\n}\n</script>\n"],"mappings":";;;;;;;;;;;EAkDA,MAAM,QAAQ;EAGd,MAAM,cAAc,MAAe,QAA+B;AAChE,UAAO,EAAE,cAAc,SAAS,KAAK,oBAAoB,WAAA,SAAA,QAAA,SAAA,KAAA,IAAA,KAAA,IAAW,KAAM,SAAS,IAAI,GAAG,KAAK;;EAEjG,MAAM,eAAe,MAAe,QAA+B;AACjE,UACE,MAAM,YAAa,cAAc,SAAS,KAAK,oBAAoB,WAAA,SAAA,QAAA,SAAA,KAAA,IAAA,KAAA,IAAW,KAAM,SAAS,IAAI,GAAG,KAAK;;;uBAzD3G,YAsCU,MAAA,QAAA,EAAA,EAtCD,OAAM,mBAAiB,EAAA;2BAEL,EAAA,UAAA,KAAA,EADzB,mBA+BgB,UAAA,MAAA,WA9BCA,KAAAA,UAAR,SAAI;yBADb,YA+BgB,MAAA,cAAA,EAAA;MA7Bb,MAAM,KAAK;MACX,OAAO,KAAK;MACZ,OAAO,KAAK,SAAK;MACjB,KAAK,KAAK;;MAEA,SAAO,SAAE,UAAK,CACvB,WAqBO,KAAA,QAAA,GArBS,KAAK,KAAI,QAAA,EAAU,KAAK,MAAM,KAAA,QAqBvC,CApBO,MAAM,YAAA,WAAA,EAAlB,mBAES,QAAA,EAAA,KAAA,GAAA,EAAA,gBADP,KAAK,cAAc,KAAK,YAAY,MAAM,IAAG,GAAI,MAAM,IAAI,KAAK,SAAI,KAAA,EAAA,EAAA,IAIzD,MAAM,SAAM,MAAA,WAAA,EAFzB,YAgBa,MAAA,WAAA,EAAA;;OAfV,eAAa;OAEb,MAAMC,KAAAA,UAAUA,KAAAA,QAAQ,OAAO,KAAI,GAAA,IAAQ,MAAM,OAAM,IAAK,KAAK;OACjE,OAAOC,KAAAA,WAAWA,KAAAA,SAAS,OAAO,KAAI,GAAA,EAAA;;8BAWhC,CATP,WASO,KAAA,QATM,KAAK,MAAI,EAAG,KAAK,MAAM,KAAA,QAS7B,CAPG,WAAW,MAAM,MAAM,IAAG,IAAA,WAAA,EADlC,YAMY,kBAAA;;oBAJD,MAAM,IAAI,KAAK;iDAAT,IAAI,KAAK,QAAI;QAC3B,QAAQ;QACR,SAAS,MAAM;QACf,UAAU,YAAY,MAAM,MAAM,IAAG;;;;;;;2BAExC,mBAAsB,QAAA,EAAA,KAAA,GAAA,EAAT,KAAE,EAAA,CAAA,CAAA,CAAA;;;;;;;;;eAMJC,KAAAA,OAAO,WAAA,WAAA,EAA5B,YAIgB,MAAA,cAAA,EAAA;;KAJqB,OAAM;KAAM,OAAOC,KAAAA;;KAC3C,SAAO,SAAE,UAAK,CACvB,WAAmE,KAAA,QAAA,WAAA;MAA7C,KAAK,MAAM;MAAM,OAAO,MAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../src/table-editor.scss';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import Tabs from './src/tabs.js';
|
|
2
|
+
import type { SFCWithInstall } from '../../utils/index.js';
|
|
3
|
+
export declare const HdTabs: SFCWithInstall<typeof Tabs>;
|
|
4
|
+
export default HdTabs;
|
|
5
|
+
export * from './src/itabs.js';
|
|
6
|
+
export type { TabsInstance } from './src/instance.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { withInstall } from "../../utils/vue/install.mjs";
|
|
2
|
+
import { tabsEmits, tabsProps } from "./src/itabs.mjs";
|
|
3
|
+
import tabs_default from "./src/tabs.mjs";
|
|
4
|
+
//#region packages/components/tabs/index.ts
|
|
5
|
+
var HdTabs = withInstall(tabs_default);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { HdTabs, HdTabs as default, tabsEmits, tabsProps };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../packages/components/tabs/index.ts"],"sourcesContent":["import { withInstall } from '@hd-custom/utils'\n\nimport Tabs from './src/tabs'\nimport type { SFCWithInstall } from '@hd-custom/utils'\n\nexport const HdTabs: SFCWithInstall<typeof Tabs> = withInstall(Tabs)\nexport default HdTabs\n\nexport * from './src/itabs'\nexport type { TabsInstance } from './src/instance'\n"],"mappings":";;;;AAKA,IAAa,SAAsC,YAAY,aAAK"}
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType, Ref } from 'vue';
|
|
2
|
+
export interface TabItemProps {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
labelCount?: string | number | Function | Ref<string | number>;
|
|
6
|
+
}
|
|
7
|
+
export declare const tabsProps: {
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: PropType<string | number>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
activeIdx: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
tabs: {
|
|
17
|
+
type: PropType<TabItemProps[]>;
|
|
18
|
+
required: boolean;
|
|
19
|
+
default: () => never[];
|
|
20
|
+
};
|
|
21
|
+
tabPx: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
w: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const tabsEmits: string[];
|
|
31
|
+
export type TabsProps = ExtractPropTypes<typeof tabsProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region packages/components/tabs/src/itabs.ts
|
|
2
|
+
var tabsProps = {
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: [String, Number],
|
|
5
|
+
default: ""
|
|
6
|
+
},
|
|
7
|
+
activeIdx: {
|
|
8
|
+
type: Number,
|
|
9
|
+
default: -1
|
|
10
|
+
},
|
|
11
|
+
tabs: {
|
|
12
|
+
type: Array,
|
|
13
|
+
required: true,
|
|
14
|
+
default: () => []
|
|
15
|
+
},
|
|
16
|
+
tabPx: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "32px"
|
|
19
|
+
},
|
|
20
|
+
w: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "auto"
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
var tabsEmits = [
|
|
26
|
+
"update:modelValue",
|
|
27
|
+
"update:activeIdx",
|
|
28
|
+
"change"
|
|
29
|
+
];
|
|
30
|
+
//#endregion
|
|
31
|
+
export { tabsEmits, tabsProps };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=itabs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itabs.mjs","names":[],"sources":["../../../../../../packages/components/tabs/src/itabs.ts"],"sourcesContent":["import type { ExtractPropTypes, PropType, Ref } from 'vue'\n\nexport interface TabItemProps {\n label: string\n value: string | number\n labelCount?: string | number | Function | Ref<string | number>\n}\n\nexport const tabsProps = {\n modelValue: {\n type: [String, Number] as PropType<string | number>,\n default: '',\n },\n activeIdx: {\n type: Number,\n default: -1,\n },\n tabs: {\n type: Array as PropType<TabItemProps[]>,\n required: true,\n default: () => [],\n },\n tabPx: {\n type: String,\n default: '32px',\n },\n w: {\n type: String,\n default: 'auto',\n },\n}\n\nexport const tabsEmits = ['update:modelValue', 'update:activeIdx', 'change']\n\nexport type TabsProps = ExtractPropTypes<typeof tabsProps>\n"],"mappings":";AAQA,IAAa,YAAY;CACvB,YAAY;EACV,MAAM,CAAC,QAAQ,OAAO;EACtB,SAAS;EACV;CACD,WAAW;EACT,MAAM;EACN,SAAS;EACV;CACD,MAAM;EACJ,MAAM;EACN,UAAU;EACV,eAAe,EAAE;EAClB;CACD,OAAO;EACL,MAAM;EACN,SAAS;EACV;CACD,GAAG;EACD,MAAM;EACN,SAAS;EACV;CACF;AAED,IAAa,YAAY;CAAC;CAAqB;CAAoB;CAAS"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { TabItemProps } from './itabs.js';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: import("vue").PropType<string | number>;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
activeIdx: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
tabs: {
|
|
12
|
+
type: import("vue").PropType<TabItemProps[]>;
|
|
13
|
+
required: boolean;
|
|
14
|
+
default: () => never[];
|
|
15
|
+
};
|
|
16
|
+
tabPx: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
w: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: import("vue").PropType<string | number>;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
activeIdx: {
|
|
30
|
+
type: NumberConstructor;
|
|
31
|
+
default: number;
|
|
32
|
+
};
|
|
33
|
+
tabs: {
|
|
34
|
+
type: import("vue").PropType<TabItemProps[]>;
|
|
35
|
+
required: boolean;
|
|
36
|
+
default: () => never[];
|
|
37
|
+
};
|
|
38
|
+
tabPx: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
w: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
}>> & Readonly<{
|
|
47
|
+
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
48
|
+
}>, {
|
|
49
|
+
modelValue: string | number;
|
|
50
|
+
w: string;
|
|
51
|
+
activeIdx: number;
|
|
52
|
+
tabs: TabItemProps[];
|
|
53
|
+
tabPx: string;
|
|
54
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
55
|
+
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { tabsEmits, tabsProps } from "./itabs.mjs";
|
|
2
|
+
import { Fragment, computed, createTextVNode, createVNode, defineComponent, isRef } from "vue";
|
|
3
|
+
//#region packages/components/tabs/src/tabs.tsx
|
|
4
|
+
var tabs_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
name: "Tabs",
|
|
6
|
+
props: tabsProps,
|
|
7
|
+
emits: tabsEmits,
|
|
8
|
+
setup(props, { emit, slots }) {
|
|
9
|
+
const tabAct = computed({
|
|
10
|
+
get() {
|
|
11
|
+
var _props$tabs$;
|
|
12
|
+
if (props.activeIdx === -1 && props.modelValue) {
|
|
13
|
+
const _index = props.tabs.findIndex((e) => e.value === props.modelValue);
|
|
14
|
+
if (_index !== -1) emit("update:activeIdx", _index);
|
|
15
|
+
}
|
|
16
|
+
return props.modelValue !== void 0 ? props.modelValue : props.tabs.length ? (_props$tabs$ = props.tabs[0]) === null || _props$tabs$ === void 0 ? void 0 : _props$tabs$.value : "";
|
|
17
|
+
},
|
|
18
|
+
set(value) {
|
|
19
|
+
emit("update:modelValue", value);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const handleTabClick = (item, idx) => {
|
|
23
|
+
tabAct.value = item.value;
|
|
24
|
+
emit("change", item);
|
|
25
|
+
emit("update:activeIdx", idx);
|
|
26
|
+
};
|
|
27
|
+
const tabItemStyles = {
|
|
28
|
+
padding: `0 ${props.w === "auto" ? props.tabPx : 0}`,
|
|
29
|
+
width: props.w
|
|
30
|
+
};
|
|
31
|
+
const labelCountRender = (item) => {
|
|
32
|
+
if (item.labelCount && isRef(item.labelCount)) return createVNode("span", { "class": "pl-[2px]" }, [
|
|
33
|
+
createTextVNode("("),
|
|
34
|
+
item.labelCount.value,
|
|
35
|
+
createTextVNode(")")
|
|
36
|
+
]);
|
|
37
|
+
else if (typeof item.labelCount === "function") return createVNode("span", { "class": "pl-[2px]" }, [
|
|
38
|
+
createTextVNode("("),
|
|
39
|
+
item.labelCount(),
|
|
40
|
+
createTextVNode(")")
|
|
41
|
+
]);
|
|
42
|
+
return null;
|
|
43
|
+
};
|
|
44
|
+
return () => {
|
|
45
|
+
return createVNode("div", { "class": "w-full flex h-[32px] hd-tabs" }, [createVNode("div", { "class": "ltabs-box flex" }, [props.tabs.map((item, index) => {
|
|
46
|
+
return createVNode(Fragment, null, [createVNode("div", {
|
|
47
|
+
"style": tabItemStyles,
|
|
48
|
+
"class": `tab-item h-full flex items-center justify-center ${item.value === tabAct.value ? "tab-active" : ""}`,
|
|
49
|
+
"onClick": () => handleTabClick(item, index)
|
|
50
|
+
}, [createVNode("span", null, [createTextVNode(" "), item.label]), labelCountRender(item)])]);
|
|
51
|
+
})]), createVNode("div", { "class": "flex-1 w-0 h-full tabs-right-box" }, [slots.right && slots.right()])]);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
//#endregion
|
|
56
|
+
export { tabs_default as default };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=tabs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.mjs","names":["defineComponent","computed","isRef","createTextVNode","_createTextVNode","createVNode","_createVNode","Fragment","_Fragment","tabsProps","tabsEmits","name","props","emits","setup","emit","slots","tabAct","get","activeIdx","modelValue","_index","tabs","findIndex","e","value","undefined","length","set","handleTabClick","item","idx","tabItemStyles","padding","w","tabPx","width","labelCountRender","labelCount","map","index","onClick","label","right"],"sources":["../../../../../../packages/components/tabs/src/tabs.tsx"],"sourcesContent":["import { defineComponent, computed, isRef } from 'vue'\nimport { tabsProps, TabItemProps, tabsEmits } from './itabs'\n\nexport default defineComponent({\n name: 'Tabs',\n props: tabsProps,\n emits: tabsEmits,\n setup(props, { emit, slots }) {\n const tabAct = computed({\n get() {\n if (props.activeIdx === -1 && props.modelValue) {\n const _index = props.tabs.findIndex((e: TabItemProps) => e.value === props.modelValue)\n if (_index !== -1) emit('update:activeIdx', _index)\n }\n return props.modelValue !== undefined ? props.modelValue : props.tabs.length ? props.tabs[0]?.value : ''\n },\n set(value) {\n emit('update:modelValue', value)\n },\n })\n\n const handleTabClick = (item: TabItemProps, idx: number) => {\n tabAct.value = item.value\n emit('change', item)\n emit('update:activeIdx', idx)\n }\n\n const tabItemStyles = {\n padding: `0 ${props.w === 'auto' ? props.tabPx : 0}`,\n width: props.w,\n }\n\n const labelCountRender = (item: TabItemProps) => {\n if (item.labelCount && isRef(item.labelCount)) {\n return <span class=\"pl-[2px]\">({item.labelCount.value})</span>\n } else if (typeof item.labelCount === 'function') {\n return <span class=\"pl-[2px]\">({item.labelCount()})</span>\n }\n return null\n }\n\n return () => {\n return (\n <div class=\"w-full flex h-[32px] hd-tabs\">\n <div class=\"ltabs-box flex\">\n {props.tabs.map((item: TabItemProps, index: number) => {\n return (\n <>\n <div\n style={tabItemStyles}\n class={`tab-item h-full flex items-center justify-center ${\n item.value === tabAct.value ? 'tab-active' : ''\n }`}\n onClick={() => handleTabClick(item, index)}\n >\n <span> {item.label}</span>\n {labelCountRender(item)}\n </div>\n </>\n )\n })}\n </div>\n <div class=\"flex-1 w-0 h-full tabs-right-box\">{slots.right && slots.right()}</div>\n </div>\n )\n }\n },\n})\n"],"mappings":";;;AAGA,IAAA,eAAeA,gCAAgB;CAC7BW,MAAM;CACNC,OAAOH;CACPI,OAAOH;CACPI,MAAMF,OAAO,EAAEG,MAAMC,SAAS;EAC5B,MAAMC,SAAShB,SAAS;GACtBiB,MAAM;;AACJ,QAAIN,MAAMO,cAAc,MAAMP,MAAMQ,YAAY;KAC9C,MAAMC,SAAST,MAAMU,KAAKC,WAAWC,MAAoBA,EAAEC,UAAUb,MAAMQ,WAAW;AACtF,SAAIC,WAAW,GAAIN,MAAK,oBAAoBM,OAAO;;AAErD,WAAOT,MAAMQ,eAAeM,KAAAA,IAAYd,MAAMQ,aAAaR,MAAMU,KAAKK,UAAAA,eAASf,MAAMU,KAAK,QAAA,QAAA,iBAAA,KAAA,IAAA,KAAA,IAAA,aAAIG,QAAQ;;GAExGG,IAAIH,OAAO;AACTV,SAAK,qBAAqBU,MAAM;;GAEnC,CAAC;EAEF,MAAMI,kBAAkBC,MAAoBC,QAAgB;AAC1Dd,UAAOQ,QAAQK,KAAKL;AACpBV,QAAK,UAAUe,KAAK;AACpBf,QAAK,oBAAoBgB,IAAI;;EAG/B,MAAMC,gBAAgB;GACpBC,SAAS,KAAKrB,MAAMsB,MAAM,SAAStB,MAAMuB,QAAQ;GACjDC,OAAOxB,MAAMsB;GACd;EAED,MAAMG,oBAAoBP,SAAuB;AAC/C,OAAIA,KAAKQ,cAAcpC,MAAM4B,KAAKQ,WAAW,CAC3C,QAAAhC,YAAA,QAAA,EAAA,SAAA,YAAA,EAAA;IAAAF,gBAAA,IAAA;IAAgC0B,KAAKQ,WAAWb;IAAKrB,gBAAA,IAAA;IAAA,CAAA;YAC5C,OAAO0B,KAAKQ,eAAe,WACpC,QAAAhC,YAAA,QAAA,EAAA,SAAA,YAAA,EAAA;IAAAF,gBAAA,IAAA;IAAgC0B,KAAKQ,YAAY;IAAAlC,gBAAA,IAAA;IAAA,CAAA;AAEnD,UAAO;;AAGT,eAAa;AACX,UAAAE,YAAA,OAAA,EAAA,SAAA,gCAAA,EAAA,CAAAA,YAAA,OAAA,EAAA,SAAA,mBAAA,EAAA,CAGOM,MAAMU,KAAKiB,KAAKT,MAAoBU,UAAkB;AACrD,WAAAlC,YAAAE,UAAA,MAAA,CAAAF,YAAA,OAAA;KAAA,SAGa0B;KAAa,SACb,oDACLF,KAAKL,UAAUR,OAAOQ,QAAQ,eAAe;KAC7C,iBACaI,eAAeC,MAAMU,MAAK;KAAC,EAAA,CAAAlC,YAAA,QAAA,MAAA,CAAAF,gBAAA,IAAA,EAElC0B,KAAKY,MAAK,CAAA,EACjBL,iBAAiBP,KAAK,CAAA,CAAA,CAAA,CAAA;KAI7B,CAAA,CAAA,EAAAxB,YAAA,OAAA,EAAA,SAAA,oCAAA,EAAA,CAE2CU,MAAM2B,SAAS3B,MAAM2B,OAAO,CAAA,CAAA,CAAA,CAAA;;;CAKpF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../src/tabs.scss';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import TareaTag from './src/tarea-tag.vue.js';
|
|
2
|
+
import type { SFCWithInstall } from '../../utils/index.js';
|
|
3
|
+
export declare const HdTareaTag: SFCWithInstall<typeof TareaTag>;
|
|
4
|
+
export default HdTareaTag;
|
|
5
|
+
export * from './src/tarea-tag.js';
|
|
6
|
+
export type { TareaTagInstance } from './src/instance.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { withInstall } from "../../utils/vue/install.mjs";
|
|
2
|
+
import { tareaTagEmits, tareaTagProps } from "./src/tarea-tag.mjs";
|
|
3
|
+
import tarea_tag_default from "./src/tarea-tag.vue.mjs";
|
|
4
|
+
//#region packages/components/tarea-tag/index.ts
|
|
5
|
+
var HdTareaTag = withInstall(tarea_tag_default);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { HdTareaTag, HdTareaTag as default, tareaTagEmits, tareaTagProps };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../packages/components/tarea-tag/index.ts"],"sourcesContent":["import { withInstall } from '@hd-custom/utils'\n\nimport TareaTag from './src/tarea-tag.vue'\nimport type { SFCWithInstall } from '@hd-custom/utils'\n\nexport const HdTareaTag: SFCWithInstall<typeof TareaTag> = withInstall(TareaTag)\nexport default HdTareaTag\n\nexport * from './src/tarea-tag'\nexport type { TareaTagInstance } from './src/instance'\n"],"mappings":";;;;AAKA,IAAa,aAA8C,YAAY,kBAAS"}
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
export declare const tareaTagProps: {
|
|
3
|
+
modelValue: import("../../../utils/index.js").EpPropFinalized<(ArrayConstructor | StringConstructor)[], unknown, unknown, () => never[], boolean>;
|
|
4
|
+
placeholder: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
5
|
+
regular: import("../../../utils/index.js").EpPropFinalized<(FunctionConstructor | RegExpConstructor)[], unknown, unknown, null, boolean>;
|
|
6
|
+
required: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
7
|
+
disabled: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
8
|
+
};
|
|
9
|
+
export declare const tareaTagEmits: string[];
|
|
10
|
+
export type TareaTagProps = ExtractPropTypes<typeof tareaTagProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { buildProps } from "../../../utils/vue/props/runtime.mjs";
|
|
2
|
+
//#region packages/components/tarea-tag/src/tarea-tag.ts
|
|
3
|
+
var tareaTagProps = buildProps({
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: [Array, String],
|
|
6
|
+
default: () => []
|
|
7
|
+
},
|
|
8
|
+
placeholder: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: ""
|
|
11
|
+
},
|
|
12
|
+
regular: {
|
|
13
|
+
type: [RegExp, Function],
|
|
14
|
+
default: null
|
|
15
|
+
},
|
|
16
|
+
required: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
disabled: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
var tareaTagEmits = ["update:modelValue", "on-updated"];
|
|
26
|
+
//#endregion
|
|
27
|
+
export { tareaTagEmits, tareaTagProps };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=tarea-tag.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tarea-tag.mjs","names":[],"sources":["../../../../../../packages/components/tarea-tag/src/tarea-tag.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { buildProps } from '@hd-custom/utils'\n\nexport const tareaTagProps = buildProps({\n modelValue: {\n type: [Array, String],\n default: () => [],\n },\n placeholder: {\n type: String,\n default: '',\n },\n regular: {\n type: [RegExp, Function],\n default: null,\n },\n required: {\n type: Boolean,\n default: false,\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n})\n\nexport const tareaTagEmits = ['update:modelValue', 'on-updated']\n\nexport type TareaTagProps = ExtractPropTypes<typeof tareaTagProps>\n"],"mappings":";;AAGA,IAAa,gBAAgB,WAAW;CACtC,YAAY;EACV,MAAM,CAAC,OAAO,OAAO;EACrB,eAAe,EAAE;EAClB;CACD,aAAa;EACX,MAAM;EACN,SAAS;EACV;CACD,SAAS;EACP,MAAM,CAAC,QAAQ,SAAS;EACxB,SAAS;EACV;CACD,UAAU;EACR,MAAM;EACN,SAAS;EACV;CACD,UAAU;EACR,MAAM;EACN,SAAS;EACV;CACF,CAAC;AAEF,IAAa,gBAAgB,CAAC,qBAAqB,aAAa"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
modelValue: import("../../../utils/index.js").EpPropFinalized<(ArrayConstructor | StringConstructor)[], unknown, unknown, () => never[], boolean>;
|
|
3
|
+
placeholder: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
4
|
+
regular: import("../../../utils/index.js").EpPropFinalized<(FunctionConstructor | RegExpConstructor)[], unknown, unknown, null, boolean>;
|
|
5
|
+
required: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
6
|
+
disabled: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
7
|
+
}>, {
|
|
8
|
+
validState: () => any;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
modelValue: import("../../../utils/index.js").EpPropFinalized<(ArrayConstructor | StringConstructor)[], unknown, unknown, () => never[], boolean>;
|
|
11
|
+
placeholder: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
12
|
+
regular: import("../../../utils/index.js").EpPropFinalized<(FunctionConstructor | RegExpConstructor)[], unknown, unknown, null, boolean>;
|
|
13
|
+
required: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
14
|
+
disabled: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
15
|
+
}>> & Readonly<{}>, {
|
|
16
|
+
required: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
17
|
+
disabled: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
18
|
+
modelValue: import("../../../utils/index.js").EpPropMergeType<(ArrayConstructor | StringConstructor)[], unknown, unknown>;
|
|
19
|
+
placeholder: string;
|
|
20
|
+
regular: import("../../../utils/index.js").EpPropMergeType<(FunctionConstructor | RegExpConstructor)[], unknown, unknown>;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import tarea_tag_vue_vue_type_script_setup_true_lang_default from "./tarea-tag.vue_vue_type_script_setup_true_lang.mjs";
|
|
2
|
+
//#region packages/components/tarea-tag/src/tarea-tag.vue
|
|
3
|
+
var tarea_tag_default = tarea_tag_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { tarea_tag_default as default };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=tarea-tag.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tarea-tag.vue.mjs","names":[],"sources":["../../../../../../packages/components/tarea-tag/src/tarea-tag.vue"],"sourcesContent":["<template>\n <div\n ref=\"editDiv\"\n class=\"hd-tarea-tag custom-edit-div\"\n :class=\"{ 'red-b': !valid, 'focus-border': isFocus && valid, 'event-none': disabled }\"\n @click=\"handleEditDClick\"\n >\n <ElTag\n v-for=\"(item, index) in tags\"\n :key=\"index\"\n :type=\"item.valid ? 'primary' : 'danger'\"\n :closable=\"!disabled\"\n @close=\"handleTagClose(index)\"\n >\n {{ item.text }}\n </ElTag>\n <ElInput\n v-if=\"tags.length\"\n ref=\"editInput\"\n v-model=\"inputText\"\n type=\"textarea\"\n :autosize=\"_autosize\"\n :disabled=\"disabled\"\n @blur=\"handleWBlur\"\n @focus=\"handleWFocus\"\n ></ElInput>\n <ElInput\n v-else\n ref=\"editInput\"\n v-model=\"inputText\"\n type=\"textarea\"\n :autosize=\"_autosize\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n @blur=\"handleWBlur\"\n @focus=\"handleWFocus\"\n ></ElInput>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { ref, computed } from 'vue'\nimport { ElTag, ElInput } from 'element-plus'\nimport { tareaTagProps, tareaTagEmits } from './tarea-tag'\nimport { List } from 'immutable'\n\ndefineOptions({\n name: 'TareaTag',\n})\n\nconst props = defineProps(tareaTagProps)\nconst emit = defineEmits(tareaTagEmits)\n\nconst editDiv = ref()\nconst editInput = ref()\nconst valid = ref(true)\nconst isFocus = ref(false)\nconst inputText = ref('')\nconst _autosize = computed(() => {\n return tags.value.length ? { minRows: 1 } : { minRows: 2 }\n})\n\nconst tags: any = computed({\n get() {\n const list = checkText(typeof props.modelValue === 'string' ? [props.modelValue] : props.modelValue)\n return list\n },\n set(value) {\n const _v = value.map((item: any) => item)\n emit('update:modelValue', _v.length ? _v.filter((item: string) => item) : '')\n emit('on-updated', _v)\n },\n})\n\nconst handleEditDClick = () => {\n editInput.value.focus()\n isFocus.value = true\n}\n\nconst handleTagClose = (idx: number) => {\n let _tags = List(tags.value).toJS()\n _tags.splice(idx, 1)\n tags.value = _tags.map((item: any) => item.text)\n setTimeout(() => {\n valided(tags.value)\n }, 0)\n}\n\nconst handleWBlur = () => {\n isFocus.value = false\n if (inputText.value || tags.value.length) {\n const formattedText = formatInputText()\n const oldValue = typeof props.modelValue === 'string' ? [props.modelValue] : props.modelValue\n tags.value = [...oldValue, ...formattedText.split(',')]\n } else if (props.required && !inputText.value) {\n valid.value = false\n } else {\n valid.value = true\n }\n setTimeout(() => {\n valided(tags.value)\n }, 0)\n}\n\nconst handleWFocus = () => {\n isFocus.value = true\n valid.value = true\n}\n\nconst formatInputText = () => {\n return inputText.value.replace(/[\\n\\r\\s,,]+/g, ',')\n}\n\nconst checkText = (value: any) => {\n inputText.value = ''\n // 用于验证文本项的函数\n const validateItem = (item: string) => {\n if (!item) return null\n const isValid =\n props.regular instanceof RegExp\n ? props.regular.test(item)\n : typeof props.regular === 'function'\n ? props.regular(item)\n : true\n return {\n text: item,\n valid: isValid,\n }\n }\n\n // 使用 map 来创建一个新数组,并过滤掉所�?null �?\n const newTags = value.map(validateItem).filter(Boolean)\n return [...newTags]\n}\n\nconst valided = (values: []) => {\n if (props.required && !values.length) {\n valid.value = false\n return\n }\n valid.value = values.every((item: any) => item.valid)\n}\n\nconst validState = () => {\n return valid.value\n}\n\ndefineExpose({ validState })\n</script>\n"],"mappings":""}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { tareaTagEmits, tareaTagProps } from "./tarea-tag.mjs";
|
|
2
|
+
import { Fragment, computed, createBlock, createElementBlock, createTextVNode, defineComponent, normalizeClass, openBlock, ref, renderList, toDisplayString, unref, withCtx } from "vue";
|
|
3
|
+
import { ElInput, ElTag } from "element-plus";
|
|
4
|
+
import { List } from "immutable";
|
|
5
|
+
//#region packages/components/tarea-tag/src/tarea-tag.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var tarea_tag_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "TareaTag",
|
|
8
|
+
__name: "tarea-tag",
|
|
9
|
+
props: tareaTagProps,
|
|
10
|
+
emits: tareaTagEmits,
|
|
11
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const emit = __emit;
|
|
14
|
+
const editDiv = ref();
|
|
15
|
+
const editInput = ref();
|
|
16
|
+
const valid = ref(true);
|
|
17
|
+
const isFocus = ref(false);
|
|
18
|
+
const inputText = ref("");
|
|
19
|
+
const _autosize = computed(() => {
|
|
20
|
+
return tags.value.length ? { minRows: 1 } : { minRows: 2 };
|
|
21
|
+
});
|
|
22
|
+
const tags = computed({
|
|
23
|
+
get() {
|
|
24
|
+
return checkText(typeof props.modelValue === "string" ? [props.modelValue] : props.modelValue);
|
|
25
|
+
},
|
|
26
|
+
set(value) {
|
|
27
|
+
const _v = value.map((item) => item);
|
|
28
|
+
emit("update:modelValue", _v.length ? _v.filter((item) => item) : "");
|
|
29
|
+
emit("on-updated", _v);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const handleEditDClick = () => {
|
|
33
|
+
editInput.value.focus();
|
|
34
|
+
isFocus.value = true;
|
|
35
|
+
};
|
|
36
|
+
const handleTagClose = (idx) => {
|
|
37
|
+
let _tags = List(tags.value).toJS();
|
|
38
|
+
_tags.splice(idx, 1);
|
|
39
|
+
tags.value = _tags.map((item) => item.text);
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
valided(tags.value);
|
|
42
|
+
}, 0);
|
|
43
|
+
};
|
|
44
|
+
const handleWBlur = () => {
|
|
45
|
+
isFocus.value = false;
|
|
46
|
+
if (inputText.value || tags.value.length) {
|
|
47
|
+
const formattedText = formatInputText();
|
|
48
|
+
tags.value = [...typeof props.modelValue === "string" ? [props.modelValue] : props.modelValue, ...formattedText.split(",")];
|
|
49
|
+
} else if (props.required && !inputText.value) valid.value = false;
|
|
50
|
+
else valid.value = true;
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
valided(tags.value);
|
|
53
|
+
}, 0);
|
|
54
|
+
};
|
|
55
|
+
const handleWFocus = () => {
|
|
56
|
+
isFocus.value = true;
|
|
57
|
+
valid.value = true;
|
|
58
|
+
};
|
|
59
|
+
const formatInputText = () => {
|
|
60
|
+
return inputText.value.replace(/[\n\r\s,,]+/g, ",");
|
|
61
|
+
};
|
|
62
|
+
const checkText = (value) => {
|
|
63
|
+
inputText.value = "";
|
|
64
|
+
const validateItem = (item) => {
|
|
65
|
+
if (!item) return null;
|
|
66
|
+
return {
|
|
67
|
+
text: item,
|
|
68
|
+
valid: props.regular instanceof RegExp ? props.regular.test(item) : typeof props.regular === "function" ? props.regular(item) : true
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
return [...value.map(validateItem).filter(Boolean)];
|
|
72
|
+
};
|
|
73
|
+
const valided = (values) => {
|
|
74
|
+
if (props.required && !values.length) {
|
|
75
|
+
valid.value = false;
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
valid.value = values.every((item) => item.valid);
|
|
79
|
+
};
|
|
80
|
+
const validState = () => {
|
|
81
|
+
return valid.value;
|
|
82
|
+
};
|
|
83
|
+
__expose({ validState });
|
|
84
|
+
return (_ctx, _cache) => {
|
|
85
|
+
return openBlock(), createElementBlock("div", {
|
|
86
|
+
ref_key: "editDiv",
|
|
87
|
+
ref: editDiv,
|
|
88
|
+
class: normalizeClass(["hd-tarea-tag custom-edit-div", {
|
|
89
|
+
"red-b": !valid.value,
|
|
90
|
+
"focus-border": isFocus.value && valid.value,
|
|
91
|
+
"event-none": _ctx.disabled
|
|
92
|
+
}]),
|
|
93
|
+
onClick: handleEditDClick
|
|
94
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(tags.value, (item, index) => {
|
|
95
|
+
return openBlock(), createBlock(unref(ElTag), {
|
|
96
|
+
key: index,
|
|
97
|
+
type: item.valid ? "primary" : "danger",
|
|
98
|
+
closable: !_ctx.disabled,
|
|
99
|
+
onClose: ($event) => handleTagClose(index)
|
|
100
|
+
}, {
|
|
101
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.text), 1)]),
|
|
102
|
+
_: 2
|
|
103
|
+
}, 1032, [
|
|
104
|
+
"type",
|
|
105
|
+
"closable",
|
|
106
|
+
"onClose"
|
|
107
|
+
]);
|
|
108
|
+
}), 128)), tags.value.length ? (openBlock(), createBlock(unref(ElInput), {
|
|
109
|
+
key: 0,
|
|
110
|
+
ref_key: "editInput",
|
|
111
|
+
ref: editInput,
|
|
112
|
+
modelValue: inputText.value,
|
|
113
|
+
"onUpdate:modelValue": ($event) => inputText.value = $event,
|
|
114
|
+
type: "textarea",
|
|
115
|
+
autosize: _autosize.value,
|
|
116
|
+
disabled: _ctx.disabled,
|
|
117
|
+
onBlur: handleWBlur,
|
|
118
|
+
onFocus: handleWFocus
|
|
119
|
+
}, null, 8, [
|
|
120
|
+
"modelValue",
|
|
121
|
+
"onUpdate:modelValue",
|
|
122
|
+
"autosize",
|
|
123
|
+
"disabled"
|
|
124
|
+
])) : (openBlock(), createBlock(unref(ElInput), {
|
|
125
|
+
key: 1,
|
|
126
|
+
ref_key: "editInput",
|
|
127
|
+
ref: editInput,
|
|
128
|
+
modelValue: inputText.value,
|
|
129
|
+
"onUpdate:modelValue": ($event) => inputText.value = $event,
|
|
130
|
+
type: "textarea",
|
|
131
|
+
autosize: _autosize.value,
|
|
132
|
+
disabled: _ctx.disabled,
|
|
133
|
+
placeholder: _ctx.placeholder,
|
|
134
|
+
onBlur: handleWBlur,
|
|
135
|
+
onFocus: handleWFocus
|
|
136
|
+
}, null, 8, [
|
|
137
|
+
"modelValue",
|
|
138
|
+
"onUpdate:modelValue",
|
|
139
|
+
"autosize",
|
|
140
|
+
"disabled",
|
|
141
|
+
"placeholder"
|
|
142
|
+
]))], 2);
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
//#endregion
|
|
147
|
+
export { tarea_tag_vue_vue_type_script_setup_true_lang_default as default };
|
|
148
|
+
|
|
149
|
+
//# sourceMappingURL=tarea-tag.vue_vue_type_script_setup_true_lang.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tarea-tag.vue_vue_type_script_setup_true_lang.mjs","names":["disabled","placeholder"],"sources":["../../../../../../packages/components/tarea-tag/src/tarea-tag.vue"],"sourcesContent":["<template>\n <div\n ref=\"editDiv\"\n class=\"hd-tarea-tag custom-edit-div\"\n :class=\"{ 'red-b': !valid, 'focus-border': isFocus && valid, 'event-none': disabled }\"\n @click=\"handleEditDClick\"\n >\n <ElTag\n v-for=\"(item, index) in tags\"\n :key=\"index\"\n :type=\"item.valid ? 'primary' : 'danger'\"\n :closable=\"!disabled\"\n @close=\"handleTagClose(index)\"\n >\n {{ item.text }}\n </ElTag>\n <ElInput\n v-if=\"tags.length\"\n ref=\"editInput\"\n v-model=\"inputText\"\n type=\"textarea\"\n :autosize=\"_autosize\"\n :disabled=\"disabled\"\n @blur=\"handleWBlur\"\n @focus=\"handleWFocus\"\n ></ElInput>\n <ElInput\n v-else\n ref=\"editInput\"\n v-model=\"inputText\"\n type=\"textarea\"\n :autosize=\"_autosize\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n @blur=\"handleWBlur\"\n @focus=\"handleWFocus\"\n ></ElInput>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { ref, computed } from 'vue'\nimport { ElTag, ElInput } from 'element-plus'\nimport { tareaTagProps, tareaTagEmits } from './tarea-tag'\nimport { List } from 'immutable'\n\ndefineOptions({\n name: 'TareaTag',\n})\n\nconst props = defineProps(tareaTagProps)\nconst emit = defineEmits(tareaTagEmits)\n\nconst editDiv = ref()\nconst editInput = ref()\nconst valid = ref(true)\nconst isFocus = ref(false)\nconst inputText = ref('')\nconst _autosize = computed(() => {\n return tags.value.length ? { minRows: 1 } : { minRows: 2 }\n})\n\nconst tags: any = computed({\n get() {\n const list = checkText(typeof props.modelValue === 'string' ? [props.modelValue] : props.modelValue)\n return list\n },\n set(value) {\n const _v = value.map((item: any) => item)\n emit('update:modelValue', _v.length ? _v.filter((item: string) => item) : '')\n emit('on-updated', _v)\n },\n})\n\nconst handleEditDClick = () => {\n editInput.value.focus()\n isFocus.value = true\n}\n\nconst handleTagClose = (idx: number) => {\n let _tags = List(tags.value).toJS()\n _tags.splice(idx, 1)\n tags.value = _tags.map((item: any) => item.text)\n setTimeout(() => {\n valided(tags.value)\n }, 0)\n}\n\nconst handleWBlur = () => {\n isFocus.value = false\n if (inputText.value || tags.value.length) {\n const formattedText = formatInputText()\n const oldValue = typeof props.modelValue === 'string' ? [props.modelValue] : props.modelValue\n tags.value = [...oldValue, ...formattedText.split(',')]\n } else if (props.required && !inputText.value) {\n valid.value = false\n } else {\n valid.value = true\n }\n setTimeout(() => {\n valided(tags.value)\n }, 0)\n}\n\nconst handleWFocus = () => {\n isFocus.value = true\n valid.value = true\n}\n\nconst formatInputText = () => {\n return inputText.value.replace(/[\\n\\r\\s,,]+/g, ',')\n}\n\nconst checkText = (value: any) => {\n inputText.value = ''\n // 用于验证文本项的函数\n const validateItem = (item: string) => {\n if (!item) return null\n const isValid =\n props.regular instanceof RegExp\n ? props.regular.test(item)\n : typeof props.regular === 'function'\n ? props.regular(item)\n : true\n return {\n text: item,\n valid: isValid,\n }\n }\n\n // 使用 map 来创建一个新数组,并过滤掉所�?null �?\n const newTags = value.map(validateItem).filter(Boolean)\n return [...newTags]\n}\n\nconst valided = (values: []) => {\n if (props.required && !values.length) {\n valid.value = false\n return\n }\n valid.value = values.every((item: any) => item.valid)\n}\n\nconst validState = () => {\n return valid.value\n}\n\ndefineExpose({ validState })\n</script>\n"],"mappings":";;;;;;;;;;;EAiDA,MAAM,QAAQ;EACd,MAAM,OAAO;EAEb,MAAM,UAAU,KAAI;EACpB,MAAM,YAAY,KAAI;EACtB,MAAM,QAAQ,IAAI,KAAI;EACtB,MAAM,UAAU,IAAI,MAAK;EACzB,MAAM,YAAY,IAAI,GAAE;EACxB,MAAM,YAAY,eAAe;AAC/B,UAAO,KAAK,MAAM,SAAS,EAAE,SAAS,GAAG,GAAG,EAAE,SAAS,GAAE;IAC1D;EAED,MAAM,OAAY,SAAS;GACzB,MAAM;AAEJ,WADa,UAAU,OAAO,MAAM,eAAe,WAAW,CAAC,MAAM,WAAW,GAAG,MAAM,WAClF;;GAET,IAAI,OAAO;IACT,MAAM,KAAK,MAAM,KAAK,SAAc,KAAI;AACxC,SAAK,qBAAqB,GAAG,SAAS,GAAG,QAAQ,SAAiB,KAAK,GAAG,GAAE;AAC5E,SAAK,cAAc,GAAE;;GAExB,CAAA;EAED,MAAM,yBAAyB;AAC7B,aAAU,MAAM,OAAM;AACtB,WAAQ,QAAQ;;EAGlB,MAAM,kBAAkB,QAAgB;GACtC,IAAI,QAAQ,KAAK,KAAK,MAAM,CAAC,MAAK;AAClC,SAAM,OAAO,KAAK,EAAC;AACnB,QAAK,QAAQ,MAAM,KAAK,SAAc,KAAK,KAAI;AAC/C,oBAAiB;AACf,YAAQ,KAAK,MAAK;MACjB,EAAC;;EAGN,MAAM,oBAAoB;AACxB,WAAQ,QAAQ;AAChB,OAAI,UAAU,SAAS,KAAK,MAAM,QAAQ;IACxC,MAAM,gBAAgB,iBAAgB;AAEtC,SAAK,QAAQ,CAAC,GADG,OAAO,MAAM,eAAe,WAAW,CAAC,MAAM,WAAW,GAAG,MAAM,YACxD,GAAG,cAAc,MAAM,IAAI,CAAA;cAC7C,MAAM,YAAY,CAAC,UAAU,MACtC,OAAM,QAAQ;OAEd,OAAM,QAAQ;AAEhB,oBAAiB;AACf,YAAQ,KAAK,MAAK;MACjB,EAAC;;EAGN,MAAM,qBAAqB;AACzB,WAAQ,QAAQ;AAChB,SAAM,QAAQ;;EAGhB,MAAM,wBAAwB;AAC5B,UAAO,UAAU,MAAM,QAAQ,gBAAgB,IAAG;;EAGpD,MAAM,aAAa,UAAe;AAChC,aAAU,QAAQ;GAElB,MAAM,gBAAgB,SAAiB;AACrC,QAAI,CAAC,KAAM,QAAO;AAOlB,WAAO;KACL,MAAM;KACN,OAPA,MAAM,mBAAmB,SACrB,MAAM,QAAQ,KAAK,KAAI,GACvB,OAAO,MAAM,YAAY,aACvB,MAAM,QAAQ,KAAI,GAClB;KAIR;;AAKF,UAAO,CAAC,GADQ,MAAM,IAAI,aAAa,CAAC,OAAO,QACpC,CAAO;;EAGpB,MAAM,WAAW,WAAe;AAC9B,OAAI,MAAM,YAAY,CAAC,OAAO,QAAQ;AACpC,UAAM,QAAQ;AACd;;AAEF,SAAM,QAAQ,OAAO,OAAO,SAAc,KAAK,MAAK;;EAGtD,MAAM,mBAAmB;AACvB,UAAO,MAAM;;AAGf,WAAa,EAAE,YAAY,CAAA;;uBAjJzB,mBAoCM,OAAA;aAnCA;IAAJ,KAAI;IACJ,OAAK,eAAA,CAAC,gCAA8B;KAAA,SAAA,CAChB,MAAA;KAAK,gBAAkB,QAAA,SAAW,MAAA;KAAK,cAAgBA,KAAAA;KAAQ,CAAA,CAAA;IAClF,SAAO;yBAER,mBAQQ,UAAA,MAAA,WAPkB,KAAA,QAAhB,MAAM,UAAK;wBADrB,YAQQ,MAAA,MAAA,EAAA;KANL,KAAK;KACL,MAAM,KAAK,QAAK,YAAA;KAChB,UAAQ,CAAGA,KAAAA;KACX,UAAK,WAAE,eAAe,MAAK;;4BAEb,CAAA,gBAAA,gBAAZ,KAAK,KAAI,EAAA,EAAA,CAAA,CAAA;;;;;;;cAGN,KAAA,MAAK,UAAA,WAAA,EADb,YASW,MAAA,QAAA,EAAA;;aAPL;IAAJ,KAAI;gBACK,UAAA;iDAAS,QAAA;IAClB,MAAK;IACJ,UAAU,UAAA;IACV,UAAUA,KAAAA;IACV,QAAM;IACN,SAAO;;;;;;uBAEV,YAUW,MAAA,QAAA,EAAA;;aARL;IAAJ,KAAI;gBACK,UAAA;iDAAS,QAAA;IAClB,MAAK;IACJ,UAAU,UAAA;IACV,UAAUA,KAAAA;IACV,aAAaC,KAAAA;IACb,QAAM;IACN,SAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../src/tarea-tag.scss';
|