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