@duxweb/dvha-pro 0.0.7 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/component.cjs +1 -1
- package/dist/cjs/components/card/card.cjs +1 -1
- package/dist/cjs/components/card/store.cjs +1 -0
- package/dist/cjs/components/chart/echart.cjs +1 -1
- package/dist/cjs/components/crop/imageCrop.cjs +1 -0
- package/dist/cjs/components/crop/imageCropModal.cjs +1 -0
- package/dist/cjs/components/dashboard/helloBig.cjs +1 -1
- package/dist/cjs/components/data/dynamicData.cjs +1 -0
- package/dist/cjs/components/data/dynamicSelect.cjs +1 -0
- package/dist/cjs/components/data/selectModal.cjs +1 -0
- package/dist/cjs/components/dialog/dialog.cjs +1 -1
- package/dist/cjs/components/drawer/drawer.cjs +1 -1
- package/dist/cjs/components/editor/aiEditor.cjs +1 -0
- package/dist/cjs/components/form/modalForm.cjs +1 -1
- package/dist/cjs/components/form/pageForm.cjs +1 -1
- package/dist/cjs/components/form/settingForm.cjs +1 -1
- package/dist/cjs/components/layout/list.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/components/level/level.cjs +1 -0
- package/dist/cjs/components/media/media.cjs +1 -1
- package/dist/cjs/components/modal/modal.cjs +1 -1
- package/dist/cjs/components/modal/modalPage.cjs +1 -1
- package/dist/cjs/components/panel/setting.cjs +1 -1
- package/dist/cjs/components/stats/number.cjs +1 -0
- package/dist/cjs/components/stats/realTime.cjs +1 -0
- package/dist/cjs/components/status/blockEmpty.cjs +1 -1
- package/dist/cjs/components/upload/file.cjs +1 -0
- package/dist/cjs/components/upload/image.cjs +1 -0
- package/dist/cjs/components/upload/manage/item.cjs +1 -0
- package/dist/cjs/components/upload/manager.cjs +1 -0
- package/dist/cjs/components/widget/avatar.cjs +1 -0
- package/dist/cjs/components/widget/connect.cjs +1 -1
- package/dist/cjs/components/widget/image.cjs +1 -0
- package/dist/cjs/components/widget/placeholder.cjs +1 -0
- package/dist/cjs/config/uno.cjs +1 -1
- package/dist/cjs/config/validate.cjs +1 -1
- package/dist/cjs/hooks/action.cjs +1 -1
- package/dist/cjs/hooks/dialog.cjs +1 -1
- package/dist/cjs/hooks/download.cjs +1 -0
- package/dist/cjs/hooks/drawer.cjs +1 -1
- package/dist/cjs/hooks/echart.cjs +1 -1
- package/dist/cjs/hooks/image.cjs +1 -0
- package/dist/cjs/hooks/level.cjs +1 -0
- package/dist/cjs/hooks/modal.cjs +1 -1
- package/dist/cjs/hooks/table/copy.cjs +1 -1
- package/dist/cjs/hooks/table/image.cjs +1 -1
- package/dist/cjs/hooks/table/input.cjs +1 -1
- package/dist/cjs/hooks/table/media.cjs +1 -1
- package/dist/cjs/hooks/table.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/langs/en-US.json.cjs +1 -1
- package/dist/cjs/langs/zh-CN.json.cjs +1 -1
- package/dist/cjs/main.cjs +1 -1
- package/dist/cjs/pages/authLayout.cjs +1 -1
- package/dist/cjs/pages/layout/global.cjs +1 -1
- package/dist/cjs/pages/layout/page.cjs +1 -1
- package/dist/cjs/pages/login.cjs +1 -1
- package/dist/cjs/pages/menu/avatar.cjs +1 -1
- package/dist/cjs/pages/menu/button.cjs +1 -1
- package/dist/cjs/pages/menu/cmd.cjs +1 -1
- package/dist/cjs/pages/menu/main.cjs +1 -1
- package/dist/cjs/pages/menu/mobile.cjs +1 -1
- package/dist/cjs/pages/page.cjs +1 -1
- package/dist/cjs/pages/page404.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/static/images/icon/audio.svg.cjs +1 -0
- package/dist/cjs/static/images/icon/excel.svg.cjs +1 -0
- package/dist/cjs/static/images/icon/file.svg.cjs +1 -0
- package/dist/cjs/static/images/icon/folder.svg.cjs +1 -0
- package/dist/cjs/static/images/icon/pdf.svg.cjs +1 -0
- package/dist/cjs/static/images/icon/ppt.svg.cjs +1 -0
- package/dist/cjs/static/images/icon/video.svg.cjs +1 -0
- package/dist/cjs/static/images/icon/word.svg.cjs +1 -0
- package/dist/cjs/stores/ui.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +108 -12
- package/dist/esm/component.js +64 -47
- package/dist/esm/components/card/card.js +22 -21
- package/dist/esm/components/card/store.js +64 -0
- package/dist/esm/components/chart/echart.js +29 -16
- package/dist/esm/components/crop/imageCrop.js +105 -0
- package/dist/esm/components/crop/imageCropModal.js +118 -0
- package/dist/esm/components/dashboard/helloBig.js +3 -2
- package/dist/esm/components/data/dynamicData.js +145 -0
- package/dist/esm/components/data/dynamicSelect.js +109 -0
- package/dist/esm/components/data/selectModal.js +135 -0
- package/dist/esm/components/dialog/dialog.js +50 -38
- package/dist/esm/components/drawer/drawer.js +14 -12
- package/dist/esm/components/editor/aiEditor.js +127 -0
- package/dist/esm/components/form/modalForm.js +66 -40
- package/dist/esm/components/form/pageForm.js +31 -21
- package/dist/esm/components/form/settingForm.js +31 -21
- package/dist/esm/components/layout/list.js +67 -57
- package/dist/esm/components/layout/table.js +59 -49
- package/dist/esm/components/level/level.js +103 -0
- package/dist/esm/components/media/media.js +18 -16
- package/dist/esm/components/modal/modal.js +27 -21
- package/dist/esm/components/modal/modalPage.js +7 -7
- package/dist/esm/components/panel/setting.js +9 -6
- package/dist/esm/components/stats/number.js +49 -0
- package/dist/esm/components/stats/realTime.js +99 -0
- package/dist/esm/components/status/blockEmpty.js +136 -57
- package/dist/esm/components/upload/file.js +258 -0
- package/dist/esm/components/upload/image.js +189 -0
- package/dist/esm/components/upload/manage/item.js +178 -0
- package/dist/esm/components/upload/manager.js +378 -0
- package/dist/esm/components/widget/avatar.js +59 -0
- package/dist/esm/components/widget/connect.js +6 -4
- package/dist/esm/components/widget/image.js +67 -0
- package/dist/esm/components/widget/placeholder.js +83 -0
- package/dist/esm/config/uno.js +6 -6
- package/dist/esm/config/validate.js +2 -2
- package/dist/esm/hooks/action.js +34 -34
- package/dist/esm/hooks/dialog.js +13 -3
- package/dist/esm/hooks/download.js +100 -0
- package/dist/esm/hooks/drawer.js +13 -3
- package/dist/esm/hooks/echart.js +292 -246
- package/dist/esm/hooks/image.js +23 -0
- package/dist/esm/hooks/level.js +75 -0
- package/dist/esm/hooks/modal.js +14 -4
- package/dist/esm/hooks/table/copy.js +14 -11
- package/dist/esm/hooks/table/image.js +55 -17
- package/dist/esm/hooks/table/input.js +35 -33
- package/dist/esm/hooks/table/media.js +17 -7
- package/dist/esm/hooks/table.js +41 -25
- package/dist/esm/index.js +198 -160
- package/dist/esm/langs/en-US.json.js +6 -4
- package/dist/esm/langs/zh-CN.json.js +5 -3
- package/dist/esm/main.js +8 -6
- package/dist/esm/pages/authLayout.js +24 -18
- package/dist/esm/pages/layout/global.js +29 -23
- package/dist/esm/pages/layout/page.js +26 -16
- package/dist/esm/pages/login.js +33 -23
- package/dist/esm/pages/menu/avatar.js +122 -93
- package/dist/esm/pages/menu/button.js +23 -13
- package/dist/esm/pages/menu/cmd.js +41 -31
- package/dist/esm/pages/menu/main.js +38 -28
- package/dist/esm/pages/menu/mobile.js +20 -10
- package/dist/esm/pages/page.js +21 -14
- package/dist/esm/pages/page404.js +15 -5
- package/dist/esm/pages/pageStatus.js +22 -12
- package/dist/esm/static/images/icon/audio.svg.js +4 -0
- package/dist/esm/static/images/icon/excel.svg.js +4 -0
- package/dist/esm/static/images/icon/file.svg.js +4 -0
- package/dist/esm/static/images/icon/folder.svg.js +4 -0
- package/dist/esm/static/images/icon/pdf.svg.js +4 -0
- package/dist/esm/static/images/icon/ppt.svg.js +4 -0
- package/dist/esm/static/images/icon/video.svg.js +4 -0
- package/dist/esm/static/images/icon/word.svg.js +4 -0
- package/dist/esm/stores/ui.js +10 -10
- package/dist/esm/theme/uno.css.js +108 -12
- package/dist/types/components/card/index.d.ts +1 -0
- package/dist/types/components/card/store.d.ts +16 -0
- package/dist/types/components/chart/echart.d.ts +2 -2
- package/dist/types/components/crop/imageCrop.d.ts +40 -0
- package/dist/types/components/crop/imageCropModal.d.ts +7 -0
- package/dist/types/components/crop/index.d.ts +2 -0
- package/dist/types/components/data/dynamicData.d.ts +56 -0
- package/dist/types/components/data/dynamicSelect.d.ts +49 -0
- package/dist/types/components/data/index.d.ts +3 -0
- package/dist/types/components/data/selectModal.d.ts +61 -0
- package/dist/types/components/dialog/dialog.d.ts +2 -0
- package/dist/types/components/editor/aiEditor.d.ts +26 -0
- package/dist/types/components/editor/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +7 -0
- package/dist/types/components/level/index.d.ts +1 -0
- package/dist/types/components/level/level.d.ts +60 -0
- package/dist/types/components/modal/index.d.ts +2 -2
- package/dist/types/components/modal/modal.d.ts +1 -4
- package/dist/types/components/stats/index.d.ts +2 -0
- package/dist/types/components/stats/number.d.ts +50 -0
- package/dist/types/components/stats/realTime.d.ts +56 -0
- package/dist/types/components/upload/file.d.ts +9 -0
- package/dist/types/components/upload/image.d.ts +99 -0
- package/dist/types/components/upload/index.d.ts +4 -0
- package/dist/types/components/upload/manage/item.d.ts +22 -0
- package/dist/types/components/upload/manager.d.ts +37 -0
- package/dist/types/components/widget/avatar.d.ts +159 -0
- package/dist/types/components/widget/image.d.ts +257 -0
- package/dist/types/components/widget/index.d.ts +2 -0
- package/dist/types/components/widget/placeholder.d.ts +22 -0
- package/dist/types/hooks/dialog.d.ts +1 -0
- package/dist/types/hooks/download.d.ts +31 -0
- package/dist/types/hooks/echart.d.ts +14 -0
- package/dist/types/hooks/image.d.ts +3 -0
- package/dist/types/hooks/index.d.ts +3 -0
- package/dist/types/hooks/level.d.ts +19 -0
- package/dist/types/main.d.ts +12 -0
- package/dist/types/static/images/icon/index.d.ts +8 -0
- package/package.json +9 -3
- package/dist/cjs/_virtual/_commonjsHelpers.cjs +0 -1
- package/dist/cjs/_virtual/browser.cjs +0 -1
- package/dist/cjs/_virtual/browser2.cjs +0 -1
- package/dist/cjs/_virtual/sourcemap-codec.umd.cjs +0 -1
- package/dist/cjs/_virtual/sourcemap-codec.umd2.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify-json_tabler@1.2.19/node_modules/@iconify-json/tabler/icons.json.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/customisations/defaults.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/defaults.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/merge.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/transformations.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/get-icon.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/tree.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/custom.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/loader.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/modern.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/utils.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/build.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/defs.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/size.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/trim.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/url.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_core@66.2.3/node_modules/@unocss/core/dist/index.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_extractor-arbitrary-variants@66.2.3/node_modules/@unocss/extractor-arbitrary-variants/dist/index.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_preset-icons@66.2.3/node_modules/@unocss/preset-icons/dist/browser.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_preset-icons@66.2.3/node_modules/@unocss/preset-icons/dist/core.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_preset-icons@66.2.3/node_modules/@unocss/preset-icons/dist/shared/preset-icons.DE2iazBM.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/colors.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/index.cjs +0 -391
- package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/postprocess.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.BgkAsChl.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.BwwuP5Yw.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.CYAfjDEV.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.CgvxUQFi.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.dDC8WtZ5.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/theme.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@unocss_rule-utils@66.2.3/node_modules/@unocss/rule-utils/dist/index.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@vee-validate_i18n@4.15.1/node_modules/@vee-validate/i18n/dist/locale/en.json.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/@vee-validate_i18n@4.15.1/node_modules/@vee-validate/i18n/dist/locale/zh_CN.json.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.cjs +0 -10
- package/dist/cjs/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/ofetch@1.4.1/node_modules/ofetch/dist/index.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/ofetch@1.4.1/node_modules/ofetch/dist/shared/ofetch.03887fc3.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/ufo@1.6.1/node_modules/ufo/dist/index.cjs +0 -1
- package/dist/cjs/static/images/placeholder.png.cjs +0 -1
- package/dist/esm/_virtual/_commonjsHelpers.js +0 -6
- package/dist/esm/_virtual/browser.js +0 -7
- package/dist/esm/_virtual/browser2.js +0 -4
- package/dist/esm/_virtual/sourcemap-codec.umd.js +0 -5
- package/dist/esm/_virtual/sourcemap-codec.umd2.js +0 -4
- package/dist/esm/node_modules/.pnpm/@iconify-json_tabler@1.2.19/node_modules/@iconify-json/tabler/icons.json.js +0 -17
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/customisations/defaults.js +0 -14
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/defaults.js +0 -25
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/merge.js +0 -11
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/transformations.js +0 -9
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/get-icon.js +0 -23
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/tree.js +0 -17
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/custom.js +0 -40
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/loader.js +0 -46
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/modern.js +0 -55
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/loader/utils.js +0 -38
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/build.js +0 -69
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/defs.js +0 -29
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +0 -14
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/size.js +0 -27
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/trim.js +0 -6
- package/dist/esm/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/url.js +0 -6
- package/dist/esm/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +0 -255
- package/dist/esm/node_modules/.pnpm/@unocss_core@66.2.3/node_modules/@unocss/core/dist/index.js +0 -88
- package/dist/esm/node_modules/.pnpm/@unocss_extractor-arbitrary-variants@66.2.3/node_modules/@unocss/extractor-arbitrary-variants/dist/index.js +0 -51
- package/dist/esm/node_modules/.pnpm/@unocss_preset-icons@66.2.3/node_modules/@unocss/preset-icons/dist/browser.js +0 -17
- package/dist/esm/node_modules/.pnpm/@unocss_preset-icons@66.2.3/node_modules/@unocss/preset-icons/dist/core.js +0 -151
- package/dist/esm/node_modules/.pnpm/@unocss_preset-icons@66.2.3/node_modules/@unocss/preset-icons/dist/shared/preset-icons.DE2iazBM.js +0 -8
- package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/colors.js +0 -322
- package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/index.js +0 -547
- package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/postprocess.js +0 -32
- package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.BgkAsChl.js +0 -2307
- package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.BwwuP5Yw.js +0 -627
- package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.CYAfjDEV.js +0 -7
- package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.CgvxUQFi.js +0 -588
- package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/shared/preset-wind4.dDC8WtZ5.js +0 -51
- package/dist/esm/node_modules/.pnpm/@unocss_preset-wind4@66.2.3/node_modules/@unocss/preset-wind4/dist/theme.js +0 -553
- package/dist/esm/node_modules/.pnpm/@unocss_rule-utils@66.2.3/node_modules/@unocss/rule-utils/dist/index.js +0 -632
- package/dist/esm/node_modules/.pnpm/@vee-validate_i18n@4.15.1/node_modules/@vee-validate/i18n/dist/locale/en.json.js +0 -9
- package/dist/esm/node_modules/.pnpm/@vee-validate_i18n@4.15.1/node_modules/@vee-validate/i18n/dist/locale/zh_CN.json.js +0 -9
- package/dist/esm/node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js +0 -146
- package/dist/esm/node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js +0 -97
- package/dist/esm/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.js +0 -56
- package/dist/esm/node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.js +0 -608
- package/dist/esm/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +0 -85
- package/dist/esm/node_modules/.pnpm/ofetch@1.4.1/node_modules/ofetch/dist/index.js +0 -23
- package/dist/esm/node_modules/.pnpm/ofetch@1.4.1/node_modules/ofetch/dist/shared/ofetch.03887fc3.js +0 -219
- package/dist/esm/node_modules/.pnpm/ufo@1.6.1/node_modules/ufo/dist/index.js +0 -153
- package/dist/esm/static/images/placeholder.png.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as i, createVNode as t } from "vue";
|
|
2
|
+
import { useI18n as o } from "@duxweb/dvha-core";
|
|
3
|
+
import l from "clsx";
|
|
4
|
+
const n = /* @__PURE__ */ i({
|
|
5
5
|
name: "Message",
|
|
6
6
|
props: {
|
|
7
7
|
text: {
|
|
@@ -15,64 +15,143 @@ const s = /* @__PURE__ */ t({
|
|
|
15
15
|
default: !1
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
18
|
+
setup(r) {
|
|
19
19
|
const {
|
|
20
|
-
t:
|
|
21
|
-
} =
|
|
22
|
-
return () =>
|
|
20
|
+
t: e
|
|
21
|
+
} = o();
|
|
22
|
+
return () => t("div", {
|
|
23
23
|
class: "flex justify-center p-2"
|
|
24
|
-
}, [
|
|
25
|
-
class:
|
|
26
|
-
}, [
|
|
24
|
+
}, [t("div", {
|
|
25
|
+
class: l(["flex flex-row items-center", r.simple ? "flex-col" : "gap-2"])
|
|
26
|
+
}, [t("div", null, [t("svg", {
|
|
27
27
|
class: "size-60px",
|
|
28
|
-
viewBox: "0 0
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
}, null),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
}, null),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, null),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
28
|
+
viewBox: "0 0 200 200",
|
|
29
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
30
|
+
}, [t("defs", null, [t("linearGradient", {
|
|
31
|
+
id: "bgGradient",
|
|
32
|
+
x1: "0%",
|
|
33
|
+
y1: "0%",
|
|
34
|
+
x2: "100%",
|
|
35
|
+
y2: "100%"
|
|
36
|
+
}, [t("stop", {
|
|
37
|
+
offset: "0%",
|
|
38
|
+
style: "stop-color:rgb(var(--ui-color-primary));stop-opacity:0.1"
|
|
39
|
+
}, null), t("stop", {
|
|
40
|
+
offset: "100%",
|
|
41
|
+
style: "stop-color:rgb(var(--ui-color-primary));stop-opacity:0.05"
|
|
42
|
+
}, null)]), t("linearGradient", {
|
|
43
|
+
id: "boxGradient",
|
|
44
|
+
x1: "0%",
|
|
45
|
+
y1: "0%",
|
|
46
|
+
x2: "0%",
|
|
47
|
+
y2: "100%"
|
|
48
|
+
}, [t("stop", {
|
|
49
|
+
offset: "0%",
|
|
50
|
+
style: "stop-color:rgb(var(--ui-bg-elevated));stop-opacity:1"
|
|
51
|
+
}, null), t("stop", {
|
|
52
|
+
offset: "100%",
|
|
53
|
+
style: "stop-color:rgb(var(--ui-bg-muted));stop-opacity:1"
|
|
54
|
+
}, null)])]), t("circle", {
|
|
55
|
+
cx: "100",
|
|
56
|
+
cy: "100",
|
|
57
|
+
r: "85",
|
|
58
|
+
fill: "url(#bgGradient)"
|
|
59
|
+
}, null), t("g", {
|
|
60
|
+
transform: "translate(100, 100)"
|
|
61
|
+
}, [t("ellipse", {
|
|
62
|
+
cx: "0",
|
|
63
|
+
cy: "35",
|
|
64
|
+
rx: "45",
|
|
65
|
+
ry: "8",
|
|
66
|
+
fill: "rgb(var(--ui-color-gray-300))",
|
|
67
|
+
opacity: "0.3"
|
|
68
|
+
}, null), t("path", {
|
|
69
|
+
d: "M -35 -10 L -35 25 Q -35 30 -30 30 L 30 30 Q 35 30 35 25 L 35 -5 Q 35 -10 30 -10 L 5 -10 L -5 -20 L -30 -20 Q -35 -20 -35 -15 Z",
|
|
70
|
+
fill: "url(#boxGradient)",
|
|
71
|
+
stroke: "rgb(var(--ui-color-gray-300))",
|
|
72
|
+
"stroke-width": "1"
|
|
73
|
+
}, null), t("path", {
|
|
74
|
+
d: "M -5 -20 L 5 -10 L 15 -10 Q 20 -10 20 -15 Q 20 -20 15 -20 Z",
|
|
75
|
+
fill: "rgb(var(--ui-color-primary))",
|
|
76
|
+
opacity: "0.8"
|
|
77
|
+
}, null), t("g", {
|
|
78
|
+
transform: "translate(0, -5)",
|
|
79
|
+
opacity: "0.6"
|
|
80
|
+
}, [t("rect", {
|
|
81
|
+
x: "-8",
|
|
82
|
+
y: "-5",
|
|
83
|
+
width: "16",
|
|
84
|
+
height: "20",
|
|
85
|
+
rx: "2",
|
|
86
|
+
fill: "rgb(var(--ui-bg-elevated))",
|
|
87
|
+
stroke: "rgb(var(--ui-color-gray-400))",
|
|
88
|
+
"stroke-width": "0.5"
|
|
89
|
+
}, null), t("line", {
|
|
90
|
+
x1: "-5",
|
|
91
|
+
y1: "0",
|
|
92
|
+
x2: "5",
|
|
93
|
+
y2: "0",
|
|
94
|
+
stroke: "rgb(var(--ui-color-gray-400))",
|
|
95
|
+
"stroke-width": "1",
|
|
96
|
+
opacity: "0.5"
|
|
97
|
+
}, null), t("line", {
|
|
98
|
+
x1: "-5",
|
|
99
|
+
y1: "4",
|
|
100
|
+
x2: "3",
|
|
101
|
+
y2: "4",
|
|
102
|
+
stroke: "rgb(var(--ui-color-gray-400))",
|
|
103
|
+
"stroke-width": "1",
|
|
104
|
+
opacity: "0.5"
|
|
105
|
+
}, null), t("line", {
|
|
106
|
+
x1: "-5",
|
|
107
|
+
y1: "8",
|
|
108
|
+
x2: "5",
|
|
109
|
+
y2: "8",
|
|
110
|
+
stroke: "rgb(var(--ui-color-gray-400))",
|
|
111
|
+
"stroke-width": "1",
|
|
112
|
+
opacity: "0.5"
|
|
113
|
+
}, null)]), t("circle", {
|
|
114
|
+
cx: "-25",
|
|
115
|
+
cy: "-25",
|
|
116
|
+
r: "2",
|
|
117
|
+
fill: "rgb(var(--ui-color-primary))",
|
|
118
|
+
opacity: "0.4"
|
|
119
|
+
}, [t("animate", {
|
|
120
|
+
attributeName: "opacity",
|
|
121
|
+
values: "0.4;0.8;0.4",
|
|
122
|
+
dur: "2s",
|
|
123
|
+
repeatCount: "indefinite"
|
|
124
|
+
}, null)]), t("circle", {
|
|
125
|
+
cx: "25",
|
|
126
|
+
cy: "-15",
|
|
127
|
+
r: "1.5",
|
|
128
|
+
fill: "rgb(var(--ui-color-primary))",
|
|
129
|
+
opacity: "0.3"
|
|
130
|
+
}, [t("animate", {
|
|
131
|
+
attributeName: "opacity",
|
|
132
|
+
values: "0.3;0.6;0.3",
|
|
133
|
+
dur: "3s",
|
|
134
|
+
repeatCount: "indefinite"
|
|
135
|
+
}, null)]), t("circle", {
|
|
136
|
+
cx: "20",
|
|
137
|
+
cy: "25",
|
|
138
|
+
r: "1",
|
|
139
|
+
fill: "rgb(var(--ui-color-primary))",
|
|
140
|
+
opacity: "0.2"
|
|
141
|
+
}, [t("animate", {
|
|
142
|
+
attributeName: "opacity",
|
|
143
|
+
values: "0.2;0.5;0.2",
|
|
144
|
+
dur: "4s",
|
|
145
|
+
repeatCount: "indefinite"
|
|
146
|
+
}, null)])])])]), t("div", {
|
|
68
147
|
class: "flex flex-col gap-0"
|
|
69
|
-
}, [
|
|
70
|
-
class:
|
|
71
|
-
}, [
|
|
72
|
-
class: "text-
|
|
73
|
-
}, [
|
|
148
|
+
}, [t("div", {
|
|
149
|
+
class: l(["text-default", r.simple ? "text-center" : ""])
|
|
150
|
+
}, [r.text || e("pages.empty.title")]), !r.simple && t("div", {
|
|
151
|
+
class: "text-muted"
|
|
152
|
+
}, [r.desc || e("pages.empty.desc")])])])]);
|
|
74
153
|
}
|
|
75
154
|
});
|
|
76
155
|
export {
|
|
77
|
-
|
|
156
|
+
n as DuxBlockEmpty
|
|
78
157
|
};
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { defineComponent as M, ref as D, computed as s, watch as k, createVNode as a, Fragment as w, createTextVNode as A, isVNode as U } from "vue";
|
|
2
|
+
import { useManage as Z, useI18n as j, useUpload as O } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as B, useDropZone as X } from "@vueuse/core";
|
|
4
|
+
import E from "mime";
|
|
5
|
+
import { useMessage as L, NDataTable as T, NProgress as I, NButton as h } from "naive-ui";
|
|
6
|
+
import "vue-router";
|
|
7
|
+
import "@overlastic/vue";
|
|
8
|
+
import { DuxMedia as W } from "../media/media.js";
|
|
9
|
+
import "vue-echarts";
|
|
10
|
+
import "vue-cropper";
|
|
11
|
+
import "clsx";
|
|
12
|
+
import "jinrishici";
|
|
13
|
+
import "lodash-es";
|
|
14
|
+
import "vue-draggable-plus";
|
|
15
|
+
import "aieditor";
|
|
16
|
+
import "vee-validate";
|
|
17
|
+
import "@vee-validate/i18n";
|
|
18
|
+
import "colorizr";
|
|
19
|
+
import "echarts";
|
|
20
|
+
import "@ant-design/colors";
|
|
21
|
+
import "@unocss/preset-icons/browser";
|
|
22
|
+
import "@unocss/preset-typography";
|
|
23
|
+
import "unocss/preset-wind4";
|
|
24
|
+
import "@vee-validate/i18n/dist/locale/en.json";
|
|
25
|
+
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
26
|
+
import "vue-command-palette";
|
|
27
|
+
import "@duxweb/dvha-naiveui";
|
|
28
|
+
import "../../pages/page404.js";
|
|
29
|
+
import { useModal as G } from "../../hooks/modal.js";
|
|
30
|
+
import "dayjs";
|
|
31
|
+
import "@tanstack/vue-query";
|
|
32
|
+
import "pinia";
|
|
33
|
+
function v(o) {
|
|
34
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !U(o);
|
|
35
|
+
}
|
|
36
|
+
const m = {
|
|
37
|
+
"image/*": "JPG, PNG, GIF, BMP, WEBP",
|
|
38
|
+
"video/*": "MP4, AVI, MOV, WMV, FLV",
|
|
39
|
+
"audio/*": "MP3, WAV, AAC, FLAC",
|
|
40
|
+
"text/*": "TXT, CSV, JSON, XML",
|
|
41
|
+
"application/pdf": "PDF",
|
|
42
|
+
"application/msword": "DOC",
|
|
43
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
|
|
44
|
+
"application/vnd.ms-excel": "XLS",
|
|
45
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX"
|
|
46
|
+
}, i = {
|
|
47
|
+
container: "flex flex-col gap-2",
|
|
48
|
+
dropZone: {
|
|
49
|
+
base: "flex items-center justify-center p-6 rounded bg-muted border border-dashed transition-all cursor-pointer group",
|
|
50
|
+
active: "border-primary bg-primary/5",
|
|
51
|
+
hover: "border-accented hover:bg-primary/5 hover:border-primary"
|
|
52
|
+
},
|
|
53
|
+
content: "flex flex-col items-center gap-1",
|
|
54
|
+
icon: {
|
|
55
|
+
wrapper: "size-10 flex items-center justify-center rounded-full border border-dashed border-accented group-hover:border-primary transition-all cursor-pointer",
|
|
56
|
+
icon: "i-tabler:device-desktop-up size-5"
|
|
57
|
+
},
|
|
58
|
+
text: {
|
|
59
|
+
title: "mt-3 text-base font-medium",
|
|
60
|
+
desc: "text-sm text-muted text-center",
|
|
61
|
+
highlight: "text-primary font-medium"
|
|
62
|
+
},
|
|
63
|
+
table: {
|
|
64
|
+
empty: "flex items-center justify-center h-full text-muted",
|
|
65
|
+
actions: "flex gap-2"
|
|
66
|
+
}
|
|
67
|
+
}, Se = /* @__PURE__ */ M({
|
|
68
|
+
name: "DuxFileUpload",
|
|
69
|
+
props: {
|
|
70
|
+
path: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: ""
|
|
73
|
+
},
|
|
74
|
+
managePath: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: ""
|
|
77
|
+
},
|
|
78
|
+
maxNum: Number,
|
|
79
|
+
maxSize: Number,
|
|
80
|
+
multiple: Boolean,
|
|
81
|
+
manager: Boolean,
|
|
82
|
+
accept: String,
|
|
83
|
+
value: [String, Array],
|
|
84
|
+
defaultValue: [String, Array],
|
|
85
|
+
onUpdateValue: Function
|
|
86
|
+
},
|
|
87
|
+
setup(o, {
|
|
88
|
+
emit: b
|
|
89
|
+
}) {
|
|
90
|
+
const y = B(o, "value", b, {
|
|
91
|
+
passive: !0,
|
|
92
|
+
deep: !0,
|
|
93
|
+
defaultValue: o.defaultValue
|
|
94
|
+
}), u = Z(), F = L(), {
|
|
95
|
+
t: n
|
|
96
|
+
} = j(), d = D(), c = s(() => o.maxSize || 5), P = G(), f = s(() => {
|
|
97
|
+
var e, t;
|
|
98
|
+
return o.path || ((t = (e = u.config) == null ? void 0 : e.apiPath) == null ? void 0 : t.upload);
|
|
99
|
+
}), S = s(() => {
|
|
100
|
+
var e, t;
|
|
101
|
+
return o.managePath || ((t = (e = u.config) == null ? void 0 : e.apiPath) == null ? void 0 : t.uploadManage);
|
|
102
|
+
}), l = O({
|
|
103
|
+
path: f.value,
|
|
104
|
+
multiple: o.multiple,
|
|
105
|
+
maxFileCount: o.maxNum,
|
|
106
|
+
maxFileSize: c.value * 1024 * 1024,
|
|
107
|
+
autoUpload: !0,
|
|
108
|
+
accept: o.accept,
|
|
109
|
+
onError: (e) => F.error(e.message || n("components.upload.error"))
|
|
110
|
+
}), {
|
|
111
|
+
isOverDropZone: x
|
|
112
|
+
} = X(d, {
|
|
113
|
+
onDrop: (e) => {
|
|
114
|
+
e && e.length > 0 && l.addFiles(Array.from(e), "file");
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
k(l.dataFiles, (e) => {
|
|
118
|
+
var r, p;
|
|
119
|
+
const t = o.multiple ? e == null ? void 0 : e.map((z) => z.url) : (r = e == null ? void 0 : e[0]) == null ? void 0 : r.url;
|
|
120
|
+
y.value = t, (p = o.onUpdateValue) == null || p.call(o, t);
|
|
121
|
+
});
|
|
122
|
+
const g = s(() => o.accept ? o.accept.split(",").map((e) => {
|
|
123
|
+
const t = e.trim();
|
|
124
|
+
if (m[t]) return m[t];
|
|
125
|
+
if (t.includes("*")) {
|
|
126
|
+
const p = t.split("/")[0];
|
|
127
|
+
return m[t] || n("common.fileExtension", {
|
|
128
|
+
ext: p.toUpperCase()
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
const r = E.getExtension(t);
|
|
132
|
+
return r ? r.toUpperCase() : t;
|
|
133
|
+
}).filter(Boolean).join(", ") : ""), C = s(() => ({
|
|
134
|
+
pending: a("div", {
|
|
135
|
+
class: "text-info"
|
|
136
|
+
}, [n("components.upload.status.pending")]),
|
|
137
|
+
uploading: a("div", {
|
|
138
|
+
class: "text-info"
|
|
139
|
+
}, [n("components.upload.status.uploading")]),
|
|
140
|
+
success: a("div", {
|
|
141
|
+
class: "text-success"
|
|
142
|
+
}, [n("components.upload.status.success")]),
|
|
143
|
+
error: a("div", {
|
|
144
|
+
class: "text-error"
|
|
145
|
+
}, [n("components.upload.status.error")])
|
|
146
|
+
})), N = s(() => [i.dropZone.base, x.value ? i.dropZone.active : i.dropZone.hover]), V = s(() => [l.uploadFiles.value.length === 0 && "border-b border-muted"]);
|
|
147
|
+
return () => a("div", {
|
|
148
|
+
class: i.container
|
|
149
|
+
}, [a("div", {
|
|
150
|
+
ref: d,
|
|
151
|
+
class: N.value,
|
|
152
|
+
onClick: () => l.open()
|
|
153
|
+
}, [a("div", {
|
|
154
|
+
class: i.content
|
|
155
|
+
}, [a("div", {
|
|
156
|
+
class: i.icon.wrapper,
|
|
157
|
+
onClick: (e) => {
|
|
158
|
+
o.manager && (e.stopPropagation(), P.show({
|
|
159
|
+
title: n("components.upload.title"),
|
|
160
|
+
width: 800,
|
|
161
|
+
component: () => import("./manager.js"),
|
|
162
|
+
componentProps: {
|
|
163
|
+
path: S.value,
|
|
164
|
+
multiple: o.multiple,
|
|
165
|
+
uploadParams: {
|
|
166
|
+
path: f.value,
|
|
167
|
+
accept: o.accept,
|
|
168
|
+
maxNum: o.maxNum,
|
|
169
|
+
maxSize: c.value
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}).then((t) => {
|
|
173
|
+
l.addDataFiles(t);
|
|
174
|
+
}));
|
|
175
|
+
}
|
|
176
|
+
}, [a("div", {
|
|
177
|
+
class: i.icon.icon
|
|
178
|
+
}, null)]), a("div", {
|
|
179
|
+
class: i.text.title
|
|
180
|
+
}, [n("components.upload.desc")]), a("div", {
|
|
181
|
+
class: i.text.desc
|
|
182
|
+
}, [x.value ? a("span", {
|
|
183
|
+
class: i.text.highlight
|
|
184
|
+
}, [n("components.upload.dropHere")]) : a(w, null, [g.value ? n("components.upload.supportFormats", {
|
|
185
|
+
formats: g.value
|
|
186
|
+
}) : n("components.upload.allFormats"), A(","), " ", n("components.upload.maxSize", {
|
|
187
|
+
size: c.value
|
|
188
|
+
})])])])]), a(T, {
|
|
189
|
+
bordered: !1,
|
|
190
|
+
class: V.value,
|
|
191
|
+
columns: [{
|
|
192
|
+
key: "filename",
|
|
193
|
+
title: n("components.upload.file.name"),
|
|
194
|
+
minWidth: 200,
|
|
195
|
+
render: (e) => a(W, {
|
|
196
|
+
title: e.filename,
|
|
197
|
+
desc: e.filetype
|
|
198
|
+
}, null)
|
|
199
|
+
}, {
|
|
200
|
+
key: "filesizeText",
|
|
201
|
+
title: n("components.upload.file.size"),
|
|
202
|
+
width: 120
|
|
203
|
+
}, {
|
|
204
|
+
key: "status",
|
|
205
|
+
title: n("components.upload.file.status"),
|
|
206
|
+
width: 120,
|
|
207
|
+
render: (e) => {
|
|
208
|
+
var t;
|
|
209
|
+
return e.status === "uploading" ? a(I, {
|
|
210
|
+
type: "line",
|
|
211
|
+
style: {
|
|
212
|
+
width: "24px",
|
|
213
|
+
height: "24px"
|
|
214
|
+
},
|
|
215
|
+
color: "rgb(var(--ui-color-primary))",
|
|
216
|
+
"indicator-placement": "inside",
|
|
217
|
+
percentage: (t = e.progress) == null ? void 0 : t.percent,
|
|
218
|
+
showIndicator: !1,
|
|
219
|
+
height: 14
|
|
220
|
+
}, null) : C.value[e.status];
|
|
221
|
+
}
|
|
222
|
+
}, {
|
|
223
|
+
key: "actions",
|
|
224
|
+
title: n("components.upload.actions"),
|
|
225
|
+
width: 120,
|
|
226
|
+
render: (e) => {
|
|
227
|
+
let t, r;
|
|
228
|
+
return a("div", {
|
|
229
|
+
class: i.table.actions
|
|
230
|
+
}, [a(h, {
|
|
231
|
+
type: "warning",
|
|
232
|
+
size: "small",
|
|
233
|
+
text: !0,
|
|
234
|
+
disabled: ["success", "error", "cancelled"].includes(e.status),
|
|
235
|
+
onClick: () => l.cancelFiles([e.id])
|
|
236
|
+
}, v(t = n("components.upload.cancel")) ? t : {
|
|
237
|
+
default: () => [t]
|
|
238
|
+
}), a(h, {
|
|
239
|
+
type: "error",
|
|
240
|
+
size: "small",
|
|
241
|
+
text: !0,
|
|
242
|
+
onClick: () => l.removeFiles([e.id])
|
|
243
|
+
}, v(r = n("components.upload.delete")) ? r : {
|
|
244
|
+
default: () => [r]
|
|
245
|
+
})]);
|
|
246
|
+
}
|
|
247
|
+
}],
|
|
248
|
+
data: l.uploadFiles.value
|
|
249
|
+
}, {
|
|
250
|
+
empty: () => a("div", {
|
|
251
|
+
class: i.table.empty
|
|
252
|
+
}, [n("components.upload.empty")])
|
|
253
|
+
})]);
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
export {
|
|
257
|
+
Se as DuxFileUpload
|
|
258
|
+
};
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { defineComponent as U, computed as n, watch as w, createVNode as t } from "vue";
|
|
2
|
+
import { useI18n as I, useManage as S, useUpload as V } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as k } from "@vueuse/core";
|
|
4
|
+
import j from "clsx";
|
|
5
|
+
import { useMessage as M, NImage as B, NButton as c, NProgress as D } from "naive-ui";
|
|
6
|
+
import { VueDraggable as A } from "vue-draggable-plus";
|
|
7
|
+
import "vue-router";
|
|
8
|
+
import "@overlastic/vue";
|
|
9
|
+
import "vue-echarts";
|
|
10
|
+
import "vue-cropper";
|
|
11
|
+
import "jinrishici";
|
|
12
|
+
import "lodash-es";
|
|
13
|
+
import "aieditor";
|
|
14
|
+
import "vee-validate";
|
|
15
|
+
import "@vee-validate/i18n";
|
|
16
|
+
import "colorizr";
|
|
17
|
+
import "echarts";
|
|
18
|
+
import "@ant-design/colors";
|
|
19
|
+
import "@unocss/preset-icons/browser";
|
|
20
|
+
import "@unocss/preset-typography";
|
|
21
|
+
import "unocss/preset-wind4";
|
|
22
|
+
import "@vee-validate/i18n/dist/locale/en.json";
|
|
23
|
+
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
24
|
+
import "vue-command-palette";
|
|
25
|
+
import "@duxweb/dvha-naiveui";
|
|
26
|
+
import "../../pages/page404.js";
|
|
27
|
+
import "mime";
|
|
28
|
+
import { useModal as L } from "../../hooks/modal.js";
|
|
29
|
+
import "dayjs";
|
|
30
|
+
import { useImagePreview as O } from "../../hooks/image.js";
|
|
31
|
+
import "@tanstack/vue-query";
|
|
32
|
+
import "pinia";
|
|
33
|
+
const fe = /* @__PURE__ */ U({
|
|
34
|
+
name: "DuxImageUpload",
|
|
35
|
+
props: {
|
|
36
|
+
path: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "upload"
|
|
39
|
+
},
|
|
40
|
+
managePath: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: ""
|
|
43
|
+
},
|
|
44
|
+
maxNum: Number,
|
|
45
|
+
maxSize: Number,
|
|
46
|
+
multiple: Boolean,
|
|
47
|
+
manager: Boolean,
|
|
48
|
+
value: [String, Array],
|
|
49
|
+
defaultValue: [String, Array],
|
|
50
|
+
onUpdateValue: Function
|
|
51
|
+
},
|
|
52
|
+
setup(a, {
|
|
53
|
+
emit: p
|
|
54
|
+
}) {
|
|
55
|
+
const g = k(a, "value", p, {
|
|
56
|
+
passive: !0,
|
|
57
|
+
deep: !0,
|
|
58
|
+
defaultValue: a.defaultValue
|
|
59
|
+
}), v = M(), h = O(), {
|
|
60
|
+
t: s
|
|
61
|
+
} = I(), o = {
|
|
62
|
+
container: "flex gap-2",
|
|
63
|
+
imageItem: "size-80px rounded border border-muted relative group draggable flex items-center",
|
|
64
|
+
imageOverlay: "z-1 size-full inset-0 absolute flex items-center justify-center bg-default/80 transition-all opacity-0 group-hover:opacity-100 rounded",
|
|
65
|
+
uploadArea: "relative size-80px text-sm rounded flex flex-col border border-dashed bg-elevated border-muted dark:border-accented hover:bg-accented/50 hover:border-accented dark:hover:bg-accented/50 dark:hover:border-accented cursor-pointer",
|
|
66
|
+
uploadContent: "flex-1 flex flex-col justify-center items-center gap-1 relative",
|
|
67
|
+
progressContainer: "size-80px flex items-center justify-center rounded",
|
|
68
|
+
progressBar: "absolute left-2 right-2 bottom-2"
|
|
69
|
+
}, m = S(), f = n(() => a.maxSize || 5), d = n(() => {
|
|
70
|
+
var e, l;
|
|
71
|
+
return a.path || ((l = (e = m.config) == null ? void 0 : e.apiPath) == null ? void 0 : l.upload);
|
|
72
|
+
}), b = n(() => {
|
|
73
|
+
var e, l;
|
|
74
|
+
return a.managePath || ((l = (e = m.config) == null ? void 0 : e.apiPath) == null ? void 0 : l.uploadManage);
|
|
75
|
+
}), r = V({
|
|
76
|
+
path: d.value,
|
|
77
|
+
multiple: a.multiple,
|
|
78
|
+
maxFileCount: a.maxNum,
|
|
79
|
+
maxFileSize: f.value * 1024 * 1024,
|
|
80
|
+
autoUpload: !0,
|
|
81
|
+
accept: "image/*",
|
|
82
|
+
onError: (e) => {
|
|
83
|
+
v.error(e.message || s("components.upload.error"));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
w(r.dataFiles, (e) => {
|
|
87
|
+
var i, u;
|
|
88
|
+
const l = a.multiple ? e == null ? void 0 : e.map((C) => C.url) : (i = e == null ? void 0 : e[0]) == null ? void 0 : i.url;
|
|
89
|
+
g.value = l, (u = a.onUpdateValue) == null || u.call(a, l);
|
|
90
|
+
});
|
|
91
|
+
const x = n(() => r.progress.value.totalPercent), y = n(() => r.isUploading.value), z = async () => {
|
|
92
|
+
r.open();
|
|
93
|
+
}, F = n(() => a.multiple ? a.maxNum && r.uploadFiles.value.length >= a.maxNum : !0), P = n(() => {
|
|
94
|
+
var e;
|
|
95
|
+
return (e = r.dataFiles.value) == null ? void 0 : e.map((l) => l.url);
|
|
96
|
+
}), N = L();
|
|
97
|
+
return () => t("div", null, [t(A, {
|
|
98
|
+
modelValue: r.uploadFiles.value,
|
|
99
|
+
"onUpdate:modelValue": (e) => r.uploadFiles.value = e,
|
|
100
|
+
class: o.container,
|
|
101
|
+
draggable: ".draggable"
|
|
102
|
+
}, {
|
|
103
|
+
default: () => {
|
|
104
|
+
var e;
|
|
105
|
+
return [(e = r.uploadFiles.value) == null ? void 0 : e.map((l, i) => {
|
|
106
|
+
const u = l.url || URL.createObjectURL(l.file);
|
|
107
|
+
return t("div", {
|
|
108
|
+
key: i,
|
|
109
|
+
class: j(o.imageItem)
|
|
110
|
+
}, [t(B, {
|
|
111
|
+
class: "z-0 rounded",
|
|
112
|
+
objectFit: "scale-down",
|
|
113
|
+
width: 78,
|
|
114
|
+
height: 78,
|
|
115
|
+
previewDisabled: !0,
|
|
116
|
+
src: u
|
|
117
|
+
}, null), t("div", {
|
|
118
|
+
class: o.imageOverlay
|
|
119
|
+
}, [l.status === "success" && t(c, {
|
|
120
|
+
quaternary: !0,
|
|
121
|
+
circle: !0,
|
|
122
|
+
size: "small",
|
|
123
|
+
renderIcon: () => t("div", {
|
|
124
|
+
class: "n-icon i-tabler:eye"
|
|
125
|
+
}, null),
|
|
126
|
+
onClick: () => h.show(P.value, i)
|
|
127
|
+
}, null), t(c, {
|
|
128
|
+
quaternary: !0,
|
|
129
|
+
circle: !0,
|
|
130
|
+
size: "small",
|
|
131
|
+
renderIcon: () => t("div", {
|
|
132
|
+
class: "n-icon i-tabler:trash"
|
|
133
|
+
}, null),
|
|
134
|
+
onClick: () => {
|
|
135
|
+
r.removeFiles([l.id]);
|
|
136
|
+
}
|
|
137
|
+
}, null)])]);
|
|
138
|
+
}), (r.uploadFiles.value.length === 0 || !F.value) && t("div", {
|
|
139
|
+
class: o.uploadArea,
|
|
140
|
+
onClick: () => {
|
|
141
|
+
z();
|
|
142
|
+
}
|
|
143
|
+
}, [a.manager && t("div", {
|
|
144
|
+
class: " py-1 text-xs bg-muted border-b border-dashed border-accented flex items-center justify-center",
|
|
145
|
+
onClick: (l) => {
|
|
146
|
+
l.stopPropagation(), N.show({
|
|
147
|
+
title: s("components.upload.title"),
|
|
148
|
+
width: "800px",
|
|
149
|
+
component: () => import("./manager.js"),
|
|
150
|
+
componentProps: {
|
|
151
|
+
path: b.value,
|
|
152
|
+
type: "image",
|
|
153
|
+
multiple: a.multiple,
|
|
154
|
+
uploadParams: {
|
|
155
|
+
path: d.value,
|
|
156
|
+
accept: "image/*",
|
|
157
|
+
maxNum: a.maxNum,
|
|
158
|
+
maxSize: a.maxSize
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}).then((i) => {
|
|
162
|
+
r.addDataFiles(i);
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}, [t("div", {
|
|
166
|
+
class: "i-tabler:folder size-4"
|
|
167
|
+
}, null)]), t("div", {
|
|
168
|
+
class: o.uploadContent
|
|
169
|
+
}, [y.value ? t("div", {
|
|
170
|
+
class: o.progressContainer
|
|
171
|
+
}, [t("div", {
|
|
172
|
+
class: "i-tabler:photo size-6"
|
|
173
|
+
}, null), t("div", {
|
|
174
|
+
class: o.progressBar
|
|
175
|
+
}, [t(D, {
|
|
176
|
+
type: "line",
|
|
177
|
+
percentage: x.value,
|
|
178
|
+
showIndicator: !1,
|
|
179
|
+
height: 4
|
|
180
|
+
}, null)])]) : t("div", {
|
|
181
|
+
class: "i-tabler:plus size-4"
|
|
182
|
+
}, null)])])];
|
|
183
|
+
}
|
|
184
|
+
})]);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
export {
|
|
188
|
+
fe as DuxImageUpload
|
|
189
|
+
};
|