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