@web-utils/component 2.7.36 → 2.7.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{config.75161c38.js → config.46422d7f.mjs} +31 -31
- package/dist/chunks/confirmable-mixin.2bfe1ab9.mjs +105 -0
- package/dist/chunks/dataformat.5f95e59e.mjs +158 -0
- package/dist/chunks/detail.81ecaefa.mjs +29 -0
- package/dist/chunks/dic.5c08c9fb.mjs +135 -0
- package/dist/chunks/{event.812c361c.js → event.e4e57889.mjs} +47 -78
- package/dist/chunks/form-input-mixin.e3b4c68c.mjs +24 -0
- package/dist/chunks/form-item-mixin.149d5844.mjs +140 -0
- package/dist/chunks/{form-pick-mixin.822300f3.js → form-pick-mixin.61ad06b2.mjs} +3 -3
- package/dist/chunks/index.9b7a65d1.mjs +185 -0
- package/dist/chunks/init.07b0cebe.mjs +122 -0
- package/dist/chunks/{input-number-mixin.44b78389.js → input-number-mixin.41a066be.mjs} +8 -8
- package/dist/chunks/{mixins.e1939731.js → mixins.5a78e0db.mjs} +5 -6
- package/dist/chunks/{packages.c4ea639d.js → packages.1fc9ccba.mjs} +9 -15
- package/dist/chunks/permission.ce5d2121.mjs +16 -0
- package/dist/chunks/slot.4b391395.mjs +27 -0
- package/dist/chunks/tab-mixin.e2b9c6a4.mjs +81 -0
- package/dist/chunks/util.eca708b6.mjs +261 -0
- package/dist/chunks/utils.97652d86.mjs +26 -0
- package/dist/chunks/vueComponentNormalizer.446f5dc4.mjs +32 -0
- package/dist/components/address-input/index.mjs +113 -0
- package/dist/components/address-input/style.css +1 -15
- package/dist/components/affix/index.mjs +102 -0
- package/dist/components/affix/style.css +1 -5
- package/dist/components/aside-menu/index.mjs +58 -0
- package/dist/components/aside-menu/style.css +1 -9
- package/dist/components/avatar/index.mjs +106 -0
- package/dist/components/avatar/style.css +1 -57
- package/dist/components/awesome-button/index.mjs +112 -0
- package/dist/components/base.css +1 -410
- package/dist/components/capsule-tab/index.mjs +52 -0
- package/dist/components/capsule-tab/style.css +1 -32
- package/dist/components/card/index.mjs +130 -0
- package/dist/components/card/style.css +1 -90
- package/dist/components/carousel/index.mjs +70 -0
- package/dist/components/carousel/style.css +1 -41
- package/dist/components/chat/index.mjs +567 -0
- package/dist/components/chat/style.css +1 -279
- package/dist/components/chunk-file-uploader/index.mjs +119 -0
- package/dist/components/chunk-file-uploader/style.css +1 -4
- package/dist/components/chunk-file-uploader-button/index.mjs +60 -0
- package/dist/components/chunk-file-uploader-button/style.css +1 -17
- package/dist/components/chunk-file-uploader-drop/index.mjs +83 -0
- package/dist/components/chunk-file-uploader-drop/style.css +1 -12
- package/dist/components/chunk-file-uploader-file/index.mjs +311 -0
- package/dist/components/chunk-file-uploader-file/style.css +1 -125
- package/dist/components/chunk-file-uploader-files/index.mjs +49 -0
- package/dist/components/chunk-file-uploader-files/style.css +1 -9
- package/dist/components/chunk-file-uploader-list/index.mjs +50 -0
- package/dist/components/chunk-file-uploader-list/style.css +1 -9
- package/dist/components/chunk-file-uploader-un-support/index.mjs +51 -0
- package/dist/components/chunk-file-uploader-un-support/style.css +1 -6
- package/dist/components/code-mirror-editor/index.mjs +313 -0
- package/dist/components/code-mirror-editor/style.css +1 -17
- package/dist/components/color-picker/index.mjs +128 -0
- package/dist/components/column/index.mjs +115 -0
- package/dist/components/column-default/index.mjs +106 -0
- package/dist/components/column-dynamic/index.mjs +93 -0
- package/dist/components/column-menu/index.mjs +286 -0
- package/dist/components/column-slot/index.mjs +266 -0
- package/dist/components/comment/index.mjs +94 -0
- package/dist/components/comment/style.css +1 -92
- package/dist/components/confirm-button/index.mjs +57 -0
- package/dist/components/confirmable/index.mjs +28 -0
- package/dist/components/context-menu/index.mjs +253 -0
- package/dist/components/context-menu/style.css +1 -88
- package/dist/components/count-up/index.mjs +131 -0
- package/dist/components/custom-scrollbar/index.mjs +167 -0
- package/dist/components/data-box/index.mjs +97 -0
- package/dist/components/data-box/style.css +1 -58
- package/dist/components/data-card/index.mjs +98 -0
- package/dist/components/data-card/style.css +1 -46
- package/dist/components/data-cardtext/index.mjs +82 -0
- package/dist/components/data-cardtext/style.css +1 -36
- package/dist/components/data-display/index.mjs +93 -0
- package/dist/components/data-display/style.css +1 -37
- package/dist/components/data-icons/index.mjs +104 -0
- package/dist/components/data-icons/style.css +1 -53
- package/dist/components/data-imgtext/index.mjs +106 -0
- package/dist/components/data-imgtext/style.css +1 -70
- package/dist/components/data-operatext/index.mjs +99 -0
- package/dist/components/data-operatext/style.css +1 -81
- package/dist/components/data-panel/index.mjs +93 -0
- package/dist/components/data-panel/style.css +1 -37
- package/dist/components/data-pay/index.mjs +149 -0
- package/dist/components/data-pay/style.css +1 -102
- package/dist/components/data-price/index.mjs +84 -0
- package/dist/components/data-price/style.css +1 -81
- package/dist/components/data-progress/index.mjs +97 -0
- package/dist/components/data-progress/style.css +1 -30
- package/dist/components/data-rotate/index.mjs +96 -0
- package/dist/components/data-rotate/style.css +1 -50
- package/dist/components/data-table-picker/index.mjs +137 -0
- package/dist/components/data-tabs/index.mjs +94 -0
- package/dist/components/data-tabs/style.css +1 -70
- package/dist/components/dialog-column/index.mjs +139 -0
- package/dist/components/dialog-excel/index.mjs +211 -0
- package/dist/components/dialog-filter/index.mjs +246 -0
- package/dist/components/dialog-form/index.mjs +143 -0
- package/dist/components/dialog-form/style.css +1 -10
- package/dist/components/dynamic-table/index.mjs +195 -0
- package/dist/components/dynamic-table/style.css +1 -30
- package/dist/components/e-charts/index.mjs +216 -0
- package/dist/components/e-charts/style.css +1 -10
- package/dist/components/easy-popup/index.mjs +87 -0
- package/dist/components/easy-popup/style.css +1 -18
- package/dist/components/editable-progress/index.mjs +141 -0
- package/dist/components/editable-progress/style.css +1 -37
- package/dist/components/editable-tree/index.mjs +844 -0
- package/dist/components/editable-tree/style.css +1 -82
- package/dist/components/egd-collapse/index.mjs +79 -0
- package/dist/components/egd-collapse-item/index.mjs +132 -0
- package/dist/components/element-dialog/index.mjs +249 -0
- package/dist/components/element-dialog/style.css +1 -88
- package/dist/components/empty-view/index.mjs +69 -0
- package/dist/components/empty-view/style.css +1 -17
- package/dist/components/error-view/index.mjs +61 -0
- package/dist/components/error-view/style.css +1 -17
- package/dist/components/flex-column/index.mjs +62 -0
- package/dist/components/flex-item/index.mjs +81 -0
- package/dist/components/flex-row/index.mjs +62 -0
- package/dist/components/flex-scroller/index.mjs +47 -0
- package/dist/components/flex-scroller/style.css +1 -20
- package/dist/components/flow/index.mjs +277 -0
- package/dist/components/flow/style.css +1 -44
- package/dist/components/flow-node/index.mjs +102 -0
- package/dist/components/flow-viewer/index.mjs +162 -0
- package/dist/components/flow-viewer/style.css +1 -19
- package/dist/components/form-button/index.mjs +80 -0
- package/dist/components/form-cascader/index.mjs +163 -0
- package/dist/components/form-checkbox-group/index.mjs +203 -0
- package/dist/components/form-checkbox-group/style.css +1 -51
- package/dist/components/form-date-picker/index.mjs +191 -0
- package/dist/components/form-group/index.mjs +122 -0
- package/dist/components/form-group/style.css +1 -76
- package/dist/components/form-holder/index.mjs +129 -0
- package/dist/components/form-input/index.mjs +117 -0
- package/dist/components/form-input-email/index.mjs +108 -0
- package/dist/components/form-input-id-card/index.mjs +115 -0
- package/dist/components/form-input-number/index.mjs +134 -0
- package/dist/components/form-input-number/style.css +1 -12
- package/dist/components/form-input-phone-number/index.mjs +109 -0
- package/dist/components/form-input-time/index.mjs +135 -0
- package/dist/components/form-item/index.mjs +147 -0
- package/dist/components/form-item/style.css +1 -11
- package/dist/components/form-item-config-provider/index.mjs +63 -0
- package/dist/components/form-item-group/index.mjs +169 -0
- package/dist/components/form-item-group/style.css +1 -30
- package/dist/components/form-radio-group/index.mjs +181 -0
- package/dist/components/form-radio-group/style.css +1 -53
- package/dist/components/form-select/index.mjs +165 -0
- package/dist/components/form-switch/index.mjs +108 -0
- package/dist/components/form-temp/index.mjs +149 -0
- package/dist/components/form-textarea/index.mjs +113 -0
- package/dist/components/form-view/index.mjs +366 -0
- package/dist/components/form-view/style.css +1 -158
- package/dist/components/fy-array/index.mjs +156 -0
- package/dist/components/fy-array/style.css +1 -18
- package/dist/components/fy-article/index.mjs +93 -0
- package/dist/components/fy-article/style.css +1 -40
- package/dist/components/fy-cascader/index.mjs +132 -0
- package/dist/components/fy-checkbox/index.mjs +116 -0
- package/dist/components/fy-checkbox/style.css +1 -15
- package/dist/components/fy-code/index.mjs +66 -0
- package/dist/components/fy-curd/index.mjs +751 -0
- package/dist/components/fy-curd/style.css +1 -239
- package/dist/components/fy-date/index.mjs +84 -0
- package/dist/components/fy-date/style.css +1 -21
- package/dist/components/fy-dialog-form/index.mjs +278 -0
- package/dist/components/fy-draggable/index.mjs +382 -0
- package/dist/components/fy-draggable/style.css +1 -136
- package/dist/components/fy-dynamic/index.mjs +337 -0
- package/dist/components/fy-dynamic/style.css +1 -35
- package/dist/components/fy-empty/{index.js → index.mjs} +28 -34
- package/dist/components/fy-empty/style.css +1 -24
- package/dist/components/fy-form/index.mjs +786 -0
- package/dist/components/fy-form/style.css +1 -79
- package/dist/components/fy-form-design/index.mjs +7775 -0
- package/dist/components/fy-form-design/style.css +1 -578
- package/dist/components/fy-form-menu/index.mjs +95 -0
- package/dist/components/fy-input/index.mjs +176 -0
- package/dist/components/fy-input-color/index.mjs +101 -0
- package/dist/components/fy-input-icon/index.mjs +161 -0
- package/dist/components/fy-input-icon/style.css +1 -39
- package/dist/components/fy-input-map/index.mjs +275 -0
- package/dist/components/fy-input-map/style.css +1 -50
- package/dist/components/fy-input-number/index.mjs +87 -0
- package/dist/components/fy-input-table/index.mjs +172 -0
- package/dist/components/fy-input-table/style.css +1 -10
- package/dist/components/fy-input-tree/index.mjs +265 -0
- package/dist/components/fy-input-tree/style.css +1 -25
- package/dist/components/fy-progress/index.mjs +60 -0
- package/dist/components/fy-radio/index.mjs +68 -0
- package/dist/components/fy-radio/style.css +1 -12
- package/dist/components/fy-rate/index.mjs +105 -0
- package/dist/components/fy-rate/style.css +1 -9
- package/dist/components/fy-select/index.mjs +224 -0
- package/dist/components/fy-select/style.css +1 -25
- package/dist/components/fy-slider/index.mjs +79 -0
- package/dist/components/fy-switch/index.mjs +73 -0
- package/dist/components/fy-tabs/index.mjs +90 -0
- package/dist/components/fy-tabs/style.css +0 -6
- package/dist/components/fy-time/index.mjs +95 -0
- package/dist/components/fy-title/index.mjs +40 -0
- package/dist/components/fy-title/style.css +1 -11
- package/dist/components/fy-tree/index.mjs +428 -0
- package/dist/components/fy-tree/style.css +1 -46
- package/dist/components/fy-u-editor/index.mjs +409 -0
- package/dist/components/fy-u-editor/style.css +1 -15
- package/dist/components/fy-upload/index.mjs +591 -0
- package/dist/components/fy-upload/style.css +1 -60
- package/dist/components/guide-steps/index.mjs +94 -0
- package/dist/components/guide-steps/style.css +1 -34
- package/dist/components/header-menu/index.mjs +238 -0
- package/dist/components/header-search/index.mjs +253 -0
- package/dist/components/highlight-j-s/index.mjs +76 -0
- package/dist/components/highlight-j-s/style.css +1 -21
- package/dist/components/icon-card/index.mjs +62 -0
- package/dist/components/icon-card/style.css +1 -56
- package/dist/components/icon-temp/index.mjs +50 -0
- package/dist/components/icon-temp/style.css +1 -21
- package/dist/components/iframe-window/index.mjs +61 -0
- package/dist/components/iframe-window/style.css +1 -20
- package/dist/components/image-cropper/index.mjs +199 -0
- package/dist/components/image-cropper/style.css +1 -34
- package/dist/components/image-preview/index.mjs +233 -0
- package/dist/components/image-preview/style.css +1 -72
- package/dist/components/image-viewer/index.mjs +95 -0
- package/dist/components/image-viewer/style.css +1 -21
- package/dist/components/input-number/index.mjs +274 -0
- package/dist/components/input-number/style.css +1 -15
- package/dist/components/input-number-range/index.mjs +110 -0
- package/dist/components/input-number-range/style.css +1 -12
- package/dist/components/j-s-x-component/{index.js → index.mjs} +4 -4
- package/dist/components/keep-view-alive/index.mjs +123 -0
- package/dist/components/keyboard/index.mjs +384 -0
- package/dist/components/keyboard/style.css +1 -547
- package/dist/components/license/index.mjs +134 -0
- package/dist/components/loading-view/index.mjs +61 -0
- package/dist/components/loading-view/style.css +1 -17
- package/dist/components/login/index.mjs +250 -0
- package/dist/components/login/style.css +1 -25
- package/dist/components/name-avatar/index.mjs +66 -0
- package/dist/components/name-avatar/style.css +1 -35
- package/dist/components/nav-bar/index.mjs +52 -0
- package/dist/components/nav-bar/style.css +1 -17
- package/dist/components/not-implement/index.mjs +35 -0
- package/dist/components/not-implement/style.css +1 -15
- package/dist/components/notice/index.mjs +143 -0
- package/dist/components/notice/style.css +1 -54
- package/dist/components/page/index.mjs +40 -0
- package/dist/components/page/style.css +1 -12
- package/dist/components/page-header/index.mjs +56 -0
- package/dist/components/page-header/style.css +1 -14
- package/dist/components/page-index/index.mjs +175 -0
- package/dist/components/page-index/style.css +1 -23
- package/dist/components/page-index-top/index.mjs +141 -0
- package/dist/components/page-skeleton/index.mjs +56 -0
- package/dist/components/page-skeleton/style.css +1 -23
- package/dist/components/page-skeleton-new/index.mjs +98 -0
- package/dist/components/page-skeleton-new/style.css +1 -42
- package/dist/components/pageable-table/index.mjs +478 -0
- package/dist/components/pageable-table/style.css +1 -72
- package/dist/components/pageable-view/index.mjs +378 -0
- package/dist/components/pageable-view/style.css +1 -69
- package/dist/components/photo-swipe/index.mjs +129 -0
- package/dist/components/process-designer/{index.js → index.mjs} +1022 -1211
- package/dist/components/process-designer/style.css +1 -1186
- package/dist/components/properties-panel/index.mjs +4791 -0
- package/dist/components/properties-panel/style.css +1 -122
- package/dist/components/queue/index.mjs +76 -0
- package/dist/components/record-video/index.mjs +173 -0
- package/dist/components/record-video/style.css +1 -53
- package/dist/components/resize-observer/index.mjs +62 -0
- package/dist/components/resize-observer/style.css +1 -31
- package/dist/components/search/index.mjs +143 -0
- package/dist/components/search/style.css +1 -57
- package/dist/components/search-popover/index.mjs +411 -0
- package/dist/components/search-popover/style.css +1 -93
- package/dist/components/sign/index.mjs +133 -0
- package/dist/components/sign/style.css +1 -12
- package/dist/components/sign-panel/index.mjs +255 -0
- package/dist/components/sign-panel/style.css +1 -97
- package/dist/components/skeleton/index.mjs +82 -0
- package/dist/components/skeleton/style.css +1 -61
- package/dist/components/split-pane/index.mjs +233 -0
- package/dist/components/split-pane/style.css +1 -100
- package/dist/components/stateful/index.mjs +84 -0
- package/dist/components/stateful/style.css +1 -33
- package/dist/components/static-pageable-table/index.mjs +92 -0
- package/dist/components/static-pageable-table/style.css +1 -9
- package/dist/components/swiper/index.mjs +178 -0
- package/dist/components/swiper/style.css +1 -43
- package/dist/components/tab/index.mjs +147 -0
- package/dist/components/tab/style.css +1 -122
- package/dist/components/tab-item/index.mjs +73 -0
- package/dist/components/table-column/index.mjs +102 -0
- package/dist/components/table-page/index.mjs +132 -0
- package/dist/components/table-view/index.mjs +390 -0
- package/dist/components/table-view/style.css +1 -95
- package/dist/components/tag-render/index.mjs +108 -0
- package/dist/components/tag-render/style.css +1 -33
- package/dist/components/text-ellipsis/index.mjs +108 -0
- package/dist/components/text-ellipsis/style.css +1 -9
- package/dist/components/tinymce-editor/index.mjs +191 -0
- package/dist/components/tinymce-editor/style.css +1 -43
- package/dist/components/tinymce-wrapper/{index.js → index.mjs} +102 -138
- package/dist/components/tinymce-wrapper/style.css +1 -36
- package/dist/components/toolbar/index.mjs +217 -0
- package/dist/components/toolbar/style.css +1 -39
- package/dist/components/toolbar-button/index.mjs +108 -0
- package/dist/components/toolbar-button/style.css +1 -21
- package/dist/components/trigger/index.mjs +71 -0
- package/dist/components/verify/index.mjs +80 -0
- package/dist/components/verify/style.css +1 -15
- package/dist/components/vue-tags-input/index.mjs +553 -0
- package/dist/components/vue-tags-input/style.css +1 -688
- package/dist/components/watermark/index.mjs +95 -0
- package/dist/components/watermark/style.css +1 -11
- package/dist/index.cjs +85 -0
- package/dist/index.css +1 -8521
- package/dist/index.mjs +45819 -0
- package/package.json +6 -6
- package/web-types.json +1 -1
- package/dist/chunks/confirmable-mixin.851d6299.js +0 -137
- package/dist/chunks/dataformat.b8c8c01a.js +0 -237
- package/dist/chunks/detail.6135ade5.js +0 -55
- package/dist/chunks/dic.e57b75f2.js +0 -215
- package/dist/chunks/form-input-mixin.3e63b57f.js +0 -24
- package/dist/chunks/form-item-mixin.a56c101a.js +0 -166
- package/dist/chunks/init.38cbb3a2.js +0 -142
- package/dist/chunks/permission.9c766972.js +0 -21
- package/dist/chunks/slot.55598d0f.js +0 -35
- package/dist/chunks/tab-mixin.9d848bf6.js +0 -99
- package/dist/chunks/util.b0d0b0ad.js +0 -478
- package/dist/chunks/utils.2a3ffac9.js +0 -250
- package/dist/chunks/utils.a8891d2c.js +0 -30
- package/dist/chunks/vueComponentNormalizer.9c6b8b3d.js +0 -59
- package/dist/components/address-input/index.js +0 -126
- package/dist/components/affix/index.js +0 -152
- package/dist/components/aside-menu/index.js +0 -64
- package/dist/components/avatar/index.js +0 -124
- package/dist/components/awesome-button/index.js +0 -126
- package/dist/components/capsule-tab/index.js +0 -58
- package/dist/components/card/index.js +0 -143
- package/dist/components/carousel/index.js +0 -76
- package/dist/components/chat/index.js +0 -673
- package/dist/components/chunk-file-uploader/index.js +0 -153
- package/dist/components/chunk-file-uploader-button/index.js +0 -66
- package/dist/components/chunk-file-uploader-drop/index.js +0 -101
- package/dist/components/chunk-file-uploader-file/index.js +0 -388
- package/dist/components/chunk-file-uploader-files/index.js +0 -55
- package/dist/components/chunk-file-uploader-list/index.js +0 -56
- package/dist/components/chunk-file-uploader-un-support/index.js +0 -59
- package/dist/components/code-mirror-editor/index.js +0 -341
- package/dist/components/color-picker/index.js +0 -151
- package/dist/components/column/index.js +0 -140
- package/dist/components/column-default/index.js +0 -120
- package/dist/components/column-dynamic/index.js +0 -100
- package/dist/components/column-menu/index.js +0 -298
- package/dist/components/column-slot/index.js +0 -326
- package/dist/components/comment/index.js +0 -107
- package/dist/components/confirm-button/index.js +0 -59
- package/dist/components/confirmable/index.js +0 -29
- package/dist/components/context-menu/index.js +0 -275
- package/dist/components/count-up/index.js +0 -148
- package/dist/components/custom-scrollbar/index.js +0 -191
- package/dist/components/data-box/index.js +0 -103
- package/dist/components/data-card/index.js +0 -104
- package/dist/components/data-cardtext/index.js +0 -88
- package/dist/components/data-display/index.js +0 -99
- package/dist/components/data-icons/index.js +0 -110
- package/dist/components/data-imgtext/index.js +0 -112
- package/dist/components/data-operatext/index.js +0 -105
- package/dist/components/data-panel/index.js +0 -99
- package/dist/components/data-pay/index.js +0 -155
- package/dist/components/data-price/index.js +0 -90
- package/dist/components/data-progress/index.js +0 -103
- package/dist/components/data-rotate/index.js +0 -102
- package/dist/components/data-table-picker/index.js +0 -156
- package/dist/components/data-tabs/index.js +0 -100
- package/dist/components/dialog-column/index.js +0 -152
- package/dist/components/dialog-excel/index.js +0 -260
- package/dist/components/dialog-filter/index.js +0 -259
- package/dist/components/dialog-form/index.js +0 -163
- package/dist/components/dynamic-table/index.js +0 -219
- package/dist/components/e-charts/index.js +0 -297
- package/dist/components/easy-popup/index.js +0 -105
- package/dist/components/editable-progress/index.js +0 -174
- package/dist/components/editable-tree/index.js +0 -1070
- package/dist/components/egd-collapse/index.js +0 -92
- package/dist/components/egd-collapse-item/index.js +0 -148
- package/dist/components/element-dialog/index.js +0 -302
- package/dist/components/empty-view/index.js +0 -75
- package/dist/components/error-view/index.js +0 -67
- package/dist/components/flex-column/index.js +0 -84
- package/dist/components/flex-item/index.js +0 -116
- package/dist/components/flex-row/index.js +0 -84
- package/dist/components/flex-scroller/index.js +0 -53
- package/dist/components/flow/index.js +0 -329
- package/dist/components/flow-node/index.js +0 -110
- package/dist/components/flow-viewer/index.js +0 -207
- package/dist/components/form-button/index.js +0 -84
- package/dist/components/form-cascader/index.js +0 -178
- package/dist/components/form-checkbox-group/index.js +0 -233
- package/dist/components/form-date-picker/index.js +0 -260
- package/dist/components/form-group/index.js +0 -128
- package/dist/components/form-holder/index.js +0 -140
- package/dist/components/form-input/index.js +0 -128
- package/dist/components/form-input-email/index.js +0 -125
- package/dist/components/form-input-id-card/index.js +0 -126
- package/dist/components/form-input-number/index.js +0 -146
- package/dist/components/form-input-phone-number/index.js +0 -120
- package/dist/components/form-input-time/index.js +0 -146
- package/dist/components/form-item/index.js +0 -199
- package/dist/components/form-item-config-provider/index.js +0 -64
- package/dist/components/form-item-group/index.js +0 -195
- package/dist/components/form-radio-group/index.js +0 -205
- package/dist/components/form-select/index.js +0 -185
- package/dist/components/form-switch/index.js +0 -119
- package/dist/components/form-temp/index.js +0 -169
- package/dist/components/form-textarea/index.js +0 -124
- package/dist/components/form-view/index.js +0 -437
- package/dist/components/fy-array/index.js +0 -164
- package/dist/components/fy-article/index.js +0 -104
- package/dist/components/fy-cascader/index.js +0 -142
- package/dist/components/fy-checkbox/index.js +0 -127
- package/dist/components/fy-code/index.js +0 -73
- package/dist/components/fy-curd/index.js +0 -889
- package/dist/components/fy-date/index.js +0 -90
- package/dist/components/fy-dialog-form/index.js +0 -351
- package/dist/components/fy-draggable/index.js +0 -505
- package/dist/components/fy-dynamic/index.js +0 -380
- package/dist/components/fy-form/index.js +0 -964
- package/dist/components/fy-form-design/index.js +0 -8412
- package/dist/components/fy-form-menu/index.js +0 -103
- package/dist/components/fy-input/index.js +0 -187
- package/dist/components/fy-input-color/index.js +0 -108
- package/dist/components/fy-input-icon/index.js +0 -182
- package/dist/components/fy-input-map/index.js +0 -320
- package/dist/components/fy-input-number/index.js +0 -92
- package/dist/components/fy-input-table/index.js +0 -206
- package/dist/components/fy-input-tree/index.js +0 -309
- package/dist/components/fy-progress/index.js +0 -65
- package/dist/components/fy-radio/index.js +0 -74
- package/dist/components/fy-rate/index.js +0 -111
- package/dist/components/fy-select/index.js +0 -242
- package/dist/components/fy-slider/index.js +0 -84
- package/dist/components/fy-switch/index.js +0 -78
- package/dist/components/fy-tabs/index.js +0 -98
- package/dist/components/fy-time/index.js +0 -106
- package/dist/components/fy-title/index.js +0 -48
- package/dist/components/fy-tree/index.js +0 -491
- package/dist/components/fy-u-editor/index.js +0 -514
- package/dist/components/fy-upload/index.js +0 -760
- package/dist/components/guide-steps/index.js +0 -108
- package/dist/components/header-menu/index.js +0 -258
- package/dist/components/header-search/index.js +0 -285
- package/dist/components/highlight-j-s/index.js +0 -89
- package/dist/components/icon-card/index.js +0 -68
- package/dist/components/icon-temp/index.js +0 -56
- package/dist/components/iframe-window/index.js +0 -67
- package/dist/components/image-cropper/index.js +0 -217
- package/dist/components/image-preview/index.js +0 -264
- package/dist/components/image-viewer/index.js +0 -113
- package/dist/components/input-number/index.js +0 -340
- package/dist/components/input-number-range/index.js +0 -122
- package/dist/components/keep-view-alive/index.js +0 -170
- package/dist/components/keyboard/index.js +0 -469
- package/dist/components/license/index.js +0 -180
- package/dist/components/loading-view/index.js +0 -67
- package/dist/components/login/index.js +0 -279
- package/dist/components/name-avatar/index.js +0 -88
- package/dist/components/nav-bar/index.js +0 -62
- package/dist/components/not-implement/index.js +0 -43
- package/dist/components/notice/index.js +0 -156
- package/dist/components/page/index.js +0 -46
- package/dist/components/page-header/index.js +0 -62
- package/dist/components/page-index/index.js +0 -200
- package/dist/components/page-index-top/index.js +0 -160
- package/dist/components/page-skeleton/index.js +0 -62
- package/dist/components/page-skeleton-new/index.js +0 -104
- package/dist/components/pageable-table/index.js +0 -559
- package/dist/components/pageable-view/index.js +0 -462
- package/dist/components/photo-swipe/index.js +0 -175
- package/dist/components/properties-panel/index.js +0 -5235
- package/dist/components/queue/index.js +0 -88
- package/dist/components/record-video/index.js +0 -199
- package/dist/components/resize-observer/index.js +0 -96
- package/dist/components/search/index.js +0 -162
- package/dist/components/search-popover/index.js +0 -473
- package/dist/components/sign/index.js +0 -236
- package/dist/components/sign-panel/index.js +0 -305
- package/dist/components/skeleton/index.js +0 -92
- package/dist/components/split-pane/index.js +0 -298
- package/dist/components/stateful/index.js +0 -87
- package/dist/components/static-pageable-table/index.js +0 -99
- package/dist/components/swiper/index.js +0 -247
- package/dist/components/tab/index.js +0 -165
- package/dist/components/tab-item/index.js +0 -78
- package/dist/components/table-column/index.js +0 -111
- package/dist/components/table-page/index.js +0 -151
- package/dist/components/table-view/index.js +0 -465
- package/dist/components/tag-render/index.js +0 -127
- package/dist/components/text-ellipsis/index.js +0 -130
- package/dist/components/tinymce-editor/index.js +0 -211
- package/dist/components/toolbar/index.js +0 -238
- package/dist/components/toolbar-button/index.js +0 -119
- package/dist/components/trigger/index.js +0 -78
- package/dist/components/verify/index.js +0 -87
- package/dist/components/vue-tags-input/index.js +0 -673
- package/dist/components/watermark/index.js +0 -114
- package/dist/index.es.js +0 -52436
|
@@ -1,1070 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __async = (__this, __arguments, generator) => {
|
|
21
|
-
return new Promise((resolve, reject) => {
|
|
22
|
-
var fulfilled = (value) => {
|
|
23
|
-
try {
|
|
24
|
-
step(generator.next(value));
|
|
25
|
-
} catch (e) {
|
|
26
|
-
reject(e);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
var rejected = (value) => {
|
|
30
|
-
try {
|
|
31
|
-
step(generator.throw(value));
|
|
32
|
-
} catch (e) {
|
|
33
|
-
reject(e);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
import { hasOwn, isVerticalScrollbarVisible, scrollbarWidth, computePosition, isPlainObject, isFunction, isUndefined, isNotEmpty, fastClone, delay, findTreeChildren } from "@web-utils/core";
|
|
41
|
-
import { addResizeListener, removeResizeListener } from "@web-utils/integrations/resize";
|
|
42
|
-
import { cloneDeep } from "@web-utils/integrations/lodash";
|
|
43
|
-
import { a as filterTreeProperties, b as filterTreeEvents, c as assignReactiveProperties } from "../../chunks/utils.2a3ffac9.js";
|
|
44
|
-
import { n as normalizeComponent } from "../../chunks/vueComponentNormalizer.9c6b8b3d.js";
|
|
45
|
-
var render = function() {
|
|
46
|
-
var _vm = this;
|
|
47
|
-
var _h = _vm.$createElement;
|
|
48
|
-
var _c = _vm._self._c || _h;
|
|
49
|
-
return _c("div", {
|
|
50
|
-
staticClass: "editable-tree"
|
|
51
|
-
}, [!_vm.readonly && _vm.addRootNodeButtonStyle === "top-right" ? _c("ElButton", {
|
|
52
|
-
staticStyle: {
|
|
53
|
-
"position": "absolute",
|
|
54
|
-
"top": "4px",
|
|
55
|
-
"z-index": "1"
|
|
56
|
-
},
|
|
57
|
-
style: {
|
|
58
|
-
right: `${_vm.right}px`
|
|
59
|
-
},
|
|
60
|
-
attrs: {
|
|
61
|
-
"type": "primary",
|
|
62
|
-
"size": "mini",
|
|
63
|
-
"icon": "el-icon-plus",
|
|
64
|
-
"circle": "",
|
|
65
|
-
"plain": ""
|
|
66
|
-
},
|
|
67
|
-
on: {
|
|
68
|
-
"click": function($event) {
|
|
69
|
-
$event.stopPropagation();
|
|
70
|
-
return _vm.$emit("add-root-node");
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}) : _vm._e(), _c("div", {
|
|
74
|
-
ref: "treeWrapper",
|
|
75
|
-
staticClass: "et-tree-wrapper"
|
|
76
|
-
}, [!_vm.readonly && _vm.addRootNodeButtonStyle === "top" ? _c("div", {
|
|
77
|
-
staticStyle: {
|
|
78
|
-
"padding-left": "24px"
|
|
79
|
-
}
|
|
80
|
-
}, [_c("ElButton", {
|
|
81
|
-
attrs: {
|
|
82
|
-
"disabled": _vm.loading,
|
|
83
|
-
"size": "mini",
|
|
84
|
-
"type": "text"
|
|
85
|
-
},
|
|
86
|
-
on: {
|
|
87
|
-
"click": _vm.appendRootNode
|
|
88
|
-
}
|
|
89
|
-
}, [_c("i", {
|
|
90
|
-
staticClass: "el-icon-lx-add"
|
|
91
|
-
}), _vm._v(" " + _vm._s(_vm.addRootNodeLabel ? _vm.addRootNodeLabel : `添加${_vm.label}`) + " ")])], 1) : _vm._e(), _c("ElTree", _vm._g(_vm._b({
|
|
92
|
-
key: _vm.treeKey,
|
|
93
|
-
ref: "tree",
|
|
94
|
-
staticClass: "flex-item",
|
|
95
|
-
attrs: {
|
|
96
|
-
"default-expanded-keys": _vm.expandedKeys,
|
|
97
|
-
"expand-on-click-node": false,
|
|
98
|
-
"highlight-current": "",
|
|
99
|
-
"load": _vm.loadNode,
|
|
100
|
-
"data": _vm.innerTreeData,
|
|
101
|
-
"props": _vm.treeProps,
|
|
102
|
-
"lazy": _vm.lazy,
|
|
103
|
-
"node-key": _vm.nodeKey
|
|
104
|
-
},
|
|
105
|
-
on: {
|
|
106
|
-
"node-click": _vm.nodeClick,
|
|
107
|
-
"node-contextmenu": _vm.showContextMenu,
|
|
108
|
-
"node-expand": _vm.addExpandKey,
|
|
109
|
-
"node-collapse": _vm.removeExpandKey
|
|
110
|
-
},
|
|
111
|
-
scopedSlots: _vm._u([{
|
|
112
|
-
key: "default",
|
|
113
|
-
fn: function(_ref) {
|
|
114
|
-
var node = _ref.node, data = _ref.data;
|
|
115
|
-
return [_vm._t("default", function() {
|
|
116
|
-
return [!data.edit ? [_c("span", {
|
|
117
|
-
staticClass: "custom-tree-node",
|
|
118
|
-
attrs: {
|
|
119
|
-
"data-id": data.id
|
|
120
|
-
}
|
|
121
|
-
}, [_c("span", {
|
|
122
|
-
staticClass: "node-label flex-row flex-item oh ellipsis-1"
|
|
123
|
-
}, [_vm.icon ? _c("i", {
|
|
124
|
-
staticClass: "node-icon",
|
|
125
|
-
class: data.loading ? "el-icon-loading" : _vm.icon(data, node)
|
|
126
|
-
}) : _vm._e(), _c("span", {
|
|
127
|
-
staticClass: "flex-item-relative",
|
|
128
|
-
staticStyle: {
|
|
129
|
-
"height": "21px"
|
|
130
|
-
}
|
|
131
|
-
}, [_c("span", {
|
|
132
|
-
staticClass: "ellipsis-1 absolute-box et-tree-label",
|
|
133
|
-
attrs: {
|
|
134
|
-
"title": node.label
|
|
135
|
-
}
|
|
136
|
-
}, [_vm._t("label", function() {
|
|
137
|
-
return [_vm._v(_vm._s(node.label))];
|
|
138
|
-
}, {
|
|
139
|
-
"data": data,
|
|
140
|
-
"node": node
|
|
141
|
-
})], 2)]), _vm._t("label-suffix", null, {
|
|
142
|
-
"node": node,
|
|
143
|
-
"data": data
|
|
144
|
-
})], 2), !_vm.contextMenu && !_vm.readonly ? _c("span", {
|
|
145
|
-
directives: [{
|
|
146
|
-
name: "show",
|
|
147
|
-
rawName: "v-show",
|
|
148
|
-
value: !data.loading && !_vm.loading,
|
|
149
|
-
expression: "!data.loading && !loading"
|
|
150
|
-
}],
|
|
151
|
-
staticClass: "handle-actions"
|
|
152
|
-
}, [_c("ElButton", {
|
|
153
|
-
attrs: {
|
|
154
|
-
"size": "mini",
|
|
155
|
-
"type": "text"
|
|
156
|
-
},
|
|
157
|
-
on: {
|
|
158
|
-
"click": function($event) {
|
|
159
|
-
$event.stopPropagation();
|
|
160
|
-
return _vm.appendChildNode(node, data);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}, [_vm._v("添加")]), _c("ElButton", {
|
|
164
|
-
attrs: {
|
|
165
|
-
"size": "mini",
|
|
166
|
-
"type": "text"
|
|
167
|
-
},
|
|
168
|
-
on: {
|
|
169
|
-
"click": function($event) {
|
|
170
|
-
$event.stopPropagation();
|
|
171
|
-
return _vm.editNode(node, data);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}, [_vm._v("修改")]), _c("ElPopconfirm", {
|
|
175
|
-
staticClass: "pop-confirm",
|
|
176
|
-
attrs: {
|
|
177
|
-
"icon-color": "red",
|
|
178
|
-
"title": "你确定要删除吗?"
|
|
179
|
-
},
|
|
180
|
-
on: {
|
|
181
|
-
"confirm": function($event) {
|
|
182
|
-
return _vm.removeNode(node, data);
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
scopedSlots: _vm._u([{
|
|
186
|
-
key: "reference",
|
|
187
|
-
fn: function() {
|
|
188
|
-
return [_c("ElButton", {
|
|
189
|
-
directives: [{
|
|
190
|
-
name: "show",
|
|
191
|
-
rawName: "v-show",
|
|
192
|
-
value: node.isLeaf,
|
|
193
|
-
expression: "node.isLeaf"
|
|
194
|
-
}],
|
|
195
|
-
staticStyle: {
|
|
196
|
-
"margin-left": "4px"
|
|
197
|
-
},
|
|
198
|
-
attrs: {
|
|
199
|
-
"size": "mini",
|
|
200
|
-
"type": "text"
|
|
201
|
-
},
|
|
202
|
-
on: {
|
|
203
|
-
"click": function($event) {
|
|
204
|
-
$event.stopPropagation();
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}, [_vm._v("删除")])];
|
|
208
|
-
},
|
|
209
|
-
proxy: true
|
|
210
|
-
}], null, true)
|
|
211
|
-
})], 1) : _vm._e(), _vm.contextMenuIcon && _vm.contextMenu && !_vm.readonly ? _c("span", {
|
|
212
|
-
directives: [{
|
|
213
|
-
name: "show",
|
|
214
|
-
rawName: "v-show",
|
|
215
|
-
value: !data.loading && !_vm.loading,
|
|
216
|
-
expression: "!data.loading && !loading"
|
|
217
|
-
}],
|
|
218
|
-
staticClass: "handle-actions",
|
|
219
|
-
staticStyle: {
|
|
220
|
-
"display": "inline-block"
|
|
221
|
-
}
|
|
222
|
-
}, [_c("ElButton", {
|
|
223
|
-
staticStyle: {
|
|
224
|
-
"padding": "6px 10px 0"
|
|
225
|
-
},
|
|
226
|
-
attrs: {
|
|
227
|
-
"size": "mini",
|
|
228
|
-
"type": "text"
|
|
229
|
-
},
|
|
230
|
-
on: {
|
|
231
|
-
"click": function($event) {
|
|
232
|
-
$event.stopPropagation();
|
|
233
|
-
return _vm.showContextMenu($event, data, node);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}, [_vm._v(". . .")])], 1) : _vm._e()])] : [_c("span", {
|
|
237
|
-
staticClass: "custom-tree-node flex-row flex-item oh",
|
|
238
|
-
attrs: {
|
|
239
|
-
"data-id": data.id
|
|
240
|
-
}
|
|
241
|
-
}, [_vm.icon ? _c("i", {
|
|
242
|
-
staticClass: "node-icon shrink-0",
|
|
243
|
-
class: data.loading ? "el-icon-loading" : "el-icon-edit-outline"
|
|
244
|
-
}) : _vm._e(), _c("ElInput", {
|
|
245
|
-
ref: "labelTxt",
|
|
246
|
-
staticClass: "node-input flex-item",
|
|
247
|
-
attrs: {
|
|
248
|
-
"size": "mini",
|
|
249
|
-
"placeholder": _vm.defaultOptions.inputPlaceholder
|
|
250
|
-
},
|
|
251
|
-
on: {
|
|
252
|
-
"blur": function(event) {
|
|
253
|
-
return _vm.inputBlur(event, node, data);
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
nativeOn: {
|
|
257
|
-
"keyup": function($event) {
|
|
258
|
-
return function(event) {
|
|
259
|
-
return _vm.inputKeyup(event, node, data);
|
|
260
|
-
}.apply(null, arguments);
|
|
261
|
-
},
|
|
262
|
-
"click": function($event) {
|
|
263
|
-
$event.stopPropagation();
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
model: {
|
|
267
|
-
value: _vm.text,
|
|
268
|
-
callback: function($$v) {
|
|
269
|
-
_vm.text = $$v;
|
|
270
|
-
},
|
|
271
|
-
expression: "text"
|
|
272
|
-
}
|
|
273
|
-
}), _vm.confirmButton ? [_c("ElButton", {
|
|
274
|
-
directives: [{
|
|
275
|
-
name: "show",
|
|
276
|
-
rawName: "v-show",
|
|
277
|
-
value: !data.loading,
|
|
278
|
-
expression: "!data.loading"
|
|
279
|
-
}],
|
|
280
|
-
staticClass: "shrink-0",
|
|
281
|
-
attrs: {
|
|
282
|
-
"size": "mini",
|
|
283
|
-
"type": "text"
|
|
284
|
-
},
|
|
285
|
-
on: {
|
|
286
|
-
"click": function($event) {
|
|
287
|
-
$event.stopPropagation();
|
|
288
|
-
return _vm.onConfirm(node, data);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}, [_vm._v("确定")]), _c("ElButton", {
|
|
292
|
-
directives: [{
|
|
293
|
-
name: "show",
|
|
294
|
-
rawName: "v-show",
|
|
295
|
-
value: !data.loading,
|
|
296
|
-
expression: "!data.loading"
|
|
297
|
-
}],
|
|
298
|
-
staticClass: "shrink-0",
|
|
299
|
-
attrs: {
|
|
300
|
-
"size": "mini",
|
|
301
|
-
"type": "text"
|
|
302
|
-
},
|
|
303
|
-
on: {
|
|
304
|
-
"click": function($event) {
|
|
305
|
-
$event.stopPropagation();
|
|
306
|
-
return _vm.onCancel(node, data);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}, [_vm._v("取消")])] : _vm._e()], 2)]];
|
|
310
|
-
}, {
|
|
311
|
-
"node": node,
|
|
312
|
-
"data": data
|
|
313
|
-
})];
|
|
314
|
-
}
|
|
315
|
-
}], null, true)
|
|
316
|
-
}, "ElTree", _vm.filterTreeProperties(_vm.$attrs), false), _vm.filterTreeEvents(_vm.$listeners))), _vm.contextMenu && !_vm.readonly ? _c("div", {
|
|
317
|
-
directives: [{
|
|
318
|
-
name: "show",
|
|
319
|
-
rawName: "v-show",
|
|
320
|
-
value: _vm.showMenu,
|
|
321
|
-
expression: "showMenu"
|
|
322
|
-
}],
|
|
323
|
-
ref: "contextMenu",
|
|
324
|
-
staticClass: "menu",
|
|
325
|
-
style: _vm.position
|
|
326
|
-
}, [_c("ul", {
|
|
327
|
-
staticClass: "menu-list"
|
|
328
|
-
}, [_vm._t("context-menu", function() {
|
|
329
|
-
return [_c("li", {
|
|
330
|
-
directives: [{
|
|
331
|
-
name: "show",
|
|
332
|
-
rawName: "v-show",
|
|
333
|
-
value: _vm.curData.id > -1,
|
|
334
|
-
expression: "curData.id > -1"
|
|
335
|
-
}],
|
|
336
|
-
staticClass: "menu-item",
|
|
337
|
-
on: {
|
|
338
|
-
"click": function($event) {
|
|
339
|
-
return _vm.appendPeerNode(_vm.curNode, _vm.curData);
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}, [_c("i", {
|
|
343
|
-
staticClass: "menu-item-icon el-icon-lx-add",
|
|
344
|
-
staticStyle: {
|
|
345
|
-
"color": "#228b22"
|
|
346
|
-
}
|
|
347
|
-
}), _vm._v(_vm._s(_vm.menuLabel.appendPeer) + " ")]), _c("li", {
|
|
348
|
-
staticClass: "menu-item",
|
|
349
|
-
on: {
|
|
350
|
-
"click": function($event) {
|
|
351
|
-
return _vm.appendChildNode(_vm.curNode, _vm.curData);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}, [_c("i", {
|
|
355
|
-
staticClass: "menu-item-icon el-icon-lx-add",
|
|
356
|
-
staticStyle: {
|
|
357
|
-
"color": "#228b22"
|
|
358
|
-
}
|
|
359
|
-
}), _vm._v(_vm._s(_vm.menuLabel.appendChild) + " ")]), _c("li", {
|
|
360
|
-
directives: [{
|
|
361
|
-
name: "show",
|
|
362
|
-
rawName: "v-show",
|
|
363
|
-
value: _vm.curData.id > -1,
|
|
364
|
-
expression: "curData.id > -1"
|
|
365
|
-
}],
|
|
366
|
-
staticClass: "menu-item",
|
|
367
|
-
on: {
|
|
368
|
-
"click": function($event) {
|
|
369
|
-
return _vm.editNode(_vm.curNode, _vm.curData);
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}, [_c("i", {
|
|
373
|
-
staticClass: "menu-item-icon el-icon-edit-outline",
|
|
374
|
-
staticStyle: {
|
|
375
|
-
"color": "#ffa500"
|
|
376
|
-
}
|
|
377
|
-
}), _vm._v(_vm._s(_vm.menuLabel.editNode) + " ")]), _c("li", {
|
|
378
|
-
directives: [{
|
|
379
|
-
name: "show",
|
|
380
|
-
rawName: "v-show",
|
|
381
|
-
value: _vm.curNode.isLeaf,
|
|
382
|
-
expression: "curNode.isLeaf"
|
|
383
|
-
}],
|
|
384
|
-
staticClass: "menu-item",
|
|
385
|
-
on: {
|
|
386
|
-
"click": function($event) {
|
|
387
|
-
return _vm.removeNodeModal(_vm.curNode, _vm.curData);
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}, [_c("i", {
|
|
391
|
-
staticClass: "menu-item-icon el-icon-delete",
|
|
392
|
-
staticStyle: {
|
|
393
|
-
"color": "#f00"
|
|
394
|
-
}
|
|
395
|
-
}), _vm._v(_vm._s(_vm.menuLabel.removeNode) + " ")])];
|
|
396
|
-
}, {
|
|
397
|
-
"curNode": _vm.curNode,
|
|
398
|
-
"curData": _vm.curData
|
|
399
|
-
})], 2)]) : _vm._e()], 1)], 1);
|
|
400
|
-
};
|
|
401
|
-
var staticRenderFns = [];
|
|
402
|
-
const EditableTree_vue_vue_type_style_index_0_lang = "";
|
|
403
|
-
const __vue2_script = {
|
|
404
|
-
name: "EditableTree",
|
|
405
|
-
props: {
|
|
406
|
-
label: {
|
|
407
|
-
type: String,
|
|
408
|
-
default: "书签"
|
|
409
|
-
},
|
|
410
|
-
addRootNodeLabel: {
|
|
411
|
-
type: String
|
|
412
|
-
},
|
|
413
|
-
defaultExpandedKeys: {
|
|
414
|
-
type: Array,
|
|
415
|
-
default: () => []
|
|
416
|
-
},
|
|
417
|
-
newNodeBuilder: {
|
|
418
|
-
type: Function,
|
|
419
|
-
default: (name, parent) => {
|
|
420
|
-
return {
|
|
421
|
-
name,
|
|
422
|
-
parentId: parent.id
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
},
|
|
426
|
-
contextMenu: Boolean,
|
|
427
|
-
lazy: {
|
|
428
|
-
type: Boolean,
|
|
429
|
-
default: true
|
|
430
|
-
},
|
|
431
|
-
expandFirstNode: {
|
|
432
|
-
type: Boolean,
|
|
433
|
-
default: true
|
|
434
|
-
},
|
|
435
|
-
readonly: Boolean,
|
|
436
|
-
saveApi: {
|
|
437
|
-
type: Function
|
|
438
|
-
},
|
|
439
|
-
updateApi: {
|
|
440
|
-
type: Function
|
|
441
|
-
},
|
|
442
|
-
deleteApi: {
|
|
443
|
-
type: Function
|
|
444
|
-
},
|
|
445
|
-
fetchApi: {
|
|
446
|
-
type: Function
|
|
447
|
-
},
|
|
448
|
-
customRootNode: {
|
|
449
|
-
type: {
|
|
450
|
-
type: Object,
|
|
451
|
-
default: void 0
|
|
452
|
-
}
|
|
453
|
-
},
|
|
454
|
-
rootNode: {
|
|
455
|
-
type: Object
|
|
456
|
-
},
|
|
457
|
-
contextMenuIcon: Boolean,
|
|
458
|
-
contextMenuInline: Boolean,
|
|
459
|
-
treeProps: {
|
|
460
|
-
type: Object,
|
|
461
|
-
default: () => {
|
|
462
|
-
return {
|
|
463
|
-
children: "children",
|
|
464
|
-
label: "name",
|
|
465
|
-
isLeaf: (data) => {
|
|
466
|
-
if (hasOwn(data, "hasChildren")) {
|
|
467
|
-
return !data.hasChildren;
|
|
468
|
-
} else if (hasOwn(data, "hasChild")) {
|
|
469
|
-
return !data.hasChild;
|
|
470
|
-
} else if (hasOwn(data, "children") && data.children) {
|
|
471
|
-
return data.children.length === 0;
|
|
472
|
-
} else {
|
|
473
|
-
return true;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
},
|
|
479
|
-
menuLabel: {
|
|
480
|
-
type: Object,
|
|
481
|
-
default: () => ({
|
|
482
|
-
appendPeer: "添加同级节点",
|
|
483
|
-
appendChild: "添加",
|
|
484
|
-
removeNode: "删除",
|
|
485
|
-
editNode: "修改"
|
|
486
|
-
})
|
|
487
|
-
},
|
|
488
|
-
icon: {
|
|
489
|
-
type: [Function, Boolean],
|
|
490
|
-
default: () => {
|
|
491
|
-
return "el-icon-collection-tag";
|
|
492
|
-
}
|
|
493
|
-
},
|
|
494
|
-
confirmButton: {
|
|
495
|
-
type: Boolean,
|
|
496
|
-
default: true
|
|
497
|
-
},
|
|
498
|
-
addRootNodeButtonStyle: {
|
|
499
|
-
type: String,
|
|
500
|
-
default: "top"
|
|
501
|
-
},
|
|
502
|
-
reserveExpandKey: Boolean,
|
|
503
|
-
nodeKey: {
|
|
504
|
-
type: String,
|
|
505
|
-
default: "id"
|
|
506
|
-
}
|
|
507
|
-
},
|
|
508
|
-
data() {
|
|
509
|
-
return {
|
|
510
|
-
loading: false,
|
|
511
|
-
showMenu: false,
|
|
512
|
-
empty: true,
|
|
513
|
-
expandedKeys: this.lazy ? [] : this.defaultExpandedKeys,
|
|
514
|
-
treeData: [],
|
|
515
|
-
curNode: {},
|
|
516
|
-
curData: {},
|
|
517
|
-
position: {},
|
|
518
|
-
text: "",
|
|
519
|
-
right: 4,
|
|
520
|
-
treeKey: Date.now()
|
|
521
|
-
};
|
|
522
|
-
},
|
|
523
|
-
computed: {
|
|
524
|
-
defaultOptions() {
|
|
525
|
-
return {
|
|
526
|
-
confirmButtonText: "确定",
|
|
527
|
-
cancelButtonText: "取消",
|
|
528
|
-
closeOnClickModal: false,
|
|
529
|
-
modal: true,
|
|
530
|
-
inputErrorMessage: `${this.label}名不能为空!`,
|
|
531
|
-
inputPlaceholder: `请输入${this.label}名...`,
|
|
532
|
-
inputValidator: (value) => value != null && value.trim().length > 0
|
|
533
|
-
};
|
|
534
|
-
},
|
|
535
|
-
innerTreeData() {
|
|
536
|
-
var _a;
|
|
537
|
-
return ((_a = this.$attrs.data) == null ? void 0 : _a.length) ? this.$attrs.data : this.treeData;
|
|
538
|
-
}
|
|
539
|
-
},
|
|
540
|
-
watch: {
|
|
541
|
-
defaultExpandedKeys: {
|
|
542
|
-
immediate: true,
|
|
543
|
-
handler(newVal) {
|
|
544
|
-
this.expandedKeys = [...newVal];
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
},
|
|
548
|
-
created() {
|
|
549
|
-
this.tryFetch();
|
|
550
|
-
},
|
|
551
|
-
mounted() {
|
|
552
|
-
addResizeListener(this.$refs.tree.$el, this.resize);
|
|
553
|
-
addResizeListener(this.$refs.treeWrapper, this.resize);
|
|
554
|
-
},
|
|
555
|
-
beforeDestroy() {
|
|
556
|
-
removeResizeListener(this.$refs.tree.$el, this.resize);
|
|
557
|
-
removeResizeListener(this.$refs.treeWrapper, this.resize);
|
|
558
|
-
},
|
|
559
|
-
methods: {
|
|
560
|
-
filterTreeProperties,
|
|
561
|
-
filterTreeEvents,
|
|
562
|
-
addExpandKey(data) {
|
|
563
|
-
if (this.reserveExpandKey) {
|
|
564
|
-
this.expandedKeys.push(data[this.nodeKey]);
|
|
565
|
-
}
|
|
566
|
-
},
|
|
567
|
-
removeExpandKey(data) {
|
|
568
|
-
if (this.reserveExpandKey) {
|
|
569
|
-
this.expandedKeys = this.expandedKeys.filter((key) => key !== data[this.nodeKey]);
|
|
570
|
-
}
|
|
571
|
-
},
|
|
572
|
-
resize() {
|
|
573
|
-
if (isVerticalScrollbarVisible(this.$refs.treeWrapper)) {
|
|
574
|
-
this.right = 4 + scrollbarWidth;
|
|
575
|
-
} else {
|
|
576
|
-
this.right = 4;
|
|
577
|
-
}
|
|
578
|
-
},
|
|
579
|
-
showContextMenu(event, data, node) {
|
|
580
|
-
return __async(this, null, function* () {
|
|
581
|
-
if (data.contextmenu === false || data.id === -1 || data.id === 0 || data.edit === true) {
|
|
582
|
-
return;
|
|
583
|
-
}
|
|
584
|
-
if (this.contextMenu) {
|
|
585
|
-
this.curNode = node;
|
|
586
|
-
this.curData = data;
|
|
587
|
-
this.showMenu = true;
|
|
588
|
-
this.$refs.tree.setCurrentKey(data.id);
|
|
589
|
-
yield this.$nextTick();
|
|
590
|
-
this.position = computePosition(event, this.$refs.contextMenu);
|
|
591
|
-
window.addEventListener("click", this.hideContextMenu);
|
|
592
|
-
}
|
|
593
|
-
});
|
|
594
|
-
},
|
|
595
|
-
hideContextMenu() {
|
|
596
|
-
this.showMenu = false;
|
|
597
|
-
window.removeEventListener("click", this.hideContextMenu);
|
|
598
|
-
},
|
|
599
|
-
tryFetch() {
|
|
600
|
-
return __async(this, null, function* () {
|
|
601
|
-
var _a, _b;
|
|
602
|
-
if (this.lazy === false && this.fetchApi) {
|
|
603
|
-
const res = yield this.fetchApi((_b = (_a = this.rootNode) == null ? void 0 : _a.id) != null ? _b : -1, {});
|
|
604
|
-
if (isPlainObject(res.data)) {
|
|
605
|
-
res.data = [res.data];
|
|
606
|
-
}
|
|
607
|
-
res.data = res.data || [];
|
|
608
|
-
this.empty = res.data.length === 0;
|
|
609
|
-
if (isPlainObject(this.customRootNode)) {
|
|
610
|
-
const data = cloneDeep(this.customRootNode);
|
|
611
|
-
data[this.treeProps.children || "children"] = res.data;
|
|
612
|
-
this.treeData = [data];
|
|
613
|
-
} else if (isFunction(this.customRootNode)) {
|
|
614
|
-
const data = this.customRootNode(res.data);
|
|
615
|
-
data[this.treeProps.children || "children"] = res.data;
|
|
616
|
-
this.treeData = isPlainObject(data) ? [data] : data;
|
|
617
|
-
} else {
|
|
618
|
-
this.treeData = res.data;
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
});
|
|
622
|
-
},
|
|
623
|
-
loadNode(node, resolve) {
|
|
624
|
-
return __async(this, null, function* () {
|
|
625
|
-
var _a, _b, _c, _d;
|
|
626
|
-
if (node.level === 0) {
|
|
627
|
-
const res = yield this.fetchApi((_b = (_a = this.rootNode) == null ? void 0 : _a.id) != null ? _b : -1, node);
|
|
628
|
-
this.empty = res.data.length === 0;
|
|
629
|
-
if (isPlainObject(this.customRootNode)) {
|
|
630
|
-
const data = cloneDeep(this.customRootNode);
|
|
631
|
-
data[this.treeProps.children || "children"] = res.data;
|
|
632
|
-
resolve([data]);
|
|
633
|
-
} else if (isFunction(this.customRootNode)) {
|
|
634
|
-
const data = this.customRootNode(res.data);
|
|
635
|
-
data[this.treeProps.children || "children"] = res.data;
|
|
636
|
-
this.treeData = isPlainObject(data) ? [data] : data;
|
|
637
|
-
} else {
|
|
638
|
-
resolve(res.data);
|
|
639
|
-
}
|
|
640
|
-
yield this.$nextTick();
|
|
641
|
-
this.$emit("root-node-loaded", res.data);
|
|
642
|
-
if (this.defaultExpandedKeys) {
|
|
643
|
-
this.expandedKeys = [(_c = res == null ? void 0 : res.data[0]) == null ? void 0 : _c.id, ...this.defaultExpandedKeys];
|
|
644
|
-
} else {
|
|
645
|
-
if (this.expandFirstNode) {
|
|
646
|
-
this.expandedKeys = [(_d = res == null ? void 0 : res.data[0]) == null ? void 0 : _d.id];
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
} else {
|
|
650
|
-
if (node.leaf || node.data.isTempNode) {
|
|
651
|
-
return resolve([]);
|
|
652
|
-
}
|
|
653
|
-
const res = yield this.fetchApi(node.data.id, node);
|
|
654
|
-
resolve(res.data);
|
|
655
|
-
yield this.$nextTick();
|
|
656
|
-
this.$emit("node-loaded", res.data);
|
|
657
|
-
}
|
|
658
|
-
});
|
|
659
|
-
},
|
|
660
|
-
clear() {
|
|
661
|
-
this.cancelEdit();
|
|
662
|
-
this.removeNewNode();
|
|
663
|
-
},
|
|
664
|
-
clearChecked() {
|
|
665
|
-
this.$refs.tree.setCheckedKeys([]);
|
|
666
|
-
},
|
|
667
|
-
removeNewNode() {
|
|
668
|
-
if (this.newChild && this.newChild.id === -1) {
|
|
669
|
-
console.log(this.newChild);
|
|
670
|
-
this.$refs.tree.remove(this.newChild);
|
|
671
|
-
this.$emit("remove-new-node");
|
|
672
|
-
}
|
|
673
|
-
},
|
|
674
|
-
cancelEdit() {
|
|
675
|
-
if (this.editData) {
|
|
676
|
-
if (isUndefined(this.editData.edit)) {
|
|
677
|
-
this.$set(this.editData, "edit", true);
|
|
678
|
-
} else {
|
|
679
|
-
this.editData.edit = false;
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
},
|
|
683
|
-
editNode(node, data) {
|
|
684
|
-
return __async(this, null, function* () {
|
|
685
|
-
if (!this.contextMenu || this.contextMenuIcon || this.contextMenuInline) {
|
|
686
|
-
this.clear();
|
|
687
|
-
this.editData = data;
|
|
688
|
-
this.text = data[this.treeProps.label];
|
|
689
|
-
if (isUndefined(data.edit)) {
|
|
690
|
-
this.$set(data, "edit", true);
|
|
691
|
-
} else {
|
|
692
|
-
data.edit = true;
|
|
693
|
-
}
|
|
694
|
-
yield this.$nextTick();
|
|
695
|
-
this.$refs.labelTxt.focus();
|
|
696
|
-
} else {
|
|
697
|
-
yield this.$prompt(`请输入新的${this.label}名:`, __spreadProps(__spreadValues({}, this.defaultOptions), {
|
|
698
|
-
inputValue: data[this.treeProps.label],
|
|
699
|
-
beforeClose: (action, instance, done) => __async(this, null, function* () {
|
|
700
|
-
if (action === "confirm") {
|
|
701
|
-
try {
|
|
702
|
-
instance.confirmButtonLoading = true;
|
|
703
|
-
instance.confirmButtonText = "处理中...";
|
|
704
|
-
this.text = instance.inputValue;
|
|
705
|
-
yield this.onConfirm(this.curNode, this.curData);
|
|
706
|
-
done();
|
|
707
|
-
} catch (e) {
|
|
708
|
-
instance.confirmButtonText = "确定";
|
|
709
|
-
}
|
|
710
|
-
instance.confirmButtonLoading = false;
|
|
711
|
-
} else {
|
|
712
|
-
done();
|
|
713
|
-
}
|
|
714
|
-
})
|
|
715
|
-
})).catch((_) => _);
|
|
716
|
-
}
|
|
717
|
-
});
|
|
718
|
-
},
|
|
719
|
-
appendRootNode() {
|
|
720
|
-
return __async(this, null, function* () {
|
|
721
|
-
this.text = "";
|
|
722
|
-
if (!this.contextMenu || this.contextMenuIcon || this.contextMenuInline) {
|
|
723
|
-
this.clear();
|
|
724
|
-
this.createNewChild(void 0);
|
|
725
|
-
this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, true);
|
|
726
|
-
yield this.scrollIntoView(true);
|
|
727
|
-
} else {
|
|
728
|
-
yield this.$prompt(`请输入${this.label}名:`, __spreadProps(__spreadValues({}, this.defaultOptions), {
|
|
729
|
-
beforeClose: (action, instance, done) => __async(this, null, function* () {
|
|
730
|
-
if (action === "confirm") {
|
|
731
|
-
try {
|
|
732
|
-
this.createNewChild(-1);
|
|
733
|
-
instance.confirmButtonLoading = true;
|
|
734
|
-
instance.confirmButtonText = "处理中...";
|
|
735
|
-
const res = yield this.saveApi(this.newNodeBuilder(instance.inputValue, { id: -1 }));
|
|
736
|
-
this.newChild[this.treeProps.label] = instance.inputValue;
|
|
737
|
-
this.newChild.edit = false;
|
|
738
|
-
assignReactiveProperties(this.newChild, res.data);
|
|
739
|
-
this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, true);
|
|
740
|
-
yield this.locateView();
|
|
741
|
-
done();
|
|
742
|
-
} catch (e) {
|
|
743
|
-
instance.confirmButtonText = "确定";
|
|
744
|
-
}
|
|
745
|
-
instance.confirmButtonLoading = false;
|
|
746
|
-
} else {
|
|
747
|
-
done();
|
|
748
|
-
}
|
|
749
|
-
})
|
|
750
|
-
})).catch((_) => _);
|
|
751
|
-
}
|
|
752
|
-
});
|
|
753
|
-
},
|
|
754
|
-
appendChildNode(node) {
|
|
755
|
-
this.text = "";
|
|
756
|
-
const expanded = node.expanded;
|
|
757
|
-
node.expand(() => __async(this, null, function* () {
|
|
758
|
-
if (!this.contextMenu || this.contextMenuIcon || this.contextMenuInline) {
|
|
759
|
-
this.clear();
|
|
760
|
-
this.createNewChild(node.data.id);
|
|
761
|
-
this.$refs.tree.append(this.newChild, node);
|
|
762
|
-
yield this.scrollIntoView(expanded);
|
|
763
|
-
} else {
|
|
764
|
-
yield this.$prompt(`请输入${this.label}名:`, __spreadProps(__spreadValues({}, this.defaultOptions), {
|
|
765
|
-
beforeClose: (action, instance, done) => __async(this, null, function* () {
|
|
766
|
-
if (action === "confirm") {
|
|
767
|
-
try {
|
|
768
|
-
this.createNewChild(node.data.id);
|
|
769
|
-
instance.confirmButtonLoading = true;
|
|
770
|
-
instance.confirmButtonText = "处理中...";
|
|
771
|
-
const res = yield this.saveApi(this.newNodeBuilder(instance.inputValue, node.data));
|
|
772
|
-
this.newChild[this.treeProps.label] = instance.inputValue;
|
|
773
|
-
this.newChild.edit = false;
|
|
774
|
-
assignReactiveProperties(this.newChild, res.data);
|
|
775
|
-
this.$refs.tree.append(this.newChild, node);
|
|
776
|
-
yield this.locateView();
|
|
777
|
-
done();
|
|
778
|
-
} catch (e) {
|
|
779
|
-
instance.confirmButtonText = "确定";
|
|
780
|
-
}
|
|
781
|
-
instance.confirmButtonLoading = false;
|
|
782
|
-
} else {
|
|
783
|
-
done();
|
|
784
|
-
}
|
|
785
|
-
})
|
|
786
|
-
})).catch((_) => _);
|
|
787
|
-
}
|
|
788
|
-
}));
|
|
789
|
-
},
|
|
790
|
-
appendChildNodeWithData(node, parentId, label) {
|
|
791
|
-
this.text = "";
|
|
792
|
-
const expanded = node.expanded;
|
|
793
|
-
node.expand(() => __async(this, null, function* () {
|
|
794
|
-
this.clear();
|
|
795
|
-
this.newChild = {
|
|
796
|
-
id: -1,
|
|
797
|
-
parentId,
|
|
798
|
-
[this.treeProps.label]: label,
|
|
799
|
-
edit: false,
|
|
800
|
-
isTempNode: true,
|
|
801
|
-
hasChildren: false
|
|
802
|
-
};
|
|
803
|
-
this.$refs.tree.append(this.newChild, node);
|
|
804
|
-
yield this.scrollIntoView(expanded);
|
|
805
|
-
}));
|
|
806
|
-
},
|
|
807
|
-
appendPeerNode(node) {
|
|
808
|
-
if (node.parent && node.parent.level !== 0) {
|
|
809
|
-
this.appendChildNode(node.parent);
|
|
810
|
-
} else {
|
|
811
|
-
this.appendRootNode();
|
|
812
|
-
}
|
|
813
|
-
},
|
|
814
|
-
addRootNode(data) {
|
|
815
|
-
return __async(this, null, function* () {
|
|
816
|
-
this.$refs.tree.remove(data);
|
|
817
|
-
yield this.$nextTick();
|
|
818
|
-
this.$refs.tree.root.insertChild({ data }, void 0, true);
|
|
819
|
-
});
|
|
820
|
-
},
|
|
821
|
-
addChildNode(data) {
|
|
822
|
-
return __async(this, null, function* () {
|
|
823
|
-
if (this.curNode && this.curNode.level !== 0) {
|
|
824
|
-
this.curNode.expand(() => __async(this, null, function* () {
|
|
825
|
-
this.$refs.tree.remove(data);
|
|
826
|
-
yield this.$nextTick();
|
|
827
|
-
this.$refs.tree.append(data, this.curNode);
|
|
828
|
-
}));
|
|
829
|
-
} else {
|
|
830
|
-
yield this.addRootNode(data);
|
|
831
|
-
}
|
|
832
|
-
});
|
|
833
|
-
},
|
|
834
|
-
addPeerNode(data) {
|
|
835
|
-
return __async(this, null, function* () {
|
|
836
|
-
if (this.curNode && this.curNode.parent && this.curNode.parent.level !== 0) {
|
|
837
|
-
this.curNode.parent.expand(() => __async(this, null, function* () {
|
|
838
|
-
this.$refs.tree.remove(data);
|
|
839
|
-
yield this.$nextTick();
|
|
840
|
-
this.$refs.tree.append(data, this.curNode.parent);
|
|
841
|
-
}));
|
|
842
|
-
} else {
|
|
843
|
-
yield this.addRootNode(data);
|
|
844
|
-
}
|
|
845
|
-
});
|
|
846
|
-
},
|
|
847
|
-
updateNode(data) {
|
|
848
|
-
const node = this.$refs.tree.getNode(data);
|
|
849
|
-
node && (node.data = data);
|
|
850
|
-
},
|
|
851
|
-
setCurrentKey(key) {
|
|
852
|
-
this.$refs.tree && this.$refs.tree.setCurrentKey(key);
|
|
853
|
-
},
|
|
854
|
-
createNewChild(parentId) {
|
|
855
|
-
this.newChild = {
|
|
856
|
-
id: -1,
|
|
857
|
-
parentId,
|
|
858
|
-
[this.treeProps.label]: "",
|
|
859
|
-
edit: true,
|
|
860
|
-
isTempNode: true,
|
|
861
|
-
hasChildren: false
|
|
862
|
-
};
|
|
863
|
-
this.$emit("create-new-node", this.newChild);
|
|
864
|
-
},
|
|
865
|
-
removeNodeModal(node) {
|
|
866
|
-
return __async(this, null, function* () {
|
|
867
|
-
yield this.$confirm(
|
|
868
|
-
`你确定要删除${this.label}[<span class="break-word" style="color: orange">${node.data[this.treeProps.label]}</span>]吗?`,
|
|
869
|
-
"系统提示",
|
|
870
|
-
{
|
|
871
|
-
type: "warning",
|
|
872
|
-
modal: true,
|
|
873
|
-
dangerouslyUseHTMLString: true,
|
|
874
|
-
iconClass: "el-icon-question",
|
|
875
|
-
closeOnClickModal: false,
|
|
876
|
-
confirmButtonClass: "el-button--danger",
|
|
877
|
-
cancelButtonClass: "el-button--primary is-plain",
|
|
878
|
-
beforeClose: (action, instance, done) => __async(this, null, function* () {
|
|
879
|
-
if (action === "confirm") {
|
|
880
|
-
try {
|
|
881
|
-
instance.confirmButtonLoading = true;
|
|
882
|
-
instance.confirmButtonText = "删除...";
|
|
883
|
-
const parentNode = node.parent;
|
|
884
|
-
const res = yield this.deleteApi(node.data.id);
|
|
885
|
-
if (res.code === 0) {
|
|
886
|
-
this.$message.success("删除成功!");
|
|
887
|
-
this.$refs.tree.remove(node);
|
|
888
|
-
this.$emit("node-deleted", parentNode, node.data);
|
|
889
|
-
done();
|
|
890
|
-
} else {
|
|
891
|
-
this.$message.error(res.message);
|
|
892
|
-
}
|
|
893
|
-
} catch (_) {
|
|
894
|
-
}
|
|
895
|
-
instance.confirmButtonText = "确定";
|
|
896
|
-
instance.confirmButtonLoading = false;
|
|
897
|
-
} else {
|
|
898
|
-
done();
|
|
899
|
-
}
|
|
900
|
-
})
|
|
901
|
-
}
|
|
902
|
-
).catch((_) => _);
|
|
903
|
-
});
|
|
904
|
-
},
|
|
905
|
-
removeNode(node) {
|
|
906
|
-
return __async(this, null, function* () {
|
|
907
|
-
try {
|
|
908
|
-
const parentNode = node.parent;
|
|
909
|
-
if (this.deleteApi) {
|
|
910
|
-
const res = yield this.deleteApi(node.data.id);
|
|
911
|
-
if (res.code === 0) {
|
|
912
|
-
this.$message.success("删除成功!");
|
|
913
|
-
this.$refs.tree.remove(node);
|
|
914
|
-
this.$emit("node-deleted", parentNode, node.data);
|
|
915
|
-
} else {
|
|
916
|
-
this.$message.error(res.message);
|
|
917
|
-
}
|
|
918
|
-
} else {
|
|
919
|
-
this.$refs.tree.remove(node);
|
|
920
|
-
}
|
|
921
|
-
} catch (e) {
|
|
922
|
-
}
|
|
923
|
-
});
|
|
924
|
-
},
|
|
925
|
-
onConfirm(node, data) {
|
|
926
|
-
return __async(this, null, function* () {
|
|
927
|
-
if (data[this.treeProps.label] === this.text || !isNotEmpty(this.text)) {
|
|
928
|
-
this.clear();
|
|
929
|
-
return;
|
|
930
|
-
}
|
|
931
|
-
if (isUndefined(data.loading)) {
|
|
932
|
-
this.$set(data, "loading", true);
|
|
933
|
-
} else {
|
|
934
|
-
data.loading = true;
|
|
935
|
-
}
|
|
936
|
-
try {
|
|
937
|
-
this.loading = true;
|
|
938
|
-
if (data.id === -1) {
|
|
939
|
-
const res = yield this.saveApi(this.newNodeBuilder(this.text, node.parent.data || { id: -1 }));
|
|
940
|
-
const old = fastClone(data);
|
|
941
|
-
assignReactiveProperties(data, __spreadProps(__spreadValues({}, res.data), { isTempNode: false }));
|
|
942
|
-
this.$emit("node-added", data, old, node);
|
|
943
|
-
this.registerNode(node);
|
|
944
|
-
} else {
|
|
945
|
-
yield this.updateApi(__spreadProps(__spreadValues({}, data), { [this.treeProps.label]: this.text }));
|
|
946
|
-
}
|
|
947
|
-
data[this.treeProps.label] = this.text;
|
|
948
|
-
data.edit = false;
|
|
949
|
-
this.$emit("node-updated", data, node);
|
|
950
|
-
this.text = "";
|
|
951
|
-
} catch (e) {
|
|
952
|
-
}
|
|
953
|
-
data.loading = false;
|
|
954
|
-
this.loading = false;
|
|
955
|
-
});
|
|
956
|
-
},
|
|
957
|
-
onCancel(node, data) {
|
|
958
|
-
if (data.id === -1) {
|
|
959
|
-
this.$refs.tree.remove(node);
|
|
960
|
-
} else {
|
|
961
|
-
data.edit = false;
|
|
962
|
-
}
|
|
963
|
-
this.text = "";
|
|
964
|
-
},
|
|
965
|
-
nodeClick(data, node, tree) {
|
|
966
|
-
this.hideContextMenu();
|
|
967
|
-
if (isUndefined(data.loading) || !data.loading) {
|
|
968
|
-
this.curNode = node;
|
|
969
|
-
this.curData = data;
|
|
970
|
-
this.$emit("on-node-click", data, node, tree);
|
|
971
|
-
}
|
|
972
|
-
},
|
|
973
|
-
getCurrentNode() {
|
|
974
|
-
return this.$refs.tree.getCurrentNode();
|
|
975
|
-
},
|
|
976
|
-
locateView() {
|
|
977
|
-
return __async(this, null, function* () {
|
|
978
|
-
yield this.$nextTick();
|
|
979
|
-
const el = this.$el.querySelector(`[data-id="${this.newChild.id}"]`);
|
|
980
|
-
if (el) {
|
|
981
|
-
el.scrollIntoView();
|
|
982
|
-
}
|
|
983
|
-
});
|
|
984
|
-
},
|
|
985
|
-
scrollIntoView(expanded) {
|
|
986
|
-
return __async(this, null, function* () {
|
|
987
|
-
var _a, _b;
|
|
988
|
-
yield this.$nextTick();
|
|
989
|
-
if (!expanded) {
|
|
990
|
-
yield delay(300);
|
|
991
|
-
}
|
|
992
|
-
(_b = (_a = this.$refs) == null ? void 0 : _a.labelTxt) == null ? void 0 : _b.focus();
|
|
993
|
-
});
|
|
994
|
-
},
|
|
995
|
-
inputKeyup(event, node, data) {
|
|
996
|
-
if (event.keyCode === 13) {
|
|
997
|
-
this.onConfirm(node, data);
|
|
998
|
-
}
|
|
999
|
-
if (event.keyCode === 27) {
|
|
1000
|
-
this.clear();
|
|
1001
|
-
}
|
|
1002
|
-
},
|
|
1003
|
-
inputBlur(event, node, data) {
|
|
1004
|
-
if (this.confirmButton) {
|
|
1005
|
-
return;
|
|
1006
|
-
}
|
|
1007
|
-
this.onConfirm(node, data);
|
|
1008
|
-
},
|
|
1009
|
-
getCheckedKeys() {
|
|
1010
|
-
return this.$refs.tree.getCheckedKeys();
|
|
1011
|
-
},
|
|
1012
|
-
setCheckedKeys(keys) {
|
|
1013
|
-
this.$refs.tree.setCheckedKeys(keys);
|
|
1014
|
-
},
|
|
1015
|
-
getCheckedNodes() {
|
|
1016
|
-
return this.$refs.tree.getCheckedNodes();
|
|
1017
|
-
},
|
|
1018
|
-
setCheckedNodes(nodes) {
|
|
1019
|
-
this.$refs.tree.setCheckedNodes(nodes);
|
|
1020
|
-
},
|
|
1021
|
-
getNode(data) {
|
|
1022
|
-
return this.$refs.tree.getNode(data);
|
|
1023
|
-
},
|
|
1024
|
-
getRootNode() {
|
|
1025
|
-
return this.$refs.tree.root;
|
|
1026
|
-
},
|
|
1027
|
-
findTreeNode(data) {
|
|
1028
|
-
return findTreeChildren(
|
|
1029
|
-
this.$refs.tree.root.childNodes,
|
|
1030
|
-
(node) => node.data === data || node.data.id === data,
|
|
1031
|
-
"childNodes"
|
|
1032
|
-
);
|
|
1033
|
-
},
|
|
1034
|
-
registerNode(node) {
|
|
1035
|
-
node.store.registerNode(node);
|
|
1036
|
-
delete node.store.nodesMap[-1];
|
|
1037
|
-
},
|
|
1038
|
-
reloadTree() {
|
|
1039
|
-
return __async(this, null, function* () {
|
|
1040
|
-
if (this.lazy) {
|
|
1041
|
-
this.treeKey = Date.now();
|
|
1042
|
-
} else {
|
|
1043
|
-
yield this.tryFetch();
|
|
1044
|
-
}
|
|
1045
|
-
});
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
};
|
|
1049
|
-
const __cssModules = {};
|
|
1050
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
1051
|
-
__vue2_script,
|
|
1052
|
-
render,
|
|
1053
|
-
staticRenderFns,
|
|
1054
|
-
false,
|
|
1055
|
-
__vue2_injectStyles,
|
|
1056
|
-
null,
|
|
1057
|
-
null,
|
|
1058
|
-
null
|
|
1059
|
-
);
|
|
1060
|
-
function __vue2_injectStyles(context) {
|
|
1061
|
-
for (let o in __cssModules) {
|
|
1062
|
-
this[o] = __cssModules[o];
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
const EditableTree = /* @__PURE__ */ function() {
|
|
1066
|
-
return __component__.exports;
|
|
1067
|
-
}();
|
|
1068
|
-
export {
|
|
1069
|
-
EditableTree as default
|
|
1070
|
-
};
|