@farris/ui-vue 1.7.3 → 1.7.4
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/components/accordion/index.esm.js +312 -61
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +1482 -56
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +752 -8
- package/components/binding-selector/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +266 -110
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +129 -128
- package/components/calendar/index.umd.cjs +2 -2
- package/components/code-editor/index.esm.js +237 -169
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +134 -133
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/color-picker/index.esm.js +812 -502
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +323 -291
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +355 -174
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +134 -133
- package/components/comment/index.umd.cjs +2 -2
- package/components/common/index.esm.js +1 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +3791 -2760
- package/components/component/index.umd.cjs +8 -1
- package/components/condition/index.esm.js +2482 -492
- package/components/condition/index.umd.cjs +8 -1
- package/components/data-view/index.esm.js +1815 -1789
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1 -1
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +2975 -2615
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +397 -387
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dropdown/index.esm.js +373 -124
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +592 -1894
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +250 -248
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +427 -466
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +1 -1
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1890 -1473
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.css +1 -1
- package/components/expression-editor/index.esm.js +7371 -2
- package/components/expression-editor/index.umd.cjs +427 -1
- package/components/fieldset/index.esm.js +1 -1
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +2 -3
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.css +1 -1
- package/components/filter-condition-editor/index.esm.js +9044 -425
- package/components/filter-condition-editor/index.umd.cjs +427 -1
- package/components/html-template/index.esm.js +33 -36
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +615 -361
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +325 -247
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +269 -269
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/layout/index.esm.js +549 -163
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +837 -39
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +427 -646
- package/components/list-view/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +3624 -3625
- package/components/lookup/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +577 -536
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/nav/index.esm.js +311 -31
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +1634 -189
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +82 -82
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1190 -850
- package/components/order/index.umd.cjs +6 -6
- package/components/page-footer/index.esm.js +331 -48
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +110 -116
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +509 -232
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +353 -148
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +157 -153
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +1825 -871
- package/components/property-panel/index.umd.cjs +12 -5
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +6075 -3863
- package/components/query-solution/index.umd.cjs +13 -6
- package/components/response-layout/index.esm.js +1 -1
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1 -1
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2447 -2221
- package/components/schema-selector/index.umd.cjs +7 -7
- package/components/search-box/index.esm.js +244 -72
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +134 -133
- package/components/section/index.umd.cjs +2 -2
- package/components/smoke-detector/index.esm.js +179 -8
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.css +1 -0
- package/components/sort-condition-editor/index.esm.js +9488 -4
- package/components/sort-condition-editor/index.umd.cjs +427 -1
- package/components/splitter/index.esm.js +1172 -142
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +47 -48
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +490 -419
- package/components/tabs/index.umd.cjs +1 -1
- package/components/text/index.esm.js +217 -73
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +29 -27
- package/components/textarea/index.umd.cjs +2 -2
- package/components/transfer/index.esm.js +760 -543
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +105 -104
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +320 -153
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +1125 -634
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +359 -106
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +222 -89
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +290 -199
- package/components/weather/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +5191 -4407
- package/designer/data-grid/index.umd.cjs +17 -10
- package/designer/drawer/index.esm.js +576 -567
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1418 -1154
- package/designer/dynamic-form/index.umd.cjs +8 -1
- package/designer/farris-designer.all.esm.js +12665 -12117
- package/designer/farris-designer.all.umd.cjs +12 -12
- package/designer/list-view/index.esm.js +327 -327
- package/designer/list-view/index.umd.cjs +3 -3
- package/designer/modal/index.esm.js +29 -137
- package/designer/modal/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +0 -1
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +1 -1
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/response-toolbar/index.esm.js +9 -9
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +1 -6
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +2829 -2540
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/tree-grid/index.esm.js +822 -464
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +69725 -68244
- package/farris.all.umd.cjs +92 -92
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/accordion/src/accordion.props.d.ts +1 -0
- package/types/accordion/src/components/accordion-item.props.d.ts +1 -0
- package/types/avatar/src/avatar.props.d.ts +1 -0
- package/types/binding-selector/index.d.ts +54 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +1 -0
- package/types/button-group/index.d.ts +0 -15
- package/types/button-group/src/button-group.props.d.ts +1 -0
- package/types/code-editor/index.d.ts +1 -0
- package/types/code-editor/src/code-textbox.component.d.ts +6 -6
- package/types/code-editor/src/code-textbox.props.d.ts +2 -0
- package/types/color-picker/index.d.ts +15 -0
- package/types/color-picker/src/color-picker.props.d.ts +1 -0
- package/types/combo-list/src/composition/use-data-source.d.ts +2 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +14 -2
- package/types/combo-tree/src/combo-tree.props.d.ts +1 -0
- package/types/component/index.d.ts +2 -0
- package/types/component/src/component.props.d.ts +8 -0
- package/types/components.d.ts +6 -1
- package/types/condition/index.d.ts +55 -0
- package/types/designer-toolbox/index.d.ts +3 -0
- package/types/designer-toolbox/src/toolbox.component.d.ts +14 -0
- package/types/designer-toolbox/src/toolbox.props.d.ts +29 -0
- package/types/designer-toolbox/src/types.d.ts +21 -0
- package/types/designer.d.ts +13 -0
- package/types/dropdown/index.d.ts +6 -27
- package/types/dropdown/src/dropdown.item.component.d.ts +1 -1
- package/types/dropdown/src/dropdown.props.d.ts +1 -0
- package/types/dynamic-form/designer.d.ts +1 -3
- package/types/dynamic-form/index.d.ts +3 -9
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -3
- package/types/dynamic-resolver/index.d.ts +0 -3
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
- package/types/dynamic-view/src/components/maps.d.ts +104 -92
- package/types/{binding-selector/designer.d.ts → expression-editor/index.d.ts} +6 -6
- package/types/filter-condition-editor/index.d.ts +9 -0
- package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +1 -0
- package/types/flow-canvas/index.d.ts +3 -0
- package/types/{dynamic-form/src/component/form-control/form-control.component.d.ts → flow-canvas/src/components/flow-node-item.component.d.ts} +1 -1
- package/types/flow-canvas/src/components/flow-node-item.props.d.ts +3 -0
- package/types/flow-canvas/src/composition/types.d.ts +42 -0
- package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-connections.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-curve.d.ts +4 -0
- package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-drawing.d.ts +4 -0
- package/types/flow-canvas/src/flow-canvas.component.d.ts +8 -0
- package/types/flow-canvas/src/flow-canvas.props.d.ts +3 -0
- package/types/image-cropper/src/image-cropper.props.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/json-editor/src/json-editor.props.d.ts +1 -0
- package/types/layout/index.d.ts +0 -1
- package/types/layout/src/components/layout-pane.props.d.ts +1 -0
- package/types/layout/src/layout.props.d.ts +1 -0
- package/types/list-nav/index.d.ts +5 -24
- package/types/list-nav/src/list-nav.props.d.ts +1 -0
- package/types/list-view/index.d.ts +0 -1
- package/types/list-view/src/composition/use-draggable.d.ts +1 -1
- package/types/lookup/index.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/menu-lookup/src/menu-lookup.props.d.ts +1 -0
- package/types/modal/designer.d.ts +0 -2
- package/types/nav/index.d.ts +20 -24
- package/types/nav/src/nav.props.d.ts +1 -0
- package/types/number-range/src/number-range.props.d.ts +1 -0
- package/types/order/index.d.ts +5 -36
- package/types/order/src/designer/order.design.component.d.ts +1 -1
- package/types/order/src/order.props.d.ts +1 -0
- package/types/page-footer/index.d.ts +2 -0
- package/types/page-footer/src/page-footer.props.d.ts +1 -0
- package/types/pagination/index.d.ts +0 -15
- package/types/pagination/src/pagination.props.d.ts +1 -0
- package/types/progress/src/progress.props.d.ts +1 -0
- package/types/query-solution/index.d.ts +1 -1
- package/types/radio-group/designer.d.ts +1 -2
- package/types/search-box/index.d.ts +17 -1
- package/types/search-box/src/search-box.props.d.ts +1 -0
- package/types/section/designer.d.ts +0 -1
- package/types/smoke-detector/index.d.ts +2 -0
- package/types/smoke-detector/src/smoke-detector.props.d.ts +1 -0
- package/types/sort-condition-editor/index.d.ts +7 -2
- package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +1 -0
- package/types/splitter/index.d.ts +0 -1
- package/types/splitter/src/components/splitter-pane.props.d.ts +1 -0
- package/types/splitter/src/splitter.props.d.ts +1 -0
- package/types/tabs/designer.d.ts +0 -1
- package/types/tabs/index.d.ts +1 -0
- package/types/text/index.d.ts +20 -24
- package/types/text/src/text.props.d.ts +1 -0
- package/types/transfer/src/transfer.props.d.ts +1 -0
- package/types/tree-view/src/tree-view.props.d.ts +1 -0
- package/types/uploader/src/uploader.props.d.ts +1 -0
- package/types/verify-detail/index.d.ts +5 -58
- package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
- package/types/verify-detail/src/verify-detail.props.d.ts +1 -0
- package/types/video/index.d.ts +20 -24
- package/types/video/src/video.props.d.ts +1 -0
- package/components/dynamic-form/index.css +0 -1
- package/designer/accordion/index.esm.js +0 -257
- package/designer/accordion/index.umd.cjs +0 -1
- package/designer/avatar/index.esm.js +0 -1460
- package/designer/avatar/index.umd.cjs +0 -1
- package/designer/binding-selector/index.esm.js +0 -792
- package/designer/binding-selector/index.umd.cjs +0 -1
- package/designer/button-group/index.esm.js +0 -282
- package/designer/button-group/index.umd.cjs +0 -1
- package/designer/code-editor/index.esm.js +0 -75
- package/designer/code-editor/index.umd.cjs +0 -1
- package/designer/color-picker/index.esm.js +0 -1096
- package/designer/color-picker/index.umd.cjs +0 -1
- package/designer/combo-list/index.esm.js +0 -1095
- package/designer/combo-list/index.umd.cjs +0 -1
- package/designer/combo-tree/index.esm.js +0 -186
- package/designer/combo-tree/index.umd.cjs +0 -1
- package/designer/component/index.css +0 -1
- package/designer/component/index.esm.js +0 -5002
- package/designer/component/index.umd.cjs +0 -1
- package/designer/condition/index.esm.js +0 -1899
- package/designer/condition/index.umd.cjs +0 -1
- package/designer/dropdown/index.esm.js +0 -261
- package/designer/dropdown/index.umd.cjs +0 -1
- package/designer/expression-editor/index.css +0 -1
- package/designer/expression-editor/index.esm.js +0 -7006
- package/designer/expression-editor/index.umd.cjs +0 -427
- package/designer/filter-condition-editor/index.css +0 -1
- package/designer/filter-condition-editor/index.esm.js +0 -4795
- package/designer/filter-condition-editor/index.umd.cjs +0 -1
- package/designer/html-template/index.esm.js +0 -718
- package/designer/html-template/index.umd.cjs +0 -1
- package/designer/image-cropper/index.esm.js +0 -765
- package/designer/image-cropper/index.umd.cjs +0 -1
- package/designer/json-editor/index.esm.js +0 -83
- package/designer/json-editor/index.umd.cjs +0 -1
- package/designer/language-textbox/index.esm.js +0 -783
- package/designer/language-textbox/index.umd.cjs +0 -8
- package/designer/layout/index.esm.js +0 -430
- package/designer/layout/index.umd.cjs +0 -1
- package/designer/list-nav/index.esm.js +0 -802
- package/designer/list-nav/index.umd.cjs +0 -1
- package/designer/lookup/index.esm.js +0 -2083
- package/designer/lookup/index.umd.cjs +0 -1
- package/designer/menu-lookup/index.esm.js +0 -46
- package/designer/menu-lookup/index.umd.cjs +0 -1
- package/designer/nav/index.esm.js +0 -284
- package/designer/nav/index.umd.cjs +0 -1
- package/designer/number-range/index.esm.js +0 -1616
- package/designer/number-range/index.umd.cjs +0 -1
- package/designer/order/index.css +0 -1
- package/designer/order/index.esm.js +0 -2196
- package/designer/order/index.umd.cjs +0 -18
- package/designer/page-footer/index.esm.js +0 -290
- package/designer/page-footer/index.umd.cjs +0 -1
- package/designer/page-header/index.esm.js +0 -1003
- package/designer/page-header/index.umd.cjs +0 -1
- package/designer/pagination/index.esm.js +0 -591
- package/designer/pagination/index.umd.cjs +0 -1
- package/designer/progress/index.esm.js +0 -213
- package/designer/progress/index.umd.cjs +0 -1
- package/designer/search-box/index.esm.js +0 -245
- package/designer/search-box/index.umd.cjs +0 -1
- package/designer/smoke-detector/index.css +0 -1
- package/designer/smoke-detector/index.esm.js +0 -178
- package/designer/smoke-detector/index.umd.cjs +0 -1
- package/designer/sort-condition-editor/index.esm.js +0 -138
- package/designer/sort-condition-editor/index.umd.cjs +0 -1
- package/designer/splitter/index.esm.js +0 -1120
- package/designer/splitter/index.umd.cjs +0 -1
- package/designer/step/index.esm.js +0 -226
- package/designer/step/index.umd.cjs +0 -1
- package/designer/text/index.esm.js +0 -147
- package/designer/text/index.umd.cjs +0 -1
- package/designer/transfer/index.esm.js +0 -254
- package/designer/transfer/index.umd.cjs +0 -1
- package/designer/tree-view/index.esm.js +0 -313
- package/designer/tree-view/index.umd.cjs +0 -1
- package/designer/uploader/index.esm.js +0 -1190
- package/designer/uploader/index.umd.cjs +0 -2
- package/designer/verify-detail/index.esm.js +0 -258
- package/designer/verify-detail/index.umd.cjs +0 -1
- package/designer/video/index.esm.js +0 -136
- package/designer/video/index.umd.cjs +0 -1
- package/designer/weather/index.css +0 -1
- package/designer/weather/index.esm.js +0 -6244
- package/designer/weather/index.umd.cjs +0 -14
- package/types/accordion/designer.d.ts +0 -44
- package/types/avatar/designer.d.ts +0 -29
- package/types/button-group/designer.d.ts +0 -29
- package/types/code-editor/designer.d.ts +0 -5
- package/types/color-picker/designer.d.ts +0 -29
- package/types/combo-list/designer.d.ts +0 -29
- package/types/combo-list/src/designer/combo-list.design.props.d.ts +0 -6
- package/types/combo-tree/designer.d.ts +0 -5
- package/types/component/designer.d.ts +0 -35
- package/types/condition/designer.d.ts +0 -56
- package/types/dropdown/designer.d.ts +0 -6
- package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +0 -11
- package/types/expression-editor/designer.d.ts +0 -9
- package/types/filter-condition-editor/designer.d.ts +0 -10
- package/types/html-template/designer.d.ts +0 -31
- package/types/html-template/src/designer/html-template.design.props.d.ts +0 -9
- package/types/image-cropper/designer.d.ts +0 -4
- package/types/json-editor/designer.d.ts +0 -5
- package/types/layout/designer.d.ts +0 -32
- package/types/list-nav/designer.d.ts +0 -6
- package/types/menu-lookup/designer.d.ts +0 -5
- package/types/nav/designer.d.ts +0 -6
- package/types/number-range/designer.d.ts +0 -29
- package/types/order/designer.d.ts +0 -6
- package/types/page-footer/designer.d.ts +0 -6
- package/types/page-header/src/designer/page-header.design.props.d.ts +0 -20
- package/types/pagination/designer.d.ts +0 -29
- package/types/progress/designer.d.ts +0 -29
- package/types/search-box/designer.d.ts +0 -52
- package/types/smoke-detector/designer.d.ts +0 -6
- package/types/sort-condition-editor/designer.d.ts +0 -9
- package/types/splitter/designer.d.ts +0 -32
- package/types/step/designer.d.ts +0 -6
- package/types/text/designer.d.ts +0 -6
- package/types/transfer/designer.d.ts +0 -35
- package/types/tree-view/designer.d.ts +0 -29
- package/types/uploader/designer.d.ts +0 -141
- package/types/verify-detail/designer.d.ts +0 -6
- package/types/video/designer.d.ts +0 -6
- /package/{designer → components}/condition/index.css +0 -0
- /package/{designer → components}/uploader/index.css +0 -0
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
var Oe = Object.defineProperty;
|
|
2
|
+
var Ue = (t, e, n) => e in t ? Oe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var L = (t, e, n) => Ue(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { defineComponent as K, toRefs as fe, createVNode as l, Fragment as J, createTextVNode as x, ref as B, watch as Q, inject as Z, getCurrentInstance as Ie, onMounted as ve, onUnmounted as me, computed as N, reactive as ze, createApp as je, Transition as Le, mergeProps as qe, provide as $e, resolveComponent as V, onBeforeMount as Ve } from "vue";
|
|
5
|
+
import { resolveAppearance as _e, createPropsResolver as Qe } from "../dynamic-resolver/index.esm.js";
|
|
6
|
+
import { useDateFormat as Ke, withInstall as We } from "../common/index.esm.js";
|
|
7
|
+
import { LocaleService as ce } from "../locale/index.esm.js";
|
|
8
|
+
import { useDesignerComponent as Ye } from "../designer-canvas/index.esm.js";
|
|
9
|
+
const Xe = {
|
|
8
10
|
// 是否被选中
|
|
9
11
|
checked: { type: Boolean, default: !1 },
|
|
10
12
|
// 进度条状态 默认'normal'
|
|
11
13
|
id: { type: String, default: "" },
|
|
12
14
|
// 禁用
|
|
13
15
|
disabled: { type: Boolean, default: !1 }
|
|
14
|
-
},
|
|
16
|
+
}, Ge = {
|
|
15
17
|
// 是否显示进度条信息
|
|
16
18
|
showInfo: { type: Boolean, default: !0 },
|
|
17
19
|
// 进度条状态 默认'normal'
|
|
@@ -19,7 +21,7 @@ const Ue = {
|
|
|
19
21
|
// 已完成的分段百分比
|
|
20
22
|
percent: { type: Number, default: 0 },
|
|
21
23
|
maxWidth: { type: Number, default: 0 }
|
|
22
|
-
},
|
|
24
|
+
}, Je = {
|
|
23
25
|
/**
|
|
24
26
|
* 按钮文本
|
|
25
27
|
*/
|
|
@@ -52,123 +54,402 @@ const Ue = {
|
|
|
52
54
|
* 附件服务器端服务注入的Token
|
|
53
55
|
*/
|
|
54
56
|
uploadServerToken: { type: String, default: "" }
|
|
55
|
-
},
|
|
57
|
+
}, Ze = /* @__PURE__ */ K({
|
|
56
58
|
name: "FUploadProgress",
|
|
57
|
-
props:
|
|
59
|
+
props: Ge,
|
|
58
60
|
setup(t, e) {
|
|
59
61
|
const {
|
|
60
|
-
showInfo:
|
|
61
|
-
status:
|
|
62
|
+
showInfo: n,
|
|
63
|
+
status: s,
|
|
62
64
|
maxWidth: a,
|
|
63
|
-
percent:
|
|
65
|
+
percent: i
|
|
64
66
|
} = fe(t);
|
|
65
|
-
return () =>
|
|
66
|
-
class: ["f-progress upload-progress", "upload-progress-status-" +
|
|
67
|
-
}, [
|
|
67
|
+
return () => l("div", {
|
|
68
|
+
class: ["f-progress upload-progress", "upload-progress-status-" + s.value, "f-progress-status-" + s.value, "upload-progress-line", n.value ? "upload-progress-show-info" : ""]
|
|
69
|
+
}, [l("div", {
|
|
68
70
|
class: "upload-progress-outer",
|
|
69
71
|
style: {
|
|
70
72
|
"max-width": a.value > 0 ? a.value + "px" : "auto"
|
|
71
73
|
}
|
|
72
|
-
}, [
|
|
74
|
+
}, [l("div", {
|
|
73
75
|
class: "upload-progress-inner"
|
|
74
|
-
}, [
|
|
76
|
+
}, [l("div", {
|
|
75
77
|
class: "upload-progress-bg f-progress-bg",
|
|
76
78
|
style: {
|
|
77
|
-
width:
|
|
79
|
+
width: i.value + "%"
|
|
78
80
|
}
|
|
79
|
-
}, null)])]),
|
|
81
|
+
}, null)])]), n.value ? l("span", {
|
|
80
82
|
class: "upload-progress-text"
|
|
81
|
-
}, [
|
|
82
|
-
class: ["upload-progress-text-icon f-icon", "f-icon-" +
|
|
83
|
-
}, null) :
|
|
83
|
+
}, [s.value === "error" || s.value === "success" ? l("span", {
|
|
84
|
+
class: ["upload-progress-text-icon f-icon", "f-icon-" + s.value]
|
|
85
|
+
}, null) : l(J, null, [i.value, x("%")])]) : ""]);
|
|
84
86
|
}
|
|
85
|
-
}),
|
|
87
|
+
}), Te = /* @__PURE__ */ K({
|
|
86
88
|
name: "FPreviewCheckbox",
|
|
87
|
-
props:
|
|
89
|
+
props: Xe,
|
|
88
90
|
emits: ["checkedChange"],
|
|
89
91
|
setup(t, e) {
|
|
90
92
|
const {
|
|
91
|
-
disabled:
|
|
92
|
-
} = fe(t),
|
|
93
|
-
|
|
94
|
-
checked:
|
|
93
|
+
disabled: n
|
|
94
|
+
} = fe(t), s = B(t.checked), a = (i) => {
|
|
95
|
+
i.stopPropagation(), n.value || (s.value = !s.value, e.emit("checkedChange", {
|
|
96
|
+
checked: s.value,
|
|
95
97
|
id: t.id
|
|
96
98
|
}));
|
|
97
99
|
};
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
}), () =>
|
|
100
|
+
return Q(() => t.checked, (i) => {
|
|
101
|
+
s.value = i;
|
|
102
|
+
}), () => l("div", {
|
|
101
103
|
class: "preview-checkbox d-inline-flex align-middle"
|
|
102
|
-
}, [
|
|
104
|
+
}, [l("div", {
|
|
103
105
|
class: "custom-control custom-checkbox f-checkradio-single m-0"
|
|
104
|
-
}, [
|
|
106
|
+
}, [l("input", {
|
|
105
107
|
title: "custom-control-input",
|
|
106
108
|
class: "custom-control-input",
|
|
107
109
|
type: "checkbox",
|
|
108
|
-
disabled:
|
|
109
|
-
checked:
|
|
110
|
-
}, null),
|
|
110
|
+
disabled: n.value,
|
|
111
|
+
checked: s.value
|
|
112
|
+
}, null), l("label", {
|
|
111
113
|
class: "custom-control-label",
|
|
112
|
-
onClick: (
|
|
113
|
-
onMousedown: (
|
|
114
|
+
onClick: (i) => a(i),
|
|
115
|
+
onMousedown: (i) => i.stopPropagation()
|
|
114
116
|
}, null)])]);
|
|
115
117
|
}
|
|
116
|
-
}),
|
|
118
|
+
}), Ee = /* @__PURE__ */ K({
|
|
117
119
|
name: "FFileSelect",
|
|
118
|
-
props:
|
|
120
|
+
props: Je,
|
|
119
121
|
emits: ["change", "stateChange"],
|
|
120
122
|
setup(t, e) {
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
let
|
|
125
|
-
const
|
|
126
|
-
|
|
123
|
+
const n = Z("uploaderService");
|
|
124
|
+
n.setUploadContext(e);
|
|
125
|
+
const s = Ie(), a = B("*");
|
|
126
|
+
let i;
|
|
127
|
+
const d = () => {
|
|
128
|
+
i.files && (e.emit("change", i.files), n.handleFiles(i.files), i.value = null);
|
|
127
129
|
};
|
|
128
130
|
function u() {
|
|
129
|
-
|
|
131
|
+
i.value = null, n.reset();
|
|
130
132
|
}
|
|
131
|
-
|
|
133
|
+
Q(() => t.disabled, () => {
|
|
132
134
|
u();
|
|
133
|
-
}),
|
|
134
|
-
|
|
135
|
-
uploadedCount:
|
|
135
|
+
}), Q(() => t.uploadedCount, (f) => {
|
|
136
|
+
n.setOptions({
|
|
137
|
+
uploadedCount: f
|
|
136
138
|
});
|
|
137
|
-
}),
|
|
138
|
-
|
|
139
|
+
}), Q(() => t.extendConfig, (f) => {
|
|
140
|
+
n.setExtendServerConfig(f);
|
|
139
141
|
});
|
|
140
|
-
function
|
|
141
|
-
|
|
142
|
+
function v(f) {
|
|
143
|
+
f && f.stopPropagation(), i.click();
|
|
142
144
|
}
|
|
143
|
-
function C(
|
|
144
|
-
|
|
145
|
+
function C(f) {
|
|
146
|
+
n.handleUploadEvent(f);
|
|
145
147
|
}
|
|
146
|
-
return
|
|
147
|
-
var
|
|
148
|
-
|
|
149
|
-
}),
|
|
148
|
+
return ve(() => {
|
|
149
|
+
var f, T;
|
|
150
|
+
i = (f = s == null ? void 0 : s.proxy) == null ? void 0 : f.$refs.uploadInput, u(), n.setOptions(t.options), n.setExtendServerConfig(t.extendConfig), a.value = (((T = t.options) == null ? void 0 : T.allowedContentTypes) || ["*"]).join(",");
|
|
151
|
+
}), me(() => {
|
|
150
152
|
}), e.expose({
|
|
151
153
|
handleUploadEvent: C
|
|
152
|
-
}), () =>
|
|
154
|
+
}), () => l(J, null, [l("input", {
|
|
153
155
|
ref: "uploadInput",
|
|
154
156
|
type: "file",
|
|
155
157
|
class: "ffileupload--browser",
|
|
156
158
|
disabled: t.disabled,
|
|
157
159
|
multiple: t.enableMulti,
|
|
158
160
|
accept: a.value,
|
|
159
|
-
onChange: () =>
|
|
161
|
+
onChange: () => d(),
|
|
160
162
|
style: "width: 10px",
|
|
161
163
|
title: "uploadInput"
|
|
162
|
-
}, null),
|
|
164
|
+
}, null), l("div", {
|
|
163
165
|
class: ["upload-container", t.disabled ? "f-state-disabled" : ""],
|
|
164
|
-
onClick: (
|
|
166
|
+
onClick: (f) => v(f),
|
|
165
167
|
title: t.selectText
|
|
166
|
-
}, [
|
|
168
|
+
}, [l("i", {
|
|
167
169
|
class: "f-icon f-icon-upload upload-icon",
|
|
168
170
|
style: "top: 2px;position: relative;"
|
|
169
171
|
}, null), t.selectText])]);
|
|
170
172
|
}
|
|
171
|
-
}),
|
|
173
|
+
}), et = "https://json-schema.org/draft/2020-12/schema", tt = "https://farris-design.gitee.io/uploader.schema.json", lt = "uploader", nt = "A Farris Component", it = "object", st = {
|
|
174
|
+
id: {
|
|
175
|
+
description: "The unique identifier for uploader",
|
|
176
|
+
type: "string"
|
|
177
|
+
},
|
|
178
|
+
type: {
|
|
179
|
+
description: "The type string of uploader",
|
|
180
|
+
type: "string",
|
|
181
|
+
default: "uploader"
|
|
182
|
+
},
|
|
183
|
+
appearance: {
|
|
184
|
+
description: "",
|
|
185
|
+
type: "object",
|
|
186
|
+
properties: {
|
|
187
|
+
class: {
|
|
188
|
+
type: "string"
|
|
189
|
+
},
|
|
190
|
+
style: {
|
|
191
|
+
type: "string"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
default: {}
|
|
195
|
+
},
|
|
196
|
+
binding: {
|
|
197
|
+
description: "",
|
|
198
|
+
type: "object",
|
|
199
|
+
default: {}
|
|
200
|
+
},
|
|
201
|
+
disable: {
|
|
202
|
+
type: "boolean",
|
|
203
|
+
default: !1
|
|
204
|
+
},
|
|
205
|
+
placeholder: {
|
|
206
|
+
description: "",
|
|
207
|
+
type: "string",
|
|
208
|
+
default: ""
|
|
209
|
+
},
|
|
210
|
+
readonly: {
|
|
211
|
+
description: "",
|
|
212
|
+
type: "boolean",
|
|
213
|
+
default: !1
|
|
214
|
+
},
|
|
215
|
+
tabindex: {
|
|
216
|
+
description: "",
|
|
217
|
+
type: "number",
|
|
218
|
+
default: -1
|
|
219
|
+
},
|
|
220
|
+
visible: {
|
|
221
|
+
description: "",
|
|
222
|
+
type: "boolean",
|
|
223
|
+
default: !0
|
|
224
|
+
}
|
|
225
|
+
}, at = [
|
|
226
|
+
"id",
|
|
227
|
+
"type"
|
|
228
|
+
], ot = {
|
|
229
|
+
$schema: et,
|
|
230
|
+
$id: tt,
|
|
231
|
+
title: lt,
|
|
232
|
+
description: nt,
|
|
233
|
+
type: it,
|
|
234
|
+
properties: st,
|
|
235
|
+
required: at
|
|
236
|
+
}, rt = /* @__PURE__ */ new Map([
|
|
237
|
+
["appearance", _e]
|
|
238
|
+
]);
|
|
239
|
+
function ut(t, e, n) {
|
|
240
|
+
return e;
|
|
241
|
+
}
|
|
242
|
+
const dt = "uploader", ct = "A Farris Component", pt = "object", ft = {
|
|
243
|
+
basic: {
|
|
244
|
+
description: "Basic Infomation",
|
|
245
|
+
title: "基本信息",
|
|
246
|
+
properties: {
|
|
247
|
+
id: {
|
|
248
|
+
description: "组件标识",
|
|
249
|
+
title: "标识",
|
|
250
|
+
type: "string",
|
|
251
|
+
readonly: !0
|
|
252
|
+
},
|
|
253
|
+
type: {
|
|
254
|
+
description: "组件类型",
|
|
255
|
+
title: "控件类型",
|
|
256
|
+
type: "select",
|
|
257
|
+
editor: {
|
|
258
|
+
type: "waiting for modification",
|
|
259
|
+
enum: []
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
appearance: {
|
|
265
|
+
description: "外观",
|
|
266
|
+
title: "外观",
|
|
267
|
+
properties: {
|
|
268
|
+
contentFill: {
|
|
269
|
+
description: "内容填充",
|
|
270
|
+
title: "内容填充",
|
|
271
|
+
type: "boolean"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
server: {
|
|
276
|
+
description: "服务器配置",
|
|
277
|
+
title: "服务器配置",
|
|
278
|
+
properties: {
|
|
279
|
+
rootId: {
|
|
280
|
+
description: "附件服务器根目录",
|
|
281
|
+
title: "附件服务器根目录",
|
|
282
|
+
type: "string"
|
|
283
|
+
},
|
|
284
|
+
formId: {
|
|
285
|
+
description: "必填,根据【附件信息】业务字段所在位置区分:1、在子表,二级目录建议绑定主表ID。2:在主表:二级目录建议填写当前表数据ID",
|
|
286
|
+
title: "二级目录",
|
|
287
|
+
type: "string"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
upload: {
|
|
292
|
+
description: "上传配置",
|
|
293
|
+
title: "上传配置",
|
|
294
|
+
properties: {
|
|
295
|
+
uploadVisible: {
|
|
296
|
+
description: "上传按钮是否可见",
|
|
297
|
+
title: "上传是否可见",
|
|
298
|
+
type: "boolean"
|
|
299
|
+
},
|
|
300
|
+
uploadDisabled: {
|
|
301
|
+
description: "禁用时,上传按钮可见,但不可用",
|
|
302
|
+
title: "上传是否禁用",
|
|
303
|
+
type: "boolean"
|
|
304
|
+
},
|
|
305
|
+
allowEmpty: {
|
|
306
|
+
description: "运行时是否允许不上传附件",
|
|
307
|
+
title: "是否允许为空",
|
|
308
|
+
type: "boolean"
|
|
309
|
+
},
|
|
310
|
+
uploadSelectText: {
|
|
311
|
+
description: "选择文件按钮文本",
|
|
312
|
+
title: "选择文件按钮文本",
|
|
313
|
+
type: "string"
|
|
314
|
+
},
|
|
315
|
+
uploadOptions: {
|
|
316
|
+
description: "附件上传配置",
|
|
317
|
+
title: "附件上传配置",
|
|
318
|
+
type: "cascade",
|
|
319
|
+
isExpand: !0,
|
|
320
|
+
properties: {
|
|
321
|
+
maxUploads: {
|
|
322
|
+
description: "值为0时表示不限制上传个数",
|
|
323
|
+
title: "最大上传个数",
|
|
324
|
+
type: "number"
|
|
325
|
+
},
|
|
326
|
+
maxFileSize: {
|
|
327
|
+
description: "单个附件最大值(MB)",
|
|
328
|
+
title: "单个附件最大值(MB)",
|
|
329
|
+
type: "number"
|
|
330
|
+
},
|
|
331
|
+
allowedContentTypes: {
|
|
332
|
+
description: "允许上传附件类型",
|
|
333
|
+
title: "允许上传附件类型",
|
|
334
|
+
type: "string"
|
|
335
|
+
},
|
|
336
|
+
notAllowedCharsInFileName: {
|
|
337
|
+
description: "文件名禁用字符",
|
|
338
|
+
title: "文件名禁用字符",
|
|
339
|
+
type: "string"
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
enableUploadedCount: {
|
|
344
|
+
description: "是否启用已上传个数限制",
|
|
345
|
+
title: "是否启用已上传个数限制",
|
|
346
|
+
type: "select",
|
|
347
|
+
editor: {
|
|
348
|
+
type: "waiting for modification",
|
|
349
|
+
enum: []
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
uploadEnableMulti: {
|
|
353
|
+
description: "是否启用多选附件上传",
|
|
354
|
+
title: "是否启用多选附件上传",
|
|
355
|
+
type: "select",
|
|
356
|
+
editor: {
|
|
357
|
+
type: "waiting for modification",
|
|
358
|
+
enum: []
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
enableSliceUpload: {
|
|
362
|
+
description: "是否启用分片上传",
|
|
363
|
+
title: "是否启用分片上传",
|
|
364
|
+
type: "select",
|
|
365
|
+
editor: {
|
|
366
|
+
type: "waiting for modification",
|
|
367
|
+
enum: []
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
chunkSize: {
|
|
371
|
+
description: "分片上传时,每片的大小。单位:M",
|
|
372
|
+
title: "分片大小(M)",
|
|
373
|
+
type: "number"
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
preview: {
|
|
378
|
+
description: "附件预览",
|
|
379
|
+
title: "附件预览",
|
|
380
|
+
properties: {
|
|
381
|
+
previewVisible: {
|
|
382
|
+
description: "预览是否可见",
|
|
383
|
+
title: "预览是否可见",
|
|
384
|
+
type: "boolean"
|
|
385
|
+
},
|
|
386
|
+
previewReadonly: {
|
|
387
|
+
description: "预览是否只读",
|
|
388
|
+
title: "预览是否只读",
|
|
389
|
+
type: "boolean"
|
|
390
|
+
},
|
|
391
|
+
fieldIdKey: {
|
|
392
|
+
description: "附件ID字段",
|
|
393
|
+
title: "附件ID字段",
|
|
394
|
+
type: "string",
|
|
395
|
+
editor: {
|
|
396
|
+
type: "field-selector"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
fileNameKey: {
|
|
400
|
+
description: "附件名称字段",
|
|
401
|
+
title: "附件名称字段",
|
|
402
|
+
type: "string",
|
|
403
|
+
editor: {
|
|
404
|
+
type: "field-selector"
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
previewEnableMulti: {
|
|
408
|
+
description: "是否启用批量操作",
|
|
409
|
+
title: "是否启用批量操作",
|
|
410
|
+
type: "boolean"
|
|
411
|
+
},
|
|
412
|
+
noDelete: {
|
|
413
|
+
description: "是否禁止删除附件",
|
|
414
|
+
title: "是否禁止删除附件",
|
|
415
|
+
type: "boolean"
|
|
416
|
+
},
|
|
417
|
+
noPreview: {
|
|
418
|
+
description: "是否禁止预览",
|
|
419
|
+
title: "是否禁止预览",
|
|
420
|
+
type: "boolean"
|
|
421
|
+
},
|
|
422
|
+
previewDateFormat: {
|
|
423
|
+
description: "附件上传时间字段的格式化设置,请注意此属性仅针对附件上传时间一个字段,若有自定义预览列,请在预览列编辑器中单独设置时间格式。",
|
|
424
|
+
title: "附件上传时间格式化",
|
|
425
|
+
type: "select",
|
|
426
|
+
editor: {
|
|
427
|
+
type: "waiting for modification",
|
|
428
|
+
enum: []
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
fileSortOrderKey: {
|
|
432
|
+
description: "排序字段",
|
|
433
|
+
title: "排序字段",
|
|
434
|
+
type: "string"
|
|
435
|
+
},
|
|
436
|
+
orderType: {
|
|
437
|
+
description: "排序类型",
|
|
438
|
+
title: "排序类型",
|
|
439
|
+
type: "select",
|
|
440
|
+
editor: {
|
|
441
|
+
type: "waiting for modification",
|
|
442
|
+
enum: []
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}, vt = {
|
|
448
|
+
title: dt,
|
|
449
|
+
description: ct,
|
|
450
|
+
type: pt,
|
|
451
|
+
categories: ft
|
|
452
|
+
}, he = {
|
|
172
453
|
/** 内容区域填充 */
|
|
173
454
|
contentFill: { type: Boolean, default: !1 },
|
|
174
455
|
/** 排序字段 */
|
|
@@ -232,68 +513,68 @@ const Ue = {
|
|
|
232
513
|
* 提示服务注入的Token
|
|
233
514
|
*/
|
|
234
515
|
notifyServiceToken: { type: String, default: "" }
|
|
235
|
-
};
|
|
236
|
-
var
|
|
237
|
-
class
|
|
238
|
-
constructor(e = {},
|
|
516
|
+
}, Be = Qe(he, ot, rt, ut, vt);
|
|
517
|
+
var q = /* @__PURE__ */ ((t) => (t[t.Queue = 0] = "Queue", t[t.Uploading = 1] = "Uploading", t[t.Done = 2] = "Done", t[t.Cancelled = 3] = "Cancelled", t[t.Remove = 4] = "Remove", t[t.Error = 5] = "Error", t))(q || {});
|
|
518
|
+
class mt {
|
|
519
|
+
constructor(e = {}, n = {}) {
|
|
239
520
|
/**
|
|
240
521
|
* 上传配置
|
|
241
522
|
*/
|
|
242
|
-
|
|
523
|
+
L(this, "uploadConfig");
|
|
243
524
|
/**
|
|
244
525
|
* 删除配置
|
|
245
526
|
*/
|
|
246
|
-
|
|
247
|
-
const
|
|
248
|
-
this.uploadConfig = Object.assign({},
|
|
527
|
+
L(this, "removeConfig");
|
|
528
|
+
const s = { type: "config", url: "", timeout: 0, headers: null, data: {} };
|
|
529
|
+
this.uploadConfig = Object.assign({}, s, e), this.removeConfig = Object.assign({}, s, n);
|
|
249
530
|
}
|
|
250
531
|
}
|
|
251
|
-
function ve(t, e) {
|
|
252
|
-
const { formatTo: l } = Oe();
|
|
253
|
-
return l(t, e);
|
|
254
|
-
}
|
|
255
532
|
function ge(t, e) {
|
|
533
|
+
const { formatTo: n } = Ke();
|
|
534
|
+
return n(t, e);
|
|
535
|
+
}
|
|
536
|
+
function be(t, e) {
|
|
256
537
|
if (!e)
|
|
257
538
|
return "";
|
|
258
|
-
let
|
|
259
|
-
return t.indexOf(".") === -1 && e.hasOwnProperty(t) ?
|
|
539
|
+
let n = "";
|
|
540
|
+
return t.indexOf(".") === -1 && e.hasOwnProperty(t) ? n = e[t] : n = t.split(".").reduce((s, a) => s ? s[a] : null, e), n;
|
|
260
541
|
}
|
|
261
|
-
function
|
|
262
|
-
return (e,
|
|
542
|
+
function ht(t) {
|
|
543
|
+
return (e, n) => {
|
|
263
544
|
if (!e.hasOwnProperty(t) || e[t] === void 0 || e[t] === null)
|
|
264
545
|
return 1;
|
|
265
|
-
if (!
|
|
546
|
+
if (!n.hasOwnProperty(t) || n[t] === void 0 || n[t] === null)
|
|
266
547
|
return -1;
|
|
267
548
|
if (t !== "createTime") {
|
|
268
|
-
let
|
|
269
|
-
return t.indexOf(".") > -1 ? (
|
|
549
|
+
let i = "", d = "";
|
|
550
|
+
return t.indexOf(".") > -1 ? (i = be(t, e), d = be(t, n)) : (i = e[t], d = n[t]), i > d ? 1 : -1;
|
|
270
551
|
}
|
|
271
|
-
const
|
|
272
|
-
return
|
|
552
|
+
const s = new Date(e[t]), a = new Date(n[t]);
|
|
553
|
+
return s.getTime() > a.getTime() ? -1 : 1;
|
|
273
554
|
};
|
|
274
555
|
}
|
|
275
|
-
function
|
|
276
|
-
return (t || []).findIndex((
|
|
556
|
+
function He(t) {
|
|
557
|
+
return (t || []).findIndex((n) => n === "*") === -1;
|
|
277
558
|
}
|
|
278
|
-
function
|
|
559
|
+
function De(t) {
|
|
279
560
|
return t !== "0 Byte";
|
|
280
561
|
}
|
|
281
|
-
function
|
|
562
|
+
function ie(t) {
|
|
282
563
|
if (t === 0)
|
|
283
564
|
return "0 Byte";
|
|
284
|
-
const e = 1024,
|
|
285
|
-
return parseFloat((t / e **
|
|
565
|
+
const e = 1024, n = ["Bytes", "KB", "MB", "GB", "TB", "PB"], s = Math.floor(Math.log(t) / Math.log(e));
|
|
566
|
+
return parseFloat((t / e ** s).toFixed(2)) + " " + n[s];
|
|
286
567
|
}
|
|
287
|
-
function
|
|
288
|
-
return t && (t.hasOwnProperty("allowedContentTypes") && (e.allowedContentTypes = t.allowedContentTypes || ["*"], e.allowedContentTypes = e.allowedContentTypes && e.allowedContentTypes.length > 0 ? e.allowedContentTypes : ["*"]), t.hasOwnProperty("maxUploads") && (e.maxUploads = t.maxUploads || 0), t.hasOwnProperty("maxFileSize") && (e.maxFileSize =
|
|
568
|
+
function Ae(t, e) {
|
|
569
|
+
return t && (t.hasOwnProperty("allowedContentTypes") && (e.allowedContentTypes = t.allowedContentTypes || ["*"], e.allowedContentTypes = e.allowedContentTypes && e.allowedContentTypes.length > 0 ? e.allowedContentTypes : ["*"]), t.hasOwnProperty("maxUploads") && (e.maxUploads = t.maxUploads || 0), t.hasOwnProperty("maxFileSize") && (e.maxFileSize = ie(1024 * 1024 * (parseInt(String(t.maxFileSize), 10) || 1)))), e;
|
|
289
570
|
}
|
|
290
|
-
function
|
|
571
|
+
function xe(t) {
|
|
291
572
|
let e = "ffilepreview--filetype";
|
|
292
573
|
if (!t)
|
|
293
574
|
return e + "-any";
|
|
294
|
-
const
|
|
295
|
-
let
|
|
296
|
-
switch (
|
|
575
|
+
const n = t.lastIndexOf(".");
|
|
576
|
+
let s = "";
|
|
577
|
+
switch (n > -1 && (s = t.substring(n + 1).toLocaleLowerCase()), s) {
|
|
297
578
|
case "pdf":
|
|
298
579
|
e += "-pdf";
|
|
299
580
|
break;
|
|
@@ -334,156 +615,156 @@ function ye(t) {
|
|
|
334
615
|
}
|
|
335
616
|
return e;
|
|
336
617
|
}
|
|
337
|
-
function
|
|
618
|
+
function Ce(t) {
|
|
338
619
|
var e;
|
|
339
620
|
if (t.type === "done")
|
|
340
621
|
return 100;
|
|
341
622
|
if (t.file && t.file.progress) {
|
|
342
|
-
if (t.file.progress.status ===
|
|
343
|
-
const
|
|
344
|
-
return
|
|
623
|
+
if (t.file.progress.status === q.Uploading) {
|
|
624
|
+
const n = ((e = t.file.progress.data) == null ? void 0 : e.percentage) || 5;
|
|
625
|
+
return n > 5 ? n : 5;
|
|
345
626
|
}
|
|
346
627
|
return 5;
|
|
347
628
|
}
|
|
348
629
|
return 5;
|
|
349
630
|
}
|
|
350
|
-
function
|
|
631
|
+
function gt(t) {
|
|
351
632
|
let e = t;
|
|
352
|
-
return t ? (typeof t == "string" && (e = parseInt(t, 10)),
|
|
633
|
+
return t ? (typeof t == "string" && (e = parseInt(t, 10)), ie(e)) : "0 Byte";
|
|
353
634
|
}
|
|
354
|
-
const
|
|
355
|
-
function
|
|
635
|
+
const wt = () => Math.random().toString(36).substring(7);
|
|
636
|
+
function Fe(t, e) {
|
|
356
637
|
return {
|
|
357
638
|
fileIndex: e,
|
|
358
|
-
id:
|
|
639
|
+
id: wt(),
|
|
359
640
|
name: t.name,
|
|
360
641
|
size: t.size,
|
|
361
642
|
type: t.type,
|
|
362
643
|
form: new FormData(),
|
|
363
644
|
progress: {
|
|
364
|
-
status:
|
|
645
|
+
status: q.Queue,
|
|
365
646
|
data: {
|
|
366
647
|
percentage: 0,
|
|
367
648
|
speed: 0,
|
|
368
|
-
speedHuman: `${
|
|
649
|
+
speedHuman: `${ie(0)}/s`,
|
|
369
650
|
startTime: null,
|
|
370
651
|
endTime: null,
|
|
371
652
|
eta: null,
|
|
372
653
|
etaHuman: null
|
|
373
654
|
}
|
|
374
655
|
},
|
|
375
|
-
lastModifiedDate:
|
|
656
|
+
lastModifiedDate: ge(new Date(t.lastModified), "yyyy-MM-dd HH:mm:ss"),
|
|
376
657
|
nativeFile: t
|
|
377
658
|
};
|
|
378
659
|
}
|
|
379
|
-
function
|
|
660
|
+
function Se(t) {
|
|
380
661
|
const e = [];
|
|
381
|
-
return t.forEach((
|
|
382
|
-
const
|
|
383
|
-
for (const a in
|
|
384
|
-
const
|
|
385
|
-
|
|
662
|
+
return t.forEach((n) => {
|
|
663
|
+
const s = { id: "", name: "", size: 0, type: "", extend: null, extendHeaders: null, createTime: "" };
|
|
664
|
+
for (const a in s) {
|
|
665
|
+
const i = a.replace("extend", "response").replace("createTime", "lastModifiedDate");
|
|
666
|
+
n.hasOwnProperty(i) && (i === "lastModifiedDate" ? s[a] = ge(n[i], "yyyy-MM-dd HH:mm:ss") : s[a] = n[i]);
|
|
386
667
|
}
|
|
387
|
-
e.push(
|
|
668
|
+
e.push(s);
|
|
388
669
|
}), e;
|
|
389
670
|
}
|
|
390
|
-
function
|
|
671
|
+
function yt(t, e) {
|
|
391
672
|
return t ? e <= t * 1024 * 1024 : !0;
|
|
392
673
|
}
|
|
393
|
-
function
|
|
674
|
+
function bt(t) {
|
|
394
675
|
return t.find((e) => e === "*") !== void 0;
|
|
395
676
|
}
|
|
396
|
-
function
|
|
397
|
-
if (!t || t.length === 0 ||
|
|
677
|
+
function xt(t, e) {
|
|
678
|
+
if (!t || t.length === 0 || bt(t))
|
|
398
679
|
return !0;
|
|
399
680
|
if (e.lastIndexOf(".") < 0)
|
|
400
681
|
return !1;
|
|
401
|
-
const
|
|
682
|
+
const n = e.substr(e.lastIndexOf("."));
|
|
402
683
|
return t.findIndex(
|
|
403
|
-
(
|
|
684
|
+
(s) => s.toLowerCase() === n.toLowerCase()
|
|
404
685
|
) > -1;
|
|
405
686
|
}
|
|
406
|
-
function
|
|
687
|
+
function Ct(t) {
|
|
407
688
|
if (t)
|
|
408
689
|
return t.split(`
|
|
409
|
-
`).map((e) => e.split(/: */, 2)).filter((e) => e[0]).reduce((e,
|
|
690
|
+
`).map((e) => e.split(/: */, 2)).filter((e) => e[0]).reduce((e, n) => (e[n[0]] = n[1], e), {});
|
|
410
691
|
}
|
|
411
|
-
function
|
|
692
|
+
function ke(t) {
|
|
412
693
|
return new Date(t * 1e3).toISOString().substr(11, 8);
|
|
413
694
|
}
|
|
414
|
-
class
|
|
415
|
-
upload(e,
|
|
416
|
-
const
|
|
417
|
-
return new Promise((
|
|
418
|
-
var
|
|
419
|
-
const
|
|
420
|
-
let
|
|
421
|
-
|
|
422
|
-
var
|
|
695
|
+
class Ft extends mt {
|
|
696
|
+
upload(e, n, s, a) {
|
|
697
|
+
const i = e[0];
|
|
698
|
+
return new Promise((d, u) => {
|
|
699
|
+
var I, y;
|
|
700
|
+
const v = n.url || s.url || "", C = n.method || "POST", f = n.data || {}, T = n.headers || {}, h = new XMLHttpRequest(), D = (/* @__PURE__ */ new Date()).getTime();
|
|
701
|
+
let E = ((I = i.progress) == null ? void 0 : I.data) && i.progress.data.startTime || D, H = 0, g = null;
|
|
702
|
+
h.upload.addEventListener("progress", (b) => {
|
|
703
|
+
var A;
|
|
423
704
|
if (b.lengthComputable) {
|
|
424
|
-
const
|
|
425
|
-
|
|
426
|
-
status:
|
|
705
|
+
const k = Math.round(b.loaded * 100 / b.total), j = (/* @__PURE__ */ new Date()).getTime() - D;
|
|
706
|
+
H = Math.round(b.loaded / j * 1e3), E = ((A = i.progress) == null ? void 0 : A.data) && i.progress.data.startTime || (/* @__PURE__ */ new Date()).getTime(), g = Math.ceil((b.total - b.loaded) / H), i.progress = {
|
|
707
|
+
status: q.Uploading,
|
|
427
708
|
data: {
|
|
428
|
-
percentage:
|
|
429
|
-
speed:
|
|
430
|
-
speedHuman: `${
|
|
431
|
-
startTime:
|
|
709
|
+
percentage: k,
|
|
710
|
+
speed: H,
|
|
711
|
+
speedHuman: `${ie(H)}/s`,
|
|
712
|
+
startTime: E,
|
|
432
713
|
endTime: null,
|
|
433
714
|
eta: g,
|
|
434
|
-
etaHuman:
|
|
715
|
+
etaHuman: ke(g)
|
|
435
716
|
}
|
|
436
|
-
}, a({ type: "uploading", files: [
|
|
717
|
+
}, a({ type: "uploading", files: [i] });
|
|
437
718
|
}
|
|
438
|
-
}, !1),
|
|
719
|
+
}, !1), h.upload.addEventListener("error", (b) => {
|
|
439
720
|
u(b);
|
|
440
|
-
}),
|
|
441
|
-
if (
|
|
442
|
-
const b = Math.round(
|
|
443
|
-
|
|
444
|
-
status:
|
|
721
|
+
}), h.onreadystatechange = () => {
|
|
722
|
+
if (h.readyState === XMLHttpRequest.DONE) {
|
|
723
|
+
const b = Math.round(i.size / ((/* @__PURE__ */ new Date()).getTime() - E) * 1e3);
|
|
724
|
+
i.progress = {
|
|
725
|
+
status: q.Done,
|
|
445
726
|
data: {
|
|
446
727
|
percentage: 100,
|
|
447
728
|
speed: b,
|
|
448
|
-
speedHuman: `${
|
|
449
|
-
startTime:
|
|
729
|
+
speedHuman: `${ie(b)}/s`,
|
|
730
|
+
startTime: E,
|
|
450
731
|
endTime: (/* @__PURE__ */ new Date()).getTime(),
|
|
451
732
|
eta: g,
|
|
452
|
-
etaHuman:
|
|
733
|
+
etaHuman: ke(g || 0)
|
|
453
734
|
}
|
|
454
|
-
},
|
|
735
|
+
}, i.responseStatus = h.status;
|
|
455
736
|
try {
|
|
456
|
-
|
|
737
|
+
i.response = JSON.parse(h.response);
|
|
457
738
|
} catch {
|
|
458
|
-
|
|
739
|
+
i.response = h.response;
|
|
459
740
|
}
|
|
460
|
-
|
|
741
|
+
i.responseHeaders = Ct(h.getAllResponseHeaders()), d({ type: "done", files: [i] });
|
|
461
742
|
}
|
|
462
|
-
},
|
|
743
|
+
}, h.open(C, v, !0), h.withCredentials = !!n.withCredentials;
|
|
463
744
|
try {
|
|
464
|
-
const b =
|
|
465
|
-
Object.keys(
|
|
466
|
-
let
|
|
467
|
-
|
|
745
|
+
const b = i.nativeFile;
|
|
746
|
+
Object.keys(T).forEach((k) => h.setRequestHeader(k, T[k]));
|
|
747
|
+
let A;
|
|
748
|
+
n.includeWebKitFormBoundary !== !1 ? (Object.keys(f).forEach((k) => {
|
|
468
749
|
var j;
|
|
469
|
-
return (j =
|
|
470
|
-
}), (
|
|
750
|
+
return (j = i.form) == null ? void 0 : j.append(k, f[k]);
|
|
751
|
+
}), (y = i.form) == null || y.append(n.fieldName || "file", b, b.name), A = i.form) : A = b, h.send(A);
|
|
471
752
|
} catch (b) {
|
|
472
753
|
u(b);
|
|
473
754
|
}
|
|
474
755
|
return () => {
|
|
475
|
-
|
|
756
|
+
h.abort();
|
|
476
757
|
};
|
|
477
758
|
});
|
|
478
759
|
}
|
|
479
760
|
// 删除附件
|
|
480
|
-
remove(e,
|
|
481
|
-
return new Promise((
|
|
482
|
-
|
|
761
|
+
remove(e, n, s, a) {
|
|
762
|
+
return new Promise((i, d) => {
|
|
763
|
+
i({ type: "removed", files: e });
|
|
483
764
|
});
|
|
484
765
|
}
|
|
485
766
|
}
|
|
486
|
-
const
|
|
767
|
+
const St = {
|
|
487
768
|
showCloseButton: { type: Boolean, default: !0 },
|
|
488
769
|
position: { type: String, default: "top-center" },
|
|
489
770
|
timeout: { type: Number, default: 3e3 },
|
|
@@ -496,247 +777,247 @@ const lt = {
|
|
|
496
777
|
animate: { type: String, default: "fadeIn" },
|
|
497
778
|
options: { type: Object },
|
|
498
779
|
safeHtml: { type: Boolean, default: !0 }
|
|
499
|
-
},
|
|
780
|
+
}, kt = {
|
|
500
781
|
showCloseButton: { type: Boolean, default: !0 },
|
|
501
782
|
animate: { type: String, default: "fadeIn" },
|
|
502
783
|
options: { type: Object }
|
|
503
|
-
},
|
|
784
|
+
}, pe = /* @__PURE__ */ K({
|
|
504
785
|
name: "Toast",
|
|
505
|
-
props:
|
|
786
|
+
props: kt,
|
|
506
787
|
emits: ["close", "click"],
|
|
507
788
|
setup: (t, e) => {
|
|
508
|
-
const
|
|
509
|
-
const
|
|
510
|
-
animated:
|
|
789
|
+
const n = B(t.animate), s = "fadeOut", a = N(() => t.options), i = B(!1), d = N(() => a.value.title && a.value.message), u = N(() => !a.value.title && a.value.message), v = N(() => {
|
|
790
|
+
const y = {
|
|
791
|
+
animated: i.value,
|
|
511
792
|
toast: !0,
|
|
512
|
-
"toast--only-content": !
|
|
793
|
+
"toast--only-content": !d.value
|
|
513
794
|
};
|
|
514
|
-
return
|
|
515
|
-
}), C =
|
|
516
|
-
const
|
|
795
|
+
return y[t.animate] = !1, y[s] = i.value, y["toasty-type-" + a.value.type] = !0, a.value.theme && (y[a.value.theme] = !0), y;
|
|
796
|
+
}), C = N(() => {
|
|
797
|
+
const A = `f-icon-${a.value && a.value.type ? a.value.type.replace("toasty-type-", "") : "default"}`, k = {
|
|
517
798
|
"f-icon": !0
|
|
518
799
|
};
|
|
519
|
-
return
|
|
520
|
-
}),
|
|
800
|
+
return k[A] = !0, k;
|
|
801
|
+
}), f = N(() => a.value.title || a.value.message), T = N(() => t.showCloseButton), h = N(() => !!a.value.buttons || !!e.slots.default), D = N(() => ce.getLocale() === "en" ? {
|
|
521
802
|
wordBreak: "keep-all",
|
|
522
803
|
overflowWrap: "break-word"
|
|
523
804
|
} : {});
|
|
524
|
-
function
|
|
525
|
-
|
|
805
|
+
function E(y) {
|
|
806
|
+
y.stopPropagation(), y.preventDefault(), i.value = !1, setTimeout(() => {
|
|
526
807
|
e.emit("close", a.value);
|
|
527
808
|
}, 200);
|
|
528
809
|
}
|
|
529
|
-
function
|
|
810
|
+
function H(y, b) {
|
|
530
811
|
}
|
|
531
|
-
function g(
|
|
532
|
-
return `f-preten-link ${
|
|
812
|
+
function g(y) {
|
|
813
|
+
return `f-preten-link ${y.customClass ? y.customClass : ""}`;
|
|
533
814
|
}
|
|
534
|
-
|
|
535
|
-
|
|
815
|
+
Q(n, () => {
|
|
816
|
+
n.value;
|
|
536
817
|
});
|
|
537
|
-
const
|
|
538
|
-
var
|
|
539
|
-
return
|
|
818
|
+
const I = () => {
|
|
819
|
+
var y;
|
|
820
|
+
return l(J, null, [l("div", {
|
|
540
821
|
class: "after-toast-msg text-right"
|
|
541
|
-
}, [!e.slots.default && ((
|
|
822
|
+
}, [!e.slots.default && ((y = a.value.buttons) == null ? void 0 : y.map((b) => l("span", {
|
|
542
823
|
class: g(b),
|
|
543
|
-
onClick: (
|
|
824
|
+
onClick: (A) => void 0
|
|
544
825
|
}, [b.text]))), e.slots.default && e.slots.default()])]);
|
|
545
826
|
};
|
|
546
|
-
return () =>
|
|
547
|
-
class:
|
|
827
|
+
return () => l("div", {
|
|
828
|
+
class: v.value,
|
|
548
829
|
style: "min-height:44px"
|
|
549
|
-
}, [
|
|
550
|
-
title:
|
|
830
|
+
}, [T.value && l("button", {
|
|
831
|
+
title: ce.getLocaleValue("messageBox.close"),
|
|
551
832
|
class: "toast-close f-btn-icon f-bare",
|
|
552
|
-
onClick:
|
|
553
|
-
}, [
|
|
833
|
+
onClick: E
|
|
834
|
+
}, [l("span", {
|
|
554
835
|
class: "f-icon modal_close"
|
|
555
|
-
}, null)]),
|
|
836
|
+
}, null)]), f.value && l("section", {
|
|
556
837
|
class: "modal-tips"
|
|
557
|
-
}, [!
|
|
838
|
+
}, [!d.value && l("div", {
|
|
558
839
|
class: "float-left modal-tips-iconwrap"
|
|
559
|
-
}, [
|
|
840
|
+
}, [l("span", {
|
|
560
841
|
class: C.value
|
|
561
|
-
}, null)]),
|
|
842
|
+
}, null)]), l("div", {
|
|
562
843
|
class: "modal-tips-content"
|
|
563
|
-
}, [
|
|
844
|
+
}, [d.value && l(J, null, [l("h5", {
|
|
564
845
|
class: "toast-title modal-tips-title",
|
|
565
846
|
innerHTML: a.value.title
|
|
566
|
-
}, null),
|
|
847
|
+
}, null), l("p", {
|
|
567
848
|
class: "toast-msg",
|
|
568
849
|
innerHTML: a.value.message,
|
|
569
|
-
style:
|
|
570
|
-
}, null),
|
|
850
|
+
style: D.value
|
|
851
|
+
}, null), h.value && I()]), u.value && (a.value.buttons ? l("div", {
|
|
571
852
|
class: "toast-title-btns-wrapper d-flex"
|
|
572
|
-
}, [
|
|
853
|
+
}, [l("h5", {
|
|
573
854
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
574
|
-
style:
|
|
855
|
+
style: D.value,
|
|
575
856
|
innerHTML: a.value.message
|
|
576
|
-
}, null),
|
|
857
|
+
}, null), l("div", {
|
|
577
858
|
class: "after-toast-title text-right ml-auto"
|
|
578
|
-
}, [
|
|
859
|
+
}, [I()])]) : l("h5", {
|
|
579
860
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
580
|
-
style:
|
|
861
|
+
style: D.value,
|
|
581
862
|
innerHTML: a.value.message
|
|
582
863
|
}, null))])])]);
|
|
583
864
|
}
|
|
584
|
-
}),
|
|
865
|
+
}), re = /* @__PURE__ */ K({
|
|
585
866
|
name: "Notify",
|
|
586
|
-
props:
|
|
867
|
+
props: St,
|
|
587
868
|
emits: ["close", "empty"],
|
|
588
869
|
setup(t, e) {
|
|
589
|
-
const
|
|
870
|
+
const n = N(() => ({
|
|
590
871
|
"farris-notify": !0
|
|
591
|
-
})),
|
|
872
|
+
})), s = {
|
|
592
873
|
left: 12,
|
|
593
874
|
right: 12,
|
|
594
875
|
top: 20,
|
|
595
876
|
bottom: 12
|
|
596
|
-
}, a = B(),
|
|
597
|
-
const
|
|
877
|
+
}, a = B(), i = B(t.options), d = B(t.showCloseButton), u = N(() => t.position || "bottom-right"), v = N(() => t.timeout != null ? t.timeout : 3e3), C = N(() => {
|
|
878
|
+
const h = t.bottom ? t.bottom : s.bottom, D = t.top ? t.top : s.top, E = {
|
|
598
879
|
transition: "all 0.2s ease",
|
|
599
|
-
left: u.value.indexOf("left") > -1 ? `${t.left ? t.left :
|
|
600
|
-
right: u.value.indexOf("right") > -1 ? `${t.right ? t.right :
|
|
601
|
-
top: u.value.indexOf("top") > -1 ? `${
|
|
602
|
-
bottom: u.value.indexOf("bottom") > -1 ? `${
|
|
880
|
+
left: u.value.indexOf("left") > -1 ? `${t.left ? t.left : s.left}px` : "",
|
|
881
|
+
right: u.value.indexOf("right") > -1 ? `${t.right ? t.right : s.right}px` : "",
|
|
882
|
+
top: u.value.indexOf("top") > -1 ? `${D}px` : "",
|
|
883
|
+
bottom: u.value.indexOf("bottom") > -1 ? `${h}px` : ""
|
|
603
884
|
};
|
|
604
|
-
return u.value.indexOf("center") > -1 && (
|
|
885
|
+
return u.value.indexOf("center") > -1 && (E.left = "50%", E.marginLeft = "calc(-24rem / 2)", u.value === "center-center" && (E.top = "50%", E.transform = "translate(-50%, -50%)")), E;
|
|
605
886
|
});
|
|
606
|
-
function
|
|
887
|
+
function f(h) {
|
|
607
888
|
e.emit("close");
|
|
608
889
|
}
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
},
|
|
612
|
-
closeToast:
|
|
890
|
+
v.value && setTimeout(() => {
|
|
891
|
+
f();
|
|
892
|
+
}, v.value), e.expose({
|
|
893
|
+
closeToast: f,
|
|
613
894
|
container: a,
|
|
614
895
|
notifyPosition: u
|
|
615
896
|
});
|
|
616
|
-
function
|
|
617
|
-
|
|
897
|
+
function T(h, D) {
|
|
898
|
+
f();
|
|
618
899
|
}
|
|
619
|
-
return () =>
|
|
620
|
-
class:
|
|
900
|
+
return () => l("div", {
|
|
901
|
+
class: n.value,
|
|
621
902
|
style: C.value,
|
|
622
903
|
ref: a
|
|
623
|
-
}, [
|
|
624
|
-
options:
|
|
625
|
-
showCloseButton:
|
|
904
|
+
}, [l(pe, {
|
|
905
|
+
options: i.value,
|
|
906
|
+
showCloseButton: d.value,
|
|
626
907
|
animate: t.animate,
|
|
627
|
-
onClose: (
|
|
908
|
+
onClose: (h) => T(h, i.value)
|
|
628
909
|
}, null)]);
|
|
629
910
|
}
|
|
630
911
|
});
|
|
631
|
-
class
|
|
912
|
+
class Me {
|
|
632
913
|
constructor() {
|
|
633
|
-
|
|
634
|
-
|
|
914
|
+
L(this, "notifyRefs", []);
|
|
915
|
+
L(this, "globalConfig", ze({}));
|
|
635
916
|
}
|
|
636
917
|
escapeAllHtml(e) {
|
|
637
918
|
if (typeof e != "string" || !e)
|
|
638
919
|
return "";
|
|
639
|
-
const
|
|
640
|
-
return
|
|
920
|
+
const n = document.createElement("div");
|
|
921
|
+
return n.textContent = e || "", n.innerHTML.replace(/\\n/g, "<br>").replace(/\\t/g, " ").replace(/\\r/g, "");
|
|
641
922
|
}
|
|
642
923
|
createNotifyInstance(e) {
|
|
643
|
-
const
|
|
924
|
+
const n = this, a = Object.assign({
|
|
644
925
|
timeout: 3e3,
|
|
645
926
|
position: "bottom-right",
|
|
646
927
|
showCloseButton: !0,
|
|
647
928
|
safeHtml: !0
|
|
648
929
|
}, this.globalConfig, {
|
|
649
930
|
...e
|
|
650
|
-
}),
|
|
651
|
-
|
|
652
|
-
const
|
|
931
|
+
}), i = document.createElement("div");
|
|
932
|
+
i.style.display = "contents";
|
|
933
|
+
const d = je({
|
|
653
934
|
setup() {
|
|
654
935
|
var C;
|
|
655
936
|
const u = B();
|
|
656
|
-
function
|
|
937
|
+
function v() {
|
|
657
938
|
u.value.container.style.transform = "scale(0)", setTimeout(() => {
|
|
658
|
-
|
|
939
|
+
n.updateNotifyPositionForClose(a, u), d.unmount();
|
|
659
940
|
}, 220);
|
|
660
941
|
}
|
|
661
942
|
if (a.position.indexOf("top") > -1) {
|
|
662
|
-
const
|
|
663
|
-
if (
|
|
664
|
-
const
|
|
665
|
-
a.top =
|
|
943
|
+
const f = n.getNotifyInstances(a.position), T = f[f.length - 1];
|
|
944
|
+
if (T) {
|
|
945
|
+
const h = T.value.container.getBoundingClientRect();
|
|
946
|
+
a.top = h.bottom;
|
|
666
947
|
}
|
|
667
948
|
}
|
|
668
|
-
return a.safeHtml && ((C = a.options) != null && C.message) && (a.options.message =
|
|
669
|
-
document.body.removeChild(
|
|
670
|
-
}),
|
|
671
|
-
|
|
672
|
-
}), () =>
|
|
949
|
+
return a.safeHtml && ((C = a.options) != null && C.message) && (a.options.message = n.escapeAllHtml(a.options.message)), me(() => {
|
|
950
|
+
document.body.removeChild(i);
|
|
951
|
+
}), ve(() => {
|
|
952
|
+
n.updateNotifyPositionForCreate(a, u);
|
|
953
|
+
}), () => l(Le, {
|
|
673
954
|
mode: "out-in",
|
|
674
955
|
name: "fade",
|
|
675
956
|
appear: !0
|
|
676
957
|
}, {
|
|
677
|
-
default: () => [
|
|
958
|
+
default: () => [l(re, qe({
|
|
678
959
|
ref: u
|
|
679
960
|
}, a, {
|
|
680
|
-
onClose:
|
|
961
|
+
onClose: v
|
|
681
962
|
}), null)]
|
|
682
963
|
});
|
|
683
964
|
}
|
|
684
965
|
});
|
|
685
|
-
return
|
|
966
|
+
return d.provide("NotifyService", this), document.body.appendChild(i), d.use(ce.i18n), d.mount(i), d;
|
|
686
967
|
}
|
|
687
968
|
getNotifyInstances(e) {
|
|
688
|
-
return this.notifyRefs.filter((
|
|
969
|
+
return this.notifyRefs.filter((n) => n.value.notifyPosition === e);
|
|
689
970
|
}
|
|
690
|
-
updateNotifyPositionForCreate(e,
|
|
971
|
+
updateNotifyPositionForCreate(e, n) {
|
|
691
972
|
if (this.notifyRefs && this.notifyRefs.length) {
|
|
692
|
-
const
|
|
973
|
+
const s = window.innerHeight;
|
|
693
974
|
e.position.indexOf("bottom") > -1 && this.getNotifyInstances(e.position).forEach((a) => {
|
|
694
|
-
const
|
|
695
|
-
a.value.container.style.bottom =
|
|
975
|
+
const i = a.value.container.getBoundingClientRect();
|
|
976
|
+
a.value.container.style.bottom = i.height + s - i.bottom + "px";
|
|
696
977
|
});
|
|
697
978
|
}
|
|
698
|
-
this.notifyRefs = [...this.notifyRefs,
|
|
979
|
+
this.notifyRefs = [...this.notifyRefs, n];
|
|
699
980
|
}
|
|
700
|
-
updateNotifyPositionForClose(e,
|
|
701
|
-
const
|
|
981
|
+
updateNotifyPositionForClose(e, n) {
|
|
982
|
+
const s = this.notifyRefs.indexOf(n);
|
|
702
983
|
if (e.position.indexOf("top") > -1) {
|
|
703
|
-
const a = this.getNotifyInstances(e.position),
|
|
704
|
-
a.slice(
|
|
705
|
-
|
|
984
|
+
const a = this.getNotifyInstances(e.position), i = a.indexOf(n);
|
|
985
|
+
a.slice(i + 1).forEach((d) => {
|
|
986
|
+
d.value.container.style.top = d.value.container.offsetTop - d.value.container.offsetHeight + "px";
|
|
706
987
|
});
|
|
707
988
|
}
|
|
708
|
-
|
|
989
|
+
s > -1 && this.notifyRefs.splice(s, 1);
|
|
709
990
|
}
|
|
710
991
|
show(e) {
|
|
711
992
|
return this.createNotifyInstance(e);
|
|
712
993
|
}
|
|
713
|
-
buildNotifyProps(e,
|
|
714
|
-
let
|
|
715
|
-
typeof
|
|
994
|
+
buildNotifyProps(e, n) {
|
|
995
|
+
let s = "", a = "", i, d, u;
|
|
996
|
+
typeof n == "string" ? s = n : n && (s = n.message || "", a = n.title || "", d = n.position || null, u = n.showCloseButton != null ? n.showCloseButton : null, i = n.timeout != null ? n.timeout : null);
|
|
716
997
|
const C = {
|
|
717
998
|
options: {
|
|
718
999
|
type: e,
|
|
719
|
-
message:
|
|
1000
|
+
message: s,
|
|
720
1001
|
title: a
|
|
721
1002
|
}
|
|
722
1003
|
};
|
|
723
|
-
return
|
|
1004
|
+
return d != null && (C.position = d), u != null && (C.showCloseButton = u), i != null && (C.timeout = i), C;
|
|
724
1005
|
}
|
|
725
1006
|
info(e) {
|
|
726
|
-
const
|
|
727
|
-
return this.show(
|
|
1007
|
+
const n = this.buildNotifyProps("info", e);
|
|
1008
|
+
return this.show(n);
|
|
728
1009
|
}
|
|
729
1010
|
success(e) {
|
|
730
|
-
const
|
|
731
|
-
return this.show(
|
|
1011
|
+
const n = this.buildNotifyProps("success", e);
|
|
1012
|
+
return this.show(n);
|
|
732
1013
|
}
|
|
733
1014
|
warning(e) {
|
|
734
|
-
const
|
|
735
|
-
return this.show(
|
|
1015
|
+
const n = this.buildNotifyProps("warning", e);
|
|
1016
|
+
return this.show(n);
|
|
736
1017
|
}
|
|
737
1018
|
error(e) {
|
|
738
|
-
const
|
|
739
|
-
return this.show(
|
|
1019
|
+
const n = this.buildNotifyProps("error", e);
|
|
1020
|
+
return this.show(n);
|
|
740
1021
|
}
|
|
741
1022
|
close(e) {
|
|
742
1023
|
e && e.unmount();
|
|
@@ -747,162 +1028,162 @@ class Fe {
|
|
|
747
1028
|
}), this.notifyRefs.length = 0;
|
|
748
1029
|
}
|
|
749
1030
|
}
|
|
750
|
-
const
|
|
751
|
-
|
|
752
|
-
t.component(
|
|
753
|
-
const e = new
|
|
754
|
-
t.provide(
|
|
1031
|
+
const Tt = Symbol("NOTIFY_SERVICE_TOKEN");
|
|
1032
|
+
re.install = (t) => {
|
|
1033
|
+
t.component(re.name, re), t.component(pe.name, pe);
|
|
1034
|
+
const e = new Me();
|
|
1035
|
+
t.provide(Tt, e), t.provide("FNotifyService", e);
|
|
755
1036
|
};
|
|
756
|
-
const
|
|
1037
|
+
const Et = (t = "") => {
|
|
757
1038
|
let e;
|
|
758
|
-
return t &&
|
|
759
|
-
},
|
|
1039
|
+
return t && Z(t, null) && (e = Z(t)), e || (e = new Me()), e;
|
|
1040
|
+
}, Bt = (t = "") => {
|
|
760
1041
|
let e;
|
|
761
|
-
if (t &&
|
|
762
|
-
const
|
|
763
|
-
|
|
1042
|
+
if (t && Z(t, null)) {
|
|
1043
|
+
const n = Z(t);
|
|
1044
|
+
n && n() && (e = n());
|
|
764
1045
|
}
|
|
765
|
-
return e || (e = new
|
|
766
|
-
},
|
|
767
|
-
getNotify:
|
|
768
|
-
getServerAPI:
|
|
1046
|
+
return e || (e = new Ft()), e;
|
|
1047
|
+
}, Pe = {
|
|
1048
|
+
getNotify: Et,
|
|
1049
|
+
getServerAPI: Bt
|
|
769
1050
|
};
|
|
770
|
-
function
|
|
771
|
-
const
|
|
772
|
-
disabled:
|
|
773
|
-
uploadVisible:
|
|
1051
|
+
function Re(t, e, n) {
|
|
1052
|
+
const s = Pe.getNotify(t.notifyServiceToken), a = B(t.fileInfos), {
|
|
1053
|
+
disabled: i,
|
|
1054
|
+
uploadVisible: d,
|
|
774
1055
|
uploadDisabled: u,
|
|
775
|
-
previewVisible:
|
|
1056
|
+
previewVisible: v,
|
|
776
1057
|
orderField: C,
|
|
777
|
-
previewEnableMulti:
|
|
778
|
-
downloadButtonDisable:
|
|
779
|
-
previewColumns:
|
|
780
|
-
uploadEnableMulti:
|
|
781
|
-
previewButtonDisable:
|
|
782
|
-
} = fe(t),
|
|
783
|
-
function
|
|
784
|
-
(!o.length || g.value.length !== o.length) && (
|
|
785
|
-
const
|
|
786
|
-
return
|
|
1058
|
+
previewEnableMulti: f,
|
|
1059
|
+
downloadButtonDisable: T,
|
|
1060
|
+
previewColumns: h,
|
|
1061
|
+
uploadEnableMulti: D,
|
|
1062
|
+
previewButtonDisable: E
|
|
1063
|
+
} = fe(t), H = B(!1), g = B([]), I = N(() => g.value.length), y = B([]), b = B("");
|
|
1064
|
+
function A(o) {
|
|
1065
|
+
(!o.length || g.value.length !== o.length) && (H.value = !1);
|
|
1066
|
+
const m = [...o.map((w) => (w.hasOwnProperty("size") || (w.size = void 0), w.hasOwnProperty("createTime") || (w.createTime = void 0), f.value && (w.checked = !!g.value.find((z) => z.id === w.id) || H.value), w))];
|
|
1067
|
+
return m.sort(ht(C.value)), f.value && (g.value = [...m].filter((w) => w.checked)), m;
|
|
787
1068
|
}
|
|
788
|
-
const
|
|
789
|
-
|
|
790
|
-
|
|
1069
|
+
const k = B(A(a.value));
|
|
1070
|
+
Q(() => t.fileInfos, (o) => {
|
|
1071
|
+
k.value = A(o);
|
|
791
1072
|
});
|
|
792
|
-
const j = (o,
|
|
793
|
-
o.stopImmediatePropagation(), e.emit("fileDownloadEvent", { fileInfos: [
|
|
794
|
-
},
|
|
795
|
-
o.stopImmediatePropagation(), !
|
|
796
|
-
},
|
|
797
|
-
|
|
798
|
-
},
|
|
799
|
-
if (o.stopImmediatePropagation(),
|
|
800
|
-
let
|
|
801
|
-
|
|
1073
|
+
const j = (o, c) => {
|
|
1074
|
+
o.stopImmediatePropagation(), e.emit("fileDownloadEvent", { fileInfos: [c], name: "" });
|
|
1075
|
+
}, ee = (o, c) => {
|
|
1076
|
+
o.stopImmediatePropagation(), !E.value && e.emit("filePreviewEvent", c);
|
|
1077
|
+
}, te = (o, c, m) => {
|
|
1078
|
+
c.checked && (g.value = g.value.filter((w) => w.id !== c.id)), e.emit("fileRemoveEvent", c), m.handleUploadEvent({ type: "remove", file: c });
|
|
1079
|
+
}, W = (o, c = "preview") => o.formatter ? !0 : c === "preview" ? ["state", "name", "action", "size", "createTime"].findIndex((w) => w === o.field) > -1 : c === "upload" ? ["state", "name", "size"].findIndex((w) => w === o.field) > -1 : !1, Y = (o) => !(o.field === "state" && (u.value || !d.value)), le = (o) => o.lastIndexOf(".") > 0 ? o.substring(0, o.lastIndexOf(".")) : "", X = (o) => {
|
|
1080
|
+
if (o.stopImmediatePropagation(), I.value > 1) {
|
|
1081
|
+
let c = "";
|
|
1082
|
+
c = le(g.value[0].name), e.emit("fileDownloadEvent", {
|
|
802
1083
|
fileInfos: g.value,
|
|
803
|
-
name:
|
|
1084
|
+
name: c
|
|
804
1085
|
});
|
|
805
1086
|
}
|
|
806
|
-
},
|
|
1087
|
+
}, _ = (o) => {
|
|
807
1088
|
o.stopImmediatePropagation(), e.emit("fileRemoveEvent", g.value);
|
|
808
1089
|
}, G = (o) => {
|
|
809
|
-
const
|
|
810
|
-
o.checked ? (
|
|
811
|
-
|
|
812
|
-
}), g.value = [...
|
|
813
|
-
|
|
814
|
-
}),
|
|
815
|
-
},
|
|
816
|
-
o && (o.stopImmediatePropagation(), o.stopPropagation()), (!b.value ||
|
|
817
|
-
},
|
|
818
|
-
const
|
|
819
|
-
|
|
820
|
-
},
|
|
821
|
-
var
|
|
822
|
-
(
|
|
823
|
-
},
|
|
824
|
-
|
|
825
|
-
},
|
|
826
|
-
let
|
|
827
|
-
o.files && o.files.length > 0 ?
|
|
828
|
-
const
|
|
829
|
-
var
|
|
830
|
-
return typeof
|
|
1090
|
+
const c = k.value;
|
|
1091
|
+
o.checked ? (c.forEach((m) => {
|
|
1092
|
+
m.checked = !0;
|
|
1093
|
+
}), g.value = [...k.value], H.value = !0) : (g.value = [], c.forEach((m) => {
|
|
1094
|
+
m.checked = !1;
|
|
1095
|
+
}), H.value = !1), e.emit("previewMultiSelectedEvent", g.value);
|
|
1096
|
+
}, M = (o, c) => {
|
|
1097
|
+
o && (o.stopImmediatePropagation(), o.stopPropagation()), (!b.value || c.id !== b.value) && (b.value = c.id, e.emit("selectedEvent", c));
|
|
1098
|
+
}, F = (o) => {
|
|
1099
|
+
const c = g.value.findIndex((z) => z.id === o.id), m = c > -1, w = k.value.find((z) => z.id === o.id);
|
|
1100
|
+
w && (w.checked = o.checked), o.checked && !m && w && g.value.push(w), !o.checked && m && g.value.splice(c, 1), k.value.length > 0 && (g.value.length === k.value.length ? H.value = !0 : H.value = !1), M(null, w), e.emit("previewMultiSelectedEvent", g.value);
|
|
1101
|
+
}, O = (o) => {
|
|
1102
|
+
var c;
|
|
1103
|
+
(c = n == null ? void 0 : n.value) == null || c.handleUploadEvent(o);
|
|
1104
|
+
}, ne = (o) => {
|
|
1105
|
+
O({ type: "upload", file: o });
|
|
1106
|
+
}, P = (o, c) => {
|
|
1107
|
+
let m = [];
|
|
1108
|
+
o.files && o.files.length > 0 ? m = o.files : typeof o.file < "u" && (m = [o.file]), c = c || o.type, m.map((w) => {
|
|
1109
|
+
const z = y.value.findIndex(($) => {
|
|
1110
|
+
var oe;
|
|
1111
|
+
return typeof w < "u" && ((oe = $ == null ? void 0 : $.file) == null ? void 0 : oe.id) === w.id;
|
|
831
1112
|
});
|
|
832
|
-
|
|
1113
|
+
z > -1 && (y.value[z] = { type: c, file: w });
|
|
833
1114
|
});
|
|
834
|
-
},
|
|
1115
|
+
}, de = (o) => {
|
|
835
1116
|
if (o.files) {
|
|
836
|
-
const
|
|
837
|
-
|
|
838
|
-
var
|
|
839
|
-
return
|
|
840
|
-
}) > -1)),
|
|
1117
|
+
const c = o.files.map((m) => m.id);
|
|
1118
|
+
y.value = y.value.filter((m) => !(c.findIndex((z) => {
|
|
1119
|
+
var $;
|
|
1120
|
+
return z === (($ = m == null ? void 0 : m.file) == null ? void 0 : $.id);
|
|
1121
|
+
}) > -1)), O({
|
|
841
1122
|
type: "hide",
|
|
842
|
-
id:
|
|
1123
|
+
id: c.join(",")
|
|
843
1124
|
});
|
|
844
1125
|
}
|
|
845
|
-
},
|
|
846
|
-
let
|
|
847
|
-
(o.type === "cancelled" || o.type === "removed") && (
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
options: { type:
|
|
1126
|
+
}, se = (o) => {
|
|
1127
|
+
let c = "warning";
|
|
1128
|
+
(o.type === "cancelled" || o.type === "removed") && (c = "success");
|
|
1129
|
+
const m = o.hasOwnProperty("message") ? o.message : "";
|
|
1130
|
+
s.show({
|
|
1131
|
+
options: { type: c, message: m },
|
|
851
1132
|
position: "top-center"
|
|
852
1133
|
});
|
|
853
|
-
},
|
|
1134
|
+
}, ae = (o) => {
|
|
854
1135
|
if (o.type === "addedToQueue" && typeof o.file < "u")
|
|
855
|
-
|
|
1136
|
+
y.value.push({ type: o.type, file: o.file }), ne(o.file);
|
|
856
1137
|
else if (o.type === "start")
|
|
857
|
-
|
|
1138
|
+
P(o, "start");
|
|
858
1139
|
else if (o.type === "done") {
|
|
859
|
-
|
|
860
|
-
const
|
|
1140
|
+
P(o, "done");
|
|
1141
|
+
const c = (o.files || []).map((m) => ({
|
|
861
1142
|
checked: !1,
|
|
862
|
-
id:
|
|
863
|
-
name:
|
|
864
|
-
size:
|
|
865
|
-
createTime:
|
|
1143
|
+
id: m.id,
|
|
1144
|
+
name: m.name,
|
|
1145
|
+
size: m.size,
|
|
1146
|
+
createTime: ge(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss")
|
|
866
1147
|
}));
|
|
867
|
-
a.value = [...
|
|
1148
|
+
a.value = [...c, ...k.value], de(o), e.emit("fUploadDoneEvent", Se(o.files || [])), e.emit("uploadDoneEvent", Se(o.files || []));
|
|
868
1149
|
} else if (o.type === "cancelled" || o.type === "removed" || o.type === "error") {
|
|
869
|
-
const
|
|
870
|
-
a.value = [...
|
|
871
|
-
} else o.type === "rejected" && typeof o.file < "u" &&
|
|
1150
|
+
const c = a.value.filter((m) => o.files && o.files.findIndex((w) => m.id === w.id) < 0);
|
|
1151
|
+
a.value = [...c], se(o);
|
|
1152
|
+
} else o.type === "rejected" && typeof o.file < "u" && se(o);
|
|
872
1153
|
};
|
|
873
|
-
return
|
|
1154
|
+
return me(() => {
|
|
874
1155
|
}), {
|
|
875
|
-
disabled:
|
|
876
|
-
uploadVisible:
|
|
1156
|
+
disabled: i,
|
|
1157
|
+
uploadVisible: d,
|
|
877
1158
|
uploadDisabled: u,
|
|
878
|
-
downloadButtonDisable:
|
|
879
|
-
previewVisible:
|
|
880
|
-
previewColumns:
|
|
881
|
-
uploadFiles:
|
|
882
|
-
innerFileInfos:
|
|
883
|
-
previewEnableMulti:
|
|
884
|
-
previewMultiSelectedLength:
|
|
885
|
-
previewSelectAllBtnChecked:
|
|
886
|
-
uploadEnableMulti:
|
|
1159
|
+
downloadButtonDisable: T,
|
|
1160
|
+
previewVisible: v,
|
|
1161
|
+
previewColumns: h,
|
|
1162
|
+
uploadFiles: y,
|
|
1163
|
+
innerFileInfos: k,
|
|
1164
|
+
previewEnableMulti: f,
|
|
1165
|
+
previewMultiSelectedLength: I,
|
|
1166
|
+
previewSelectAllBtnChecked: H,
|
|
1167
|
+
uploadEnableMulti: D,
|
|
887
1168
|
previewCurrentId: b,
|
|
888
|
-
multiFileRemoveHandler:
|
|
889
|
-
previewMultiSelectChangeHandler:
|
|
1169
|
+
multiFileRemoveHandler: _,
|
|
1170
|
+
previewMultiSelectChangeHandler: F,
|
|
890
1171
|
fileMultiDownloadHandler: X,
|
|
891
1172
|
selectOrCancelAllHandler: G,
|
|
892
|
-
hasColumnHtmlFunc:
|
|
1173
|
+
hasColumnHtmlFunc: W,
|
|
893
1174
|
showPreviewStateColumn: Y,
|
|
894
|
-
rowSelectedHandler:
|
|
1175
|
+
rowSelectedHandler: M,
|
|
895
1176
|
fileDownloadHandler: j,
|
|
896
|
-
filePreviewHandler:
|
|
897
|
-
fileRemoveHandler:
|
|
898
|
-
handleStateChange:
|
|
1177
|
+
filePreviewHandler: ee,
|
|
1178
|
+
fileRemoveHandler: te,
|
|
1179
|
+
handleStateChange: ae
|
|
899
1180
|
};
|
|
900
1181
|
}
|
|
901
|
-
class
|
|
902
|
-
constructor(e,
|
|
1182
|
+
class Ht {
|
|
1183
|
+
constructor(e, n) {
|
|
903
1184
|
// 记录在上传的附件数组
|
|
904
|
-
|
|
905
|
-
|
|
1185
|
+
L(this, "queue");
|
|
1186
|
+
L(this, "uploadOpts", {
|
|
906
1187
|
// 默认不限制,0代表不限制 Number.POSITIVE_INFINITY
|
|
907
1188
|
allowedContentTypes: ["*"],
|
|
908
1189
|
maxUploads: 0,
|
|
@@ -914,10 +1195,10 @@ class rt {
|
|
|
914
1195
|
/**
|
|
915
1196
|
* 服务器端扩展
|
|
916
1197
|
*/
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
this.stateChangeRecord = e, this.serverToken =
|
|
1198
|
+
L(this, "extendServerConfig", null);
|
|
1199
|
+
L(this, "uploadServerSer");
|
|
1200
|
+
L(this, "uploadContext", null);
|
|
1201
|
+
this.stateChangeRecord = e, this.serverToken = n, this.queue = [], this.uploadServerSer = Pe.getServerAPI(this.serverToken);
|
|
921
1202
|
}
|
|
922
1203
|
setUploadContext(e) {
|
|
923
1204
|
this.uploadContext = e;
|
|
@@ -926,21 +1207,21 @@ class rt {
|
|
|
926
1207
|
* 处理从服务器端返回的结果
|
|
927
1208
|
*/
|
|
928
1209
|
handleResultFromServer(e) {
|
|
929
|
-
var
|
|
1210
|
+
var n, s;
|
|
930
1211
|
switch (e.type) {
|
|
931
1212
|
case "removed":
|
|
932
1213
|
this.queue = this.queue.filter(
|
|
933
1214
|
(a) => {
|
|
934
|
-
var
|
|
935
|
-
return ((
|
|
1215
|
+
var i;
|
|
1216
|
+
return ((i = a.progress) == null ? void 0 : i.status) !== q.Remove;
|
|
936
1217
|
}
|
|
937
1218
|
), e.hasOwnProperty("message") || (e.message = "被删除"), this.stateChangeRecord.value = e;
|
|
938
1219
|
break;
|
|
939
1220
|
case "error":
|
|
940
|
-
this.queue = this.queue.filter((a) => e.files && e.files.findIndex((
|
|
1221
|
+
this.queue = this.queue.filter((a) => e.files && e.files.findIndex((i) => a.id === i.id) < 0), (n = this.uploadContext) == null || n.emit("stateChange", e);
|
|
941
1222
|
break;
|
|
942
1223
|
default:
|
|
943
|
-
(
|
|
1224
|
+
(s = this.uploadContext) == null || s.emit("stateChange", e);
|
|
944
1225
|
}
|
|
945
1226
|
}
|
|
946
1227
|
setOptions(e) {
|
|
@@ -951,37 +1232,37 @@ class rt {
|
|
|
951
1232
|
* @param incomingFiles
|
|
952
1233
|
*/
|
|
953
1234
|
handleFiles(e) {
|
|
954
|
-
var
|
|
955
|
-
const
|
|
956
|
-
(a,
|
|
1235
|
+
var s;
|
|
1236
|
+
const n = Array.from(e).reduce(
|
|
1237
|
+
(a, i, d) => {
|
|
957
1238
|
var C;
|
|
958
|
-
const u = a.length + this.queue.length + 1,
|
|
959
|
-
|
|
1239
|
+
const u = a.length + this.queue.length + 1, v = this.rejectedReason(
|
|
1240
|
+
i.name,
|
|
960
1241
|
u,
|
|
961
|
-
|
|
1242
|
+
i.size
|
|
962
1243
|
);
|
|
963
|
-
if (
|
|
964
|
-
a = a.concat(
|
|
1244
|
+
if (v.allowed)
|
|
1245
|
+
a = a.concat(i);
|
|
965
1246
|
else {
|
|
966
|
-
const
|
|
967
|
-
|
|
968
|
-
|
|
1247
|
+
const f = Fe(
|
|
1248
|
+
i,
|
|
1249
|
+
d
|
|
969
1250
|
);
|
|
970
1251
|
(C = this.uploadContext) == null || C.emit("stateChange", {
|
|
971
1252
|
type: "rejected",
|
|
972
|
-
file:
|
|
973
|
-
message:
|
|
1253
|
+
file: f,
|
|
1254
|
+
message: v.message
|
|
974
1255
|
});
|
|
975
1256
|
}
|
|
976
1257
|
return a;
|
|
977
1258
|
},
|
|
978
1259
|
[]
|
|
979
1260
|
);
|
|
980
|
-
[].map.call(
|
|
1261
|
+
[].map.call(n, (a, i) => {
|
|
981
1262
|
var u;
|
|
982
|
-
const
|
|
983
|
-
this.queue.push(
|
|
984
|
-
}), (
|
|
1263
|
+
const d = Fe(a, i);
|
|
1264
|
+
this.queue.push(d), (u = this.uploadContext) == null || u.emit("stateChange", { type: "addedToQueue", file: d });
|
|
1265
|
+
}), (s = this.uploadContext) == null || s.emit("stateChange", { type: "allAddedToQueue" });
|
|
985
1266
|
}
|
|
986
1267
|
/**
|
|
987
1268
|
* 获取上传被拒绝的理由
|
|
@@ -990,11 +1271,11 @@ class rt {
|
|
|
990
1271
|
* @param size
|
|
991
1272
|
* @returns
|
|
992
1273
|
*/
|
|
993
|
-
rejectedReason(e,
|
|
994
|
-
let a = !1,
|
|
995
|
-
return this.queue.findIndex((u) => u.name === e) > -1 ?
|
|
1274
|
+
rejectedReason(e, n, s) {
|
|
1275
|
+
let a = !1, i = "";
|
|
1276
|
+
return this.queue.findIndex((u) => u.name === e) > -1 ? i = "上传失败:已存在同名文件" : this.uploadOpts.allowedContentTypes && !xt(this.uploadOpts.allowedContentTypes, e) ? i = `上传失败:只允许上传${this.uploadOpts.allowedContentTypes.join(",")}类型的文档` : this.exceedMaxUpload(n) ? i = `上传失败:文件总个数超出${this.uploadOpts.maxUploads}限制` : yt(this.uploadOpts.maxFileSize, s) ? s === 0 ? i = "上传失败:不允许文件为空" : a = !0 : i = `上传失败:单个文件大小超出${this.uploadOpts.maxFileSize}MB的限制`, {
|
|
996
1277
|
allowed: a,
|
|
997
|
-
message:
|
|
1278
|
+
message: i
|
|
998
1279
|
};
|
|
999
1280
|
}
|
|
1000
1281
|
/**
|
|
@@ -1005,15 +1286,15 @@ class rt {
|
|
|
1005
1286
|
exceedMaxUpload(e = 0) {
|
|
1006
1287
|
if (!this.uploadOpts || !this.uploadOpts.maxUploads)
|
|
1007
1288
|
return !1;
|
|
1008
|
-
const
|
|
1009
|
-
return this.uploadOpts.maxUploads > 0 && (this.uploadOpts.maxUploads <=
|
|
1289
|
+
const n = this.uploadOpts.uploadedCount || 0;
|
|
1290
|
+
return this.uploadOpts.maxUploads > 0 && (this.uploadOpts.maxUploads <= n || e + n > this.uploadOpts.maxUploads);
|
|
1010
1291
|
}
|
|
1011
1292
|
/**
|
|
1012
1293
|
* 从前端传来事件,进行服务器端方法类型判断
|
|
1013
1294
|
* @param input
|
|
1014
1295
|
*/
|
|
1015
1296
|
handleUploadEvent(e) {
|
|
1016
|
-
var
|
|
1297
|
+
var n, s;
|
|
1017
1298
|
switch (e.type) {
|
|
1018
1299
|
case "upload":
|
|
1019
1300
|
const a = this.queue.findIndex(
|
|
@@ -1025,38 +1306,38 @@ class rt {
|
|
|
1025
1306
|
});
|
|
1026
1307
|
break;
|
|
1027
1308
|
case "remove":
|
|
1028
|
-
if (!((
|
|
1309
|
+
if (!((n = e == null ? void 0 : e.file) != null && n.id))
|
|
1029
1310
|
return;
|
|
1030
|
-
const
|
|
1311
|
+
const i = this.queue.findIndex(
|
|
1031
1312
|
(u) => {
|
|
1032
|
-
var
|
|
1033
|
-
return u.id === ((
|
|
1313
|
+
var v;
|
|
1314
|
+
return u.id === ((v = e == null ? void 0 : e.file) == null ? void 0 : v.id);
|
|
1034
1315
|
}
|
|
1035
1316
|
);
|
|
1036
|
-
if (
|
|
1037
|
-
const { progress: u } = this.queue[
|
|
1038
|
-
u && (u.status =
|
|
1317
|
+
if (i !== -1 && this.queue[i] && this.queue[i].progress) {
|
|
1318
|
+
const { progress: u } = this.queue[i];
|
|
1319
|
+
u && (u.status = q.Remove);
|
|
1039
1320
|
}
|
|
1040
1321
|
this.serverMethod({ files: [e.file], event: e });
|
|
1041
1322
|
break;
|
|
1042
1323
|
case "removeAll":
|
|
1043
|
-
const
|
|
1324
|
+
const d = this.queue.filter(
|
|
1044
1325
|
(u) => {
|
|
1045
|
-
var
|
|
1046
|
-
return ((
|
|
1326
|
+
var v;
|
|
1327
|
+
return ((v = u == null ? void 0 : u.progress) == null ? void 0 : v.status) === q.Queue;
|
|
1047
1328
|
}
|
|
1048
1329
|
);
|
|
1049
|
-
|
|
1330
|
+
d.length && ((s = this.uploadContext) == null || s.emit("stateChange", {
|
|
1050
1331
|
type: "cancelled",
|
|
1051
|
-
files:
|
|
1332
|
+
files: d,
|
|
1052
1333
|
message: "删除附件成功"
|
|
1053
1334
|
}), this.queue = this.queue.filter(
|
|
1054
1335
|
(u) => {
|
|
1055
|
-
var
|
|
1056
|
-
return ((
|
|
1336
|
+
var v;
|
|
1337
|
+
return ((v = u == null ? void 0 : u.progress) == null ? void 0 : v.status) !== q.Queue;
|
|
1057
1338
|
}
|
|
1058
1339
|
)), this.queue.length && (e.type = "remove", this.queue.forEach((u) => {
|
|
1059
|
-
u.progress && (u.progress.status =
|
|
1340
|
+
u.progress && (u.progress.status = q.Remove);
|
|
1060
1341
|
}), this.serverMethod({ files: this.queue, event: e }));
|
|
1061
1342
|
break;
|
|
1062
1343
|
}
|
|
@@ -1074,22 +1355,22 @@ class rt {
|
|
|
1074
1355
|
* @returns
|
|
1075
1356
|
*/
|
|
1076
1357
|
serverMethod(e) {
|
|
1077
|
-
let
|
|
1358
|
+
let n;
|
|
1078
1359
|
switch (e.event.type) {
|
|
1079
1360
|
case "upload":
|
|
1080
|
-
|
|
1361
|
+
n = this.upload(e.files, e.event, (s) => this.handleResultFromServer(s));
|
|
1081
1362
|
break;
|
|
1082
1363
|
case "removeAll":
|
|
1083
1364
|
case "remove":
|
|
1084
|
-
|
|
1365
|
+
n = this.remove(e.files, e.event, (s) => this.handleResultFromServer(s));
|
|
1085
1366
|
break;
|
|
1086
1367
|
default:
|
|
1087
|
-
|
|
1368
|
+
n = null;
|
|
1088
1369
|
}
|
|
1089
|
-
|
|
1090
|
-
this.handleResultFromServer(
|
|
1091
|
-
}).catch((
|
|
1092
|
-
this.handleResultFromServer(
|
|
1370
|
+
n && n.then((s) => {
|
|
1371
|
+
this.handleResultFromServer(s);
|
|
1372
|
+
}).catch((s) => {
|
|
1373
|
+
this.handleResultFromServer(s);
|
|
1093
1374
|
});
|
|
1094
1375
|
}
|
|
1095
1376
|
/**
|
|
@@ -1098,9 +1379,9 @@ class rt {
|
|
|
1098
1379
|
* @param event
|
|
1099
1380
|
* @returns
|
|
1100
1381
|
*/
|
|
1101
|
-
upload(e,
|
|
1382
|
+
upload(e, n, s) {
|
|
1102
1383
|
var a;
|
|
1103
|
-
return (a = this.uploadContext) == null || a.emit("stateChange", { type: "start", files: e }), this.uploadServerSer.upload(e,
|
|
1384
|
+
return (a = this.uploadContext) == null || a.emit("stateChange", { type: "start", files: e }), this.uploadServerSer.upload(e, n, this.extendServerConfig, s);
|
|
1104
1385
|
}
|
|
1105
1386
|
/**
|
|
1106
1387
|
* 删除附件
|
|
@@ -1108,8 +1389,8 @@ class rt {
|
|
|
1108
1389
|
* @param event
|
|
1109
1390
|
* @returns
|
|
1110
1391
|
*/
|
|
1111
|
-
remove(e,
|
|
1112
|
-
return this.uploadServerSer.remove(e,
|
|
1392
|
+
remove(e, n, s) {
|
|
1393
|
+
return this.uploadServerSer.remove(e, n, this.extendServerConfig, s);
|
|
1113
1394
|
}
|
|
1114
1395
|
/**
|
|
1115
1396
|
* 重置
|
|
@@ -1124,332 +1405,542 @@ class rt {
|
|
|
1124
1405
|
this.reset();
|
|
1125
1406
|
}
|
|
1126
1407
|
}
|
|
1127
|
-
const
|
|
1408
|
+
const ue = /* @__PURE__ */ K({
|
|
1128
1409
|
name: "FUploader",
|
|
1129
1410
|
components: {
|
|
1130
|
-
"f-upload-progress":
|
|
1131
|
-
"f-preview-checkbox":
|
|
1132
|
-
"f-file-select":
|
|
1411
|
+
"f-upload-progress": Ze,
|
|
1412
|
+
"f-preview-checkbox": Te,
|
|
1413
|
+
"f-file-select": Ee
|
|
1133
1414
|
},
|
|
1134
|
-
props:
|
|
1415
|
+
props: he,
|
|
1135
1416
|
emits: ["filePreviewEvent", "fileDownloadEvent", "previewMultiSelectedEvent", "selectedEvent", "fileRemoveEvent", "fileRemovedEvent", "fUploadDoneEvent", "uploadDoneEvent"],
|
|
1136
1417
|
setup(t, e) {
|
|
1137
|
-
const
|
|
1138
|
-
|
|
1139
|
-
const a = B(t.customInfo),
|
|
1418
|
+
const n = B(), s = new Ht(n, t.uploadServerToken);
|
|
1419
|
+
$e("uploaderService", s);
|
|
1420
|
+
const a = B(t.customInfo), i = Ae(t.uploadOptions, {
|
|
1140
1421
|
// 允许上传的文件类型
|
|
1141
1422
|
allowedContentTypes: ["*"],
|
|
1142
1423
|
// 默认不限制附件上传个数
|
|
1143
1424
|
maxUploads: 0,
|
|
1144
1425
|
// 单位KB,默认是12M
|
|
1145
1426
|
maxFileSize: "12MB"
|
|
1146
|
-
}),
|
|
1427
|
+
}), d = B(null), {
|
|
1147
1428
|
disabled: u,
|
|
1148
|
-
uploadVisible:
|
|
1429
|
+
uploadVisible: v,
|
|
1149
1430
|
uploadDisabled: C,
|
|
1150
|
-
downloadButtonDisable:
|
|
1151
|
-
previewVisible:
|
|
1152
|
-
previewColumns:
|
|
1153
|
-
uploadFiles:
|
|
1154
|
-
innerFileInfos:
|
|
1155
|
-
previewEnableMulti:
|
|
1431
|
+
downloadButtonDisable: f,
|
|
1432
|
+
previewVisible: T,
|
|
1433
|
+
previewColumns: h,
|
|
1434
|
+
uploadFiles: D,
|
|
1435
|
+
innerFileInfos: E,
|
|
1436
|
+
previewEnableMulti: H,
|
|
1156
1437
|
previewMultiSelectedLength: g,
|
|
1157
|
-
previewSelectAllBtnChecked:
|
|
1158
|
-
uploadEnableMulti:
|
|
1438
|
+
previewSelectAllBtnChecked: I,
|
|
1439
|
+
uploadEnableMulti: y,
|
|
1159
1440
|
previewCurrentId: b,
|
|
1160
|
-
multiFileRemoveHandler:
|
|
1161
|
-
previewMultiSelectChangeHandler:
|
|
1441
|
+
multiFileRemoveHandler: A,
|
|
1442
|
+
previewMultiSelectChangeHandler: k,
|
|
1162
1443
|
fileMultiDownloadHandler: j,
|
|
1163
|
-
selectOrCancelAllHandler:
|
|
1164
|
-
rowSelectedHandler:
|
|
1165
|
-
hasColumnHtmlFunc:
|
|
1444
|
+
selectOrCancelAllHandler: ee,
|
|
1445
|
+
rowSelectedHandler: te,
|
|
1446
|
+
hasColumnHtmlFunc: W,
|
|
1166
1447
|
showPreviewStateColumn: Y,
|
|
1167
|
-
fileDownloadHandler:
|
|
1448
|
+
fileDownloadHandler: le,
|
|
1168
1449
|
filePreviewHandler: X,
|
|
1169
|
-
fileRemoveHandler:
|
|
1450
|
+
fileRemoveHandler: _,
|
|
1170
1451
|
handleStateChange: G
|
|
1171
|
-
} =
|
|
1172
|
-
|
|
1452
|
+
} = Re(t, e, d);
|
|
1453
|
+
Q(n, (r) => {
|
|
1173
1454
|
switch (G(r), r.type) {
|
|
1174
1455
|
case "removed":
|
|
1175
1456
|
e.emit("fileRemovedEvent", r.files[0]);
|
|
1176
1457
|
break;
|
|
1177
1458
|
}
|
|
1178
1459
|
});
|
|
1179
|
-
const
|
|
1180
|
-
function
|
|
1460
|
+
const M = N(() => E.value.length > 0);
|
|
1461
|
+
function F() {
|
|
1181
1462
|
var r;
|
|
1182
|
-
return
|
|
1463
|
+
return He((i == null ? void 0 : i.allowedContentTypes) || []) ? l("li", null, [l("span", null, [x("支持类型:")]), l("span", {
|
|
1183
1464
|
class: "support-info--item-detail",
|
|
1184
1465
|
style: "margin-right:4px;"
|
|
1185
|
-
}, [(r =
|
|
1466
|
+
}, [(r = i.allowedContentTypes) == null ? void 0 : r.join(""), x(",")])]) : "";
|
|
1186
1467
|
}
|
|
1187
|
-
function
|
|
1188
|
-
return
|
|
1468
|
+
function O() {
|
|
1469
|
+
return De((i == null ? void 0 : i.maxFileSize) || "") ? l("li", null, [l("span", null, [x("单个文件限制:")]), l("span", {
|
|
1189
1470
|
class: "support-info--item-detail"
|
|
1190
|
-
}, [
|
|
1471
|
+
}, [i.maxFileSize, x(", ")])]) : "";
|
|
1191
1472
|
}
|
|
1192
|
-
function
|
|
1193
|
-
return ((
|
|
1473
|
+
function ne() {
|
|
1474
|
+
return ((i == null ? void 0 : i.maxUploads) || 0) > 0 && l("li", null, [l("span", null, [x("文件总数限制:")]), l("span", {
|
|
1194
1475
|
class: "support-info--item-detail"
|
|
1195
|
-
}, [
|
|
1476
|
+
}, [i.maxUploads, x("个")])]);
|
|
1196
1477
|
}
|
|
1197
|
-
function
|
|
1198
|
-
return
|
|
1478
|
+
function P() {
|
|
1479
|
+
return v.value && !C.value && !u.value ? l("div", {
|
|
1199
1480
|
class: "ffileupload--support-info"
|
|
1200
|
-
}, [a.value ?
|
|
1481
|
+
}, [a.value ? l("ul", {
|
|
1201
1482
|
class: "support-info--wrapper"
|
|
1202
|
-
}, [
|
|
1483
|
+
}, [l("li", null, [l("span", {
|
|
1203
1484
|
class: "support-info--item-detail",
|
|
1204
1485
|
innerHTML: a.value
|
|
1205
|
-
}, null)])]) :
|
|
1486
|
+
}, null)])]) : l("ul", {
|
|
1206
1487
|
class: "support-info--wrapper"
|
|
1207
|
-
}, [
|
|
1488
|
+
}, [F(), O(), ne()])]) : null;
|
|
1208
1489
|
}
|
|
1209
|
-
function
|
|
1210
|
-
var
|
|
1211
|
-
return
|
|
1490
|
+
function de(r) {
|
|
1491
|
+
var p, S, U;
|
|
1492
|
+
return l("div", {
|
|
1212
1493
|
class: "uploadAndpreview--title-container"
|
|
1213
|
-
}, [
|
|
1494
|
+
}, [l("div", {
|
|
1214
1495
|
class: "ffilepreview--item-icon"
|
|
1215
|
-
}, [
|
|
1216
|
-
class: ["ffilepreview--filetype-icon",
|
|
1217
|
-
}, null)]),
|
|
1496
|
+
}, [l("span", {
|
|
1497
|
+
class: ["ffilepreview--filetype-icon", xe(((p = r.file) == null ? void 0 : p.name) || "")]
|
|
1498
|
+
}, null)]), l("div", {
|
|
1218
1499
|
class: "uploadAndpreview--right"
|
|
1219
|
-
}, [
|
|
1500
|
+
}, [l("a", {
|
|
1220
1501
|
class: "item-content--title",
|
|
1221
|
-
title: (
|
|
1222
|
-
}, [((
|
|
1502
|
+
title: (S = r.file) == null ? void 0 : S.name
|
|
1503
|
+
}, [((U = r.file) == null ? void 0 : U.name) || "无名称"]), l(V("f-upload-progress"), {
|
|
1223
1504
|
status: r.type === "done" ? "success" : "active",
|
|
1224
|
-
percent:
|
|
1505
|
+
percent: Ce(r),
|
|
1225
1506
|
maxWidth: 300
|
|
1226
1507
|
}, null)])]);
|
|
1227
1508
|
}
|
|
1228
|
-
function
|
|
1229
|
-
return
|
|
1509
|
+
function se(r) {
|
|
1510
|
+
return l("div", {
|
|
1230
1511
|
class: "uploadAndpreview--title-container"
|
|
1231
|
-
}, [
|
|
1512
|
+
}, [l("div", {
|
|
1232
1513
|
class: "ffilepreview--item-icon"
|
|
1233
|
-
}, [
|
|
1234
|
-
class: ["ffilepreview--filetype-icon",
|
|
1235
|
-
}, null)]),
|
|
1514
|
+
}, [l("span", {
|
|
1515
|
+
class: ["ffilepreview--filetype-icon", xe(r.name)]
|
|
1516
|
+
}, null)]), l("div", {
|
|
1236
1517
|
class: "uploadAndpreview--right"
|
|
1237
|
-
}, [
|
|
1518
|
+
}, [l("a", {
|
|
1238
1519
|
class: ["item-content--title", "previewButtonDisable.value?'no-preview':''"],
|
|
1239
1520
|
title: r.name,
|
|
1240
|
-
onClick: (
|
|
1521
|
+
onClick: (p) => X(p, r)
|
|
1241
1522
|
}, [r.name])])]);
|
|
1242
1523
|
}
|
|
1243
|
-
function
|
|
1244
|
-
return
|
|
1524
|
+
function ae(r, p, S) {
|
|
1525
|
+
return l("div", {
|
|
1245
1526
|
class: "uploadAndpreview--filesize-container"
|
|
1246
|
-
}, [r === "preview" &&
|
|
1527
|
+
}, [r === "preview" && S ? l("span", null, [gt(S.size)]) : null, r === "upload" && p ? l("span", null, [Ce(p)]) : null]);
|
|
1247
1528
|
}
|
|
1248
|
-
function o(r,
|
|
1249
|
-
return
|
|
1529
|
+
function o(r, p) {
|
|
1530
|
+
return p && p.type === "error" ? l("div", {
|
|
1250
1531
|
class: "uploadAndpreview--state-container"
|
|
1251
|
-
}, [
|
|
1532
|
+
}, [l("p", {
|
|
1252
1533
|
class: "upload-state--uploaded"
|
|
1253
|
-
}, [
|
|
1534
|
+
}, [l("i", {
|
|
1254
1535
|
class: "f-icon f-icon-message_warning text-danger"
|
|
1255
|
-
}, null),
|
|
1536
|
+
}, null), l("span", null, [x("存在异常")])])]) : l("div", {
|
|
1256
1537
|
class: "uploadAndpreview--state-container"
|
|
1257
|
-
}, [r === "upload" ?
|
|
1538
|
+
}, [r === "upload" ? p && p.type !== "done" ? l("p", {
|
|
1258
1539
|
class: "upload-state--uploading"
|
|
1259
|
-
}, [
|
|
1540
|
+
}, [l("i", {
|
|
1260
1541
|
class: "f-icon f-icon-clock text-warning"
|
|
1261
|
-
}, null),
|
|
1542
|
+
}, null), l("span", null, [x("正在上传...")])]) : l("p", {
|
|
1262
1543
|
class: "upload-state--uploaded"
|
|
1263
|
-
}, [
|
|
1544
|
+
}, [l("i", {
|
|
1264
1545
|
class: "f-icon f-icon-success text-success"
|
|
1265
|
-
}, null),
|
|
1546
|
+
}, null), l("span", null, [x("上传成功")])]) : r === "preview" ? l("p", {
|
|
1266
1547
|
class: "upload-state--uploaded"
|
|
1267
|
-
}, [
|
|
1548
|
+
}, [l("i", {
|
|
1268
1549
|
class: "f-icon f-icon-success text-success"
|
|
1269
|
-
}, null),
|
|
1550
|
+
}, null), l("span", null, [x("已上传")])]) : ""]);
|
|
1270
1551
|
}
|
|
1271
|
-
function
|
|
1272
|
-
return
|
|
1552
|
+
function c(r) {
|
|
1553
|
+
return l("div", {
|
|
1273
1554
|
class: "uploadAndpreview--action-container"
|
|
1274
|
-
}, [
|
|
1555
|
+
}, [f.value ? "" : l("button", {
|
|
1275
1556
|
class: "btn preview-btn",
|
|
1276
1557
|
title: "下载",
|
|
1277
|
-
onClick: (
|
|
1278
|
-
}, [
|
|
1558
|
+
onClick: (p) => le(p, r)
|
|
1559
|
+
}, [l("span", {
|
|
1279
1560
|
class: "f-icon f-icon-enclosure_download"
|
|
1280
|
-
}, null)]), t.previewButtonDisable ? "" :
|
|
1561
|
+
}, null)]), t.previewButtonDisable ? "" : l("button", {
|
|
1281
1562
|
class: "btn preview-btn",
|
|
1282
1563
|
title: "预览",
|
|
1283
|
-
onClick: (
|
|
1284
|
-
}, [
|
|
1564
|
+
onClick: (p) => X(p, r)
|
|
1565
|
+
}, [l("span", {
|
|
1285
1566
|
class: "f-icon f-icon-enclosure_browse"
|
|
1286
|
-
}, null)]), t.deleteButtonDisable ? "" :
|
|
1567
|
+
}, null)]), t.deleteButtonDisable ? "" : l("button", {
|
|
1287
1568
|
class: "btn preview-btn",
|
|
1288
1569
|
title: "删除",
|
|
1289
|
-
onClick: (
|
|
1290
|
-
}, [
|
|
1570
|
+
onClick: (p) => _(p, r, s)
|
|
1571
|
+
}, [l("span", {
|
|
1291
1572
|
class: "f-icon f-icon-enclosure_delete",
|
|
1292
1573
|
style: "top: -1px"
|
|
1293
1574
|
}, null)])]);
|
|
1294
1575
|
}
|
|
1295
|
-
function
|
|
1296
|
-
return
|
|
1576
|
+
function m(r) {
|
|
1577
|
+
return l("div", {
|
|
1297
1578
|
class: "uploadAndpreview--date-container"
|
|
1298
1579
|
}, [r.createTime || ""]);
|
|
1299
1580
|
}
|
|
1300
|
-
function
|
|
1301
|
-
let
|
|
1302
|
-
if (r = r || "preview",
|
|
1303
|
-
return
|
|
1304
|
-
if (r === "preview" &&
|
|
1305
|
-
switch (
|
|
1581
|
+
function w(r, p, S, U) {
|
|
1582
|
+
let R;
|
|
1583
|
+
if (r = r || "preview", U.formatter)
|
|
1584
|
+
return R = U.formatter(S[U.field] || "", r, r === "preview" ? S : p, U), R;
|
|
1585
|
+
if (r === "preview" && S)
|
|
1586
|
+
switch (U.field) {
|
|
1306
1587
|
case "state":
|
|
1307
|
-
|
|
1588
|
+
R = o("preview", null);
|
|
1308
1589
|
break;
|
|
1309
1590
|
case "name":
|
|
1310
|
-
|
|
1591
|
+
R = se(S);
|
|
1311
1592
|
break;
|
|
1312
1593
|
case "action":
|
|
1313
|
-
|
|
1594
|
+
R = c(S);
|
|
1314
1595
|
break;
|
|
1315
1596
|
case "size":
|
|
1316
|
-
|
|
1597
|
+
R = ae(r, p, S);
|
|
1317
1598
|
break;
|
|
1318
1599
|
case "createTime":
|
|
1319
|
-
|
|
1600
|
+
R = m(S);
|
|
1320
1601
|
break;
|
|
1321
1602
|
default:
|
|
1322
|
-
|
|
1603
|
+
R = `<div>${S[U.field] || ""} </div>`;
|
|
1323
1604
|
}
|
|
1324
|
-
if (r === "upload" &&
|
|
1325
|
-
switch (
|
|
1605
|
+
if (r === "upload" && p)
|
|
1606
|
+
switch (U.field) {
|
|
1326
1607
|
case "state":
|
|
1327
|
-
|
|
1608
|
+
R = o("upload", p);
|
|
1328
1609
|
break;
|
|
1329
1610
|
case "name":
|
|
1330
|
-
|
|
1611
|
+
R = de(p);
|
|
1331
1612
|
break;
|
|
1332
1613
|
case "size":
|
|
1333
|
-
|
|
1614
|
+
R = ae(r, p, S);
|
|
1334
1615
|
break;
|
|
1335
1616
|
default:
|
|
1336
|
-
|
|
1617
|
+
R = "";
|
|
1337
1618
|
}
|
|
1338
|
-
return
|
|
1619
|
+
return R;
|
|
1339
1620
|
}
|
|
1340
|
-
function
|
|
1341
|
-
return
|
|
1621
|
+
function z() {
|
|
1622
|
+
return v.value ? l("div", {
|
|
1342
1623
|
class: "header--left-container"
|
|
1343
|
-
}, [
|
|
1344
|
-
ref:
|
|
1624
|
+
}, [l(V("f-file-select"), {
|
|
1625
|
+
ref: d,
|
|
1345
1626
|
disabled: C.value,
|
|
1346
1627
|
selectText: t.selectText,
|
|
1347
1628
|
uploadedCount: t.uploadedCount,
|
|
1348
1629
|
uploadServerToken: t.uploadServerToken,
|
|
1349
|
-
enableMulti:
|
|
1630
|
+
enableMulti: y.value,
|
|
1350
1631
|
options: t.uploadOptions,
|
|
1351
1632
|
extendConfig: t.extendConfig,
|
|
1352
1633
|
onStateChange: (r) => G(r)
|
|
1353
1634
|
}, null)]) : null;
|
|
1354
1635
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return !
|
|
1636
|
+
function $() {
|
|
1637
|
+
return !v.value && T.value && M.value ? l("div", {
|
|
1357
1638
|
class: "header--left-container header--countInfo"
|
|
1358
|
-
}, [
|
|
1639
|
+
}, [l("p", {
|
|
1359
1640
|
class: "m-0"
|
|
1360
|
-
}, [
|
|
1641
|
+
}, [x("共"), l("span", {
|
|
1361
1642
|
class: "count"
|
|
1362
|
-
}, [
|
|
1643
|
+
}, [D.value.length + E.value.length]), x("个附件"), g.value > 0 ? l(J, null, [x("(已选"), l("span", {
|
|
1363
1644
|
class: "count-selected"
|
|
1364
|
-
}, [g.value]),
|
|
1645
|
+
}, [g.value]), x("个)")]) : ""])]) : null;
|
|
1365
1646
|
}
|
|
1366
|
-
function
|
|
1367
|
-
return (!
|
|
1647
|
+
function oe() {
|
|
1648
|
+
return (!f.value || !t.deleteButtonDisable) && T.value && M.value ? l("div", {
|
|
1368
1649
|
class: "header--right-container"
|
|
1369
|
-
}, [
|
|
1650
|
+
}, [f.value ? null : l("button", {
|
|
1370
1651
|
class: "btn btn-primary f-btn-ml",
|
|
1371
1652
|
disabled: g.value === 0,
|
|
1372
|
-
onClick: (
|
|
1373
|
-
}, [
|
|
1653
|
+
onClick: (S) => j(S)
|
|
1654
|
+
}, [x("下载")]), t.deleteButtonDisable.value ? null : l("button", {
|
|
1374
1655
|
class: "btn btn-secondary f-btn-ml",
|
|
1375
1656
|
disabled: g.value === 0,
|
|
1376
|
-
onClick: (
|
|
1377
|
-
}, [
|
|
1657
|
+
onClick: (S) => A(S)
|
|
1658
|
+
}, [x("删除")])]) : null;
|
|
1378
1659
|
}
|
|
1379
|
-
function
|
|
1380
|
-
return
|
|
1660
|
+
function we() {
|
|
1661
|
+
return h.value.map((r) => Y(r) ? l("th", {
|
|
1381
1662
|
style: {
|
|
1382
1663
|
width: r.width ? r.width + "px" : "auto"
|
|
1383
1664
|
},
|
|
1384
1665
|
class: [!u.value && r.checkbox && r.checkbox ? "td--hascheckbox" : ""]
|
|
1385
|
-
}, [!u.value &&
|
|
1666
|
+
}, [!u.value && H.value && r.checkbox ? l(V("f-preview-checkbox"), {
|
|
1386
1667
|
class: "preview-checkbox",
|
|
1387
1668
|
id: "previewMultiBtn",
|
|
1388
|
-
checked:
|
|
1389
|
-
onCheckedChange: (
|
|
1669
|
+
checked: I.value,
|
|
1670
|
+
onCheckedChange: (p) => ee(p)
|
|
1390
1671
|
}, null) : null, r.title]) : null);
|
|
1391
1672
|
}
|
|
1392
|
-
function
|
|
1393
|
-
return
|
|
1394
|
-
var
|
|
1395
|
-
return
|
|
1673
|
+
function Ne() {
|
|
1674
|
+
return D.value.map((r) => {
|
|
1675
|
+
var p;
|
|
1676
|
+
return l("tr", {
|
|
1396
1677
|
class: "uploadAndpreview--upload-item",
|
|
1397
|
-
id: "uploadAndpreview--upload-item" + (((
|
|
1398
|
-
}, [
|
|
1399
|
-
var
|
|
1400
|
-
return
|
|
1401
|
-
class: [!u.value &&
|
|
1402
|
-
}, [
|
|
1403
|
-
id: (
|
|
1678
|
+
id: "uploadAndpreview--upload-item" + (((p = r == null ? void 0 : r.file) == null ? void 0 : p.id) || "")
|
|
1679
|
+
}, [h.value.map((S) => {
|
|
1680
|
+
var U;
|
|
1681
|
+
return l("td", {
|
|
1682
|
+
class: [!u.value && S.checkbox && S.checkbox ? "td--hascheckbox" : ""]
|
|
1683
|
+
}, [H.value && S.checkbox ? l(V("f-preview-checkbox"), {
|
|
1684
|
+
id: (U = r == null ? void 0 : r.file) == null ? void 0 : U.id,
|
|
1404
1685
|
checked: r.checked,
|
|
1405
1686
|
disabled: r.type !== "done",
|
|
1406
1687
|
class: "preview-checkbox",
|
|
1407
|
-
onCheckedChange: (
|
|
1408
|
-
}, null) : null,
|
|
1688
|
+
onCheckedChange: (R) => k(R)
|
|
1689
|
+
}, null) : null, W(S, "upload") ? w("upload", r, null, S) : null]);
|
|
1409
1690
|
})]);
|
|
1410
1691
|
});
|
|
1411
1692
|
}
|
|
1412
|
-
function
|
|
1413
|
-
return
|
|
1693
|
+
function ye() {
|
|
1694
|
+
return E.value.map((r) => l("tr", {
|
|
1414
1695
|
class: ["uploadAndpreview--preview-item", b.value === r.id ? "uploadAndpreview--currentfile" : ""],
|
|
1415
1696
|
id: "uploadAndpreview--preview-item" + r.id,
|
|
1416
|
-
onClick: (
|
|
1417
|
-
}, [
|
|
1418
|
-
class: [!u.value &&
|
|
1419
|
-
}, [!u.value &&
|
|
1697
|
+
onClick: (p) => te(p, r)
|
|
1698
|
+
}, [h.value.map((p) => Y(p) ? l("td", {
|
|
1699
|
+
class: [!u.value && p.checkbox && p.checkbox ? "td--hascheckbox" : ""]
|
|
1700
|
+
}, [!u.value && H.value && p.checkbox ? l(V("f-preview-checkbox"), {
|
|
1420
1701
|
id: r.id,
|
|
1421
1702
|
checked: r.checked,
|
|
1422
1703
|
class: "preview-checkbox",
|
|
1423
|
-
onCheckedChange: (
|
|
1424
|
-
}, null) : null,
|
|
1704
|
+
onCheckedChange: (S) => k(S)
|
|
1705
|
+
}, null) : null, W(p, "preview") ? w("preview", null, r, p) : l("div", {
|
|
1425
1706
|
class: "text-truncate",
|
|
1426
|
-
innerHTML:
|
|
1707
|
+
innerHTML: w("preview", null, r, p)
|
|
1427
1708
|
}, null)]) : null)]));
|
|
1428
1709
|
}
|
|
1429
|
-
return () => u.value ?
|
|
1710
|
+
return () => u.value ? l("div", {
|
|
1430
1711
|
class: "fv-upload-and-preview"
|
|
1431
|
-
}, [
|
|
1712
|
+
}, [M.value ? null : P(), T.value ? l("div", {
|
|
1432
1713
|
class: "uploadAndpreview--content"
|
|
1433
|
-
}, [
|
|
1714
|
+
}, [M.value ? l("table", {
|
|
1434
1715
|
class: "table table-bordered uploadAndpreview--table"
|
|
1435
|
-
}, [
|
|
1716
|
+
}, [l("thead", null, [we()]), l("tbody", null, [ye()])]) : l("p", {
|
|
1436
1717
|
class: "uploadAndpreview--nodata"
|
|
1437
|
-
}, [
|
|
1718
|
+
}, [x("无附件信息")])]) : null, M.value ? P() : null]) : l("div", {
|
|
1438
1719
|
class: "fv-upload-and-preview"
|
|
1439
|
-
}, [
|
|
1720
|
+
}, [l("div", {
|
|
1440
1721
|
class: "uploadAndpreview--header"
|
|
1441
|
-
}, [
|
|
1722
|
+
}, [z(), $(), oe()]), M.value ? null : P(), T.value || v.value ? l("div", {
|
|
1442
1723
|
class: "uploadAndpreview--content"
|
|
1443
|
-
}, [(
|
|
1724
|
+
}, [(f.value || !v.value) && D.value.length === 0 && !M.value ? l("p", {
|
|
1444
1725
|
class: "uploadAndpreview--nodata"
|
|
1445
|
-
}, [
|
|
1726
|
+
}, [x("无附件信息")]) : "", D.value.length > 0 || M ? l("table", {
|
|
1446
1727
|
class: "table table-bordered uploadAndpreview--table"
|
|
1447
|
-
}, [
|
|
1728
|
+
}, [l("thead", null, [we()]), l("tbody", null, [Ne(), ye()])]) : null]) : null, M.value ? P() : null]);
|
|
1448
1729
|
}
|
|
1449
|
-
}),
|
|
1730
|
+
}), Dt = /* @__PURE__ */ K({
|
|
1731
|
+
name: "FUploaderDesign",
|
|
1732
|
+
components: {
|
|
1733
|
+
"f-preview-checkbox": Te,
|
|
1734
|
+
"f-file-select": Ee
|
|
1735
|
+
},
|
|
1736
|
+
props: he,
|
|
1737
|
+
emits: ["filePreviewEvent", "fileDownloadEvent", "previewMultiSelectedEvent", "selectedEvent", "fileRemoveEvent", "fUploadDoneEvent", "uploadDoneEvent"],
|
|
1738
|
+
setup(t, e) {
|
|
1739
|
+
const n = B(t.customInfo), s = Ae(t.uploadOptions, {
|
|
1740
|
+
// 允许上传的文件类型
|
|
1741
|
+
allowedContentTypes: ["*"],
|
|
1742
|
+
// 默认不限制附件上传个数
|
|
1743
|
+
maxUploads: 0,
|
|
1744
|
+
// 单位KB,默认是12M
|
|
1745
|
+
maxFileSize: "12MB"
|
|
1746
|
+
}), a = B(null), i = [{
|
|
1747
|
+
id: "attach01",
|
|
1748
|
+
name: ""
|
|
1749
|
+
}, {
|
|
1750
|
+
id: "attach02",
|
|
1751
|
+
name: ""
|
|
1752
|
+
}], {
|
|
1753
|
+
disabled: d,
|
|
1754
|
+
uploadVisible: u,
|
|
1755
|
+
uploadDisabled: v,
|
|
1756
|
+
downloadButtonDisable: C,
|
|
1757
|
+
previewVisible: f,
|
|
1758
|
+
previewColumns: T,
|
|
1759
|
+
previewEnableMulti: h,
|
|
1760
|
+
previewCurrentId: D,
|
|
1761
|
+
showPreviewStateColumn: E
|
|
1762
|
+
} = Re(t, e, a);
|
|
1763
|
+
function H() {
|
|
1764
|
+
var F;
|
|
1765
|
+
return He((s == null ? void 0 : s.allowedContentTypes) || []) ? l("li", null, [l("span", null, [x("支持类型:")]), l("span", {
|
|
1766
|
+
class: "support-info--item-detail",
|
|
1767
|
+
style: "margin-right:4px;"
|
|
1768
|
+
}, [(F = s.allowedContentTypes) == null ? void 0 : F.join(""), x(",")])]) : null;
|
|
1769
|
+
}
|
|
1770
|
+
function g() {
|
|
1771
|
+
return De((s == null ? void 0 : s.maxFileSize) || "") ? l("li", null, [l("span", null, [x("单个文件限制:")]), l("span", {
|
|
1772
|
+
class: "support-info--item-detail"
|
|
1773
|
+
}, [s.maxFileSize, x(", ")])]) : null;
|
|
1774
|
+
}
|
|
1775
|
+
function I() {
|
|
1776
|
+
return ((s == null ? void 0 : s.maxUploads) || 0) > 0 ? l("li", null, [l("span", null, [x("文件总数限制:")]), l("span", {
|
|
1777
|
+
class: "support-info--item-detail"
|
|
1778
|
+
}, [s.maxUploads, x("个")])]) : null;
|
|
1779
|
+
}
|
|
1780
|
+
function y() {
|
|
1781
|
+
return u.value && !v.value && !d.value ? l("div", {
|
|
1782
|
+
class: "ffileupload--support-info"
|
|
1783
|
+
}, [n.value ? l("ul", {
|
|
1784
|
+
class: "support-info--wrapper"
|
|
1785
|
+
}, [l("li", null, [l("span", {
|
|
1786
|
+
class: "support-info--item-detail",
|
|
1787
|
+
innerHTML: n.value
|
|
1788
|
+
}, null)])]) : l("ul", {
|
|
1789
|
+
class: "support-info--wrapper"
|
|
1790
|
+
}, [H(), g(), I()])]) : null;
|
|
1791
|
+
}
|
|
1792
|
+
function b(F) {
|
|
1793
|
+
return l("div", {
|
|
1794
|
+
class: "uploadAndpreview--title-container"
|
|
1795
|
+
}, [l("div", {
|
|
1796
|
+
class: "ffilepreview--item-icon"
|
|
1797
|
+
}, [l("span", {
|
|
1798
|
+
class: "ffilepreview--filetype-icon"
|
|
1799
|
+
}, null)]), l("div", {
|
|
1800
|
+
class: "uploadAndpreview--right"
|
|
1801
|
+
}, [l("span", {
|
|
1802
|
+
class: "ffilepreview--preview-block"
|
|
1803
|
+
}, null)])]);
|
|
1804
|
+
}
|
|
1805
|
+
function A(F) {
|
|
1806
|
+
return l("div", {
|
|
1807
|
+
class: "uploadAndpreview--filesize-container"
|
|
1808
|
+
}, [l("span", {
|
|
1809
|
+
class: "ffilepreview--preview-block"
|
|
1810
|
+
}, null)]);
|
|
1811
|
+
}
|
|
1812
|
+
function k() {
|
|
1813
|
+
return l("div", {
|
|
1814
|
+
class: "uploadAndpreview--state-container"
|
|
1815
|
+
}, [l("p", {
|
|
1816
|
+
class: "upload-state--uploaded"
|
|
1817
|
+
}, [l("i", {
|
|
1818
|
+
class: "f-icon f-icon-success text-success"
|
|
1819
|
+
}, null), l("span", null, [x("已上传")])])]);
|
|
1820
|
+
}
|
|
1821
|
+
function j(F) {
|
|
1822
|
+
return l("div", {
|
|
1823
|
+
class: "uploadAndpreview--action-container"
|
|
1824
|
+
}, [C.value ? "" : l("button", {
|
|
1825
|
+
class: "btn preview-btn",
|
|
1826
|
+
title: "下载"
|
|
1827
|
+
}, [l("span", {
|
|
1828
|
+
class: "f-icon f-icon-enclosure_download"
|
|
1829
|
+
}, null)]), t.previewButtonDisable ? "" : l("button", {
|
|
1830
|
+
class: "btn preview-btn",
|
|
1831
|
+
title: "预览"
|
|
1832
|
+
}, [l("span", {
|
|
1833
|
+
class: "f-icon f-icon-enclosure_browse"
|
|
1834
|
+
}, null)]), t.deleteButtonDisable ? "" : l("button", {
|
|
1835
|
+
class: "btn preview-btn",
|
|
1836
|
+
title: "删除"
|
|
1837
|
+
}, [l("span", {
|
|
1838
|
+
class: "f-icon f-icon-enclosure_delete",
|
|
1839
|
+
style: "top: -1px"
|
|
1840
|
+
}, null)])]);
|
|
1841
|
+
}
|
|
1842
|
+
function ee(F) {
|
|
1843
|
+
return l("div", {
|
|
1844
|
+
class: "uploadAndpreview--date-container"
|
|
1845
|
+
}, [x(" "), l("span", {
|
|
1846
|
+
class: "ffilepreview--preview-block"
|
|
1847
|
+
}, null)]);
|
|
1848
|
+
}
|
|
1849
|
+
function te(F, O, ne) {
|
|
1850
|
+
let P = null;
|
|
1851
|
+
if (F = F || "preview", F === "preview" && O)
|
|
1852
|
+
switch (ne.field) {
|
|
1853
|
+
case "state":
|
|
1854
|
+
P = k();
|
|
1855
|
+
break;
|
|
1856
|
+
case "name":
|
|
1857
|
+
P = b();
|
|
1858
|
+
break;
|
|
1859
|
+
case "action":
|
|
1860
|
+
P = j();
|
|
1861
|
+
break;
|
|
1862
|
+
case "size":
|
|
1863
|
+
P = A();
|
|
1864
|
+
break;
|
|
1865
|
+
case "createTime":
|
|
1866
|
+
P = ee();
|
|
1867
|
+
break;
|
|
1868
|
+
default:
|
|
1869
|
+
P = l("span", {
|
|
1870
|
+
class: "ffilepreview--preview-block"
|
|
1871
|
+
}, null);
|
|
1872
|
+
}
|
|
1873
|
+
return P;
|
|
1874
|
+
}
|
|
1875
|
+
function W() {
|
|
1876
|
+
return u.value ? l("div", {
|
|
1877
|
+
class: "header--left-container"
|
|
1878
|
+
}, [l(V("f-file-select"), {
|
|
1879
|
+
ref: a,
|
|
1880
|
+
disabled: v.value,
|
|
1881
|
+
selectText: t.selectText
|
|
1882
|
+
}, null)]) : null;
|
|
1883
|
+
}
|
|
1884
|
+
function Y() {
|
|
1885
|
+
return (!C.value || !t.deleteButtonDisable) && f.value ? l("div", {
|
|
1886
|
+
class: "header--right-container"
|
|
1887
|
+
}, [C.value ? null : l("button", {
|
|
1888
|
+
class: "btn btn-primary f-btn-ml",
|
|
1889
|
+
disabled: !0
|
|
1890
|
+
}, [x("下载")]), t.deleteButtonDisable.value ? null : l("button", {
|
|
1891
|
+
class: "btn btn-secondary f-btn-ml",
|
|
1892
|
+
disabled: !0
|
|
1893
|
+
}, [x("删除")])]) : null;
|
|
1894
|
+
}
|
|
1895
|
+
function le() {
|
|
1896
|
+
return T.value.map((F) => E(F) ? l("th", {
|
|
1897
|
+
style: {
|
|
1898
|
+
width: F.width ? F.width + "px" : "auto"
|
|
1899
|
+
},
|
|
1900
|
+
class: [!d.value && F.checkbox && F.checkbox ? "td--hascheckbox" : ""]
|
|
1901
|
+
}, [!d.value && h.value && F.checkbox ? l(V("f-preview-checkbox"), {
|
|
1902
|
+
class: "preview-checkbox",
|
|
1903
|
+
id: "previewMultiBtn"
|
|
1904
|
+
}, null) : null, F.title]) : null);
|
|
1905
|
+
}
|
|
1906
|
+
function X() {
|
|
1907
|
+
return i.map((F) => l("tr", {
|
|
1908
|
+
class: ["uploadAndpreview--preview-item", D.value === F.id ? "uploadAndpreview--currentfile" : ""],
|
|
1909
|
+
id: "uploadAndpreview--preview-item" + F.id
|
|
1910
|
+
}, [T.value.map((O) => E(O) ? l("td", {
|
|
1911
|
+
class: [!d.value && O.checkbox && O.checkbox ? "td--hascheckbox" : ""]
|
|
1912
|
+
}, [!d.value && h.value && O.checkbox ? l(V("f-preview-checkbox"), {
|
|
1913
|
+
class: "preview-checkbox"
|
|
1914
|
+
}, null) : null, te("preview", F, O)]) : null)]));
|
|
1915
|
+
}
|
|
1916
|
+
Ve(() => {
|
|
1917
|
+
});
|
|
1918
|
+
const _ = B(), G = Z("design-item-context"), M = Ye(_, G);
|
|
1919
|
+
return ve(() => {
|
|
1920
|
+
_.value.componentInstance = M;
|
|
1921
|
+
}), e.expose(M.value), () => l("div", {
|
|
1922
|
+
class: "fv-upload-and-preview",
|
|
1923
|
+
ref: _
|
|
1924
|
+
}, [f.value || u.value ? l(J, null, [d.value ? null : l("div", {
|
|
1925
|
+
class: "uploadAndpreview--header"
|
|
1926
|
+
}, [W(), Y()]), l("div", {
|
|
1927
|
+
class: "uploadAndpreview--content"
|
|
1928
|
+
}, [l("table", {
|
|
1929
|
+
class: "table table-bordered uploadAndpreview--table"
|
|
1930
|
+
}, [l("thead", null, [le()]), l("tbody", null, [X()])])]), y()]) : null]);
|
|
1931
|
+
}
|
|
1932
|
+
});
|
|
1933
|
+
ue.register = (t, e, n, s) => {
|
|
1934
|
+
t.uploader = ue, e.uploader = Be;
|
|
1935
|
+
};
|
|
1936
|
+
ue.registerDesigner = (t, e, n) => {
|
|
1937
|
+
t.uploader = Dt, e.uploader = Be;
|
|
1938
|
+
};
|
|
1939
|
+
const Ut = We(ue);
|
|
1450
1940
|
export {
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1941
|
+
ue as FUploader,
|
|
1942
|
+
mt as UploadServerAPI,
|
|
1943
|
+
Ut as default,
|
|
1944
|
+
Be as propsResolver,
|
|
1945
|
+
he as uploaderProps
|
|
1455
1946
|
};
|