@ljweb/layout-antdv-v4 0.0.0-stage → 0.1.0-beta.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/README.md +75 -2
- package/dist/style.css +9247 -0
- package/esm/_virtual/_plugin-vue_export-helper.js +11 -0
- package/esm/_virtual/_plugin-vue_export-helper.js.map +1 -0
- package/esm/assets/style.css +9247 -0
- package/esm/components/apple-window/AppleWindow.js +358 -0
- package/esm/components/apple-window/AppleWindow.js.map +1 -0
- package/esm/components/apple-window/AppleWindowHolder.js +55 -0
- package/esm/components/apple-window/AppleWindowHolder.js.map +1 -0
- package/esm/components/apple-window/command.js +11 -0
- package/esm/components/apple-window/command.js.map +1 -0
- package/esm/components/apple-window/helpers.js +19 -0
- package/esm/components/apple-window/helpers.js.map +1 -0
- package/esm/components/apple-window/index.js +10 -0
- package/esm/components/apple-window/index.js.map +1 -0
- package/esm/components/apple-window/index.module.less.js +48 -0
- package/esm/components/apple-window/index.module.less.js.map +1 -0
- package/esm/components/apple-window/layer.js +67 -0
- package/esm/components/apple-window/layer.js.map +1 -0
- package/esm/components/apple-window/records.js +45 -0
- package/esm/components/apple-window/records.js.map +1 -0
- package/esm/components/apple-window/types.js +2 -0
- package/esm/components/apple-window/types.js.map +1 -0
- package/esm/components/async-table/AsyncTable.js +290 -0
- package/esm/components/async-table/AsyncTable.js.map +1 -0
- package/esm/components/async-table/helpers.js +71 -0
- package/esm/components/async-table/helpers.js.map +1 -0
- package/esm/components/async-table/index.js +6 -0
- package/esm/components/async-table/index.js.map +1 -0
- package/esm/components/async-table/style.js +2 -0
- package/esm/components/async-table/style.js.map +1 -0
- package/esm/components/async-table/types.js +2 -0
- package/esm/components/async-table/types.js.map +1 -0
- package/esm/components/avatar-dropdown/AvatarDropdown.js +163 -0
- package/esm/components/avatar-dropdown/AvatarDropdown.js.map +1 -0
- package/esm/components/avatar-dropdown/index.js +12 -0
- package/esm/components/avatar-dropdown/index.js.map +1 -0
- package/esm/components/avatar-dropdown/style.js +2 -0
- package/esm/components/avatar-dropdown/style.js.map +1 -0
- package/esm/components/breadcrumb/Breadcrumb.js +112 -0
- package/esm/components/breadcrumb/Breadcrumb.js.map +1 -0
- package/esm/components/breadcrumb/index.js +10 -0
- package/esm/components/breadcrumb/index.js.map +1 -0
- package/esm/components/breadcrumb/style.js +3 -0
- package/esm/components/breadcrumb/style.js.map +1 -0
- package/esm/components/color-input/ColorInput.js +180 -0
- package/esm/components/color-input/ColorInput.js.map +1 -0
- package/esm/components/color-input/helpers.js +17 -0
- package/esm/components/color-input/helpers.js.map +1 -0
- package/esm/components/color-input/index.js +6 -0
- package/esm/components/color-input/index.js.map +1 -0
- package/esm/components/color-input/style.js +2 -0
- package/esm/components/color-input/style.js.map +1 -0
- package/esm/components/config-provider/ConfigProvider.js +105 -0
- package/esm/components/config-provider/ConfigProvider.js.map +1 -0
- package/esm/components/config-provider/index.js +6 -0
- package/esm/components/config-provider/index.js.map +1 -0
- package/esm/components/ext-button/ExtButton.vue.js +57 -0
- package/esm/components/ext-button/ExtButton.vue.js.map +1 -0
- package/esm/components/ext-button/ExtButton2.vue.js +5 -0
- package/esm/components/ext-button/ExtButton2.vue.js.map +1 -0
- package/esm/components/ext-button/color-map.js +49 -0
- package/esm/components/ext-button/color-map.js.map +1 -0
- package/esm/components/ext-button/index.js +12 -0
- package/esm/components/ext-button/index.js.map +1 -0
- package/esm/components/ext-table/ColumnSetting.vue.js +8 -0
- package/esm/components/ext-table/ColumnSetting.vue.js.map +1 -0
- package/esm/components/ext-table/ColumnSetting2.vue.js +277 -0
- package/esm/components/ext-table/ColumnSetting2.vue.js.map +1 -0
- package/esm/components/ext-table/ExtTable.vue.js +8 -0
- package/esm/components/ext-table/ExtTable.vue.js.map +1 -0
- package/esm/components/ext-table/ExtTable2.vue.js +1781 -0
- package/esm/components/ext-table/ExtTable2.vue.js.map +1 -0
- package/esm/components/ext-table/Operations.vue.js +8 -0
- package/esm/components/ext-table/Operations.vue.js.map +1 -0
- package/esm/components/ext-table/Operations2.vue.js +447 -0
- package/esm/components/ext-table/Operations2.vue.js.map +1 -0
- package/esm/components/ext-table/Status.vue.js +51 -0
- package/esm/components/ext-table/Status.vue.js.map +1 -0
- package/esm/components/ext-table/Status2.vue.js +5 -0
- package/esm/components/ext-table/Status2.vue.js.map +1 -0
- package/esm/components/ext-table/helpers.js +108 -0
- package/esm/components/ext-table/helpers.js.map +1 -0
- package/esm/components/ext-table/index.js +16 -0
- package/esm/components/ext-table/index.js.map +1 -0
- package/esm/components/ext-table/storage.js +54 -0
- package/esm/components/ext-table/storage.js.map +1 -0
- package/esm/components/ext-table/style.js +2 -0
- package/esm/components/ext-table/style.js.map +1 -0
- package/esm/components/ext-table/types.js +2 -0
- package/esm/components/ext-table/types.js.map +1 -0
- package/esm/components/ext-table/useColumnSetting.js +88 -0
- package/esm/components/ext-table/useColumnSetting.js.map +1 -0
- package/esm/components/ext-upload/ExtUpload.vue.js +8 -0
- package/esm/components/ext-upload/ExtUpload.vue.js.map +1 -0
- package/esm/components/ext-upload/ExtUpload2.vue.js +173 -0
- package/esm/components/ext-upload/ExtUpload2.vue.js.map +1 -0
- package/esm/components/ext-upload/helpers.js +129 -0
- package/esm/components/ext-upload/helpers.js.map +1 -0
- package/esm/components/ext-upload/images/excel.png.js +5 -0
- package/esm/components/ext-upload/images/excel.png.js.map +1 -0
- package/esm/components/ext-upload/images/pdf.png.js +5 -0
- package/esm/components/ext-upload/images/pdf.png.js.map +1 -0
- package/esm/components/ext-upload/images/video.png.js +5 -0
- package/esm/components/ext-upload/images/video.png.js.map +1 -0
- package/esm/components/ext-upload/images/word.png.js +5 -0
- package/esm/components/ext-upload/images/word.png.js.map +1 -0
- package/esm/components/ext-upload/index.js +12 -0
- package/esm/components/ext-upload/index.js.map +1 -0
- package/esm/components/ext-upload/types.js +12 -0
- package/esm/components/ext-upload/types.js.map +1 -0
- package/esm/components/format-value/CustomerLevel.vue.js +48 -0
- package/esm/components/format-value/CustomerLevel.vue.js.map +1 -0
- package/esm/components/format-value/CustomerLevel2.vue.js +5 -0
- package/esm/components/format-value/CustomerLevel2.vue.js.map +1 -0
- package/esm/components/format-value/Date.vue.js +25 -0
- package/esm/components/format-value/Date.vue.js.map +1 -0
- package/esm/components/format-value/Date2.vue.js +5 -0
- package/esm/components/format-value/Date2.vue.js.map +1 -0
- package/esm/components/format-value/Gender.vue.js +48 -0
- package/esm/components/format-value/Gender.vue.js.map +1 -0
- package/esm/components/format-value/Gender2.vue.js +5 -0
- package/esm/components/format-value/Gender2.vue.js.map +1 -0
- package/esm/components/format-value/LongString.vue.js +8 -0
- package/esm/components/format-value/LongString.vue.js.map +1 -0
- package/esm/components/format-value/LongString2.vue.js +100 -0
- package/esm/components/format-value/LongString2.vue.js.map +1 -0
- package/esm/components/format-value/Period.vue.js +24 -0
- package/esm/components/format-value/Period.vue.js.map +1 -0
- package/esm/components/format-value/Period2.vue.js +5 -0
- package/esm/components/format-value/Period2.vue.js.map +1 -0
- package/esm/components/format-value/index.js +13 -0
- package/esm/components/format-value/index.js.map +1 -0
- package/esm/components/index.js +93 -0
- package/esm/components/index.js.map +1 -0
- package/esm/components/json-editor/JsonEditor.js +61 -0
- package/esm/components/json-editor/JsonEditor.js.map +1 -0
- package/esm/components/json-editor/index.js +6 -0
- package/esm/components/json-editor/index.js.map +1 -0
- package/esm/components/layout-admin/BreadcrumbContainer.js +125 -0
- package/esm/components/layout-admin/BreadcrumbContainer.js.map +1 -0
- package/esm/components/layout-admin/LayoutAdmin.js +675 -0
- package/esm/components/layout-admin/LayoutAdmin.js.map +1 -0
- package/esm/components/layout-admin/index.js +34 -0
- package/esm/components/layout-admin/index.js.map +1 -0
- package/esm/components/layout-admin/multi-tab.js +219 -0
- package/esm/components/layout-admin/multi-tab.js.map +1 -0
- package/esm/components/layout-admin/style.js +3 -0
- package/esm/components/layout-admin/style.js.map +1 -0
- package/esm/components/locale-dropdown/LocaleDropdown.js +109 -0
- package/esm/components/locale-dropdown/LocaleDropdown.js.map +1 -0
- package/esm/components/locale-dropdown/index.js +10 -0
- package/esm/components/locale-dropdown/index.js.map +1 -0
- package/esm/components/locale-dropdown/style.js +2 -0
- package/esm/components/locale-dropdown/style.js.map +1 -0
- package/esm/components/mixins/index.js +14 -0
- package/esm/components/mixins/index.js.map +1 -0
- package/esm/components/mixins/layout.js +178 -0
- package/esm/components/mixins/layout.js.map +1 -0
- package/esm/components/scrollbar-table/ScrollbarTable.vue.js +8 -0
- package/esm/components/scrollbar-table/ScrollbarTable.vue.js.map +1 -0
- package/esm/components/scrollbar-table/ScrollbarTable2.vue.js +250 -0
- package/esm/components/scrollbar-table/ScrollbarTable2.vue.js.map +1 -0
- package/esm/components/scrollbar-table/helpers.js +17 -0
- package/esm/components/scrollbar-table/helpers.js.map +1 -0
- package/esm/components/scrollbar-table/index.js +6 -0
- package/esm/components/scrollbar-table/index.js.map +1 -0
- package/esm/components/scrollbar-table/types.js +2 -0
- package/esm/components/scrollbar-table/types.js.map +1 -0
- package/esm/components/search-form/SearchForm.vue.js +137 -0
- package/esm/components/search-form/SearchForm.vue.js.map +1 -0
- package/esm/components/search-form/SearchForm2.vue.js +5 -0
- package/esm/components/search-form/SearchForm2.vue.js.map +1 -0
- package/esm/components/search-form/index.js +6 -0
- package/esm/components/search-form/index.js.map +1 -0
- package/esm/components/setting-drawer/SettingDrawer.js +105 -0
- package/esm/components/setting-drawer/SettingDrawer.js.map +1 -0
- package/esm/components/setting-drawer/index.js +6 -0
- package/esm/components/setting-drawer/index.js.map +1 -0
- package/esm/components/splitter-pane/SplitterPane.vue.js +8 -0
- package/esm/components/splitter-pane/SplitterPane.vue.js.map +1 -0
- package/esm/components/splitter-pane/SplitterPane2.vue.js +271 -0
- package/esm/components/splitter-pane/SplitterPane2.vue.js.map +1 -0
- package/esm/components/splitter-pane/helpers.js +38 -0
- package/esm/components/splitter-pane/helpers.js.map +1 -0
- package/esm/components/splitter-pane/index.js +5 -0
- package/esm/components/splitter-pane/index.js.map +1 -0
- package/esm/components/splitter-pane/types.js +2 -0
- package/esm/components/splitter-pane/types.js.map +1 -0
- package/esm/components/utils/index.js +12 -0
- package/esm/components/utils/index.js.map +1 -0
- package/esm/components/utils/menu.js +131 -0
- package/esm/components/utils/menu.js.map +1 -0
- package/esm/components/utils/util.js +11 -0
- package/esm/components/utils/util.js.map +1 -0
- package/esm/components/variable-input/VariableInput.vue.js +8 -0
- package/esm/components/variable-input/VariableInput.vue.js.map +1 -0
- package/esm/components/variable-input/VariableInput2.vue.js +461 -0
- package/esm/components/variable-input/VariableInput2.vue.js.map +1 -0
- package/esm/components/variable-input/helpers.js +103 -0
- package/esm/components/variable-input/helpers.js.map +1 -0
- package/esm/components/variable-input/index.js +6 -0
- package/esm/components/variable-input/index.js.map +1 -0
- package/esm/components/variable-input/types.js +2 -0
- package/esm/components/variable-input/types.js.map +1 -0
- package/esm/context/i18n.js +13 -0
- package/esm/context/i18n.js.map +1 -0
- package/esm/context/index.js +20 -0
- package/esm/context/index.js.map +1 -0
- package/esm/context/multi-tab-cache.js +22 -0
- package/esm/context/multi-tab-cache.js.map +1 -0
- package/esm/context/theme.js +31 -0
- package/esm/context/theme.js.map +1 -0
- package/esm/context/useEffect.js +26 -0
- package/esm/context/useEffect.js.map +1 -0
- package/esm/index.js +145 -0
- package/esm/index.js.map +1 -0
- package/esm/package.json +1 -0
- package/esm/shared/expose.js +10 -0
- package/esm/shared/expose.js.map +1 -0
- package/esm/shared/index.js +11 -0
- package/esm/shared/index.js.map +1 -0
- package/esm/shared/useConfigProvider.js +17 -0
- package/esm/shared/useConfigProvider.js.map +1 -0
- package/esm/style.js +2 -0
- package/esm/style.js.map +1 -0
- package/esm/styles/index.js +2 -0
- package/esm/styles/index.js.map +1 -0
- package/esm/styles/variables.less.js +2 -0
- package/esm/styles/variables.less.js.map +1 -0
- package/esm/types.js +30 -0
- package/esm/types.js.map +1 -0
- package/esm/utils/download.js +17 -0
- package/esm/utils/download.js.map +1 -0
- package/esm/utils/format.js +50 -0
- package/esm/utils/format.js.map +1 -0
- package/esm/utils/index.js +18 -0
- package/esm/utils/index.js.map +1 -0
- package/esm/utils/size.js +12 -0
- package/esm/utils/size.js.map +1 -0
- package/esm/utils/upload.js +11 -0
- package/esm/utils/upload.js.map +1 -0
- package/lib/_virtual/_plugin-vue_export-helper.js +11 -0
- package/lib/_virtual/_plugin-vue_export-helper.js.map +1 -0
- package/lib/assets/style.css +9247 -0
- package/lib/components/apple-window/AppleWindow.js +358 -0
- package/lib/components/apple-window/AppleWindow.js.map +1 -0
- package/lib/components/apple-window/AppleWindowHolder.js +55 -0
- package/lib/components/apple-window/AppleWindowHolder.js.map +1 -0
- package/lib/components/apple-window/command.js +11 -0
- package/lib/components/apple-window/command.js.map +1 -0
- package/lib/components/apple-window/helpers.js +19 -0
- package/lib/components/apple-window/helpers.js.map +1 -0
- package/lib/components/apple-window/index.js +10 -0
- package/lib/components/apple-window/index.js.map +1 -0
- package/lib/components/apple-window/index.module.less.js +48 -0
- package/lib/components/apple-window/index.module.less.js.map +1 -0
- package/lib/components/apple-window/layer.js +67 -0
- package/lib/components/apple-window/layer.js.map +1 -0
- package/lib/components/apple-window/records.js +45 -0
- package/lib/components/apple-window/records.js.map +1 -0
- package/lib/components/apple-window/types.js +2 -0
- package/lib/components/apple-window/types.js.map +1 -0
- package/lib/components/async-table/AsyncTable.js +290 -0
- package/lib/components/async-table/AsyncTable.js.map +1 -0
- package/lib/components/async-table/helpers.js +71 -0
- package/lib/components/async-table/helpers.js.map +1 -0
- package/lib/components/async-table/index.js +6 -0
- package/lib/components/async-table/index.js.map +1 -0
- package/lib/components/async-table/style.js +3 -0
- package/lib/components/async-table/style.js.map +1 -0
- package/lib/components/async-table/types.js +2 -0
- package/lib/components/async-table/types.js.map +1 -0
- package/lib/components/avatar-dropdown/AvatarDropdown.js +165 -0
- package/lib/components/avatar-dropdown/AvatarDropdown.js.map +1 -0
- package/lib/components/avatar-dropdown/index.js +11 -0
- package/lib/components/avatar-dropdown/index.js.map +1 -0
- package/lib/components/avatar-dropdown/style.js +3 -0
- package/lib/components/avatar-dropdown/style.js.map +1 -0
- package/lib/components/breadcrumb/Breadcrumb.js +112 -0
- package/lib/components/breadcrumb/Breadcrumb.js.map +1 -0
- package/lib/components/breadcrumb/index.js +10 -0
- package/lib/components/breadcrumb/index.js.map +1 -0
- package/lib/components/breadcrumb/style.js +4 -0
- package/lib/components/breadcrumb/style.js.map +1 -0
- package/lib/components/color-input/ColorInput.js +182 -0
- package/lib/components/color-input/ColorInput.js.map +1 -0
- package/lib/components/color-input/helpers.js +19 -0
- package/lib/components/color-input/helpers.js.map +1 -0
- package/lib/components/color-input/index.js +6 -0
- package/lib/components/color-input/index.js.map +1 -0
- package/lib/components/color-input/style.js +3 -0
- package/lib/components/color-input/style.js.map +1 -0
- package/lib/components/config-provider/ConfigProvider.js +105 -0
- package/lib/components/config-provider/ConfigProvider.js.map +1 -0
- package/lib/components/config-provider/index.js +6 -0
- package/lib/components/config-provider/index.js.map +1 -0
- package/lib/components/ext-button/ExtButton.vue.js +57 -0
- package/lib/components/ext-button/ExtButton.vue.js.map +1 -0
- package/lib/components/ext-button/ExtButton2.vue.js +5 -0
- package/lib/components/ext-button/ExtButton2.vue.js.map +1 -0
- package/lib/components/ext-button/color-map.js +49 -0
- package/lib/components/ext-button/color-map.js.map +1 -0
- package/lib/components/ext-button/index.js +12 -0
- package/lib/components/ext-button/index.js.map +1 -0
- package/lib/components/ext-table/ColumnSetting.vue.js +8 -0
- package/lib/components/ext-table/ColumnSetting.vue.js.map +1 -0
- package/lib/components/ext-table/ColumnSetting2.vue.js +279 -0
- package/lib/components/ext-table/ColumnSetting2.vue.js.map +1 -0
- package/lib/components/ext-table/ExtTable.vue.js +8 -0
- package/lib/components/ext-table/ExtTable.vue.js.map +1 -0
- package/lib/components/ext-table/ExtTable2.vue.js +1784 -0
- package/lib/components/ext-table/ExtTable2.vue.js.map +1 -0
- package/lib/components/ext-table/Operations.vue.js +8 -0
- package/lib/components/ext-table/Operations.vue.js.map +1 -0
- package/lib/components/ext-table/Operations2.vue.js +447 -0
- package/lib/components/ext-table/Operations2.vue.js.map +1 -0
- package/lib/components/ext-table/Status.vue.js +51 -0
- package/lib/components/ext-table/Status.vue.js.map +1 -0
- package/lib/components/ext-table/Status2.vue.js +5 -0
- package/lib/components/ext-table/Status2.vue.js.map +1 -0
- package/lib/components/ext-table/helpers.js +108 -0
- package/lib/components/ext-table/helpers.js.map +1 -0
- package/lib/components/ext-table/index.js +16 -0
- package/lib/components/ext-table/index.js.map +1 -0
- package/lib/components/ext-table/storage.js +54 -0
- package/lib/components/ext-table/storage.js.map +1 -0
- package/lib/components/ext-table/style.js +3 -0
- package/lib/components/ext-table/style.js.map +1 -0
- package/lib/components/ext-table/types.js +2 -0
- package/lib/components/ext-table/types.js.map +1 -0
- package/lib/components/ext-table/useColumnSetting.js +88 -0
- package/lib/components/ext-table/useColumnSetting.js.map +1 -0
- package/lib/components/ext-upload/ExtUpload.vue.js +8 -0
- package/lib/components/ext-upload/ExtUpload.vue.js.map +1 -0
- package/lib/components/ext-upload/ExtUpload2.vue.js +173 -0
- package/lib/components/ext-upload/ExtUpload2.vue.js.map +1 -0
- package/lib/components/ext-upload/helpers.js +129 -0
- package/lib/components/ext-upload/helpers.js.map +1 -0
- package/lib/components/ext-upload/images/excel.png.js +5 -0
- package/lib/components/ext-upload/images/excel.png.js.map +1 -0
- package/lib/components/ext-upload/images/pdf.png.js +5 -0
- package/lib/components/ext-upload/images/pdf.png.js.map +1 -0
- package/lib/components/ext-upload/images/video.png.js +5 -0
- package/lib/components/ext-upload/images/video.png.js.map +1 -0
- package/lib/components/ext-upload/images/word.png.js +5 -0
- package/lib/components/ext-upload/images/word.png.js.map +1 -0
- package/lib/components/ext-upload/index.js +12 -0
- package/lib/components/ext-upload/index.js.map +1 -0
- package/lib/components/ext-upload/types.js +12 -0
- package/lib/components/ext-upload/types.js.map +1 -0
- package/lib/components/format-value/CustomerLevel.vue.js +48 -0
- package/lib/components/format-value/CustomerLevel.vue.js.map +1 -0
- package/lib/components/format-value/CustomerLevel2.vue.js +5 -0
- package/lib/components/format-value/CustomerLevel2.vue.js.map +1 -0
- package/lib/components/format-value/Date.vue.js +27 -0
- package/lib/components/format-value/Date.vue.js.map +1 -0
- package/lib/components/format-value/Date2.vue.js +5 -0
- package/lib/components/format-value/Date2.vue.js.map +1 -0
- package/lib/components/format-value/Gender.vue.js +48 -0
- package/lib/components/format-value/Gender.vue.js.map +1 -0
- package/lib/components/format-value/Gender2.vue.js +5 -0
- package/lib/components/format-value/Gender2.vue.js.map +1 -0
- package/lib/components/format-value/LongString.vue.js +8 -0
- package/lib/components/format-value/LongString.vue.js.map +1 -0
- package/lib/components/format-value/LongString2.vue.js +100 -0
- package/lib/components/format-value/LongString2.vue.js.map +1 -0
- package/lib/components/format-value/Period.vue.js +26 -0
- package/lib/components/format-value/Period.vue.js.map +1 -0
- package/lib/components/format-value/Period2.vue.js +5 -0
- package/lib/components/format-value/Period2.vue.js.map +1 -0
- package/lib/components/format-value/index.js +13 -0
- package/lib/components/format-value/index.js.map +1 -0
- package/lib/components/index.js +93 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/json-editor/JsonEditor.js +63 -0
- package/lib/components/json-editor/JsonEditor.js.map +1 -0
- package/lib/components/json-editor/index.js +6 -0
- package/lib/components/json-editor/index.js.map +1 -0
- package/lib/components/layout-admin/BreadcrumbContainer.js +125 -0
- package/lib/components/layout-admin/BreadcrumbContainer.js.map +1 -0
- package/lib/components/layout-admin/LayoutAdmin.js +678 -0
- package/lib/components/layout-admin/LayoutAdmin.js.map +1 -0
- package/lib/components/layout-admin/index.js +34 -0
- package/lib/components/layout-admin/index.js.map +1 -0
- package/lib/components/layout-admin/multi-tab.js +219 -0
- package/lib/components/layout-admin/multi-tab.js.map +1 -0
- package/lib/components/layout-admin/style.js +4 -0
- package/lib/components/layout-admin/style.js.map +1 -0
- package/lib/components/locale-dropdown/LocaleDropdown.js +112 -0
- package/lib/components/locale-dropdown/LocaleDropdown.js.map +1 -0
- package/lib/components/locale-dropdown/index.js +10 -0
- package/lib/components/locale-dropdown/index.js.map +1 -0
- package/lib/components/locale-dropdown/style.js +3 -0
- package/lib/components/locale-dropdown/style.js.map +1 -0
- package/lib/components/mixins/index.js +14 -0
- package/lib/components/mixins/index.js.map +1 -0
- package/lib/components/mixins/layout.js +178 -0
- package/lib/components/mixins/layout.js.map +1 -0
- package/lib/components/scrollbar-table/ScrollbarTable.vue.js +8 -0
- package/lib/components/scrollbar-table/ScrollbarTable.vue.js.map +1 -0
- package/lib/components/scrollbar-table/ScrollbarTable2.vue.js +250 -0
- package/lib/components/scrollbar-table/ScrollbarTable2.vue.js.map +1 -0
- package/lib/components/scrollbar-table/helpers.js +17 -0
- package/lib/components/scrollbar-table/helpers.js.map +1 -0
- package/lib/components/scrollbar-table/index.js +6 -0
- package/lib/components/scrollbar-table/index.js.map +1 -0
- package/lib/components/scrollbar-table/types.js +2 -0
- package/lib/components/scrollbar-table/types.js.map +1 -0
- package/lib/components/search-form/SearchForm.vue.js +137 -0
- package/lib/components/search-form/SearchForm.vue.js.map +1 -0
- package/lib/components/search-form/SearchForm2.vue.js +5 -0
- package/lib/components/search-form/SearchForm2.vue.js.map +1 -0
- package/lib/components/search-form/index.js +6 -0
- package/lib/components/search-form/index.js.map +1 -0
- package/lib/components/setting-drawer/SettingDrawer.js +105 -0
- package/lib/components/setting-drawer/SettingDrawer.js.map +1 -0
- package/lib/components/setting-drawer/index.js +6 -0
- package/lib/components/setting-drawer/index.js.map +1 -0
- package/lib/components/splitter-pane/SplitterPane.vue.js +8 -0
- package/lib/components/splitter-pane/SplitterPane.vue.js.map +1 -0
- package/lib/components/splitter-pane/SplitterPane2.vue.js +271 -0
- package/lib/components/splitter-pane/SplitterPane2.vue.js.map +1 -0
- package/lib/components/splitter-pane/helpers.js +38 -0
- package/lib/components/splitter-pane/helpers.js.map +1 -0
- package/lib/components/splitter-pane/index.js +5 -0
- package/lib/components/splitter-pane/index.js.map +1 -0
- package/lib/components/splitter-pane/types.js +2 -0
- package/lib/components/splitter-pane/types.js.map +1 -0
- package/lib/components/utils/index.js +12 -0
- package/lib/components/utils/index.js.map +1 -0
- package/lib/components/utils/menu.js +131 -0
- package/lib/components/utils/menu.js.map +1 -0
- package/lib/components/utils/util.js +11 -0
- package/lib/components/utils/util.js.map +1 -0
- package/lib/components/variable-input/VariableInput.vue.js +8 -0
- package/lib/components/variable-input/VariableInput.vue.js.map +1 -0
- package/lib/components/variable-input/VariableInput2.vue.js +461 -0
- package/lib/components/variable-input/VariableInput2.vue.js.map +1 -0
- package/lib/components/variable-input/helpers.js +103 -0
- package/lib/components/variable-input/helpers.js.map +1 -0
- package/lib/components/variable-input/index.js +6 -0
- package/lib/components/variable-input/index.js.map +1 -0
- package/lib/components/variable-input/types.js +2 -0
- package/lib/components/variable-input/types.js.map +1 -0
- package/lib/context/i18n.js +13 -0
- package/lib/context/i18n.js.map +1 -0
- package/lib/context/index.js +20 -0
- package/lib/context/index.js.map +1 -0
- package/lib/context/multi-tab-cache.js +22 -0
- package/lib/context/multi-tab-cache.js.map +1 -0
- package/lib/context/theme.js +31 -0
- package/lib/context/theme.js.map +1 -0
- package/lib/context/useEffect.js +26 -0
- package/lib/context/useEffect.js.map +1 -0
- package/lib/index.js +145 -0
- package/lib/index.js.map +1 -0
- package/lib/shared/expose.js +10 -0
- package/lib/shared/expose.js.map +1 -0
- package/lib/shared/index.js +11 -0
- package/lib/shared/index.js.map +1 -0
- package/lib/shared/useConfigProvider.js +17 -0
- package/lib/shared/useConfigProvider.js.map +1 -0
- package/lib/style.js +3 -0
- package/lib/style.js.map +1 -0
- package/lib/styles/index.js +3 -0
- package/lib/styles/index.js.map +1 -0
- package/lib/styles/variables.less.js +2 -0
- package/lib/styles/variables.less.js.map +1 -0
- package/lib/types.js +30 -0
- package/lib/types.js.map +1 -0
- package/lib/utils/download.js +17 -0
- package/lib/utils/download.js.map +1 -0
- package/lib/utils/format.js +52 -0
- package/lib/utils/format.js.map +1 -0
- package/lib/utils/index.js +18 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/size.js +12 -0
- package/lib/utils/size.js.map +1 -0
- package/lib/utils/upload.js +11 -0
- package/lib/utils/upload.js.map +1 -0
- package/package.json +249 -4
- package/src/components/apple-window/index.module.less +167 -0
- package/src/components/avatar-dropdown/style.less +57 -0
- package/src/components/color-input/style.less +86 -0
- package/src/components/ext-button/style.less +144 -0
- package/src/components/ext-table/README.md +306 -0
- package/src/components/ext-table/style.less +51 -0
- package/src/components/ext-upload/README.md +29 -0
- package/src/components/layout-admin/style.less +537 -0
- package/src/components/locale-dropdown/style.less +29 -0
- package/src/styles/color/bezierEasing.less +110 -0
- package/src/styles/color/colorPalette.less +75 -0
- package/src/styles/color/tinyColor.less +1184 -0
- package/src/styles/component-reset.less +25 -0
- package/src/styles/core/1px.less +65 -0
- package/src/styles/core/colors.less +260 -0
- package/src/styles/core/globals.less +277 -0
- package/src/styles/core/index.less +4 -0
- package/src/styles/dark.less +12 -0
- package/src/styles/default.less +3 -0
- package/src/styles/index.less +14 -0
- package/src/styles/mixins/font-size.less +16 -0
- package/src/styles/mixins/index.less +8 -0
- package/src/styles/mixins/set-arrow.less +40 -0
- package/src/styles/mixins/set-color.less +243 -0
- package/src/styles/mixins/set-onepx.less +72 -0
- package/src/styles/mixins/text-overflow.less +17 -0
- package/src/styles/themes/dark.less +208 -0
- package/src/styles/themes/default.less +278 -0
- package/src/styles/themes/index.less +6 -0
- package/src/styles/variables.less +32 -0
- package/types/components/apple-window/AppleWindow.d.ts +105 -0
- package/types/components/apple-window/AppleWindowHolder.d.ts +14 -0
- package/types/components/apple-window/command.d.ts +7 -0
- package/types/components/apple-window/helpers.d.ts +4 -0
- package/types/components/apple-window/index.d.ts +6 -0
- package/types/components/apple-window/layer.d.ts +20 -0
- package/types/components/apple-window/records.d.ts +15 -0
- package/types/components/apple-window/types.d.ts +41 -0
- package/types/components/async-table/AsyncTable.d.ts +413 -0
- package/types/components/async-table/helpers.d.ts +18 -0
- package/types/components/async-table/index.d.ts +2 -0
- package/types/components/async-table/style.d.ts +1 -0
- package/types/components/async-table/types.d.ts +50 -0
- package/types/components/avatar-dropdown/AvatarDropdown.d.ts +205 -0
- package/types/components/avatar-dropdown/index.d.ts +4 -0
- package/types/components/avatar-dropdown/style.d.ts +1 -0
- package/types/components/breadcrumb/Breadcrumb.d.ts +60 -0
- package/types/components/breadcrumb/index.d.ts +4 -0
- package/types/components/breadcrumb/style.d.ts +2 -0
- package/types/components/color-input/ColorInput.d.ts +191 -0
- package/types/components/color-input/helpers.d.ts +9 -0
- package/types/components/color-input/index.d.ts +2 -0
- package/types/components/color-input/style.d.ts +1 -0
- package/types/components/config-provider/ConfigProvider.d.ts +287 -0
- package/types/components/config-provider/index.d.ts +4 -0
- package/types/components/ext-button/ExtButton.vue.d.ts +41 -0
- package/types/components/ext-button/color-map.d.ts +56 -0
- package/types/components/ext-button/index.d.ts +5 -0
- package/types/components/ext-table/ColumnSetting.vue.d.ts +34 -0
- package/types/components/ext-table/ExtTable.vue.d.ts +158 -0
- package/types/components/ext-table/Operations.vue.d.ts +52 -0
- package/types/components/ext-table/Status.vue.d.ts +19 -0
- package/types/components/ext-table/helpers.d.ts +30 -0
- package/types/components/ext-table/index.d.ts +8 -0
- package/types/components/ext-table/storage.d.ts +22 -0
- package/types/components/ext-table/style.d.ts +1 -0
- package/types/components/ext-table/types.d.ts +249 -0
- package/types/components/ext-table/useColumnSetting.d.ts +32 -0
- package/types/components/ext-upload/ExtUpload.vue.d.ts +90 -0
- package/types/components/ext-upload/helpers.d.ts +53 -0
- package/types/components/ext-upload/index.d.ts +5 -0
- package/types/components/ext-upload/types.d.ts +20 -0
- package/types/components/format-value/CustomerLevel.vue.d.ts +40 -0
- package/types/components/format-value/Date.vue.d.ts +44 -0
- package/types/components/format-value/Gender.vue.d.ts +40 -0
- package/types/components/format-value/LongString.vue.d.ts +69 -0
- package/types/components/format-value/Period.vue.d.ts +19 -0
- package/types/components/format-value/index.d.ts +5 -0
- package/types/components/index.d.ts +18 -0
- package/types/components/json-editor/JsonEditor.d.ts +29 -0
- package/types/components/json-editor/index.d.ts +3 -0
- package/types/components/layout-admin/BreadcrumbContainer.d.ts +55 -0
- package/types/components/layout-admin/LayoutAdmin.d.ts +177 -0
- package/types/components/layout-admin/index.d.ts +335 -0
- package/types/components/layout-admin/multi-tab.d.ts +73 -0
- package/types/components/layout-admin/style.d.ts +2 -0
- package/types/components/locale-dropdown/LocaleDropdown.d.ts +172 -0
- package/types/components/locale-dropdown/index.d.ts +3 -0
- package/types/components/locale-dropdown/style.d.ts +1 -0
- package/types/components/mixins/index.d.ts +2 -0
- package/types/components/mixins/layout.d.ts +56 -0
- package/types/components/scrollbar-table/helpers.d.ts +2 -0
- package/types/components/scrollbar-table/index.d.ts +4 -0
- package/types/components/scrollbar-table/types.d.ts +12 -0
- package/types/components/search-form/SearchForm.vue.d.ts +49 -0
- package/types/components/search-form/index.d.ts +3 -0
- package/types/components/setting-drawer/SettingDrawer.d.ts +49 -0
- package/types/components/setting-drawer/index.d.ts +3 -0
- package/types/components/splitter-pane/SplitterPane.vue.d.ts +76 -0
- package/types/components/splitter-pane/helpers.d.ts +6 -0
- package/types/components/splitter-pane/index.d.ts +2 -0
- package/types/components/splitter-pane/types.d.ts +3 -0
- package/types/components/utils/index.d.ts +2 -0
- package/types/components/utils/menu.d.ts +10 -0
- package/types/components/utils/util.d.ts +6 -0
- package/types/components/variable-input/VariableInput.vue.d.ts +74 -0
- package/types/components/variable-input/helpers.d.ts +14 -0
- package/types/components/variable-input/index.d.ts +4 -0
- package/types/components/variable-input/types.d.ts +18 -0
- package/types/context/i18n.d.ts +10 -0
- package/types/context/index.d.ts +4 -0
- package/types/context/multi-tab-cache.d.ts +40 -0
- package/types/context/theme.d.ts +41 -0
- package/types/context/useEffect.d.ts +3 -0
- package/types/index.d.ts +6 -0
- package/types/shared/expose.d.ts +2 -0
- package/types/shared/index.d.ts +3 -0
- package/types/shared/useConfigProvider.d.ts +10 -0
- package/types/style.d.ts +1 -0
- package/types/styles/index.d.ts +1 -0
- package/types/types.d.ts +219 -0
- package/types/utils/download.d.ts +1 -0
- package/types/utils/format.d.ts +14 -0
- package/types/utils/index.d.ts +4 -0
- package/types/utils/size.d.ts +4 -0
- package/types/utils/upload.d.ts +2 -0
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const antDesignVue = require("ant-design-vue");
|
|
5
|
+
const lodashEs = require("lodash");
|
|
6
|
+
const Icon = require("@ant-design/icons-vue");
|
|
7
|
+
const context = require("ant-design-vue/lib/config-provider/context");
|
|
8
|
+
const components_extButton_colorMap = require("../ext-button/color-map.js");
|
|
9
|
+
const ExtButton_vue_vue_type_script_setup_true_lang = require("../ext-button/ExtButton.vue.js");
|
|
10
|
+
const BUTTON_GAP = 8;
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
12
|
+
__name: "Operations",
|
|
13
|
+
props: {
|
|
14
|
+
buttons: { default: () => [] },
|
|
15
|
+
context: {},
|
|
16
|
+
index: {},
|
|
17
|
+
maxButtonCount: {},
|
|
18
|
+
placement: { default: "topRight" }
|
|
19
|
+
},
|
|
20
|
+
emits: ["click"],
|
|
21
|
+
setup(__props, { emit: __emit }) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const emit = __emit;
|
|
24
|
+
const { getPrefixCls } = context.useConfigContextInject();
|
|
25
|
+
const prefixCls = getPrefixCls("ext-table-operations");
|
|
26
|
+
const wrapRef = vue.shallowRef(null);
|
|
27
|
+
const measureRef = vue.shallowRef(null);
|
|
28
|
+
const autoButtonCount = vue.shallowRef(1);
|
|
29
|
+
let resizeObserver = null;
|
|
30
|
+
const displayCount = vue.computed(() => Math.max(1, props.maxButtonCount ?? autoButtonCount.value));
|
|
31
|
+
const filtedButtons = vue.computed(
|
|
32
|
+
() => props.buttons.filter((item) => isVisible(item)).map((item) => ({
|
|
33
|
+
...item,
|
|
34
|
+
label: typeof item.label === "function" ? item.label(props.context, props.index) : item.label,
|
|
35
|
+
disabled: typeof item.disabled === "function" ? item.disabled(props.context, props.index) : item.disabled,
|
|
36
|
+
color: typeof item.color === "function" ? item.color(props.context, props.index) : item.color
|
|
37
|
+
}))
|
|
38
|
+
);
|
|
39
|
+
const visibleButtons = vue.computed(() => filtedButtons.value.slice(0, displayCount.value));
|
|
40
|
+
const overflowButtons = vue.computed(() => filtedButtons.value.slice(displayCount.value));
|
|
41
|
+
const overflowDropdownOpen = vue.ref(false);
|
|
42
|
+
const getKey = (item) => item.key ?? (typeof item.label === "function" ? item.label(props.context, props.index) : item.label);
|
|
43
|
+
const isVisible = (item) => {
|
|
44
|
+
if (typeof item.visible === "function") {
|
|
45
|
+
return item.visible(props.context, props.index) ?? true;
|
|
46
|
+
}
|
|
47
|
+
return item.visible ?? true;
|
|
48
|
+
};
|
|
49
|
+
const getButtonClass = (item, extraClass) => {
|
|
50
|
+
const btnProps = item.buttonProps || {};
|
|
51
|
+
return [extraClass, btnProps.class].filter(Boolean).join(" ");
|
|
52
|
+
};
|
|
53
|
+
const isDisabled = (item) => Boolean(item.disabled || item.buttonProps?.disabled);
|
|
54
|
+
const buttonBind = (item) => {
|
|
55
|
+
const { class: _class, ...rest } = item.buttonProps || {};
|
|
56
|
+
const color = typeof item.color === "function" ? item.color(props.context, props.index) : item.color;
|
|
57
|
+
return {
|
|
58
|
+
type: "primary",
|
|
59
|
+
size: "small",
|
|
60
|
+
...rest,
|
|
61
|
+
color: components_extButton_colorMap.isExtColorInput(color) ? color : void 0,
|
|
62
|
+
disabled: isDisabled(item)
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
const menuItemBind = (item) => ({
|
|
66
|
+
disabled: isDisabled(item),
|
|
67
|
+
class: components_extButton_colorMap.isExtColorInput(item.color) ? `${prefixCls}__menu-item--color` : void 0,
|
|
68
|
+
style: components_extButton_colorMap.isExtColorInput(item.color) ? { "--kbr-ext-table-operation-menu-item-color": components_extButton_colorMap.resolveColorValue(item.color) } : void 0
|
|
69
|
+
});
|
|
70
|
+
const confirmBind = (item) => ({
|
|
71
|
+
title: "是否确认此操作?",
|
|
72
|
+
okText: "确定",
|
|
73
|
+
cancelText: "取消",
|
|
74
|
+
...item.confirmProps
|
|
75
|
+
});
|
|
76
|
+
const tooltipBind = (item) => ({
|
|
77
|
+
placement: "top",
|
|
78
|
+
...item.tooltipProps
|
|
79
|
+
});
|
|
80
|
+
const getTotalWidth = (buttonWidths, count, moreWidth) => {
|
|
81
|
+
const hasOverflow = count < buttonWidths.length;
|
|
82
|
+
const childCount = count + (hasOverflow ? 1 : 0);
|
|
83
|
+
const buttonsWidth = buttonWidths.slice(0, count).reduce((total, width) => total + width, 0);
|
|
84
|
+
return buttonsWidth + (hasOverflow ? moreWidth : 0) + Math.max(0, childCount - 1) * BUTTON_GAP;
|
|
85
|
+
};
|
|
86
|
+
const updateAutoButtonCount = (width) => {
|
|
87
|
+
if (props.maxButtonCount != null) return;
|
|
88
|
+
const currentWidth = width ?? wrapRef.value?.clientWidth ?? 0;
|
|
89
|
+
const buttonEls = Array.from(measureRef.value?.querySelectorAll("[data-operation-button]") || []);
|
|
90
|
+
const buttonWidths = buttonEls.map((el) => el.offsetWidth);
|
|
91
|
+
const moreWidth = measureRef.value?.querySelector("[data-operation-more]")?.offsetWidth || 16;
|
|
92
|
+
if (!currentWidth) return;
|
|
93
|
+
if (buttonWidths.length <= 1) {
|
|
94
|
+
autoButtonCount.value = Math.max(1, buttonWidths.length);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const count = buttonWidths.findIndex((_, index) => getTotalWidth(buttonWidths, index + 1, moreWidth) > currentWidth);
|
|
98
|
+
autoButtonCount.value = count === -1 ? buttonWidths.length : Math.max(1, count);
|
|
99
|
+
};
|
|
100
|
+
const scheduleUpdateAutoButtonCount = lodashEs.throttle((width) => {
|
|
101
|
+
void vue.nextTick(() => updateAutoButtonCount(width));
|
|
102
|
+
}, 300);
|
|
103
|
+
const stop = (e) => {
|
|
104
|
+
e?.stopPropagation();
|
|
105
|
+
};
|
|
106
|
+
const handleClick = (item) => {
|
|
107
|
+
if (isDisabled(item)) return;
|
|
108
|
+
if (item.onClick) {
|
|
109
|
+
item.onClick(props.context, props.index);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
emit("click", item, props.context, props.index);
|
|
113
|
+
};
|
|
114
|
+
const handleButtonClick = (item, e) => {
|
|
115
|
+
stop(e);
|
|
116
|
+
handleClick(item);
|
|
117
|
+
};
|
|
118
|
+
const handleMenuClick = (item, e) => {
|
|
119
|
+
if ("domEvent" in e) {
|
|
120
|
+
e.domEvent?.stopPropagation();
|
|
121
|
+
} else {
|
|
122
|
+
stop(e);
|
|
123
|
+
}
|
|
124
|
+
handleClick(item);
|
|
125
|
+
overflowDropdownOpen.value = false;
|
|
126
|
+
};
|
|
127
|
+
const handleConfirm = (item) => {
|
|
128
|
+
handleClick(item);
|
|
129
|
+
overflowDropdownOpen.value = false;
|
|
130
|
+
};
|
|
131
|
+
vue.watch(
|
|
132
|
+
[() => props.maxButtonCount, () => props.buttons.map((button) => button.label).join("|")],
|
|
133
|
+
() => scheduleUpdateAutoButtonCount(),
|
|
134
|
+
{ immediate: true }
|
|
135
|
+
);
|
|
136
|
+
vue.onMounted(() => {
|
|
137
|
+
if (typeof ResizeObserver !== "undefined" && wrapRef.value) {
|
|
138
|
+
resizeObserver = new ResizeObserver(([entry]) => scheduleUpdateAutoButtonCount(entry?.contentRect.width));
|
|
139
|
+
resizeObserver.observe(wrapRef.value);
|
|
140
|
+
}
|
|
141
|
+
scheduleUpdateAutoButtonCount();
|
|
142
|
+
});
|
|
143
|
+
vue.onBeforeUnmount(() => {
|
|
144
|
+
resizeObserver?.disconnect();
|
|
145
|
+
scheduleUpdateAutoButtonCount.cancel();
|
|
146
|
+
});
|
|
147
|
+
return (_ctx, _cache) => {
|
|
148
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
149
|
+
"div",
|
|
150
|
+
{
|
|
151
|
+
ref_key: "wrapRef",
|
|
152
|
+
ref: wrapRef,
|
|
153
|
+
class: vue.normalizeClass(vue.unref(prefixCls))
|
|
154
|
+
},
|
|
155
|
+
[
|
|
156
|
+
vue.createVNode(vue.unref(antDesignVue.Space), {
|
|
157
|
+
class: vue.normalizeClass(`${vue.unref(prefixCls)}__space`),
|
|
158
|
+
size: BUTTON_GAP
|
|
159
|
+
}, {
|
|
160
|
+
default: vue.withCtx(() => [
|
|
161
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
162
|
+
vue.Fragment,
|
|
163
|
+
null,
|
|
164
|
+
vue.renderList(visibleButtons.value, (op) => {
|
|
165
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
166
|
+
vue.Fragment,
|
|
167
|
+
{
|
|
168
|
+
key: getKey(op)
|
|
169
|
+
},
|
|
170
|
+
[
|
|
171
|
+
vue.createCommentVNode(" 带二次确认的操作 "),
|
|
172
|
+
op.confirmProps ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Popconfirm), vue.mergeProps({
|
|
173
|
+
key: 0,
|
|
174
|
+
ref_for: true
|
|
175
|
+
}, confirmBind(op), {
|
|
176
|
+
onConfirm: ($event) => handleClick(op)
|
|
177
|
+
}), {
|
|
178
|
+
default: vue.withCtx(() => [
|
|
179
|
+
vue.createVNode(ExtButton_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ ref_for: true }, buttonBind(op), {
|
|
180
|
+
class: getButtonClass(op, "operation-button"),
|
|
181
|
+
onClick: stop
|
|
182
|
+
}), {
|
|
183
|
+
default: vue.withCtx(() => [
|
|
184
|
+
vue.createTextVNode(
|
|
185
|
+
vue.toDisplayString(op.label),
|
|
186
|
+
1
|
|
187
|
+
/* TEXT */
|
|
188
|
+
)
|
|
189
|
+
]),
|
|
190
|
+
_: 2
|
|
191
|
+
/* DYNAMIC */
|
|
192
|
+
}, 1040, ["class"])
|
|
193
|
+
]),
|
|
194
|
+
_: 2
|
|
195
|
+
/* DYNAMIC */
|
|
196
|
+
}, 1040, ["onConfirm"])) : op.tooltipProps ? (vue.openBlock(), vue.createElementBlock(
|
|
197
|
+
vue.Fragment,
|
|
198
|
+
{ key: 1 },
|
|
199
|
+
[
|
|
200
|
+
vue.createCommentVNode(" 带 tooltip 的操作 "),
|
|
201
|
+
vue.createVNode(
|
|
202
|
+
vue.unref(antDesignVue.Tooltip),
|
|
203
|
+
vue.mergeProps({ ref_for: true }, tooltipBind(op)),
|
|
204
|
+
{
|
|
205
|
+
default: vue.withCtx(() => [
|
|
206
|
+
vue.createVNode(ExtButton_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ ref_for: true }, buttonBind(op), {
|
|
207
|
+
class: getButtonClass(op, "operation-button"),
|
|
208
|
+
onClick: ($event) => handleButtonClick(op, $event)
|
|
209
|
+
}), {
|
|
210
|
+
default: vue.withCtx(() => [
|
|
211
|
+
vue.createTextVNode(
|
|
212
|
+
vue.toDisplayString(op.label),
|
|
213
|
+
1
|
|
214
|
+
/* TEXT */
|
|
215
|
+
)
|
|
216
|
+
]),
|
|
217
|
+
_: 2
|
|
218
|
+
/* DYNAMIC */
|
|
219
|
+
}, 1040, ["class", "onClick"])
|
|
220
|
+
]),
|
|
221
|
+
_: 2
|
|
222
|
+
/* DYNAMIC */
|
|
223
|
+
},
|
|
224
|
+
1040
|
|
225
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
226
|
+
)
|
|
227
|
+
],
|
|
228
|
+
2112
|
|
229
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
230
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
231
|
+
vue.Fragment,
|
|
232
|
+
{ key: 2 },
|
|
233
|
+
[
|
|
234
|
+
vue.createCommentVNode(" 普通操作 "),
|
|
235
|
+
vue.createVNode(ExtButton_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ ref_for: true }, buttonBind(op), {
|
|
236
|
+
class: getButtonClass(op, "operation-button"),
|
|
237
|
+
onClick: ($event) => handleButtonClick(op, $event)
|
|
238
|
+
}), {
|
|
239
|
+
default: vue.withCtx(() => [
|
|
240
|
+
vue.createTextVNode(
|
|
241
|
+
vue.toDisplayString(op.label),
|
|
242
|
+
1
|
|
243
|
+
/* TEXT */
|
|
244
|
+
)
|
|
245
|
+
]),
|
|
246
|
+
_: 2
|
|
247
|
+
/* DYNAMIC */
|
|
248
|
+
}, 1040, ["class", "onClick"])
|
|
249
|
+
],
|
|
250
|
+
2112
|
|
251
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
252
|
+
))
|
|
253
|
+
],
|
|
254
|
+
64
|
|
255
|
+
/* STABLE_FRAGMENT */
|
|
256
|
+
);
|
|
257
|
+
}),
|
|
258
|
+
128
|
|
259
|
+
/* KEYED_FRAGMENT */
|
|
260
|
+
)),
|
|
261
|
+
vue.createCommentVNode(" 超出数量的按钮放入 dropdown "),
|
|
262
|
+
overflowButtons.value.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Dropdown), {
|
|
263
|
+
key: 0,
|
|
264
|
+
open: overflowDropdownOpen.value,
|
|
265
|
+
"onUpdate:open": _cache[1] || (_cache[1] = ($event) => overflowDropdownOpen.value = $event),
|
|
266
|
+
trigger: ["click"],
|
|
267
|
+
placement: _ctx.placement
|
|
268
|
+
}, {
|
|
269
|
+
overlay: vue.withCtx(() => [
|
|
270
|
+
vue.createVNode(vue.unref(antDesignVue.Menu), null, {
|
|
271
|
+
default: vue.withCtx(() => [
|
|
272
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
273
|
+
vue.Fragment,
|
|
274
|
+
null,
|
|
275
|
+
vue.renderList(overflowButtons.value, (op) => {
|
|
276
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
277
|
+
vue.Fragment,
|
|
278
|
+
{
|
|
279
|
+
key: getKey(op)
|
|
280
|
+
},
|
|
281
|
+
[
|
|
282
|
+
vue.createCommentVNode(" 带二次确认且未禁用:用 popconfirm 包裹,点击时阻止冒泡以避免下拉菜单提前关闭 "),
|
|
283
|
+
op.confirmProps && !isDisabled(op) ? (vue.openBlock(), vue.createBlock(
|
|
284
|
+
vue.unref(antDesignVue.MenuItem),
|
|
285
|
+
vue.mergeProps({
|
|
286
|
+
key: 0,
|
|
287
|
+
ref_for: true
|
|
288
|
+
}, menuItemBind(op)),
|
|
289
|
+
{
|
|
290
|
+
default: vue.withCtx(() => [
|
|
291
|
+
vue.createVNode(vue.unref(antDesignVue.Popconfirm), vue.mergeProps({ ref_for: true }, confirmBind(op), {
|
|
292
|
+
onConfirm: ($event) => handleConfirm(op)
|
|
293
|
+
}), {
|
|
294
|
+
default: vue.withCtx(() => [
|
|
295
|
+
vue.createElementVNode(
|
|
296
|
+
"span",
|
|
297
|
+
{
|
|
298
|
+
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
299
|
+
}, ["stop"]))
|
|
300
|
+
},
|
|
301
|
+
vue.toDisplayString(op.label),
|
|
302
|
+
1
|
|
303
|
+
/* TEXT */
|
|
304
|
+
)
|
|
305
|
+
]),
|
|
306
|
+
_: 2
|
|
307
|
+
/* DYNAMIC */
|
|
308
|
+
}, 1040, ["onConfirm"])
|
|
309
|
+
]),
|
|
310
|
+
_: 2
|
|
311
|
+
/* DYNAMIC */
|
|
312
|
+
},
|
|
313
|
+
1040
|
|
314
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
315
|
+
)) : op.tooltipProps ? (vue.openBlock(), vue.createElementBlock(
|
|
316
|
+
vue.Fragment,
|
|
317
|
+
{ key: 1 },
|
|
318
|
+
[
|
|
319
|
+
vue.createCommentVNode(" 带 tooltip:与可见按钮一致,hover 时显示提示,点击仍执行操作 "),
|
|
320
|
+
vue.createVNode(vue.unref(antDesignVue.MenuItem), vue.mergeProps({ ref_for: true }, menuItemBind(op), {
|
|
321
|
+
onClick: ($event) => handleMenuClick(op, $event)
|
|
322
|
+
}), {
|
|
323
|
+
default: vue.withCtx(() => [
|
|
324
|
+
vue.createVNode(
|
|
325
|
+
vue.unref(antDesignVue.Tooltip),
|
|
326
|
+
vue.mergeProps({ ref_for: true }, tooltipBind(op)),
|
|
327
|
+
{
|
|
328
|
+
default: vue.withCtx(() => [
|
|
329
|
+
vue.createElementVNode(
|
|
330
|
+
"span",
|
|
331
|
+
null,
|
|
332
|
+
vue.toDisplayString(op.label),
|
|
333
|
+
1
|
|
334
|
+
/* TEXT */
|
|
335
|
+
)
|
|
336
|
+
]),
|
|
337
|
+
_: 2
|
|
338
|
+
/* DYNAMIC */
|
|
339
|
+
},
|
|
340
|
+
1040
|
|
341
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
342
|
+
)
|
|
343
|
+
]),
|
|
344
|
+
_: 2
|
|
345
|
+
/* DYNAMIC */
|
|
346
|
+
}, 1040, ["onClick"])
|
|
347
|
+
],
|
|
348
|
+
2112
|
|
349
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
350
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
351
|
+
vue.Fragment,
|
|
352
|
+
{ key: 2 },
|
|
353
|
+
[
|
|
354
|
+
vue.createCommentVNode(" 普通操作 "),
|
|
355
|
+
vue.createVNode(vue.unref(antDesignVue.MenuItem), vue.mergeProps({ ref_for: true }, menuItemBind(op), {
|
|
356
|
+
onClick: ($event) => handleMenuClick(op, $event)
|
|
357
|
+
}), {
|
|
358
|
+
default: vue.withCtx(() => [
|
|
359
|
+
vue.createTextVNode(
|
|
360
|
+
vue.toDisplayString(op.label),
|
|
361
|
+
1
|
|
362
|
+
/* TEXT */
|
|
363
|
+
)
|
|
364
|
+
]),
|
|
365
|
+
_: 2
|
|
366
|
+
/* DYNAMIC */
|
|
367
|
+
}, 1040, ["onClick"])
|
|
368
|
+
],
|
|
369
|
+
2112
|
|
370
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
371
|
+
))
|
|
372
|
+
],
|
|
373
|
+
64
|
|
374
|
+
/* STABLE_FRAGMENT */
|
|
375
|
+
);
|
|
376
|
+
}),
|
|
377
|
+
128
|
|
378
|
+
/* KEYED_FRAGMENT */
|
|
379
|
+
))
|
|
380
|
+
]),
|
|
381
|
+
_: 1
|
|
382
|
+
/* STABLE */
|
|
383
|
+
})
|
|
384
|
+
]),
|
|
385
|
+
default: vue.withCtx(() => [
|
|
386
|
+
vue.createVNode(vue.unref(Icon.EllipsisOutlined), { class: "operation-more-trigger" })
|
|
387
|
+
]),
|
|
388
|
+
_: 1
|
|
389
|
+
/* STABLE */
|
|
390
|
+
}, 8, ["open", "placement"])) : vue.createCommentVNode("v-if", true),
|
|
391
|
+
vue.createCommentVNode(" 扩展插槽:用于展示已选数量等信息(如批量操作场景),由外部自行扩展 "),
|
|
392
|
+
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
393
|
+
]),
|
|
394
|
+
_: 3
|
|
395
|
+
/* FORWARDED */
|
|
396
|
+
}, 8, ["class"]),
|
|
397
|
+
vue.createElementVNode(
|
|
398
|
+
"div",
|
|
399
|
+
{
|
|
400
|
+
ref_key: "measureRef",
|
|
401
|
+
ref: measureRef,
|
|
402
|
+
class: vue.normalizeClass(`${vue.unref(prefixCls)}__measure`),
|
|
403
|
+
"aria-hidden": "true"
|
|
404
|
+
},
|
|
405
|
+
[
|
|
406
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
407
|
+
vue.Fragment,
|
|
408
|
+
null,
|
|
409
|
+
vue.renderList(_ctx.buttons, (op) => {
|
|
410
|
+
return vue.openBlock(), vue.createBlock(ExtButton_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({
|
|
411
|
+
key: getKey(op),
|
|
412
|
+
ref_for: true
|
|
413
|
+
}, buttonBind(op), {
|
|
414
|
+
"data-operation-button": "",
|
|
415
|
+
class: getButtonClass(op, "operation-button")
|
|
416
|
+
}), {
|
|
417
|
+
default: vue.withCtx(() => [
|
|
418
|
+
vue.createTextVNode(
|
|
419
|
+
vue.toDisplayString(op.label),
|
|
420
|
+
1
|
|
421
|
+
/* TEXT */
|
|
422
|
+
)
|
|
423
|
+
]),
|
|
424
|
+
_: 2
|
|
425
|
+
/* DYNAMIC */
|
|
426
|
+
}, 1040, ["class"]);
|
|
427
|
+
}),
|
|
428
|
+
128
|
|
429
|
+
/* KEYED_FRAGMENT */
|
|
430
|
+
)),
|
|
431
|
+
vue.createVNode(vue.unref(Icon.EllipsisOutlined), {
|
|
432
|
+
"data-operation-more": "",
|
|
433
|
+
class: "operation-more-measure"
|
|
434
|
+
})
|
|
435
|
+
],
|
|
436
|
+
2
|
|
437
|
+
/* CLASS */
|
|
438
|
+
)
|
|
439
|
+
],
|
|
440
|
+
2
|
|
441
|
+
/* CLASS */
|
|
442
|
+
);
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
exports.default = _sfc_main;
|
|
447
|
+
//# sourceMappingURL=Operations2.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Operations2.vue.js","sources":["../../../src/components/ext-table/Operations.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, shallowRef, watch } from 'vue';\nimport {\n Dropdown as ADropdown,\n Menu as AMenu,\n MenuItem as AMenuItem,\n Popconfirm as APopconfirm,\n Space as ASpace,\n Tooltip as ATooltip,\n} from 'ant-design-vue';\nimport { throttle } from 'lodash-es';\nimport { EllipsisOutlined } from '@ant-design/icons-vue';\nimport { useConfigContextInject } from 'ant-design-vue/es/config-provider/context';\nimport { isExtColorInput, resolveColorValue } from '../ext-button/color-map';\nimport ExtButton from '../ext-button/ExtButton.vue';\nimport type { TooltipProps } from 'ant-design-vue/es/tooltip';\nimport type { CSSProperties } from 'vue';\nimport type { OperationItem } from './types';\n\nconst props = withDefaults(\n defineProps<{\n buttons?: OperationItem[];\n context?: any;\n index?: number;\n maxButtonCount?: number | null;\n // 溢出按钮下拉的弹出位置\n placement?: 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';\n }>(),\n {\n buttons: () => [],\n placement: 'topRight',\n },\n);\n\nconst emit = defineEmits(['click']);\n\nconst { getPrefixCls } = useConfigContextInject();\nconst prefixCls = getPrefixCls('ext-table-operations');\nconst BUTTON_GAP = 8;\nconst wrapRef = shallowRef<HTMLElement | null>(null);\nconst measureRef = shallowRef<HTMLElement | null>(null);\nconst autoButtonCount = shallowRef(1);\nlet resizeObserver: ResizeObserver | null = null;\n\nconst displayCount = computed(() => Math.max(1, props.maxButtonCount ?? autoButtonCount.value));\nconst filtedButtons = computed(() =>\n props.buttons\n .filter((item) => isVisible(item))\n .map((item) => ({\n ...item,\n label: typeof item.label === 'function' ? item.label(props.context, props.index) : item.label,\n disabled: typeof item.disabled === 'function' ? item.disabled(props.context, props.index) : item.disabled,\n color: typeof item.color === 'function' ? item.color(props.context, props.index) : item.color,\n })),\n);\nconst visibleButtons = computed(() => filtedButtons.value.slice(0, displayCount.value));\nconst overflowButtons = computed(() => filtedButtons.value.slice(displayCount.value));\n\n// 溢出菜单的受控展开状态:确认操作后需主动关闭\nconst overflowDropdownOpen = ref(false);\n\nconst getKey = (item: OperationItem) =>\n item.key ?? (typeof item.label === 'function' ? item.label(props.context, props.index) : item.label);\n\nconst isVisible = (item: OperationItem) => {\n if (typeof item.visible === 'function') {\n return item.visible(props.context, props.index) ?? true;\n }\n return item.visible ?? true;\n};\n\nconst getButtonClass = (item: OperationItem, extraClass?: string) => {\n const btnProps = item.buttonProps || {};\n return [extraClass, btnProps.class].filter(Boolean).join(' ');\n};\n\nconst isDisabled = (item: OperationItem) => Boolean(item.disabled || item.buttonProps?.disabled);\n\n// 传给 ExtButton 的属性(剔除 class,由 :class 单独合并)\nconst buttonBind = (item: OperationItem) => {\n const { class: _class, ...rest } = item.buttonProps || {};\n void _class;\n const color = typeof item.color === 'function' ? item.color(props.context, props.index) : item.color;\n return {\n type: 'primary',\n size: 'small',\n ...rest,\n color: isExtColorInput(color) ? color : undefined,\n disabled: isDisabled(item),\n };\n};\n\nconst menuItemBind = (item: OperationItem) => ({\n disabled: isDisabled(item),\n class: isExtColorInput(item.color) ? `${prefixCls}__menu-item--color` : undefined,\n style: isExtColorInput(item.color)\n ? ({ '--kbr-ext-table-operation-menu-item-color': resolveColorValue(item.color) } as CSSProperties)\n : undefined,\n});\n\nconst confirmBind = (item: OperationItem) => ({\n title: '是否确认此操作?',\n okText: '确定',\n cancelText: '取消',\n ...item.confirmProps,\n});\n\nconst tooltipBind = (item: OperationItem): TooltipProps => ({\n placement: 'top',\n ...item.tooltipProps,\n});\n\nconst getTotalWidth = (buttonWidths: number[], count: number, moreWidth: number) => {\n const hasOverflow = count < buttonWidths.length;\n const childCount = count + (hasOverflow ? 1 : 0);\n const buttonsWidth = buttonWidths.slice(0, count).reduce((total, width) => total + width, 0);\n return buttonsWidth + (hasOverflow ? moreWidth : 0) + Math.max(0, childCount - 1) * BUTTON_GAP;\n};\n\nconst updateAutoButtonCount = (width?: number) => {\n if (props.maxButtonCount != null) return;\n\n const currentWidth = width ?? wrapRef.value?.clientWidth ?? 0;\n const buttonEls = Array.from(measureRef.value?.querySelectorAll<HTMLElement>('[data-operation-button]') || []);\n const buttonWidths = buttonEls.map((el) => el.offsetWidth);\n const moreWidth = measureRef.value?.querySelector<HTMLElement>('[data-operation-more]')?.offsetWidth || 16;\n\n if (!currentWidth) return;\n\n if (buttonWidths.length <= 1) {\n autoButtonCount.value = Math.max(1, buttonWidths.length);\n return;\n }\n\n const count = buttonWidths.findIndex((_, index) => getTotalWidth(buttonWidths, index + 1, moreWidth) > currentWidth);\n autoButtonCount.value = count === -1 ? buttonWidths.length : Math.max(1, count);\n};\n\nconst scheduleUpdateAutoButtonCount = throttle((width?: number) => {\n void nextTick(() => updateAutoButtonCount(width));\n}, 300);\n\nconst stop = (e?: Event) => {\n e?.stopPropagation();\n};\n\n// 触发操作:向上 emit click 事件(携带操作项),由父级路由 onClick(item) 或 operation 事件\nconst handleClick = (item: OperationItem) => {\n if (isDisabled(item)) return;\n if (item.onClick) {\n item.onClick(props.context, props.index);\n return;\n }\n emit('click', item, props.context, props.index);\n};\n\nconst handleButtonClick = (item: OperationItem, e: Event) => {\n stop(e);\n handleClick(item);\n};\n\nconst handleMenuClick = (item: OperationItem, e: Event | { domEvent?: Event }) => {\n if ('domEvent' in e) {\n e.domEvent?.stopPropagation();\n } else {\n stop(e as Event);\n }\n handleClick(item);\n overflowDropdownOpen.value = false;\n};\n\n// 溢出菜单中的二次确认通过后:执行操作并关闭下拉菜单\nconst handleConfirm = (item: OperationItem) => {\n handleClick(item);\n overflowDropdownOpen.value = false;\n};\n\nwatch(\n [() => props.maxButtonCount, () => props.buttons.map((button) => button.label).join('|')],\n () => scheduleUpdateAutoButtonCount(),\n { immediate: true },\n);\n\nonMounted(() => {\n if (typeof ResizeObserver !== 'undefined' && wrapRef.value) {\n resizeObserver = new ResizeObserver(([entry]) => scheduleUpdateAutoButtonCount(entry?.contentRect.width));\n resizeObserver.observe(wrapRef.value);\n }\n\n scheduleUpdateAutoButtonCount();\n});\n\nonBeforeUnmount(() => {\n resizeObserver?.disconnect();\n scheduleUpdateAutoButtonCount.cancel();\n});\n</script>\n\n<template>\n <div ref=\"wrapRef\" :class=\"prefixCls\">\n <a-space :class=\"`${prefixCls}__space`\" :size=\"BUTTON_GAP\">\n <template v-for=\"op in visibleButtons\" :key=\"getKey(op)\">\n <!-- 带二次确认的操作 -->\n <a-popconfirm v-if=\"op.confirmProps\" v-bind=\"confirmBind(op)\" @confirm=\"handleClick(op)\">\n <ExtButton v-bind=\"buttonBind(op)\" :class=\"getButtonClass(op, 'operation-button')\" @click=\"stop\">\n {{ op.label }}\n </ExtButton>\n </a-popconfirm>\n\n <!-- 带 tooltip 的操作 -->\n <a-tooltip v-else-if=\"op.tooltipProps\" v-bind=\"tooltipBind(op)\">\n <ExtButton\n v-bind=\"buttonBind(op)\"\n :class=\"getButtonClass(op, 'operation-button')\"\n @click=\"handleButtonClick(op, $event)\"\n >\n {{ op.label }}\n </ExtButton>\n </a-tooltip>\n\n <!-- 普通操作 -->\n <ExtButton\n v-else\n v-bind=\"buttonBind(op)\"\n :class=\"getButtonClass(op, 'operation-button')\"\n @click=\"handleButtonClick(op, $event)\"\n >\n {{ op.label }}\n </ExtButton>\n </template>\n\n <!-- 超出数量的按钮放入 dropdown -->\n <a-dropdown\n v-if=\"overflowButtons.length > 0\"\n v-model:open=\"overflowDropdownOpen\"\n :trigger=\"['click']\"\n :placement=\"placement\"\n >\n <EllipsisOutlined class=\"operation-more-trigger\" />\n <template #overlay>\n <a-menu>\n <template v-for=\"op in overflowButtons\" :key=\"getKey(op)\">\n <!-- 带二次确认且未禁用:用 popconfirm 包裹,点击时阻止冒泡以避免下拉菜单提前关闭 -->\n <a-menu-item v-if=\"op.confirmProps && !isDisabled(op)\" v-bind=\"menuItemBind(op)\">\n <a-popconfirm v-bind=\"confirmBind(op)\" @confirm=\"handleConfirm(op)\">\n <span @click.stop>{{ op.label }}</span>\n </a-popconfirm>\n </a-menu-item>\n <!-- 带 tooltip:与可见按钮一致,hover 时显示提示,点击仍执行操作 -->\n <a-menu-item v-else-if=\"op.tooltipProps\" v-bind=\"menuItemBind(op)\" @click=\"handleMenuClick(op, $event)\">\n <a-tooltip v-bind=\"tooltipBind(op)\">\n <span>{{ op.label }}</span>\n </a-tooltip>\n </a-menu-item>\n <!-- 普通操作 -->\n <a-menu-item v-else v-bind=\"menuItemBind(op)\" @click=\"handleMenuClick(op, $event)\">\n {{ op.label }}\n </a-menu-item>\n </template>\n </a-menu>\n </template>\n </a-dropdown>\n\n <!-- 扩展插槽:用于展示已选数量等信息(如批量操作场景),由外部自行扩展 -->\n <slot />\n </a-space>\n\n <div ref=\"measureRef\" :class=\"`${prefixCls}__measure`\" aria-hidden=\"true\">\n <ExtButton\n v-for=\"op in buttons\"\n :key=\"getKey(op)\"\n v-bind=\"buttonBind(op)\"\n data-operation-button\n :class=\"getButtonClass(op, 'operation-button')\"\n >\n {{ op.label }}\n </ExtButton>\n <EllipsisOutlined data-operation-more class=\"operation-more-measure\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.operation-button {\n padding-inline: 4px !important;\n}\n\n.operation-more-trigger {\n color: var(--lj-layout-text-secondary, #8c8c8c);\n font-size: 16px;\n cursor: pointer;\n}\n\n.operation-more-trigger:hover {\n color: var(--lj-layout-primary, #1677ff);\n}\n\n.operation-more-measure {\n font-size: 16px;\n}\n</style>\n"],"names":["useConfigContextInject","shallowRef","computed","ref","isExtColorInput","resolveColorValue","throttle","nextTick","watch","onMounted","onBeforeUnmount"],"mappings":"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"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const antDesignVue = require("ant-design-vue");
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
6
|
+
__name: "Status",
|
|
7
|
+
props: {
|
|
8
|
+
color: {},
|
|
9
|
+
type: {},
|
|
10
|
+
text: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
return (_ctx, _cache) => {
|
|
14
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
15
|
+
vue.Fragment,
|
|
16
|
+
null,
|
|
17
|
+
[
|
|
18
|
+
_ctx.type === "tag" && _ctx.text ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Tag), {
|
|
19
|
+
key: 0,
|
|
20
|
+
bordered: false,
|
|
21
|
+
color: _ctx.color
|
|
22
|
+
}, {
|
|
23
|
+
default: vue.withCtx(() => [
|
|
24
|
+
vue.createTextVNode(
|
|
25
|
+
vue.toDisplayString(_ctx.text),
|
|
26
|
+
1
|
|
27
|
+
/* TEXT */
|
|
28
|
+
)
|
|
29
|
+
]),
|
|
30
|
+
_: 1
|
|
31
|
+
/* STABLE */
|
|
32
|
+
}, 8, ["color"])) : vue.createCommentVNode("v-if", true),
|
|
33
|
+
_ctx.type === "text" && _ctx.text ? (vue.openBlock(), vue.createElementBlock(
|
|
34
|
+
"span",
|
|
35
|
+
{
|
|
36
|
+
key: 1,
|
|
37
|
+
style: vue.normalizeStyle({ color: _ctx.color })
|
|
38
|
+
},
|
|
39
|
+
vue.toDisplayString(_ctx.text),
|
|
40
|
+
5
|
|
41
|
+
/* TEXT, STYLE */
|
|
42
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
43
|
+
],
|
|
44
|
+
64
|
|
45
|
+
/* STABLE_FRAGMENT */
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
exports.default = _sfc_main;
|
|
51
|
+
//# sourceMappingURL=Status.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Status.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const Status_vue_vue_type_script_setup_true_lang = require("./Status.vue.js");
|
|
4
|
+
exports.default = Status_vue_vue_type_script_setup_true_lang.default;
|
|
5
|
+
//# sourceMappingURL=Status2.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Status2.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const lodashEs = require("lodash");
|
|
4
|
+
const TABLE_PAGE_SIZE_OPTIONS = ["10", "20", "50", "100"];
|
|
5
|
+
const TABLE_SHOW_SIZE_CHANGER = true;
|
|
6
|
+
const TABLE_SHOW_TOTAL = (total) => `共 ${total} 条`;
|
|
7
|
+
const NESTED_EXT_TABLE_KEY = Symbol("kbr-ext-table-nested");
|
|
8
|
+
function withDefaultPagination(pagination = {}) {
|
|
9
|
+
return {
|
|
10
|
+
...pagination,
|
|
11
|
+
showTotal: TABLE_SHOW_TOTAL,
|
|
12
|
+
showSizeChanger: TABLE_SHOW_SIZE_CHANGER,
|
|
13
|
+
pageSizeOptions: TABLE_PAGE_SIZE_OPTIONS
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function defineExtTableColumn(columns) {
|
|
17
|
+
return columns;
|
|
18
|
+
}
|
|
19
|
+
function defineExtTableQuery(query) {
|
|
20
|
+
return query;
|
|
21
|
+
}
|
|
22
|
+
function getCellText(target) {
|
|
23
|
+
const cell = target instanceof Element ? target.closest("td") : null;
|
|
24
|
+
return cell?.textContent?.trim() ?? "";
|
|
25
|
+
}
|
|
26
|
+
function getSelectedTextInCell(target, selection) {
|
|
27
|
+
const cell = target instanceof Element ? target.closest("td") : null;
|
|
28
|
+
const text = selection?.toString() ?? "";
|
|
29
|
+
return cell && selection && !selection.isCollapsed && text.trim() && cell.contains(selection.anchorNode) && cell.contains(selection.focusNode) ? text : "";
|
|
30
|
+
}
|
|
31
|
+
function getCopyColumnTitle(column) {
|
|
32
|
+
if (column.dataTitle) return column.dataTitle;
|
|
33
|
+
return typeof column.title === "string" || typeof column.title === "number" ? String(column.title) : "";
|
|
34
|
+
}
|
|
35
|
+
function getCopyableRowColumns(columns, record) {
|
|
36
|
+
return columns.flatMap((column) => {
|
|
37
|
+
if (column.children?.length) {
|
|
38
|
+
return getCopyableRowColumns(column.children, record);
|
|
39
|
+
}
|
|
40
|
+
if (!getCopyColumnTitle(column) || column.dataIndex == null || !lodashEs.hasIn(record, column.dataIndex)) return [];
|
|
41
|
+
if (column.copyText) return [column];
|
|
42
|
+
const value = lodashEs.get(record, column.dataIndex);
|
|
43
|
+
if (value !== null && typeof value === "object") return [];
|
|
44
|
+
return [column];
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function normalizeCopyText(value, emptyValue = "-") {
|
|
48
|
+
if (value == null) return emptyValue;
|
|
49
|
+
let text;
|
|
50
|
+
if (typeof value === "object") {
|
|
51
|
+
try {
|
|
52
|
+
text = JSON.stringify(value);
|
|
53
|
+
} catch {
|
|
54
|
+
text = String(value);
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
text = String(value);
|
|
58
|
+
}
|
|
59
|
+
return text.replace(/\s+/g, " ").trim() || emptyValue;
|
|
60
|
+
}
|
|
61
|
+
function orderColumnsByDataIndex(columns, orderColumns) {
|
|
62
|
+
const currentDataIndexSet = new Set(columns.map((col) => col.dataIndex));
|
|
63
|
+
const validOrderColumns = orderColumns.filter((dataIndex) => currentDataIndexSet.has(dataIndex));
|
|
64
|
+
if (validOrderColumns.length === 0) {
|
|
65
|
+
return columns;
|
|
66
|
+
}
|
|
67
|
+
const fixedDataIndexSet = new Set(columns.filter((col) => col.fixed).map((col) => String(col.dataIndex)));
|
|
68
|
+
const sortableOrderColumns = validOrderColumns.filter((dataIndex) => !fixedDataIndexSet.has(dataIndex));
|
|
69
|
+
if (sortableOrderColumns.length === 0) {
|
|
70
|
+
return columns;
|
|
71
|
+
}
|
|
72
|
+
const orderedDataIndexSet = new Set(sortableOrderColumns);
|
|
73
|
+
const orderedQueue = sortableOrderColumns.map((dataIndex) => columns.find((col) => col.dataIndex === dataIndex)).filter(Boolean);
|
|
74
|
+
const result = [];
|
|
75
|
+
const appendedColumns = [];
|
|
76
|
+
let lastNonFixedIdx = -1;
|
|
77
|
+
for (const col of columns) {
|
|
78
|
+
if (col.fixed) {
|
|
79
|
+
result.push(col);
|
|
80
|
+
} else if (orderedDataIndexSet.has(col.dataIndex)) {
|
|
81
|
+
const next = orderedQueue.shift();
|
|
82
|
+
if (next) {
|
|
83
|
+
result.push(next);
|
|
84
|
+
lastNonFixedIdx = result.length - 1;
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
87
|
+
appendedColumns.push(col);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (appendedColumns.length > 0) {
|
|
91
|
+
result.splice(lastNonFixedIdx + 1, 0, ...appendedColumns);
|
|
92
|
+
}
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
exports.NESTED_EXT_TABLE_KEY = NESTED_EXT_TABLE_KEY;
|
|
96
|
+
exports.TABLE_PAGE_SIZE_OPTIONS = TABLE_PAGE_SIZE_OPTIONS;
|
|
97
|
+
exports.TABLE_SHOW_SIZE_CHANGER = TABLE_SHOW_SIZE_CHANGER;
|
|
98
|
+
exports.TABLE_SHOW_TOTAL = TABLE_SHOW_TOTAL;
|
|
99
|
+
exports.defineExtTableColumn = defineExtTableColumn;
|
|
100
|
+
exports.defineExtTableQuery = defineExtTableQuery;
|
|
101
|
+
exports.getCellText = getCellText;
|
|
102
|
+
exports.getCopyColumnTitle = getCopyColumnTitle;
|
|
103
|
+
exports.getCopyableRowColumns = getCopyableRowColumns;
|
|
104
|
+
exports.getSelectedTextInCell = getSelectedTextInCell;
|
|
105
|
+
exports.normalizeCopyText = normalizeCopyText;
|
|
106
|
+
exports.orderColumnsByDataIndex = orderColumnsByDataIndex;
|
|
107
|
+
exports.withDefaultPagination = withDefaultPagination;
|
|
108
|
+
//# sourceMappingURL=helpers.js.map
|