@duxweb/dvha-pro 0.0.8 → 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
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { defineComponent as y, ref as h, watch as d, createVNode as s } from "vue";
|
|
2
|
+
import { useClient as D, useI18n as S } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as K } from "@vueuse/core";
|
|
4
|
+
import "naive-ui";
|
|
5
|
+
import "vue-router";
|
|
6
|
+
import "@overlastic/vue";
|
|
7
|
+
import "clsx";
|
|
8
|
+
import "vue-echarts";
|
|
9
|
+
import "vue-cropper";
|
|
10
|
+
import "jinrishici";
|
|
11
|
+
import "lodash-es";
|
|
12
|
+
import { DuxDynamicData as A } from "./dynamicData.js";
|
|
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 "vue-draggable-plus";
|
|
29
|
+
import { useModal as C } from "../../hooks/modal.js";
|
|
30
|
+
import "dayjs";
|
|
31
|
+
import "@tanstack/vue-query";
|
|
32
|
+
import "pinia";
|
|
33
|
+
const et = /* @__PURE__ */ y({
|
|
34
|
+
name: "DuxDynamicSelect",
|
|
35
|
+
props: {
|
|
36
|
+
rowKey: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "id"
|
|
39
|
+
},
|
|
40
|
+
path: String,
|
|
41
|
+
columns: Array,
|
|
42
|
+
filterColumns: Array,
|
|
43
|
+
filterSchema: {
|
|
44
|
+
type: Array
|
|
45
|
+
},
|
|
46
|
+
value: {
|
|
47
|
+
type: Array,
|
|
48
|
+
default: []
|
|
49
|
+
},
|
|
50
|
+
defaultValue: {
|
|
51
|
+
type: Array,
|
|
52
|
+
default: []
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
setup(t, {
|
|
56
|
+
emit: n
|
|
57
|
+
}) {
|
|
58
|
+
const e = K(t, "value", n, {
|
|
59
|
+
passive: !0,
|
|
60
|
+
defaultValue: t.defaultValue,
|
|
61
|
+
deep: !0
|
|
62
|
+
}), p = C(), c = D(), {
|
|
63
|
+
t: f
|
|
64
|
+
} = S(), r = h(!0);
|
|
65
|
+
return d([e, r], () => {
|
|
66
|
+
var m;
|
|
67
|
+
if (!r.value || !e.value || e.value.length === 0)
|
|
68
|
+
return;
|
|
69
|
+
const o = ((m = e.value) == null ? void 0 : m.map((a) => a[t.rowKey])) || [];
|
|
70
|
+
c.request({
|
|
71
|
+
path: t.path,
|
|
72
|
+
query: {
|
|
73
|
+
ids: (o == null ? void 0 : o.join(",")) || ""
|
|
74
|
+
}
|
|
75
|
+
}).then((a) => {
|
|
76
|
+
var i;
|
|
77
|
+
r.value = !1, (i = a == null ? void 0 : a.data) == null || i.forEach((l, u) => {
|
|
78
|
+
e.value.some((v) => v[t.rowKey] === l[t.rowKey]) ? e.value[u] = {
|
|
79
|
+
...e.value[u],
|
|
80
|
+
...l
|
|
81
|
+
} : e.value.push(l);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}), () => s(A, {
|
|
85
|
+
value: e.value,
|
|
86
|
+
"onUpdate:value": (o) => e.value = o,
|
|
87
|
+
columns: t.columns,
|
|
88
|
+
onCreate: () => {
|
|
89
|
+
p.show({
|
|
90
|
+
component: () => import("./selectModal.js"),
|
|
91
|
+
componentProps: {
|
|
92
|
+
path: t.path,
|
|
93
|
+
columns: t.filterColumns,
|
|
94
|
+
filterSchema: t.filterSchema
|
|
95
|
+
},
|
|
96
|
+
width: 1e3,
|
|
97
|
+
title: f("buttons.select")
|
|
98
|
+
}).then((o) => {
|
|
99
|
+
r.value = !1, o == null || o.forEach((m) => {
|
|
100
|
+
e.value.some((a) => a[t.rowKey] === m[t.rowKey]) || e.value.push(m);
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}, null);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
export {
|
|
108
|
+
et as DuxDynamicSelect
|
|
109
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { defineComponent as h, computed as C, ref as r, watch as b, createVNode as i, Fragment as x, h as w, mergeProps as z, isVNode as P } from "vue";
|
|
2
|
+
import { useI18n as j, useJsonSchema as k } from "@duxweb/dvha-core";
|
|
3
|
+
import { NButton as u, NDataTable as K } from "naive-ui";
|
|
4
|
+
import "vue-router";
|
|
5
|
+
import "@overlastic/vue";
|
|
6
|
+
import "clsx";
|
|
7
|
+
import "vue-echarts";
|
|
8
|
+
import "@vueuse/core";
|
|
9
|
+
import "vue-cropper";
|
|
10
|
+
import N from "../modal/modalPage.js";
|
|
11
|
+
import "jinrishici";
|
|
12
|
+
import "lodash-es";
|
|
13
|
+
import "vue-draggable-plus";
|
|
14
|
+
import "aieditor";
|
|
15
|
+
import "vee-validate";
|
|
16
|
+
import "@vee-validate/i18n";
|
|
17
|
+
import "colorizr";
|
|
18
|
+
import "echarts";
|
|
19
|
+
import "@ant-design/colors";
|
|
20
|
+
import "@unocss/preset-icons/browser";
|
|
21
|
+
import "@unocss/preset-typography";
|
|
22
|
+
import "unocss/preset-wind4";
|
|
23
|
+
import "@vee-validate/i18n/dist/locale/en.json";
|
|
24
|
+
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
25
|
+
import "vue-command-palette";
|
|
26
|
+
import "@duxweb/dvha-naiveui";
|
|
27
|
+
import "../../pages/page404.js";
|
|
28
|
+
import "mime";
|
|
29
|
+
import "dayjs";
|
|
30
|
+
import "@tanstack/vue-query";
|
|
31
|
+
import { useTable as D } from "../../hooks/table.js";
|
|
32
|
+
import "pinia";
|
|
33
|
+
function p(e) {
|
|
34
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !P(e);
|
|
35
|
+
}
|
|
36
|
+
const ce = /* @__PURE__ */ h({
|
|
37
|
+
name: "Select",
|
|
38
|
+
props: {
|
|
39
|
+
path: String,
|
|
40
|
+
columns: Array,
|
|
41
|
+
rowKey: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "id"
|
|
44
|
+
},
|
|
45
|
+
filterSchema: {
|
|
46
|
+
type: Array
|
|
47
|
+
},
|
|
48
|
+
onConfirm: Function,
|
|
49
|
+
onClose: Function
|
|
50
|
+
},
|
|
51
|
+
setup(e) {
|
|
52
|
+
const {
|
|
53
|
+
t: l
|
|
54
|
+
} = j(), f = C(() => [{
|
|
55
|
+
type: "selection",
|
|
56
|
+
fixed: "left"
|
|
57
|
+
}, ...e.columns || []]), m = r({}), n = r({
|
|
58
|
+
page: 1,
|
|
59
|
+
pageSize: 10
|
|
60
|
+
}), {
|
|
61
|
+
table: d,
|
|
62
|
+
list: g,
|
|
63
|
+
pageCount: s,
|
|
64
|
+
pageSizes: S,
|
|
65
|
+
checkeds: v
|
|
66
|
+
} = D({
|
|
67
|
+
path: e.path || "",
|
|
68
|
+
columns: f.value || [],
|
|
69
|
+
filters: m,
|
|
70
|
+
pagination: n.value
|
|
71
|
+
}), c = r([]);
|
|
72
|
+
b(v, (t) => {
|
|
73
|
+
var a;
|
|
74
|
+
c.value = (a = g.value) == null ? void 0 : a.filter((o) => t.includes(o[e.rowKey]));
|
|
75
|
+
});
|
|
76
|
+
const y = k({
|
|
77
|
+
data: e.filterSchema || [],
|
|
78
|
+
context: {
|
|
79
|
+
filter: m
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
return () => i(N, {
|
|
83
|
+
title: l("components.data.selectTitle"),
|
|
84
|
+
onClose: () => {
|
|
85
|
+
var t;
|
|
86
|
+
(t = e.onClose) == null || t.call(e);
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
default: () => i("div", {
|
|
90
|
+
class: "flex flex-col gap-4"
|
|
91
|
+
}, [e.filterSchema && i("div", {
|
|
92
|
+
class: "grid grid-cols-1 md:grid-cols-4 gap-2"
|
|
93
|
+
}, [w(y.render)]), i(K, z({
|
|
94
|
+
bordered: !1,
|
|
95
|
+
maxHeight: 400,
|
|
96
|
+
rowKey: (t) => t[e.rowKey]
|
|
97
|
+
}, d.value, {
|
|
98
|
+
pagination: {
|
|
99
|
+
page: n.value.page,
|
|
100
|
+
pageSize: n.value.pageSize,
|
|
101
|
+
pageCount: s.value,
|
|
102
|
+
pageSizes: S,
|
|
103
|
+
onUpdatePage: (t) => {
|
|
104
|
+
n.value.page = t;
|
|
105
|
+
},
|
|
106
|
+
onUpdatePageSize: (t) => {
|
|
107
|
+
n.value.pageSize = t;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}), null)]),
|
|
111
|
+
footer: () => {
|
|
112
|
+
let t, a;
|
|
113
|
+
return i(x, null, [i(u, {
|
|
114
|
+
onClick: () => {
|
|
115
|
+
var o;
|
|
116
|
+
(o = e.onClose) == null || o.call(e);
|
|
117
|
+
}
|
|
118
|
+
}, p(t = l("components.button.cancel")) ? t : {
|
|
119
|
+
default: () => [t]
|
|
120
|
+
}), i(u, {
|
|
121
|
+
type: "primary",
|
|
122
|
+
onClick: () => {
|
|
123
|
+
var o;
|
|
124
|
+
(o = e.onConfirm) == null || o.call(e, c.value);
|
|
125
|
+
}
|
|
126
|
+
}, p(a = l("components.button.select")) ? a : {
|
|
127
|
+
default: () => [a]
|
|
128
|
+
})]);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
export {
|
|
134
|
+
ce as default
|
|
135
|
+
};
|
|
@@ -1,59 +1,71 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useExtendOverlay as
|
|
4
|
-
import { NModal as
|
|
5
|
-
function
|
|
6
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
1
|
+
import { defineComponent as v, reactive as x, ref as h, createVNode as n, h as p, isVNode as w } from "vue";
|
|
2
|
+
import { useI18n as S, useJsonSchema as k } from "@duxweb/dvha-core";
|
|
3
|
+
import { useExtendOverlay as j } from "@overlastic/vue";
|
|
4
|
+
import { NModal as D, NForm as N, NButton as u } from "naive-ui";
|
|
5
|
+
function r(t) {
|
|
6
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !w(t);
|
|
7
7
|
}
|
|
8
|
-
const
|
|
8
|
+
const z = /* @__PURE__ */ v({
|
|
9
9
|
name: "DuxDialog",
|
|
10
10
|
props: {
|
|
11
11
|
title: String,
|
|
12
12
|
content: String,
|
|
13
13
|
type: String,
|
|
14
14
|
formSchema: Array,
|
|
15
|
+
defaultValue: Object,
|
|
15
16
|
render: Function
|
|
16
17
|
},
|
|
17
18
|
setup(t) {
|
|
18
19
|
const {
|
|
19
20
|
t: o
|
|
20
|
-
} =
|
|
21
|
-
visible:
|
|
22
|
-
resolve:
|
|
23
|
-
reject:
|
|
24
|
-
vanish:
|
|
25
|
-
} =
|
|
21
|
+
} = S(), {
|
|
22
|
+
visible: f,
|
|
23
|
+
resolve: m,
|
|
24
|
+
reject: l,
|
|
25
|
+
vanish: b
|
|
26
|
+
} = j({
|
|
26
27
|
duration: 1e3
|
|
27
|
-
}), e =
|
|
28
|
+
}), e = x({
|
|
28
29
|
title: t == null ? void 0 : t.title,
|
|
29
30
|
content: t == null ? void 0 : t.content,
|
|
30
31
|
button: "default"
|
|
31
32
|
});
|
|
32
33
|
t.type === "confirm" && (e.title = e.title || o("components.dialog.confirm.title"), e.content = e.content || o("components.dialog.confirm.content"), e.button = "primary"), t.type === "success" && (e.title = e.title || o("components.dialog.success.title"), e.content = e.content || o("components.dialog.success.content"), e.button = "success"), t.type === "error" && (e.title = e.title || o("components.dialog.error.title"), e.content = e.content || o("components.dialog.error.content"), e.button = "error"), t.type === "prompt" && (e.title = e.title || o("components.dialog.prompt.title"), e.button = "primary");
|
|
33
|
-
const {
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
34
|
+
const s = h({
|
|
35
|
+
...t.defaultValue
|
|
36
|
+
}), {
|
|
37
|
+
render: g
|
|
38
|
+
} = k({
|
|
39
|
+
data: t.formSchema || [],
|
|
40
|
+
context: {
|
|
41
|
+
form: s.value
|
|
42
|
+
}
|
|
37
43
|
});
|
|
38
|
-
return () => n(
|
|
44
|
+
return () => n(D, {
|
|
39
45
|
displayDirective: "show",
|
|
40
|
-
show:
|
|
46
|
+
show: f.value,
|
|
41
47
|
onAfterLeave: () => {
|
|
42
|
-
|
|
48
|
+
b();
|
|
49
|
+
},
|
|
50
|
+
onClose: () => {
|
|
51
|
+
l();
|
|
52
|
+
},
|
|
53
|
+
onEsc: () => {
|
|
54
|
+
l();
|
|
43
55
|
},
|
|
44
56
|
role: "dialog",
|
|
45
57
|
"aria-modal": "true",
|
|
46
58
|
draggable: !0
|
|
47
59
|
}, {
|
|
48
60
|
default: ({
|
|
49
|
-
draggableClass:
|
|
61
|
+
draggableClass: y
|
|
50
62
|
}) => {
|
|
51
|
-
var
|
|
52
|
-
let
|
|
63
|
+
var d;
|
|
64
|
+
let a, c, i;
|
|
53
65
|
return n("div", {
|
|
54
66
|
class: ["w-400px rounded border border-muted max-w-full shadow-lg shadow-gray-950/10 bg-white/70 dark:shadow-gray-950/80 dark:bg-gray-900/70 backdrop-blur"]
|
|
55
67
|
}, [t.type !== "node" ? n("div", {
|
|
56
|
-
class: ["p-6 pb-2 flex gap-4",
|
|
68
|
+
class: ["p-6 pb-2 flex gap-4", y]
|
|
57
69
|
}, [n("div", null, [(t.type === "confirm" || t.type === "prompt") && n("div", {
|
|
58
70
|
class: "bg-warning bg-opacity-10 text-warning rounded-full p-2"
|
|
59
71
|
}, [n("div", {
|
|
@@ -70,43 +82,43 @@ const A = /* @__PURE__ */ y({
|
|
|
70
82
|
class: "flex flex-1 flex-col gap-2"
|
|
71
83
|
}, [n("div", {
|
|
72
84
|
class: "text-base font-bold"
|
|
73
|
-
}, [e.title]), t.type === "prompt" ? n(
|
|
85
|
+
}, [e.title]), t.type === "prompt" ? n(N, {
|
|
74
86
|
labelAlign: "left",
|
|
75
87
|
showLabel: !1,
|
|
76
88
|
showFeedback: !1,
|
|
77
89
|
class: "py-2"
|
|
78
|
-
},
|
|
79
|
-
default: () => [
|
|
90
|
+
}, r(a = p(g)) ? a : {
|
|
91
|
+
default: () => [a]
|
|
80
92
|
}) : n("div", {
|
|
81
93
|
class: "text-sm text-gray-500"
|
|
82
94
|
}, [e.content])])]) : n("div", {
|
|
83
95
|
class: "p-4 flex flex-col gap-4"
|
|
84
96
|
}, [n("div", {
|
|
85
97
|
class: "text-base font-bold"
|
|
86
|
-
}, [e.title]), (
|
|
98
|
+
}, [e.title]), (d = t.render) == null ? void 0 : d.call(t)]), n("div", {
|
|
87
99
|
class: "px-4 pb-4 flex justify-end gap-2"
|
|
88
|
-
}, [(t.type === "confirm" || t.type === "prompt") && n(
|
|
100
|
+
}, [(t.type === "confirm" || t.type === "prompt") && n(u, {
|
|
89
101
|
tertiary: !0,
|
|
90
102
|
"aria-label": o("components.button.cancel"),
|
|
91
103
|
type: e.button,
|
|
92
104
|
onClick: () => {
|
|
93
|
-
|
|
105
|
+
l();
|
|
94
106
|
}
|
|
95
|
-
}, c
|
|
96
|
-
default: () => [
|
|
97
|
-
}), n(
|
|
107
|
+
}, r(c = o("components.button.cancel")) ? c : {
|
|
108
|
+
default: () => [c]
|
|
109
|
+
}), n(u, {
|
|
98
110
|
"aria-label": o("components.button.confirm"),
|
|
99
111
|
type: e.button,
|
|
100
112
|
onClick: () => {
|
|
101
|
-
|
|
113
|
+
m(s.value);
|
|
102
114
|
}
|
|
103
|
-
},
|
|
104
|
-
default: () => [
|
|
115
|
+
}, r(i = o("components.button.confirm")) ? i : {
|
|
116
|
+
default: () => [i]
|
|
105
117
|
})])]);
|
|
106
118
|
}
|
|
107
119
|
});
|
|
108
120
|
}
|
|
109
121
|
});
|
|
110
122
|
export {
|
|
111
|
-
|
|
123
|
+
z as default
|
|
112
124
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as u, defineAsyncComponent as r, createVNode as t, Suspense as d } from "vue";
|
|
2
|
-
import { useExtendOverlay as
|
|
3
|
-
import { NDrawer as
|
|
2
|
+
import { useExtendOverlay as f } from "@overlastic/vue";
|
|
3
|
+
import { NDrawer as s, NButton as m, NSpin as b } from "naive-ui";
|
|
4
4
|
const w = /* @__PURE__ */ u({
|
|
5
5
|
name: "DuxDrawer",
|
|
6
6
|
props: {
|
|
@@ -19,15 +19,15 @@ const w = /* @__PURE__ */ u({
|
|
|
19
19
|
setup(e) {
|
|
20
20
|
const {
|
|
21
21
|
visible: i,
|
|
22
|
-
resolve:
|
|
23
|
-
reject:
|
|
22
|
+
resolve: a,
|
|
23
|
+
reject: n,
|
|
24
24
|
vanish: o
|
|
25
|
-
} =
|
|
25
|
+
} = f({
|
|
26
26
|
duration: 1e3
|
|
27
|
-
}),
|
|
28
|
-
|
|
27
|
+
}), l = (e == null ? void 0 : e.componentProps) || {};
|
|
28
|
+
l.onConfirm = a, l.onClose = n;
|
|
29
29
|
const c = typeof e.component == "function" ? r(e.component) : e.component;
|
|
30
|
-
return () => t(
|
|
30
|
+
return () => t(s, {
|
|
31
31
|
closeOnEsc: !1,
|
|
32
32
|
maskClosable: !1,
|
|
33
33
|
minWidth: 400,
|
|
@@ -35,11 +35,13 @@ const w = /* @__PURE__ */ u({
|
|
|
35
35
|
resizable: !0,
|
|
36
36
|
placement: e.placement,
|
|
37
37
|
show: i.value,
|
|
38
|
-
onUpdateShow: () =>
|
|
38
|
+
onUpdateShow: () => a(),
|
|
39
39
|
onAfterLeave: () => {
|
|
40
40
|
o();
|
|
41
41
|
},
|
|
42
|
-
|
|
42
|
+
onEsc: () => {
|
|
43
|
+
n();
|
|
44
|
+
}
|
|
43
45
|
}, {
|
|
44
46
|
default: () => [t("div", {
|
|
45
47
|
class: "h-full flex flex-col"
|
|
@@ -52,13 +54,13 @@ const w = /* @__PURE__ */ u({
|
|
|
52
54
|
size: "small",
|
|
53
55
|
color: "default",
|
|
54
56
|
class: "!px-1 h-6",
|
|
55
|
-
onClick: () =>
|
|
57
|
+
onClick: () => n()
|
|
56
58
|
}, {
|
|
57
59
|
default: () => [t("div", {
|
|
58
60
|
class: "i-tabler:x w-5 h-5"
|
|
59
61
|
}, null)]
|
|
60
62
|
})])]), t(d, null, {
|
|
61
|
-
default: () => t(c,
|
|
63
|
+
default: () => t(c, l, null),
|
|
62
64
|
fallback: () => t(b, {
|
|
63
65
|
show: !0
|
|
64
66
|
}, {
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { defineComponent as P, ref as S, watch as f, onMounted as k, onUnmounted as V, createVNode as w } from "vue";
|
|
2
|
+
import { useTheme as x, useManage as A, useGetAuth as M, useI18n as C, useUpload as D } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as E } from "@vueuse/core";
|
|
4
|
+
import { AiEditor as F } from "aieditor";
|
|
5
|
+
import { useMessage as N } from "naive-ui";
|
|
6
|
+
const T = /* @__PURE__ */ P({
|
|
7
|
+
name: "DuxAiEditor",
|
|
8
|
+
props: {
|
|
9
|
+
value: String,
|
|
10
|
+
defaultValue: String,
|
|
11
|
+
uploadUrl: String,
|
|
12
|
+
uploadHeaders: Object,
|
|
13
|
+
aiUrl: String,
|
|
14
|
+
height: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "500px"
|
|
17
|
+
},
|
|
18
|
+
onUpdateValue: Function
|
|
19
|
+
},
|
|
20
|
+
setup(e, {
|
|
21
|
+
emit: U
|
|
22
|
+
}) {
|
|
23
|
+
var m;
|
|
24
|
+
const d = S();
|
|
25
|
+
let r = null;
|
|
26
|
+
const p = x(), {
|
|
27
|
+
config: n
|
|
28
|
+
} = A(), v = M(), {
|
|
29
|
+
t: H
|
|
30
|
+
} = C(), y = N(), s = E(e, "value", U, {
|
|
31
|
+
passive: !0
|
|
32
|
+
}), h = D({
|
|
33
|
+
path: e.uploadUrl || ((m = n.apiPath) == null ? void 0 : m.upload) || "upload",
|
|
34
|
+
autoUpload: !1
|
|
35
|
+
});
|
|
36
|
+
f(s, (t) => {
|
|
37
|
+
var l;
|
|
38
|
+
r && (r.setContent(t || ""), (l = e.onUpdateValue) == null || l.call(e, s.value || ""));
|
|
39
|
+
}, {
|
|
40
|
+
immediate: !0
|
|
41
|
+
});
|
|
42
|
+
const c = (t) => new Promise((l, i) => {
|
|
43
|
+
h.addFiles([t], "file").then(() => {
|
|
44
|
+
h.trigger().then((o) => {
|
|
45
|
+
o.forEach((a) => {
|
|
46
|
+
var g;
|
|
47
|
+
const u = (g = a == null ? void 0 : a.data) == null ? void 0 : g.data;
|
|
48
|
+
l({
|
|
49
|
+
errorCode: 0,
|
|
50
|
+
data: {
|
|
51
|
+
src: u == null ? void 0 : u.url,
|
|
52
|
+
alt: a == null ? void 0 : a.filename
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}).catch((o) => {
|
|
57
|
+
y.error(o.message), i(o);
|
|
58
|
+
}).finally(() => {
|
|
59
|
+
h.clearFiles();
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
return k(() => {
|
|
64
|
+
var t, l, i, o;
|
|
65
|
+
r = new F({
|
|
66
|
+
theme: p.isDark.value ? "dark" : "light",
|
|
67
|
+
element: d.value,
|
|
68
|
+
placeholder: H("components.editor.placeholder"),
|
|
69
|
+
content: e.defaultValue || "",
|
|
70
|
+
onBlur: (a) => {
|
|
71
|
+
s.value = a.getHtml();
|
|
72
|
+
},
|
|
73
|
+
image: {
|
|
74
|
+
uploadUrl: e.uploadUrl || ((t = n.apiPath) == null ? void 0 : t.upload) || "upload",
|
|
75
|
+
uploadHeaders: e.uploadHeaders || {},
|
|
76
|
+
uploader: c
|
|
77
|
+
},
|
|
78
|
+
video: {
|
|
79
|
+
uploadUrl: e.uploadUrl || ((l = n.apiPath) == null ? void 0 : l.upload) || "upload",
|
|
80
|
+
uploadHeaders: e.uploadHeaders || {},
|
|
81
|
+
uploader: c
|
|
82
|
+
},
|
|
83
|
+
attachment: {
|
|
84
|
+
uploadUrl: e.uploadUrl || ((i = n.apiPath) == null ? void 0 : i.upload) || "upload",
|
|
85
|
+
uploadHeaders: e.uploadHeaders || {},
|
|
86
|
+
uploader: c
|
|
87
|
+
},
|
|
88
|
+
ai: {
|
|
89
|
+
models: {
|
|
90
|
+
custom: {
|
|
91
|
+
url: e.aiUrl || ((o = n.apiPath) == null ? void 0 : o.ai) || "ai",
|
|
92
|
+
headers: () => ({
|
|
93
|
+
"Content-Type": "application/json",
|
|
94
|
+
Authorization: v.token
|
|
95
|
+
}),
|
|
96
|
+
wrapPayload: (a) => JSON.stringify({
|
|
97
|
+
prompt: a
|
|
98
|
+
}),
|
|
99
|
+
parseMessage: (a) => {
|
|
100
|
+
const u = JSON.parse(a);
|
|
101
|
+
return {
|
|
102
|
+
role: "assistant",
|
|
103
|
+
content: u.message,
|
|
104
|
+
index: u.number,
|
|
105
|
+
status: u.status
|
|
106
|
+
};
|
|
107
|
+
},
|
|
108
|
+
protocol: "sse"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}), V(() => {
|
|
114
|
+
r == null || r.destroy();
|
|
115
|
+
}), f(p.isDark, (t) => {
|
|
116
|
+
d.value && (d.value.classList.remove("aie-theme-dark", "aie-theme-light"), d.value.classList.add(t ? "aie-theme-dark" : "aie-theme-light"));
|
|
117
|
+
}, {
|
|
118
|
+
immediate: !0
|
|
119
|
+
}), () => w("div", {
|
|
120
|
+
ref: d,
|
|
121
|
+
style: `height: ${e.height}; width:100%`
|
|
122
|
+
}, null);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
export {
|
|
126
|
+
T as DuxAiEditor
|
|
127
|
+
};
|