@ctzy-web-client/plugin-component-vue 1.0.7 → 1.0.9
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/package.json +3 -3
- package/src/advance-select/advance-operation.vue +2 -1
- package/src/advance-select/advance-option.vue +2 -1
- package/src/advance-select/advance-select.vue +2 -1
- package/src/advance-select/events-helpers.js +2 -1
- package/src/advance-select/index.js +1 -0
- package/src/advance-select/use-advance-option.js +2 -1
- package/src/advance-select/use-advance-select.js +1 -0
- package/src/application-slot/application-slot.js +2 -1
- package/src/application-slot/breadcrumb-item.vue +1 -0
- package/src/application-slot/header-tools-item.vue +1 -0
- package/src/application-slot/index.js +1 -0
- package/src/breadcrumb-select/breadcrumb-select.vue +2 -1
- package/src/breadcrumb-select/index.js +1 -0
- package/src/components.js +1 -0
- package/src/contextmenu/contextmenu-item.vue +2 -1
- package/src/contextmenu/contextmenu.vue +2 -1
- package/src/contextmenu/index.js +1 -0
- package/src/contextmenu/use-contextmenu.js +2 -1
- package/src/data-form/data-form-item.vue +2 -1
- package/src/data-form/data-form.vue +2 -1
- package/src/data-form/dynamic-component.js +1 -0
- package/src/data-form/form-components/Blots/AtBlot.js +1 -0
- package/src/data-form/form-components/bwa-date-picker.vue +1 -0
- package/src/data-form/form-components/bwa-date-time-picker.vue +1 -0
- package/src/data-form/form-components/bwa-input-float.vue +1 -0
- package/src/data-form/form-components/bwa-input-integer.vue +1 -0
- package/src/data-form/form-components/bwa-input.vue +1 -0
- package/src/data-form/form-components/bwa-multi-select.vue +1 -0
- package/src/data-form/form-components/bwa-rich-text-tinymce.vue +3 -2
- package/src/data-form/form-components/bwa-rich-text.vue +2 -1
- package/src/data-form/form-components/bwa-select.vue +1 -0
- package/src/data-form/form-components/bwa-textarea.vue +1 -0
- package/src/data-form/form-components/bwa-upload.vue +2 -1
- package/src/data-form/form-components/bwa-user-multi-select.vue +1 -0
- package/src/data-form/form-components/bwa-user-select.vue +2 -1
- package/src/data-form/index.js +1 -0
- package/src/data-table/data-column-view.vue +2 -1
- package/src/data-table/data-table-card.vue +2 -1
- package/src/data-table/data-table-column.vue +2 -1
- package/src/data-table/data-table.vue +2 -1
- package/src/data-table/dynamic-component.js +1 -0
- package/src/data-table/index.js +1 -0
- package/src/data-table/use-datatable-drag.js +1 -0
- package/src/datatable-settings/datatable-settings.vue +2 -1
- package/src/datatable-settings/index.js +1 -0
- package/src/date-range/date-picker.vue +2 -1
- package/src/date-range/date-range.vue +4 -3
- package/src/date-range/index.js +1 -0
- package/src/drag-list/constants.js +1 -0
- package/src/drag-list/drag-item.vue +2 -1
- package/src/drag-list/drag-list.vue +2 -1
- package/src/drag-list/index.js +1 -0
- package/src/drag-list/use-drag-list.js +1 -0
- package/src/dragable/constants.js +1 -0
- package/src/dragable/dragable-item.vue +2 -1
- package/src/dragable/dragable-operation.vue +2 -1
- package/src/dragable/dragable.vue +2 -1
- package/src/dragable/index.js +1 -0
- package/src/dragable/use-dragable.js +1 -0
- package/src/filter-panel/conditions/condition.js +1 -0
- package/src/filter-panel/conditions/date-range-condition.vue +1 -0
- package/src/filter-panel/conditions/department-condition/department-condition.vue +2 -1
- package/src/filter-panel/conditions/department-condition/department-node.vue +2 -1
- package/src/filter-panel/conditions/index.js +1 -0
- package/src/filter-panel/conditions/input-condition.vue +2 -1
- package/src/filter-panel/conditions/multi-user-condition.vue +2 -1
- package/src/filter-panel/conditions/multiple-menu-condition.vue +1 -0
- package/src/filter-panel/conditions/single-menu-condition.vue +2 -1
- package/src/filter-panel/conditions/single-user-condition.vue +2 -1
- package/src/filter-panel/filter-panel-item.vue +2 -1
- package/src/filter-panel/filter-panel.vue +2 -1
- package/src/filter-panel/index.js +1 -0
- package/src/filter-panel/use-filter-panel-item.js +2 -1
- package/src/filter-panel/use-filter-panel.js +2 -1
- package/src/hooks/use-data/index.js +3 -2
- package/src/index.js +1 -0
- package/src/layout/index.js +1 -0
- package/src/layout/layout.vue +2 -1
- package/src/make-installer.js +2 -1
- package/src/math/Rectangle.js +1 -0
- package/src/menu/index.js +1 -0
- package/src/menu/menu-item.vue +2 -1
- package/src/menu/menu.vue +2 -1
- package/src/panel/index.js +1 -0
- package/src/panel/panel.vue +2 -1
- package/src/panel-tabs/index.js +1 -0
- package/src/panel-tabs/panel-tabs.js +2 -1
- package/src/pct-filter-panel/index.js +1 -0
- package/src/pct-filter-panel/pct-compents/index.js +1 -0
- package/src/pct-filter-panel/pct-compents/pct-Input-condition.vue +2 -1
- package/src/pct-filter-panel/pct-compents/pct-date-range-condition.vue +2 -1
- package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition.vue +3 -2
- package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.vue +3 -2
- package/src/pct-filter-panel/pct-filter-panel-item.vue +2 -1
- package/src/pct-filter-panel/pct-filter-panel.vue +2 -1
- package/src/pct-filter-panel/use-filter-panel-item.js +2 -1
- package/src/pct-filter-panel/use-filter-panel.js +3 -2
- package/src/plugins.js +1 -0
- package/src/progress/index.js +1 -0
- package/src/progress/progress-item.vue +2 -1
- package/src/progress/progress.vue +2 -1
- package/src/progress/use-progress.js +1 -0
- package/src/utils/db.js +1 -0
- package/src/utils.js +1 -0
- package/src/where-filter-panel/use-where-filter-panel.js +2 -1
- package/src/where-filter-panel/where-filter-panel.vue +1 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +0 -9
- package/es/advance-select/advance-operation.mjs +0 -43
- package/es/advance-select/advance-option.mjs +0 -125
- package/es/advance-select/advance-select.mjs +0 -359
- package/es/advance-select/events-helpers.mjs +0 -29
- package/es/advance-select/index.mjs +0 -13
- package/es/advance-select/use-advance-option.mjs +0 -43
- package/es/advance-select/use-advance-select.mjs +0 -117
- package/es/application-slot/application-slot.mjs +0 -51
- package/es/application-slot/breadcrumb-item.mjs +0 -23
- package/es/application-slot/header-tools-item.mjs +0 -23
- package/es/application-slot/index.mjs +0 -16
- package/es/breadcrumb-select/breadcrumb-select.mjs +0 -155
- package/es/breadcrumb-select/index.mjs +0 -6
- package/es/components.mjs +0 -22
- package/es/contextmenu/contextmenu-item.mjs +0 -21
- package/es/contextmenu/contextmenu.mjs +0 -64
- package/es/contextmenu/index.mjs +0 -10
- package/es/contextmenu/use-contextmenu.mjs +0 -85
- package/es/data-form/data-form-item.mjs +0 -53
- package/es/data-form/data-form.mjs +0 -175
- package/es/data-form/dynamic-component.mjs +0 -23
- package/es/data-form/form-components/Blots/AtBlot.mjs +0 -25
- package/es/data-form/form-components/bwa-date-picker.mjs +0 -45
- package/es/data-form/form-components/bwa-date-time-picker.mjs +0 -50
- package/es/data-form/form-components/bwa-input-float.mjs +0 -43
- package/es/data-form/form-components/bwa-input-integer.mjs +0 -56
- package/es/data-form/form-components/bwa-input.mjs +0 -38
- package/es/data-form/form-components/bwa-multi-select.mjs +0 -35
- package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +0 -234
- package/es/data-form/form-components/bwa-rich-text.mjs +0 -325
- package/es/data-form/form-components/bwa-select.mjs +0 -76
- package/es/data-form/form-components/bwa-textarea.mjs +0 -33
- package/es/data-form/form-components/bwa-upload.mjs +0 -159
- package/es/data-form/form-components/bwa-user-multi-select.mjs +0 -30
- package/es/data-form/form-components/bwa-user-select.mjs +0 -69
- package/es/data-form/index.mjs +0 -34
- package/es/data-table/data-column-view.mjs +0 -131
- package/es/data-table/data-table-card.mjs +0 -118
- package/es/data-table/data-table-column.mjs +0 -56
- package/es/data-table/data-table.mjs +0 -369
- package/es/data-table/dynamic-component.mjs +0 -48
- package/es/data-table/index.mjs +0 -13
- package/es/data-table/use-datatable-drag.mjs +0 -110
- package/es/datatable-settings/datatable-settings.mjs +0 -309
- package/es/datatable-settings/index.mjs +0 -6
- package/es/date-range/date-picker.mjs +0 -128
- package/es/date-range/date-range.mjs +0 -176
- package/es/date-range/index.mjs +0 -6
- package/es/drag-list/constants.mjs +0 -3
- package/es/drag-list/drag-item.mjs +0 -49
- package/es/drag-list/drag-list.mjs +0 -56
- package/es/drag-list/index.mjs +0 -6
- package/es/drag-list/use-drag-list.mjs +0 -154
- package/es/dragable/constants.mjs +0 -4
- package/es/dragable/dragable-item.mjs +0 -25
- package/es/dragable/dragable-operation.mjs +0 -32
- package/es/dragable/dragable.mjs +0 -31
- package/es/dragable/index.mjs +0 -15
- package/es/dragable/use-dragable.mjs +0 -134
- package/es/filter-panel/conditions/condition.mjs +0 -30
- package/es/filter-panel/conditions/date-range-condition.mjs +0 -46
- package/es/filter-panel/conditions/department-condition/department-condition.mjs +0 -81
- package/es/filter-panel/conditions/department-condition/department-node.mjs +0 -74
- package/es/filter-panel/conditions/index.mjs +0 -21
- package/es/filter-panel/conditions/input-condition.mjs +0 -83
- package/es/filter-panel/conditions/multi-user-condition.mjs +0 -64
- package/es/filter-panel/conditions/multiple-menu-condition.mjs +0 -41
- package/es/filter-panel/conditions/single-menu-condition.mjs +0 -68
- package/es/filter-panel/conditions/single-user-condition.mjs +0 -64
- package/es/filter-panel/filter-panel-item.mjs +0 -47
- package/es/filter-panel/filter-panel.mjs +0 -180
- package/es/filter-panel/index.mjs +0 -15
- package/es/filter-panel/use-filter-panel-item.mjs +0 -52
- package/es/filter-panel/use-filter-panel.mjs +0 -135
- package/es/hooks/use-data/index.mjs +0 -152
- package/es/index.mjs +0 -27
- package/es/layout/index.mjs +0 -6
- package/es/layout/layout.mjs +0 -86
- package/es/make-installer.mjs +0 -34
- package/es/math/Rectangle.mjs +0 -25
- package/es/menu/index.mjs +0 -6
- package/es/menu/menu-item.mjs +0 -75
- package/es/menu/menu.mjs +0 -60
- package/es/node_modules/.pnpm/@vueuse_core@9.6.0_vue@3.2.41/node_modules/@vueuse/core/index.mjs +0 -6372
- package/es/node_modules/.pnpm/@vueuse_shared@9.6.0_vue@3.2.41/node_modules/@vueuse/shared/index.mjs +0 -1517
- package/es/panel/index.mjs +0 -6
- package/es/panel/panel.mjs +0 -55
- package/es/panel-tabs/index.mjs +0 -6
- package/es/panel-tabs/panel-tabs.mjs +0 -66
- package/es/pct-filter-panel/index.mjs +0 -10
- package/es/pct-filter-panel/pct-compents/index.mjs +0 -10
- package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +0 -71
- package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +0 -74
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +0 -186
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +0 -147
- package/es/pct-filter-panel/pct-filter-panel-item.mjs +0 -48
- package/es/pct-filter-panel/pct-filter-panel.mjs +0 -251
- package/es/pct-filter-panel/use-filter-panel-item.mjs +0 -56
- package/es/pct-filter-panel/use-filter-panel.mjs +0 -127
- package/es/plugins.mjs +0 -5
- package/es/progress/index.mjs +0 -10
- package/es/progress/progress-item.mjs +0 -68
- package/es/progress/progress.mjs +0 -74
- package/es/progress/use-progress.mjs +0 -46
- package/es/utils/db.mjs +0 -9
- package/es/utils.mjs +0 -99
- package/es/where-filter-panel/index.mjs +0 -1
- package/es/where-filter-panel/use-where-filter-panel.mjs +0 -18
- package/es/where-filter-panel/where-filter-panel.mjs +0 -17
- package/lib/_virtual/_plugin-vue_export-helper.js +0 -13
- package/lib/advance-select/advance-operation.js +0 -47
- package/lib/advance-select/advance-option.js +0 -129
- package/lib/advance-select/advance-select.js +0 -363
- package/lib/advance-select/events-helpers.js +0 -33
- package/lib/advance-select/index.js +0 -20
- package/lib/advance-select/use-advance-option.js +0 -47
- package/lib/advance-select/use-advance-select.js +0 -122
- package/lib/application-slot/application-slot.js +0 -55
- package/lib/application-slot/breadcrumb-item.js +0 -27
- package/lib/application-slot/header-tools-item.js +0 -27
- package/lib/application-slot/index.js +0 -23
- package/lib/breadcrumb-select/breadcrumb-select.js +0 -159
- package/lib/breadcrumb-select/index.js +0 -11
- package/lib/components.js +0 -26
- package/lib/contextmenu/contextmenu-item.js +0 -25
- package/lib/contextmenu/contextmenu.js +0 -68
- package/lib/contextmenu/index.js +0 -16
- package/lib/contextmenu/use-contextmenu.js +0 -89
- package/lib/data-form/data-form-item.js +0 -57
- package/lib/data-form/data-form.js +0 -179
- package/lib/data-form/dynamic-component.js +0 -27
- package/lib/data-form/form-components/Blots/AtBlot.js +0 -31
- package/lib/data-form/form-components/bwa-date-picker.js +0 -49
- package/lib/data-form/form-components/bwa-date-time-picker.js +0 -54
- package/lib/data-form/form-components/bwa-input-float.js +0 -47
- package/lib/data-form/form-components/bwa-input-integer.js +0 -60
- package/lib/data-form/form-components/bwa-input.js +0 -42
- package/lib/data-form/form-components/bwa-multi-select.js +0 -39
- package/lib/data-form/form-components/bwa-rich-text-tinymce.js +0 -242
- package/lib/data-form/form-components/bwa-rich-text.js +0 -333
- package/lib/data-form/form-components/bwa-select.js +0 -80
- package/lib/data-form/form-components/bwa-textarea.js +0 -37
- package/lib/data-form/form-components/bwa-upload.js +0 -163
- package/lib/data-form/form-components/bwa-user-multi-select.js +0 -34
- package/lib/data-form/form-components/bwa-user-select.js +0 -73
- package/lib/data-form/index.js +0 -40
- package/lib/data-table/data-column-view.js +0 -135
- package/lib/data-table/data-table-card.js +0 -122
- package/lib/data-table/data-table-column.js +0 -60
- package/lib/data-table/data-table.js +0 -373
- package/lib/data-table/dynamic-component.js +0 -56
- package/lib/data-table/index.js +0 -20
- package/lib/data-table/use-datatable-drag.js +0 -114
- package/lib/datatable-settings/datatable-settings.js +0 -313
- package/lib/datatable-settings/index.js +0 -11
- package/lib/date-range/date-picker.js +0 -136
- package/lib/date-range/date-range.js +0 -180
- package/lib/date-range/index.js +0 -11
- package/lib/drag-list/constants.js +0 -7
- package/lib/drag-list/drag-item.js +0 -53
- package/lib/drag-list/drag-list.js +0 -60
- package/lib/drag-list/index.js +0 -11
- package/lib/drag-list/use-drag-list.js +0 -158
- package/lib/dragable/constants.js +0 -9
- package/lib/dragable/dragable-item.js +0 -29
- package/lib/dragable/dragable-operation.js +0 -36
- package/lib/dragable/dragable.js +0 -35
- package/lib/dragable/index.js +0 -22
- package/lib/dragable/use-dragable.js +0 -138
- package/lib/filter-panel/conditions/condition.js +0 -34
- package/lib/filter-panel/conditions/date-range-condition.js +0 -50
- package/lib/filter-panel/conditions/department-condition/department-condition.js +0 -85
- package/lib/filter-panel/conditions/department-condition/department-node.js +0 -78
- package/lib/filter-panel/conditions/index.js +0 -26
- package/lib/filter-panel/conditions/input-condition.js +0 -87
- package/lib/filter-panel/conditions/multi-user-condition.js +0 -68
- package/lib/filter-panel/conditions/multiple-menu-condition.js +0 -45
- package/lib/filter-panel/conditions/single-menu-condition.js +0 -72
- package/lib/filter-panel/conditions/single-user-condition.js +0 -68
- package/lib/filter-panel/filter-panel-item.js +0 -51
- package/lib/filter-panel/filter-panel.js +0 -184
- package/lib/filter-panel/index.js +0 -20
- package/lib/filter-panel/use-filter-panel-item.js +0 -56
- package/lib/filter-panel/use-filter-panel.js +0 -139
- package/lib/hooks/use-data/index.js +0 -157
- package/lib/index.js +0 -60
- package/lib/layout/index.js +0 -11
- package/lib/layout/layout.js +0 -90
- package/lib/make-installer.js +0 -62
- package/lib/math/Rectangle.js +0 -29
- package/lib/menu/index.js +0 -11
- package/lib/menu/menu-item.js +0 -79
- package/lib/menu/menu.js +0 -64
- package/lib/node_modules/.pnpm/@vueuse_core@9.6.0_vue@3.2.41/node_modules/@vueuse/core/index.js +0 -6635
- package/lib/node_modules/.pnpm/@vueuse_shared@9.6.0_vue@3.2.41/node_modules/@vueuse/shared/index.js +0 -1628
- package/lib/panel/index.js +0 -11
- package/lib/panel/panel.js +0 -59
- package/lib/panel-tabs/index.js +0 -11
- package/lib/panel-tabs/panel-tabs.js +0 -70
- package/lib/pct-filter-panel/index.js +0 -14
- package/lib/pct-filter-panel/pct-compents/index.js +0 -16
- package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +0 -75
- package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +0 -78
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +0 -190
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +0 -151
- package/lib/pct-filter-panel/pct-filter-panel-item.js +0 -52
- package/lib/pct-filter-panel/pct-filter-panel.js +0 -255
- package/lib/pct-filter-panel/use-filter-panel-item.js +0 -60
- package/lib/pct-filter-panel/use-filter-panel.js +0 -131
- package/lib/plugins.js +0 -9
- package/lib/progress/index.js +0 -16
- package/lib/progress/progress-item.js +0 -72
- package/lib/progress/progress.js +0 -78
- package/lib/progress/use-progress.js +0 -51
- package/lib/utils/db.js +0 -17
- package/lib/utils.js +0 -110
- package/lib/where-filter-panel/index.js +0 -2
- package/lib/where-filter-panel/use-where-filter-panel.js +0 -22
- package/lib/where-filter-panel/where-filter-panel.js +0 -21
- package/style/advance-select.css +0 -1
- package/style/breadcrumb-select.css +0 -1
- package/style/common.css +0 -1
- package/style/contextmenu.css +0 -1
- package/style/data-form.css +0 -1
- package/style/data-table.css +0 -1
- package/style/datatable-settings.css +0 -1
- package/style/date-range.css +0 -1
- package/style/department-condition.css +0 -1
- package/style/drag-list.css +0 -1
- package/style/dragable.css +0 -1
- package/style/filter-panel.css +0 -1
- package/style/index.css +0 -1
- package/style/input-condition.css +0 -1
- package/style/layout.css +0 -1
- package/style/menu.css +0 -1
- package/style/panel-tabs.css +0 -1
- package/style/panel.css +0 -1
- package/style/pct-filter-panel.css +0 -1
- package/style/progress.css +0 -1
- package/style/rich-text.css +0 -1
- package/style/var.css +0 -1
- /package/style/{src/advance-select.scss → advance-select.scss} +0 -0
- /package/style/{src/breadcrumb-select.scss → breadcrumb-select.scss} +0 -0
- /package/style/{src/common → common}/var.scss +0 -0
- /package/style/{src/common.scss → common.scss} +0 -0
- /package/style/{src/contextmenu.scss → contextmenu.scss} +0 -0
- /package/style/{src/data-form.scss → data-form.scss} +0 -0
- /package/style/{src/data-table.scss → data-table.scss} +0 -0
- /package/style/{src/datatable-settings.scss → datatable-settings.scss} +0 -0
- /package/style/{src/date-range.scss → date-range.scss} +0 -0
- /package/style/{src/department-condition.scss → department-condition.scss} +0 -0
- /package/style/{src/drag-list.scss → drag-list.scss} +0 -0
- /package/style/{src/dragable.scss → dragable.scss} +0 -0
- /package/style/{src/filter-panel.scss → filter-panel.scss} +0 -0
- /package/style/{src/index.scss → index.scss} +0 -0
- /package/style/{src/input-condition.scss → input-condition.scss} +0 -0
- /package/style/{src/layout.scss → layout.scss} +0 -0
- /package/style/{src/menu.scss → menu.scss} +0 -0
- /package/style/{src/mixins → mixins}/_var.scss +0 -0
- /package/style/{src/mixins → mixins}/config.scss +0 -0
- /package/style/{src/mixins → mixins}/function.scss +0 -0
- /package/style/{src/mixins → mixins}/mixins.scss +0 -0
- /package/style/{src/panel-tabs.scss → panel-tabs.scss} +0 -0
- /package/style/{src/panel.scss → panel.scss} +0 -0
- /package/style/{src/pct-filter-panel.scss → pct-filter-panel.scss} +0 -0
- /package/style/{src/progress.scss → progress.scss} +0 -0
- /package/style/{src/rich-text.scss → rich-text.scss} +0 -0
- /package/style/{src/theme → theme}/theme.scss +0 -0
- /package/style/{src/theme → theme}/var.scss +0 -0
- /package/style/{src/var.scss → var.scss} +0 -0
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
import { defineComponent, useAttrs, ref, computed, unref, getCurrentScope, onScopeDispose, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementVNode, normalizeClass, createTextVNode, createElementBlock, createVNode, createCommentVNode, toDisplayString, withModifiers, Fragment, renderList, renderSlot } from 'vue';
|
|
2
|
-
import { ElTooltip, ElIcon, ElScrollbar, ElSwitch } from 'element-plus';
|
|
3
|
-
import { useNamespace, useValue, useService, useEventDispatcher } from 'web-base-client-vue';
|
|
4
|
-
import { BwaDraglist } from '../drag-list/index.mjs';
|
|
5
|
-
import { map } from 'rxjs';
|
|
6
|
-
import { dataModelDB } from '../utils/db.mjs';
|
|
7
|
-
import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
|
|
8
|
-
|
|
9
|
-
const __default__ = defineComponent({ name: "BwaDataTableSetting" });
|
|
10
|
-
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
11
|
-
props: {
|
|
12
|
-
dataTable: {
|
|
13
|
-
type: Object,
|
|
14
|
-
required: true
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
setup(__props) {
|
|
18
|
-
const props = __props;
|
|
19
|
-
const attrs = useAttrs();
|
|
20
|
-
const ns = useNamespace("datatable-settings");
|
|
21
|
-
const value = ref(false);
|
|
22
|
-
const appName = useValue("AppName");
|
|
23
|
-
const userService = useService("UserService");
|
|
24
|
-
const userID = computed(() => {
|
|
25
|
-
var _a, _b;
|
|
26
|
-
return ((_b = (_a = unref(userService)) == null ? void 0 : _a.userInfo) == null ? void 0 : _b.id) || "";
|
|
27
|
-
});
|
|
28
|
-
const isShowResetColumn = computed(
|
|
29
|
-
() => !props.dataTable.isDefaultColumnSort()
|
|
30
|
-
);
|
|
31
|
-
const key = computed(
|
|
32
|
-
() => `${unref(appName)}_${props.dataTable.name}_settings`
|
|
33
|
-
);
|
|
34
|
-
const search = ref("");
|
|
35
|
-
const columns = computed(
|
|
36
|
-
() => props.dataTable.getColumns().filter((column) => column.settings.visible).filter((column) => column.settings.visible)
|
|
37
|
-
);
|
|
38
|
-
const initColumns = async () => {
|
|
39
|
-
var _a, _b, _c;
|
|
40
|
-
let persistentColumnInfos = [];
|
|
41
|
-
const result = await dataModelDB.tableHeaderSettings.where("[app+tableName+userID]").equals([unref(appName), props.dataTable.name, unref(userID)]).toArray();
|
|
42
|
-
if (result.length) {
|
|
43
|
-
persistentColumnInfos = (_b = (_a = result[0]) == null ? void 0 : _a.columnInfo) != null ? _b : [];
|
|
44
|
-
}
|
|
45
|
-
if (persistentColumnInfos.some((item) => typeof item === "string")) {
|
|
46
|
-
persistentColumnInfos = persistentColumnInfos.map((columnInfo) => {
|
|
47
|
-
return typeof columnInfo === "object" ? columnInfo : { name: columnInfo, visible: true };
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
const _dataTable = props.dataTable;
|
|
51
|
-
let dataTableColumns = _dataTable.getColumns().slice().filter((item) => item.settings.visible);
|
|
52
|
-
persistentColumnInfos = persistentColumnInfos.filter(
|
|
53
|
-
(item) => dataTableColumns.findIndex((column) => column.name === item.name) !== -1
|
|
54
|
-
);
|
|
55
|
-
if (!persistentColumnInfos) {
|
|
56
|
-
return dataTableColumns;
|
|
57
|
-
}
|
|
58
|
-
let sortedColumns = persistentColumnInfos.map(
|
|
59
|
-
(columnInfo) => dataTableColumns.find((column) => column.name === columnInfo.name)
|
|
60
|
-
).filter(Boolean);
|
|
61
|
-
dataTableColumns = sortedColumns.concat(
|
|
62
|
-
dataTableColumns.filter(
|
|
63
|
-
(column) => !sortedColumns.find((col) => column.name === col.name)
|
|
64
|
-
)
|
|
65
|
-
);
|
|
66
|
-
for (const column of dataTableColumns) {
|
|
67
|
-
const persistentItem = persistentColumnInfos.find(
|
|
68
|
-
(item) => item.name === column.name
|
|
69
|
-
);
|
|
70
|
-
column.visible = (_c = persistentItem == null ? void 0 : persistentItem.visible) != null ? _c : column.visible;
|
|
71
|
-
}
|
|
72
|
-
props.dataTable.setDisplayColumns(
|
|
73
|
-
dataTableColumns.filter((column) => column.visible)
|
|
74
|
-
);
|
|
75
|
-
return dataTableColumns;
|
|
76
|
-
};
|
|
77
|
-
const resetColumns = () => {
|
|
78
|
-
const _dataTable = props.dataTable;
|
|
79
|
-
_dataTable.resetColumnSort();
|
|
80
|
-
};
|
|
81
|
-
const allSearchedColumns = computed(() => {
|
|
82
|
-
const _search = unref(search);
|
|
83
|
-
return unref(columns).filter((column) => column.title.indexOf(_search) > -1);
|
|
84
|
-
});
|
|
85
|
-
const hiddenSearchedColumns = computed(
|
|
86
|
-
() => unref(allSearchedColumns).filter((item) => !item.visible)
|
|
87
|
-
);
|
|
88
|
-
const displaySearchedColumns = computed(() => {
|
|
89
|
-
const _search = unref(search);
|
|
90
|
-
return props.dataTable.getDisplayColumns().filter((column) => column.settings.visible).filter((column) => column.title.indexOf(_search) > -1);
|
|
91
|
-
});
|
|
92
|
-
const handleSortChange = (sort) => {
|
|
93
|
-
const _columns = unref(columns);
|
|
94
|
-
const displayColumns = sort.map(
|
|
95
|
-
(attrName) => {
|
|
96
|
-
var _a;
|
|
97
|
-
return (_a = _columns.find((column) => column.attrName === attrName)) != null ? _a : null;
|
|
98
|
-
}
|
|
99
|
-
).filter(Boolean);
|
|
100
|
-
props.dataTable.setDisplayColumns(displayColumns);
|
|
101
|
-
};
|
|
102
|
-
const scope = getCurrentScope();
|
|
103
|
-
const handleInitCompleted = async () => {
|
|
104
|
-
const dataTableColumns = await initColumns();
|
|
105
|
-
const subscription = props.dataTable.getDisplayColumnsSubject().pipe(
|
|
106
|
-
map((displayColumns) => {
|
|
107
|
-
const hiddenColumns = dataTableColumns.filter(
|
|
108
|
-
(column) => !displayColumns.find(
|
|
109
|
-
(displayColumn) => displayColumn.attrName === column.attrName
|
|
110
|
-
)
|
|
111
|
-
);
|
|
112
|
-
return [...displayColumns, ...hiddenColumns].map((column) => ({
|
|
113
|
-
name: column.name,
|
|
114
|
-
visible: column.visible
|
|
115
|
-
}));
|
|
116
|
-
})
|
|
117
|
-
).subscribe({
|
|
118
|
-
next: (columnInfo) => {
|
|
119
|
-
dataModelDB.tableHeaderSettings.put({
|
|
120
|
-
app: unref(appName),
|
|
121
|
-
tableName: props.dataTable.name,
|
|
122
|
-
userID: unref(userID),
|
|
123
|
-
columnInfo
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
scope.run(() => {
|
|
128
|
-
onScopeDispose(() => {
|
|
129
|
-
subscription.unsubscribe();
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
if (!props.dataTable.inited) {
|
|
134
|
-
useEventDispatcher(props.dataTable, "init-completed", handleInitCompleted);
|
|
135
|
-
} else {
|
|
136
|
-
handleInitCompleted();
|
|
137
|
-
}
|
|
138
|
-
return (_ctx, _cache) => {
|
|
139
|
-
const _component_RefreshRight = resolveComponent("RefreshRight");
|
|
140
|
-
const _component_Close = resolveComponent("Close");
|
|
141
|
-
return openBlock(), createBlock(unref(ElTooltip), mergeProps({
|
|
142
|
-
visible: value.value,
|
|
143
|
-
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => value.value = $event)
|
|
144
|
-
}, unref(attrs), {
|
|
145
|
-
effect: "light",
|
|
146
|
-
"show-arrow": false,
|
|
147
|
-
trigger: "click",
|
|
148
|
-
"popper-class": unref(ns).b(),
|
|
149
|
-
"gpu-acceleration": false,
|
|
150
|
-
placement: "bottom",
|
|
151
|
-
"append-to": ".bwa-application"
|
|
152
|
-
}), {
|
|
153
|
-
content: withCtx(() => [
|
|
154
|
-
createElementVNode("div", {
|
|
155
|
-
class: normalizeClass(unref(ns).e("content"))
|
|
156
|
-
}, [
|
|
157
|
-
createElementVNode("div", {
|
|
158
|
-
class: normalizeClass(unref(ns).e("header"))
|
|
159
|
-
}, [
|
|
160
|
-
createTextVNode(" \u8868\u5934\u8BBE\u7F6E "),
|
|
161
|
-
createElementVNode("span", {
|
|
162
|
-
class: normalizeClass(unref(ns).e("tools"))
|
|
163
|
-
}, [
|
|
164
|
-
unref(isShowResetColumn) ? (openBlock(), createElementBlock("span", {
|
|
165
|
-
key: 0,
|
|
166
|
-
class: normalizeClass([unref(ns).e("tools-item"), unref(ns).e("refresh")]),
|
|
167
|
-
onClick: resetColumns
|
|
168
|
-
}, [
|
|
169
|
-
createVNode(unref(ElTooltip), {
|
|
170
|
-
content: "\u6062\u590D\u9ED8\u8BA4",
|
|
171
|
-
"append-to": ".bwa-application"
|
|
172
|
-
}, {
|
|
173
|
-
default: withCtx(() => [
|
|
174
|
-
createVNode(unref(ElIcon), null, {
|
|
175
|
-
default: withCtx(() => [
|
|
176
|
-
createVNode(_component_RefreshRight)
|
|
177
|
-
]),
|
|
178
|
-
_: 1
|
|
179
|
-
})
|
|
180
|
-
]),
|
|
181
|
-
_: 1
|
|
182
|
-
})
|
|
183
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
184
|
-
createElementVNode("span", {
|
|
185
|
-
class: normalizeClass([unref(ns).e("tools-item"), unref(ns).e("close")]),
|
|
186
|
-
onClick: _cache[0] || (_cache[0] = ($event) => value.value = false)
|
|
187
|
-
}, [
|
|
188
|
-
createVNode(unref(ElTooltip), {
|
|
189
|
-
content: "\u5173\u95ED",
|
|
190
|
-
"append-to": ".bwa-application"
|
|
191
|
-
}, {
|
|
192
|
-
default: withCtx(() => [
|
|
193
|
-
createVNode(unref(ElIcon), null, {
|
|
194
|
-
default: withCtx(() => [
|
|
195
|
-
createVNode(_component_Close)
|
|
196
|
-
]),
|
|
197
|
-
_: 1
|
|
198
|
-
})
|
|
199
|
-
]),
|
|
200
|
-
_: 1
|
|
201
|
-
})
|
|
202
|
-
], 2)
|
|
203
|
-
], 2)
|
|
204
|
-
], 2),
|
|
205
|
-
createCommentVNode(` <div :class="ns.e('search')">\r
|
|
206
|
-
<ElInput\r
|
|
207
|
-
v-model="search"\r
|
|
208
|
-
:clearable="true"\r
|
|
209
|
-
prefix-icon="Search"\r
|
|
210
|
-
placeholder="\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"\r
|
|
211
|
-
/>\r
|
|
212
|
-
</div> `),
|
|
213
|
-
createVNode(unref(ElScrollbar), { "max-height": "500px" }, {
|
|
214
|
-
default: withCtx(() => [
|
|
215
|
-
createElementVNode("div", {
|
|
216
|
-
class: normalizeClass(unref(ns).e("main"))
|
|
217
|
-
}, [
|
|
218
|
-
unref(displaySearchedColumns).length ? (openBlock(), createElementBlock("div", {
|
|
219
|
-
key: 0,
|
|
220
|
-
class: normalizeClass(unref(ns).b("section"))
|
|
221
|
-
}, [
|
|
222
|
-
createElementVNode("div", {
|
|
223
|
-
class: normalizeClass(unref(ns).be("section", "header"))
|
|
224
|
-
}, "\u663E\u793A\u5B57\u6BB5", 2),
|
|
225
|
-
createVNode(unref(BwaDraglist), {
|
|
226
|
-
data: unref(displaySearchedColumns),
|
|
227
|
-
labelAttr: "title",
|
|
228
|
-
idAttr: "attrName",
|
|
229
|
-
onSortChange: handleSortChange
|
|
230
|
-
}, {
|
|
231
|
-
default: withCtx(({ item }) => [
|
|
232
|
-
createElementVNode("div", {
|
|
233
|
-
class: normalizeClass(unref(ns).be("section", "content"))
|
|
234
|
-
}, [
|
|
235
|
-
createElementVNode("div", {
|
|
236
|
-
class: normalizeClass(unref(ns).e("field-item"))
|
|
237
|
-
}, [
|
|
238
|
-
createElementVNode("span", null, toDisplayString(item.title), 1),
|
|
239
|
-
createVNode(unref(ElSwitch), {
|
|
240
|
-
modelValue: item.visible,
|
|
241
|
-
"onUpdate:modelValue": ($event) => item.visible = $event,
|
|
242
|
-
size: "small",
|
|
243
|
-
disabled: item.settings.disabled,
|
|
244
|
-
onMousedown: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
245
|
-
}, ["stop"]))
|
|
246
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
247
|
-
], 2)
|
|
248
|
-
], 2)
|
|
249
|
-
]),
|
|
250
|
-
_: 1
|
|
251
|
-
}, 8, ["data"]),
|
|
252
|
-
createCommentVNode(` <div\r
|
|
253
|
-
v-show="!displaySearchedColumns.length"\r
|
|
254
|
-
:class="ns.be('section', 'empty')"\r
|
|
255
|
-
>\r
|
|
256
|
-
\u6682\u65E0\u5B57\u6BB5\r
|
|
257
|
-
</div> `)
|
|
258
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
259
|
-
unref(hiddenSearchedColumns).length ? (openBlock(), createElementBlock("div", {
|
|
260
|
-
key: 1,
|
|
261
|
-
class: normalizeClass(unref(ns).b("section"))
|
|
262
|
-
}, [
|
|
263
|
-
createElementVNode("div", {
|
|
264
|
-
class: normalizeClass(unref(ns).be("section", "header"))
|
|
265
|
-
}, "\u672A\u663E\u793A\u5B57\u6BB5", 2),
|
|
266
|
-
createElementVNode("div", {
|
|
267
|
-
class: normalizeClass(unref(ns).be("section", "content"))
|
|
268
|
-
}, [
|
|
269
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(hiddenSearchedColumns), (column) => {
|
|
270
|
-
return openBlock(), createElementBlock("div", {
|
|
271
|
-
key: column.attrName,
|
|
272
|
-
class: normalizeClass(unref(ns).e("field-item"))
|
|
273
|
-
}, [
|
|
274
|
-
createElementVNode("span", null, toDisplayString(column.title), 1),
|
|
275
|
-
createVNode(unref(ElSwitch), {
|
|
276
|
-
modelValue: column.visible,
|
|
277
|
-
"onUpdate:modelValue": ($event) => column.visible = $event,
|
|
278
|
-
size: "small",
|
|
279
|
-
disabled: column.settings.disabled
|
|
280
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
281
|
-
], 2);
|
|
282
|
-
}), 128))
|
|
283
|
-
], 2),
|
|
284
|
-
createCommentVNode(` <div\r
|
|
285
|
-
v-show="!hiddenSearchedColumns.length"\r
|
|
286
|
-
:class="ns.be('section', 'empty')"\r
|
|
287
|
-
>\r
|
|
288
|
-
\u6682\u65E0\u5B57\u6BB5\r
|
|
289
|
-
</div> `)
|
|
290
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
291
|
-
], 2)
|
|
292
|
-
]),
|
|
293
|
-
_: 1
|
|
294
|
-
})
|
|
295
|
-
], 2)
|
|
296
|
-
]),
|
|
297
|
-
default: withCtx(() => [
|
|
298
|
-
createElementVNode("span", null, [
|
|
299
|
-
renderSlot(_ctx.$slots, "default")
|
|
300
|
-
])
|
|
301
|
-
]),
|
|
302
|
-
_: 3
|
|
303
|
-
}, 16, ["visible", "popper-class"]);
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
var DataTableSettings = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "datatable-settings.vue"]]);
|
|
308
|
-
|
|
309
|
-
export { DataTableSettings as default };
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, provide, computed, resolveComponent, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, normalizeClass, createTextVNode } from 'vue';
|
|
2
|
-
import { ROOT_PICKER_INJECTION_KEY } from 'element-plus/es/components/date-picker/src/constants';
|
|
3
|
-
import ElPanelDatePicker from 'element-plus/es/components/date-picker/src/date-picker-com/panel-date-pick';
|
|
4
|
-
import { parseDate, valueEquals, formatter } from 'element-plus/es/components/time-picker/src/utils';
|
|
5
|
-
import { useLocale } from 'element-plus/es/hooks/index';
|
|
6
|
-
import { useNamespace } from 'web-base-client-vue';
|
|
7
|
-
import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
|
|
8
|
-
|
|
9
|
-
const __default__ = defineComponent({ name: "BwaDatePicker" });
|
|
10
|
-
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
11
|
-
props: {
|
|
12
|
-
modelValue: {
|
|
13
|
-
type: [String, Date, Array]
|
|
14
|
-
},
|
|
15
|
-
visible: {
|
|
16
|
-
type: Boolean
|
|
17
|
-
},
|
|
18
|
-
format: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: "YYYY-MM-DD"
|
|
21
|
-
},
|
|
22
|
-
shortcuts: {
|
|
23
|
-
type: Array,
|
|
24
|
-
default: () => []
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
emits: ["update:modelValue", "update:visible"],
|
|
28
|
-
setup(__props, { emit }) {
|
|
29
|
-
const props = __props;
|
|
30
|
-
const ns = useNamespace("datepicker");
|
|
31
|
-
const { lang } = useLocale();
|
|
32
|
-
const visible = ref(false);
|
|
33
|
-
watch(visible, () => {
|
|
34
|
-
emit("update:visible", visible.value);
|
|
35
|
-
});
|
|
36
|
-
provide("EP_PICKER_BASE", {
|
|
37
|
-
props
|
|
38
|
-
});
|
|
39
|
-
provide(ROOT_PICKER_INJECTION_KEY, {
|
|
40
|
-
slots: {},
|
|
41
|
-
pickerNs: null
|
|
42
|
-
});
|
|
43
|
-
const parsedValue = computed(() => {
|
|
44
|
-
return parseDate(props.modelValue, props.format, lang);
|
|
45
|
-
});
|
|
46
|
-
const emitInput = (input) => {
|
|
47
|
-
if (valueEquals(props.modelValue, input)) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
let formatted;
|
|
51
|
-
if (Array.isArray(input)) {
|
|
52
|
-
formatted = input.map((item) => formatter(item, props.format, lang.value));
|
|
53
|
-
} else {
|
|
54
|
-
formatted = formatter(input, props.format, lang.value);
|
|
55
|
-
}
|
|
56
|
-
emit("update:modelValue", formatted);
|
|
57
|
-
};
|
|
58
|
-
const onPick = (date) => {
|
|
59
|
-
let result;
|
|
60
|
-
if (Array.isArray(date)) {
|
|
61
|
-
result = date.map((_) => _.toDate());
|
|
62
|
-
} else {
|
|
63
|
-
result = date ? date.toDate() : date;
|
|
64
|
-
}
|
|
65
|
-
emitInput(result);
|
|
66
|
-
visible.value = false;
|
|
67
|
-
};
|
|
68
|
-
const onClear = () => {
|
|
69
|
-
emit("update:modelValue", "");
|
|
70
|
-
visible.value = false;
|
|
71
|
-
};
|
|
72
|
-
return (_ctx, _cache) => {
|
|
73
|
-
const _component_ElButton = resolveComponent("ElButton");
|
|
74
|
-
const _component_ElTooltip = resolveComponent("ElTooltip");
|
|
75
|
-
return openBlock(), createBlock(_component_ElTooltip, {
|
|
76
|
-
trigger: "click",
|
|
77
|
-
pure: "",
|
|
78
|
-
teleported: "",
|
|
79
|
-
effect: "light",
|
|
80
|
-
role: "dialog",
|
|
81
|
-
transition: `el-zoom-in-top`,
|
|
82
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
83
|
-
"gpu-acceleration": false,
|
|
84
|
-
"show-arrow": false,
|
|
85
|
-
"stop-popper-mouse-event": false,
|
|
86
|
-
visible: visible.value,
|
|
87
|
-
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
|
88
|
-
"hide-after": 0,
|
|
89
|
-
"popper-class": unref(ns).b(),
|
|
90
|
-
persistent: "",
|
|
91
|
-
"append-to": ".bwa-application"
|
|
92
|
-
}, {
|
|
93
|
-
default: withCtx(() => [
|
|
94
|
-
renderSlot(_ctx.$slots, "default", { visible: visible.value })
|
|
95
|
-
]),
|
|
96
|
-
content: withCtx(() => [
|
|
97
|
-
createVNode(unref(ElPanelDatePicker), {
|
|
98
|
-
type: "date",
|
|
99
|
-
"parsed-value": unref(parsedValue),
|
|
100
|
-
onPick,
|
|
101
|
-
teleported: false
|
|
102
|
-
}, {
|
|
103
|
-
sidebar: withCtx(() => [
|
|
104
|
-
createElementVNode("div", {
|
|
105
|
-
class: normalizeClass(unref(ns).e("sidebar"))
|
|
106
|
-
}, [
|
|
107
|
-
createVNode(_component_ElButton, {
|
|
108
|
-
size: "small",
|
|
109
|
-
onClick: onClear
|
|
110
|
-
}, {
|
|
111
|
-
default: withCtx(() => [
|
|
112
|
-
createTextVNode("\u6E05\u7A7A")
|
|
113
|
-
]),
|
|
114
|
-
_: 1
|
|
115
|
-
})
|
|
116
|
-
], 2)
|
|
117
|
-
]),
|
|
118
|
-
_: 1
|
|
119
|
-
}, 8, ["parsed-value"])
|
|
120
|
-
]),
|
|
121
|
-
_: 3
|
|
122
|
-
}, 8, ["visible", "popper-class"]);
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
var datePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "date-picker.vue"]]);
|
|
127
|
-
|
|
128
|
-
export { datePicker as default };
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, inject, computed, useSlots, unref, provide, watch, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createElementVNode, normalizeClass, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from 'vue';
|
|
2
|
-
import { useNamespace, filterPanelItemKey, useGlobalConfig } from 'web-base-client-vue';
|
|
3
|
-
import { timePickerDefaultProps, ROOT_PICKER_INJECTION_KEY, useNamespace as useNamespace$1, dayjs, parseDate, valueEquals, formatter, PanelDateRange } from 'element-plus';
|
|
4
|
-
import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
|
|
5
|
-
|
|
6
|
-
const __default__ = defineComponent({ name: "BwaDateRange" });
|
|
7
|
-
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
8
|
-
props: {
|
|
9
|
-
...timePickerDefaultProps,
|
|
10
|
-
modelValue: {
|
|
11
|
-
type: null,
|
|
12
|
-
required: true
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
emits: ["update:modelValue"],
|
|
16
|
-
setup(__props, { emit }) {
|
|
17
|
-
const props = __props;
|
|
18
|
-
const ns = useNamespace("daterange");
|
|
19
|
-
const pickerVisivle = ref(false);
|
|
20
|
-
const filterPanelItem = inject(filterPanelItemKey);
|
|
21
|
-
const column = computed(() => {
|
|
22
|
-
var _a;
|
|
23
|
-
return (_a = filterPanelItem == null ? void 0 : filterPanelItem.column) != null ? _a : null;
|
|
24
|
-
});
|
|
25
|
-
const slots = useSlots();
|
|
26
|
-
const locale = useGlobalConfig("locale", "ZH");
|
|
27
|
-
const lang = computed(() => unref(locale).name);
|
|
28
|
-
provide(ROOT_PICKER_INJECTION_KEY, {
|
|
29
|
-
slots,
|
|
30
|
-
pickerNs: useNamespace$1("picker-panel")
|
|
31
|
-
});
|
|
32
|
-
provide("EP_PICKER_BASE", {
|
|
33
|
-
props
|
|
34
|
-
});
|
|
35
|
-
watch(
|
|
36
|
-
computed(() => props.modelValue),
|
|
37
|
-
() => {
|
|
38
|
-
if (!props.modelValue || Array.isArray(props.modelValue) || typeof props.modelValue !== "object") {
|
|
39
|
-
emit("update:modelValue", { start: "", end: "" });
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
{ immediate: true }
|
|
43
|
-
);
|
|
44
|
-
const formatShowTime = (date) => {
|
|
45
|
-
return date ? dayjs(date).format("YYYY-MM-DD") : "";
|
|
46
|
-
};
|
|
47
|
-
const startTime = computed(() => {
|
|
48
|
-
var _a;
|
|
49
|
-
if (!((_a = props.modelValue) == null ? void 0 : _a.start)) {
|
|
50
|
-
return "";
|
|
51
|
-
}
|
|
52
|
-
return dayjs(props.modelValue.start).set("hour", 0).set("minute", 0).set("second", 0).format("YYYY-MM-DD HH:mm:ss");
|
|
53
|
-
});
|
|
54
|
-
const endTime = computed(() => {
|
|
55
|
-
var _a;
|
|
56
|
-
if (!((_a = props.modelValue) == null ? void 0 : _a.end)) {
|
|
57
|
-
return "";
|
|
58
|
-
}
|
|
59
|
-
return dayjs(props.modelValue.end).set("hour", 23).set("minute", 59).set("second", 59).format("YYYY-MM-DD HH:mm:ss");
|
|
60
|
-
});
|
|
61
|
-
const formatStartTime = computed(() => formatShowTime(unref(startTime)));
|
|
62
|
-
const formatEndTime = computed(() => formatShowTime(unref(endTime)));
|
|
63
|
-
const dateRangeValue = computed(() => [unref(startTime), unref(endTime)]);
|
|
64
|
-
const valueIsEmpty = computed(() => {
|
|
65
|
-
const value = unref(dateRangeValue);
|
|
66
|
-
return !value || Array.isArray(value) && !value.filter(Boolean).length;
|
|
67
|
-
});
|
|
68
|
-
const parsedValue = computed(() => {
|
|
69
|
-
const { valueFormat } = props;
|
|
70
|
-
const value = unref(dateRangeValue);
|
|
71
|
-
if (!unref(valueIsEmpty)) {
|
|
72
|
-
return value.map((d) => parseDate(d, valueFormat, unref(lang)));
|
|
73
|
-
}
|
|
74
|
-
return [];
|
|
75
|
-
});
|
|
76
|
-
const emitInput = (input) => {
|
|
77
|
-
if (!valueEquals(unref(dateRangeValue), input)) {
|
|
78
|
-
const formatted = input.map(
|
|
79
|
-
(item) => formatter(item, props.valueFormat, unref(lang))
|
|
80
|
-
);
|
|
81
|
-
emit("update:modelValue", {
|
|
82
|
-
start: formatted[0] ? dayjs(formatted[0]).set("hour", 0).set("minute", 0).set("second", 0).format("YYYY-MM-DD HH:mm:ss") : "",
|
|
83
|
-
end: formatted[1] ? dayjs(formatted[1]).set("hour", 23).set("minute", 59).set("second", 59).format("YYYY-MM-DD HH:mm:ss") : ""
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
const onPick = (date, visible = false) => {
|
|
88
|
-
pickerVisivle.value = visible;
|
|
89
|
-
emitInput(date.map((item) => item.toDate()));
|
|
90
|
-
};
|
|
91
|
-
return (_ctx, _cache) => {
|
|
92
|
-
const _component_CaretBottom = resolveComponent("CaretBottom");
|
|
93
|
-
const _component_ElIcon = resolveComponent("ElIcon");
|
|
94
|
-
const _component_ElTooltip = resolveComponent("ElTooltip");
|
|
95
|
-
return openBlock(), createBlock(_component_ElTooltip, {
|
|
96
|
-
visible: pickerVisivle.value,
|
|
97
|
-
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => pickerVisivle.value = $event),
|
|
98
|
-
pure: "",
|
|
99
|
-
teleported: "",
|
|
100
|
-
effect: "light",
|
|
101
|
-
role: "dialog",
|
|
102
|
-
transition: `el-zoom-in-top`,
|
|
103
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
104
|
-
"gpu-acceleration": false,
|
|
105
|
-
"show-arrow": false,
|
|
106
|
-
"stop-popper-mouse-event": false,
|
|
107
|
-
"hide-after": 0,
|
|
108
|
-
persistent: "",
|
|
109
|
-
trigger: "click",
|
|
110
|
-
"append-to": ".bwa-application"
|
|
111
|
-
}, {
|
|
112
|
-
default: withCtx(() => [
|
|
113
|
-
renderSlot(_ctx.$slots, "pct-default", {
|
|
114
|
-
formatStartTime: unref(formatStartTime),
|
|
115
|
-
formatEndTime: unref(formatEndTime)
|
|
116
|
-
}, () => [
|
|
117
|
-
createElementVNode("div", {
|
|
118
|
-
class: normalizeClass([unref(ns).b(), unref(ns).is("active", pickerVisivle.value)])
|
|
119
|
-
}, [
|
|
120
|
-
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
121
|
-
unref(column) ? (openBlock(), createElementBlock("span", {
|
|
122
|
-
key: 0,
|
|
123
|
-
class: normalizeClass(unref(ns).e("label"))
|
|
124
|
-
}, toDisplayString(unref(column).title), 3)) : createCommentVNode("v-if", true)
|
|
125
|
-
]),
|
|
126
|
-
createElementVNode("span", {
|
|
127
|
-
class: normalizeClass([unref(ns).e("time"), unref(ns).is("empty", !unref(formatStartTime))])
|
|
128
|
-
}, [
|
|
129
|
-
createElementVNode("span", {
|
|
130
|
-
class: normalizeClass(unref(ns).e("content"))
|
|
131
|
-
}, toDisplayString(unref(formatStartTime) ? unref(formatStartTime) : "\u5F00\u59CB\u65E5\u671F"), 3),
|
|
132
|
-
createVNode(_component_ElIcon, {
|
|
133
|
-
class: normalizeClass(unref(ns).e("caret"))
|
|
134
|
-
}, {
|
|
135
|
-
default: withCtx(() => [
|
|
136
|
-
createVNode(_component_CaretBottom)
|
|
137
|
-
]),
|
|
138
|
-
_: 1
|
|
139
|
-
}, 8, ["class"])
|
|
140
|
-
], 2),
|
|
141
|
-
createTextVNode(" \u81F3 "),
|
|
142
|
-
createElementVNode("span", {
|
|
143
|
-
class: normalizeClass([unref(ns).e("time"), unref(ns).is("empty", !unref(formatEndTime))])
|
|
144
|
-
}, [
|
|
145
|
-
createElementVNode("span", {
|
|
146
|
-
class: normalizeClass(unref(ns).e("content"))
|
|
147
|
-
}, toDisplayString(unref(formatEndTime) ? unref(formatEndTime) : "\u7ED3\u675F\u65E5\u671F"), 3),
|
|
148
|
-
createVNode(_component_ElIcon, {
|
|
149
|
-
class: normalizeClass(unref(ns).e("caret"))
|
|
150
|
-
}, {
|
|
151
|
-
default: withCtx(() => [
|
|
152
|
-
createVNode(_component_CaretBottom)
|
|
153
|
-
]),
|
|
154
|
-
_: 1
|
|
155
|
-
}, 8, ["class"])
|
|
156
|
-
], 2)
|
|
157
|
-
], 2)
|
|
158
|
-
])
|
|
159
|
-
]),
|
|
160
|
-
content: withCtx(() => [
|
|
161
|
-
createVNode(unref(PanelDateRange), {
|
|
162
|
-
"parsed-value": unref(parsedValue),
|
|
163
|
-
type: "daterange",
|
|
164
|
-
visible: pickerVisivle.value,
|
|
165
|
-
onPick,
|
|
166
|
-
teleported: false
|
|
167
|
-
}, null, 8, ["parsed-value", "visible"])
|
|
168
|
-
]),
|
|
169
|
-
_: 3
|
|
170
|
-
}, 8, ["visible"]);
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
var DateRange = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "date-range.vue"]]);
|
|
175
|
-
|
|
176
|
-
export { DateRange as default };
|
package/es/date-range/index.mjs
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { defineComponent, inject, getCurrentInstance, onMounted, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot } from 'vue';
|
|
2
|
-
import { useNamespace } from 'web-base-client-vue';
|
|
3
|
-
import { dragListContextKey } from './constants.mjs';
|
|
4
|
-
import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
|
|
5
|
-
|
|
6
|
-
const __default__ = defineComponent({ name: "BwaDragItem" });
|
|
7
|
-
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
8
|
-
setup(__props, { expose }) {
|
|
9
|
-
const ns = useNamespace("dragitem");
|
|
10
|
-
;
|
|
11
|
-
const dragListContext = inject(dragListContextKey);
|
|
12
|
-
const id = dragListContext.nextID();
|
|
13
|
-
const instance = getCurrentInstance();
|
|
14
|
-
const handleMousedown = (event) => {
|
|
15
|
-
if (event.button !== 0) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
dragListContext.startDrag(instance.proxy);
|
|
19
|
-
};
|
|
20
|
-
onMounted(() => {
|
|
21
|
-
dragListContext.handleItemCreate(id, instance.proxy);
|
|
22
|
-
});
|
|
23
|
-
onBeforeUnmount(() => {
|
|
24
|
-
dragListContext.handleItemDestroy(id, instance.proxy);
|
|
25
|
-
});
|
|
26
|
-
expose({
|
|
27
|
-
id
|
|
28
|
-
});
|
|
29
|
-
return (_ctx, _cache) => {
|
|
30
|
-
return openBlock(), createElementBlock("div", {
|
|
31
|
-
class: normalizeClass(unref(ns).b()),
|
|
32
|
-
"draggable-context-id": "",
|
|
33
|
-
onMousedown: handleMousedown
|
|
34
|
-
}, [
|
|
35
|
-
createElementVNode("i", {
|
|
36
|
-
class: normalizeClass([unref(ns).e("drag-icon"), "ptp-icon", "ptp-buzhou-yidong"])
|
|
37
|
-
}, null, 2),
|
|
38
|
-
createElementVNode("span", {
|
|
39
|
-
class: normalizeClass(unref(ns).e("content"))
|
|
40
|
-
}, [
|
|
41
|
-
renderSlot(_ctx.$slots, "default")
|
|
42
|
-
], 2)
|
|
43
|
-
], 34);
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
var DragItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "drag-item.vue"]]);
|
|
48
|
-
|
|
49
|
-
export { DragItem as default };
|