@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,234 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, getCurrentScope, computed, reactive, onMounted, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, unref, createVNode, createBlock, Teleport, normalizeStyle, renderList, toDisplayString, createCommentVNode } from 'vue';
|
|
2
|
-
import { useNamespace, useService } from 'web-base-client-vue';
|
|
3
|
-
import TinyMCEEditor from '@tinymce/tinymce-vue';
|
|
4
|
-
import 'quill/dist/quill.snow.css';
|
|
5
|
-
import { Subject, Observable, map, filter, mergeMap, merge, from, delayWhen, timer, takeUntil, tap } from 'rxjs';
|
|
6
|
-
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
7
|
-
|
|
8
|
-
const _hoisted_1 = ["onClick"];
|
|
9
|
-
const __default__ = defineComponent({
|
|
10
|
-
name: "BwaRichText"
|
|
11
|
-
});
|
|
12
|
-
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
13
|
-
props: {
|
|
14
|
-
placeholder: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: ""
|
|
17
|
-
},
|
|
18
|
-
modelValue: {
|
|
19
|
-
type: null
|
|
20
|
-
},
|
|
21
|
-
disabled: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
emits: ["update:modelValue"],
|
|
27
|
-
setup(__props, { emit }) {
|
|
28
|
-
const props = __props;
|
|
29
|
-
let resolve = null;
|
|
30
|
-
const setupPromise = new Promise((relv) => {
|
|
31
|
-
resolve = relv;
|
|
32
|
-
});
|
|
33
|
-
const initOptions = {
|
|
34
|
-
promotion: false,
|
|
35
|
-
language: "zh-Hans",
|
|
36
|
-
setup: resolve
|
|
37
|
-
};
|
|
38
|
-
const ns = useNamespace("rich-text");
|
|
39
|
-
const fileService = useService("FileService");
|
|
40
|
-
const editorRef = ref(null);
|
|
41
|
-
const tinyMCEEditorRef = ref(null);
|
|
42
|
-
const currentScope = getCurrentScope();
|
|
43
|
-
const value = computed({
|
|
44
|
-
get: () => props.modelValue || "",
|
|
45
|
-
set: (v) => {
|
|
46
|
-
emit("update:modelValue", v);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
const focusing = ref(false);
|
|
50
|
-
const AT_REGEXP = /[^\da-zA-Z]@[^@]*$/;
|
|
51
|
-
const atPersonInfos = reactive({
|
|
52
|
-
node: null,
|
|
53
|
-
content: "",
|
|
54
|
-
selection: null,
|
|
55
|
-
index: -1,
|
|
56
|
-
style: null
|
|
57
|
-
});
|
|
58
|
-
const selectPersonSubject = new Subject();
|
|
59
|
-
const handlePersonSelect = selectPersonSubject.next.bind(selectPersonSubject);
|
|
60
|
-
window.atPersonInfos = atPersonInfos;
|
|
61
|
-
onMounted(async () => {
|
|
62
|
-
const editor = await setupPromise;
|
|
63
|
-
window.editor = editor;
|
|
64
|
-
const inputObservable = new Observable((observer) => {
|
|
65
|
-
const next = observer.next.bind(observer);
|
|
66
|
-
editor.on("input", next);
|
|
67
|
-
return () => {
|
|
68
|
-
editor.off("input", next);
|
|
69
|
-
};
|
|
70
|
-
});
|
|
71
|
-
editor.on("change", (event) => {
|
|
72
|
-
console.log(event);
|
|
73
|
-
});
|
|
74
|
-
const getSelection = (event) => {
|
|
75
|
-
if (typeof event.target.nodeType === "number" && typeof event.target.tagName === "string") {
|
|
76
|
-
return event.target.ownerDocument.getSelection();
|
|
77
|
-
}
|
|
78
|
-
return event.target.iframeElement.contentDocument.getSelection();
|
|
79
|
-
};
|
|
80
|
-
const subject = new Subject();
|
|
81
|
-
inputObservable.pipe(
|
|
82
|
-
map((event) => {
|
|
83
|
-
if (event.data !== "@") {
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
const selection = event.currentTarget.ownerDocument.getSelection();
|
|
87
|
-
const focusNode = selection.focusNode;
|
|
88
|
-
if (focusNode.nodeType !== Node.TEXT_NODE) {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
const content = focusNode.data.slice(0, selection.focusOffset);
|
|
92
|
-
const match = content.match(AT_REGEXP);
|
|
93
|
-
if (!match) {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
return {
|
|
97
|
-
event,
|
|
98
|
-
selection,
|
|
99
|
-
index: match[0].indexOf("@") + match.index,
|
|
100
|
-
node: focusNode,
|
|
101
|
-
content,
|
|
102
|
-
range: selection.getRangeAt(0)
|
|
103
|
-
};
|
|
104
|
-
}),
|
|
105
|
-
filter(Boolean),
|
|
106
|
-
mergeMap(({ event, index, node, content, range }) => {
|
|
107
|
-
const changeObservable = new Observable((observer) => {
|
|
108
|
-
const next = observer.next.bind(observer);
|
|
109
|
-
editor.on("change input undo redo", next);
|
|
110
|
-
return () => {
|
|
111
|
-
editor.off("change input undo redo", next);
|
|
112
|
-
};
|
|
113
|
-
});
|
|
114
|
-
return merge(from([event]), changeObservable).pipe(
|
|
115
|
-
delayWhen(() => timer(0)),
|
|
116
|
-
map((event2) => {
|
|
117
|
-
const selection = getSelection(event2);
|
|
118
|
-
const content2 = node.data.slice(index, selection.focusOffset);
|
|
119
|
-
console.log(content2);
|
|
120
|
-
if (!content2) {
|
|
121
|
-
subject.next();
|
|
122
|
-
return null;
|
|
123
|
-
}
|
|
124
|
-
return {
|
|
125
|
-
index,
|
|
126
|
-
node,
|
|
127
|
-
content: content2,
|
|
128
|
-
range: selection.getRangeAt(0)
|
|
129
|
-
};
|
|
130
|
-
}),
|
|
131
|
-
filter(Boolean),
|
|
132
|
-
takeUntil(
|
|
133
|
-
merge(
|
|
134
|
-
inputObservable.pipe(filter((event2) => event2.data === "@")),
|
|
135
|
-
subject
|
|
136
|
-
).pipe(
|
|
137
|
-
tap(() => {
|
|
138
|
-
atPersonInfos.node = null;
|
|
139
|
-
atPersonInfos.content = "";
|
|
140
|
-
atPersonInfos.selection = null;
|
|
141
|
-
atPersonInfos.index = -1;
|
|
142
|
-
atPersonInfos.style = null;
|
|
143
|
-
})
|
|
144
|
-
)
|
|
145
|
-
)
|
|
146
|
-
);
|
|
147
|
-
})
|
|
148
|
-
).subscribe(({ index, node, selection, content, range }) => {
|
|
149
|
-
const searchContent = content.slice(1);
|
|
150
|
-
const { x: offsetX, y: offsetY, height } = range.getBoundingClientRect();
|
|
151
|
-
const iframeElement = editor.iframeElement;
|
|
152
|
-
const { x: iframeX, y: iframeY } = iframeElement.getBoundingClientRect();
|
|
153
|
-
atPersonInfos.node = node;
|
|
154
|
-
atPersonInfos.content = content;
|
|
155
|
-
atPersonInfos.selection = selection;
|
|
156
|
-
atPersonInfos.index = index;
|
|
157
|
-
atPersonInfos.style = {
|
|
158
|
-
"--left": iframeX + offsetX + "px",
|
|
159
|
-
"--top": iframeY + offsetY + height + "px"
|
|
160
|
-
};
|
|
161
|
-
});
|
|
162
|
-
selectPersonSubject.subscribe(() => {
|
|
163
|
-
if (!atPersonInfos.node) {
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
const { node, index, content } = atPersonInfos;
|
|
167
|
-
const document = node.ownerDocument;
|
|
168
|
-
const documentFragment = document.createDocumentFragment();
|
|
169
|
-
if (index) {
|
|
170
|
-
const textNode = document.createTextNode(node.data.slice(0, index));
|
|
171
|
-
documentFragment.appendChild(textNode);
|
|
172
|
-
}
|
|
173
|
-
const span = document.createElement("span");
|
|
174
|
-
span.innerText = content;
|
|
175
|
-
documentFragment.appendChild(span);
|
|
176
|
-
const contentEndIndex = index + content.length;
|
|
177
|
-
if (contentEndIndex < node.data.length) {
|
|
178
|
-
const textNode = document.createTextNode(
|
|
179
|
-
node.data.slice(contentEndIndex)
|
|
180
|
-
);
|
|
181
|
-
documentFragment.appendChild(textNode);
|
|
182
|
-
}
|
|
183
|
-
const parent = node.parentElement;
|
|
184
|
-
parent.insertBefore(documentFragment, node);
|
|
185
|
-
parent.removeChild(node);
|
|
186
|
-
subject.next();
|
|
187
|
-
});
|
|
188
|
-
currentScope.run(() => {
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
return (_ctx, _cache) => {
|
|
192
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
193
|
-
createElementVNode("div", {
|
|
194
|
-
class: normalizeClass(unref(ns).b())
|
|
195
|
-
}, [
|
|
196
|
-
createElementVNode("div", {
|
|
197
|
-
class: normalizeClass(unref(ns).e("editor")),
|
|
198
|
-
ref_key: "editorRef",
|
|
199
|
-
ref: editorRef
|
|
200
|
-
}, [
|
|
201
|
-
createVNode(unref(TinyMCEEditor), {
|
|
202
|
-
init: initOptions,
|
|
203
|
-
disabled: __props.disabled,
|
|
204
|
-
tinymceScriptSrc: "/tinymce/tinymce.js",
|
|
205
|
-
ref_key: "tinyMCEEditorRef",
|
|
206
|
-
ref: tinyMCEEditorRef
|
|
207
|
-
}, null, 8, ["disabled"])
|
|
208
|
-
], 2)
|
|
209
|
-
], 2),
|
|
210
|
-
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
211
|
-
createElementVNode("div", {
|
|
212
|
-
class: normalizeClass(unref(ns).e("at-list-wrapper"))
|
|
213
|
-
}, [
|
|
214
|
-
atPersonInfos.style ? (openBlock(), createElementBlock("div", {
|
|
215
|
-
key: 0,
|
|
216
|
-
class: normalizeClass(unref(ns).e("at-list")),
|
|
217
|
-
style: normalizeStyle(atPersonInfos.style)
|
|
218
|
-
}, [
|
|
219
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(4, (i) => {
|
|
220
|
-
return createElementVNode("div", {
|
|
221
|
-
key: i,
|
|
222
|
-
onClick: ($event) => unref(handlePersonSelect)(i)
|
|
223
|
-
}, " \u7528\u6237" + toDisplayString(i), 9, _hoisted_1);
|
|
224
|
-
}), 64))
|
|
225
|
-
], 6)) : createCommentVNode("v-if", true)
|
|
226
|
-
], 2)
|
|
227
|
-
]))
|
|
228
|
-
], 64);
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
var bwaRichTextTinymce = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bwa-rich-text-tinymce.vue"]]);
|
|
233
|
-
|
|
234
|
-
export { bwaRichTextTinymce as default };
|
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, unref, getCurrentScope, computed, onMounted, markRaw, watch, onScopeDispose, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, withCtx, Fragment, renderList, createBlock } from 'vue';
|
|
2
|
-
import { useService, useNamespace } from 'web-base-client-vue';
|
|
3
|
-
import Quill from 'quill';
|
|
4
|
-
import 'quill/dist/quill.snow.css';
|
|
5
|
-
import { ElMessage } from 'element-plus';
|
|
6
|
-
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
7
|
-
|
|
8
|
-
const __default__ = defineComponent({
|
|
9
|
-
name: "BwaRichText"
|
|
10
|
-
});
|
|
11
|
-
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
12
|
-
props: {
|
|
13
|
-
placeholder: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: ""
|
|
16
|
-
},
|
|
17
|
-
modelValue: {
|
|
18
|
-
type: null
|
|
19
|
-
},
|
|
20
|
-
disabled: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: false
|
|
23
|
-
},
|
|
24
|
-
showAt: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: false
|
|
27
|
-
},
|
|
28
|
-
userIds: {
|
|
29
|
-
typee: Array,
|
|
30
|
-
default: () => []
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
emits: ["update:modelValue", "update:userIds"],
|
|
34
|
-
setup(__props, { expose, emit }) {
|
|
35
|
-
const props = __props;
|
|
36
|
-
let editor = null;
|
|
37
|
-
const userService = useService("UserService");
|
|
38
|
-
const loading = ref(false);
|
|
39
|
-
const userList = ref([
|
|
40
|
-
{ value: "1", label: "\u7528\u62371" },
|
|
41
|
-
{ value: "2", label: "\u7528\u62372" },
|
|
42
|
-
{ value: "3", label: "\u7528\u62373" }
|
|
43
|
-
]);
|
|
44
|
-
const handleChange = ([userId]) => {
|
|
45
|
-
if (!editor || !userId) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const userInfo = unref(userList).find((item) => item.value === userId);
|
|
49
|
-
if (!userInfo) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
editor.focus();
|
|
53
|
-
let length = editor.getSelection() ? editor.getSelection().index || 0 : editor.getLength();
|
|
54
|
-
editor.insertEmbed(
|
|
55
|
-
length,
|
|
56
|
-
"at",
|
|
57
|
-
{ id: userInfo.value, desc: userInfo.label },
|
|
58
|
-
"user"
|
|
59
|
-
);
|
|
60
|
-
editor.insertText(length + 1, " ");
|
|
61
|
-
editor.setSelection(length + 2);
|
|
62
|
-
};
|
|
63
|
-
const loadUserList = async (search = "") => {
|
|
64
|
-
try {
|
|
65
|
-
if (unref(loading)) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
loading.value = true;
|
|
69
|
-
if (!unref(userService)) {
|
|
70
|
-
ElMessage.error("\u65E0\u6CD5\u83B7\u53D6\u7528\u6237");
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
const userListResult = await unref(userService).getUserList({
|
|
74
|
-
name: search
|
|
75
|
-
});
|
|
76
|
-
if (userListResult.code != 0) {
|
|
77
|
-
ElMessage.error(userListResult.msg);
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
userList.value = userListResult.data;
|
|
81
|
-
} finally {
|
|
82
|
-
loading.value = false;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
const handleVisibleChange = (visible) => {
|
|
86
|
-
if (!visible) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
loadUserList();
|
|
90
|
-
};
|
|
91
|
-
const virtualRef = ref(null);
|
|
92
|
-
;
|
|
93
|
-
const ns = useNamespace("rich-text");
|
|
94
|
-
const fileService = useService("FileService");
|
|
95
|
-
const quillEditorContainer = ref(null);
|
|
96
|
-
const quillEditorRef = ref(null);
|
|
97
|
-
const currentScope = getCurrentScope();
|
|
98
|
-
const editorInstance = ref(null);
|
|
99
|
-
const toolbarOptions = [
|
|
100
|
-
[{ header: [1, 2, 3, 4, 5, 6, false] }],
|
|
101
|
-
[{ font: [] }],
|
|
102
|
-
["bold", "italic", "underline", "strike"],
|
|
103
|
-
[{ align: [] }],
|
|
104
|
-
["blockquote", "code-block"],
|
|
105
|
-
[{ header: 1 }, { header: 2 }],
|
|
106
|
-
[{ list: "ordered" }, { list: "bullet" }],
|
|
107
|
-
[{ script: "sub" }, { script: "super" }],
|
|
108
|
-
[{ indent: "-1" }, { indent: "+1" }],
|
|
109
|
-
[{ color: [] }, { background: [] }],
|
|
110
|
-
["clean"].concat(props.showAt ? ["at"] : [])
|
|
111
|
-
];
|
|
112
|
-
const value = computed({
|
|
113
|
-
get: () => props.modelValue || "",
|
|
114
|
-
set: (v) => {
|
|
115
|
-
let str = "";
|
|
116
|
-
if (!v && editor && editor.root.innerHTML && editor.root.innerHTML.indexOf("<img") != -1) {
|
|
117
|
-
str = editor.root.innerHTML;
|
|
118
|
-
}
|
|
119
|
-
emit("update:modelValue", v || str);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
const userIds = computed({
|
|
123
|
-
get: () => props.userIds,
|
|
124
|
-
set: (v) => {
|
|
125
|
-
emit("update:userIds", v);
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
const updateImage = async (file) => {
|
|
129
|
-
if (!unref(fileService)) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
const uploadFileResult = await unref(fileService).uploadFile(file);
|
|
133
|
-
if (uploadFileResult.code != 0) {
|
|
134
|
-
return uploadFileResult;
|
|
135
|
-
}
|
|
136
|
-
const fileID = uploadFileResult.data.id;
|
|
137
|
-
const filePathResult = await unref(fileService).getFilePath(fileID);
|
|
138
|
-
if (filePathResult.code != 0) {
|
|
139
|
-
return filePathResult;
|
|
140
|
-
}
|
|
141
|
-
return {
|
|
142
|
-
...filePathResult,
|
|
143
|
-
data: { id: fileID, path: filePathResult.data }
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
const quillEditorRefClick = () => {
|
|
147
|
-
if (!editor) {
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
editor.focus();
|
|
151
|
-
};
|
|
152
|
-
onMounted(() => {
|
|
153
|
-
editor = new Quill(unref(quillEditorRef), {
|
|
154
|
-
theme: "snow",
|
|
155
|
-
placeholder: props.placeholder,
|
|
156
|
-
modules: {
|
|
157
|
-
toolbar: {
|
|
158
|
-
container: toolbarOptions,
|
|
159
|
-
handlers: {
|
|
160
|
-
at: function(value2) {
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
virtualRef.value = quillEditorContainer.value.querySelector("button.ql-at");
|
|
167
|
-
editorInstance.value = markRaw(editor);
|
|
168
|
-
const el = document.createElement("div");
|
|
169
|
-
const getUserIds = (html) => {
|
|
170
|
-
el.innerHTML = html;
|
|
171
|
-
const items = Array.from(el.querySelectorAll("span.ptp-at-item"));
|
|
172
|
-
userIds.value = [
|
|
173
|
-
...new Set(items.map((item) => item.getAttribute("d-id")))
|
|
174
|
-
];
|
|
175
|
-
};
|
|
176
|
-
getUserIds(unref(value));
|
|
177
|
-
const handleTextChange = (delta, oldDelta, source) => {
|
|
178
|
-
const _value = editor.getText() === "\n" ? "" : editor.root.innerHTML;
|
|
179
|
-
value.value = _value;
|
|
180
|
-
getUserIds(_value);
|
|
181
|
-
};
|
|
182
|
-
const handlePaste = (evt) => {
|
|
183
|
-
if (evt.clipboardData && evt.clipboardData.files && evt.clipboardData.files.length) {
|
|
184
|
-
evt.preventDefault();
|
|
185
|
-
[].forEach.call(evt.clipboardData.files, async (file) => {
|
|
186
|
-
console.log(file);
|
|
187
|
-
if (file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i)) {
|
|
188
|
-
const filePathResult = await updateImage(file);
|
|
189
|
-
if (filePathResult.code != 0) {
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
const fileData = filePathResult.data;
|
|
193
|
-
var range = editor.getSelection();
|
|
194
|
-
if (range && fileData) {
|
|
195
|
-
editor.insertEmbed(range.index, "image", fileData.path);
|
|
196
|
-
editor.formatText(range.index, 1, {
|
|
197
|
-
alt: fileData.id
|
|
198
|
-
});
|
|
199
|
-
setTimeout(() => {
|
|
200
|
-
editor.setSelection(range.index + 1);
|
|
201
|
-
}, 300);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
currentScope.run(() => {
|
|
208
|
-
watch(
|
|
209
|
-
computed(() => props.disabled),
|
|
210
|
-
(disabled) => {
|
|
211
|
-
editor.enable(!disabled);
|
|
212
|
-
},
|
|
213
|
-
{ immediate: true }
|
|
214
|
-
);
|
|
215
|
-
const getFilePaths = async (alt) => {
|
|
216
|
-
const filePathResult = await unref(fileService).getFilePath(alt);
|
|
217
|
-
return filePathResult;
|
|
218
|
-
};
|
|
219
|
-
let artArr2 = [];
|
|
220
|
-
watch(
|
|
221
|
-
value,
|
|
222
|
-
async () => {
|
|
223
|
-
if (unref(value).indexOf("data:image/png") != -1 || unref(value).indexOf("base64") != -1) {
|
|
224
|
-
editor.root.innerHTML = unref(value);
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
if (!unref(value)) {
|
|
228
|
-
artArr2 = [];
|
|
229
|
-
}
|
|
230
|
-
let afterHtml = "";
|
|
231
|
-
let artArr = [];
|
|
232
|
-
let artArrOption = [];
|
|
233
|
-
if (unref(value).indexOf("<img") != -1) {
|
|
234
|
-
unref(value).replace(/<img [^>]*alt=['"]([^'"]+)[^>]*>/gi, (img, alt) => {
|
|
235
|
-
if (!artArr2.includes(alt)) {
|
|
236
|
-
artArr.push(alt);
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
for (const alt of artArr) {
|
|
240
|
-
artArrOption.push({
|
|
241
|
-
alt,
|
|
242
|
-
src: await getFilePaths(alt)
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
afterHtml = unref(value).replace(/<img [^>]*alt=['"]([^'"]+)[^>]*>/gi, (img, alt) => {
|
|
246
|
-
var _a;
|
|
247
|
-
if (artArr.includes(alt)) {
|
|
248
|
-
return `<img src="${(_a = artArrOption.find((a) => a.alt === alt)) == null ? void 0 : _a.src.data}" alt="${alt}">`;
|
|
249
|
-
} else {
|
|
250
|
-
return img;
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
console.log("afterHtml =>", afterHtml);
|
|
255
|
-
artArr2 = [...artArr2, ...artArr];
|
|
256
|
-
artArr = [];
|
|
257
|
-
artArrOption = [];
|
|
258
|
-
if (editor.root.innerHTML === (afterHtml || unref(value))) {
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
const range = editor.getSelection();
|
|
262
|
-
editor.root.innerHTML = afterHtml || unref(value);
|
|
263
|
-
setTimeout(() => {
|
|
264
|
-
if (range) {
|
|
265
|
-
editor.setSelection(range.index + 1);
|
|
266
|
-
editor.focus();
|
|
267
|
-
}
|
|
268
|
-
}, 100);
|
|
269
|
-
},
|
|
270
|
-
{ immediate: true }
|
|
271
|
-
);
|
|
272
|
-
editor.on("text-change", handleTextChange);
|
|
273
|
-
editor.root.addEventListener("paste", handlePaste);
|
|
274
|
-
onScopeDispose(() => {
|
|
275
|
-
editor.off("text-change", handleTextChange);
|
|
276
|
-
editor.root.removeEventListener("paste", handlePaste);
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
});
|
|
280
|
-
expose({
|
|
281
|
-
getEditorInstance() {
|
|
282
|
-
return unref(editorInstance);
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
return (_ctx, _cache) => {
|
|
286
|
-
const _component_BwaAdvanceOption = resolveComponent("BwaAdvanceOption");
|
|
287
|
-
const _component_BwaAdvanceSelect = resolveComponent("BwaAdvanceSelect");
|
|
288
|
-
return openBlock(), createElementBlock("div", {
|
|
289
|
-
class: normalizeClass(unref(ns).b()),
|
|
290
|
-
ref_key: "quillEditorContainer",
|
|
291
|
-
ref: quillEditorContainer
|
|
292
|
-
}, [
|
|
293
|
-
createElementVNode("div", {
|
|
294
|
-
class: normalizeClass(unref(ns).e("editor")),
|
|
295
|
-
ref_key: "quillEditorRef",
|
|
296
|
-
ref: quillEditorRef,
|
|
297
|
-
onClick: quillEditorRefClick
|
|
298
|
-
}, null, 2),
|
|
299
|
-
createVNode(_component_BwaAdvanceSelect, {
|
|
300
|
-
showSelection: false,
|
|
301
|
-
"virtual-triggering": true,
|
|
302
|
-
"virtual-ref": virtualRef.value,
|
|
303
|
-
loading: loading.value,
|
|
304
|
-
onSearch: loadUserList,
|
|
305
|
-
"onUpdate:modelValue": handleChange,
|
|
306
|
-
onVisibleChange: handleVisibleChange
|
|
307
|
-
}, {
|
|
308
|
-
default: withCtx(() => [
|
|
309
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(userList.value, (item) => {
|
|
310
|
-
return openBlock(), createBlock(_component_BwaAdvanceOption, {
|
|
311
|
-
key: item.value,
|
|
312
|
-
value: item.value,
|
|
313
|
-
label: item.label
|
|
314
|
-
}, null, 8, ["value", "label"]);
|
|
315
|
-
}), 128))
|
|
316
|
-
]),
|
|
317
|
-
_: 1
|
|
318
|
-
}, 8, ["virtual-ref", "loading"])
|
|
319
|
-
], 2);
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
var RichText = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bwa-rich-text.vue"]]);
|
|
324
|
-
|
|
325
|
-
export { RichText as default };
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, useAttrs, openBlock, createBlock, unref, mergeProps, isRef, withCtx, renderSlot, createElementBlock, Fragment, renderList } from 'vue';
|
|
2
|
-
import { ElSelect, ElOption } from 'element-plus';
|
|
3
|
-
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
|
-
|
|
5
|
-
const __default__ = defineComponent({
|
|
6
|
-
name: "BwaSelect"
|
|
7
|
-
});
|
|
8
|
-
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
9
|
-
props: {
|
|
10
|
-
modelValue: {
|
|
11
|
-
type: null
|
|
12
|
-
},
|
|
13
|
-
options: {
|
|
14
|
-
type: Array,
|
|
15
|
-
default: () => []
|
|
16
|
-
},
|
|
17
|
-
labelProp: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: "label"
|
|
20
|
-
},
|
|
21
|
-
valueProp: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: "value"
|
|
24
|
-
},
|
|
25
|
-
multiple: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: false
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
emits: ["update:modelValue"],
|
|
31
|
-
setup(__props, { emit }) {
|
|
32
|
-
const props = __props;
|
|
33
|
-
const options = computed(
|
|
34
|
-
() => (props.options || []).map((item) => ({
|
|
35
|
-
...item,
|
|
36
|
-
value: item.value + ""
|
|
37
|
-
}))
|
|
38
|
-
);
|
|
39
|
-
const attrs = useAttrs();
|
|
40
|
-
const modelValue = computed({
|
|
41
|
-
get: () => {
|
|
42
|
-
if (props.multiple) {
|
|
43
|
-
return Array.isArray(props.modelValue) ? props.modelValue.map((item) => item + "") : [];
|
|
44
|
-
} else {
|
|
45
|
-
return props.modelValue == null ? "" : props.modelValue + "";
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
set: (v) => emit("update:modelValue", v)
|
|
49
|
-
});
|
|
50
|
-
return (_ctx, _cache) => {
|
|
51
|
-
return openBlock(), createBlock(unref(ElSelect), mergeProps(unref(attrs), {
|
|
52
|
-
modelValue: unref(modelValue),
|
|
53
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
54
|
-
clearable: "",
|
|
55
|
-
multiple: __props.multiple,
|
|
56
|
-
teleported: false
|
|
57
|
-
}), {
|
|
58
|
-
default: withCtx(() => [
|
|
59
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
60
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(options), (item) => {
|
|
61
|
-
return openBlock(), createBlock(unref(ElOption), {
|
|
62
|
-
key: item.value,
|
|
63
|
-
value: item.value,
|
|
64
|
-
label: item.label
|
|
65
|
-
}, null, 8, ["value", "label"]);
|
|
66
|
-
}), 128))
|
|
67
|
-
])
|
|
68
|
-
]),
|
|
69
|
-
_: 3
|
|
70
|
-
}, 16, ["modelValue", "multiple"]);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
var Select = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bwa-select.vue"]]);
|
|
75
|
-
|
|
76
|
-
export { Select as default };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { defineComponent, useAttrs, computed, openBlock, createBlock, unref, mergeProps, isRef } from 'vue';
|
|
2
|
-
import { ElInput } from 'element-plus';
|
|
3
|
-
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
|
-
|
|
5
|
-
const __default__ = defineComponent({
|
|
6
|
-
name: "BwaTextarea"
|
|
7
|
-
});
|
|
8
|
-
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
9
|
-
props: {
|
|
10
|
-
value: {
|
|
11
|
-
type: [String, Number],
|
|
12
|
-
default: ""
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
emits: ["update:model-value"],
|
|
16
|
-
setup(__props, { emit }) {
|
|
17
|
-
const props = __props;
|
|
18
|
-
const attrs = useAttrs();
|
|
19
|
-
const modelValue = computed({
|
|
20
|
-
get: () => props.modelValue,
|
|
21
|
-
set: (v) => emit("update:model-value", v)
|
|
22
|
-
});
|
|
23
|
-
return (_ctx, _cache) => {
|
|
24
|
-
return openBlock(), createBlock(unref(ElInput), mergeProps({ type: "textarea" }, unref(attrs), {
|
|
25
|
-
modelValue: unref(modelValue),
|
|
26
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null)
|
|
27
|
-
}), null, 16, ["modelValue"]);
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
var Textarea = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bwa-textarea.vue"]]);
|
|
32
|
-
|
|
33
|
-
export { Textarea as default };
|