@wfrog/vc-ui 1.0.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/README.md +95 -0
- package/dist/es/chunk/-EkpfdcW.mjs +1100 -0
- package/dist/es/chunk/8rLUmOVR.mjs +29 -0
- package/dist/es/chunk/B-rxnVJv.mjs +3 -0
- package/dist/es/chunk/BAGoDD49.mjs +36 -0
- package/dist/es/chunk/BAtns-Mc.mjs +96 -0
- package/dist/es/chunk/BJS5Pdfp.mjs +55 -0
- package/dist/es/chunk/BMzd-IS6.mjs +900 -0
- package/dist/es/chunk/BWcCXRRK.mjs +229 -0
- package/dist/es/chunk/BX-Ogf7p.mjs +3743 -0
- package/dist/es/chunk/B_tU9Nax.mjs +49 -0
- package/dist/es/chunk/BdDihk0t.mjs +3420 -0
- package/dist/es/chunk/C2LgraHx.mjs +489 -0
- package/dist/es/chunk/C5hWsUfD.mjs +64 -0
- package/dist/es/chunk/C7iSSBUr.mjs +303 -0
- package/dist/es/chunk/CD98REcR.mjs +666 -0
- package/dist/es/chunk/CEClY-_T.mjs +445 -0
- package/dist/es/chunk/CEm0brzD.mjs +35 -0
- package/dist/es/chunk/CMABHk8B.mjs +1942 -0
- package/dist/es/chunk/CS4VKsqy.mjs +19 -0
- package/dist/es/chunk/CVlj9F0I.mjs +291 -0
- package/dist/es/chunk/CZ4ggqDE.mjs +140 -0
- package/dist/es/chunk/CaTfZePA.mjs +533 -0
- package/dist/es/chunk/Ce9ApjrT.mjs +201 -0
- package/dist/es/chunk/ClZGuAIb.mjs +10 -0
- package/dist/es/chunk/Coex0GxM.mjs +450 -0
- package/dist/es/chunk/Ct6q2FXg.mjs +5 -0
- package/dist/es/chunk/CyxEcbcy.mjs +29 -0
- package/dist/es/chunk/D389hx_T.mjs +35 -0
- package/dist/es/chunk/D3DXeVfC.mjs +1171 -0
- package/dist/es/chunk/D3uV7vm-.mjs +45 -0
- package/dist/es/chunk/D5259bwd.mjs +50 -0
- package/dist/es/chunk/DMHNh_tw.mjs +49 -0
- package/dist/es/chunk/DVNTpOBR.mjs +4 -0
- package/dist/es/chunk/DZACQ9LT.mjs +95 -0
- package/dist/es/chunk/De_EXLIy.mjs +22 -0
- package/dist/es/chunk/Dh4jaUSg.mjs +89 -0
- package/dist/es/chunk/DhhdKtyu.mjs +439 -0
- package/dist/es/chunk/DqUIKX7f.mjs +2039 -0
- package/dist/es/chunk/Dqz1zvKN.mjs +59 -0
- package/dist/es/chunk/Dvi7RsXg.mjs +727 -0
- package/dist/es/chunk/DyDMGLoF.mjs +123 -0
- package/dist/es/chunk/E_WRn0OP.mjs +449 -0
- package/dist/es/chunk/Fo0dZYnz.mjs +128 -0
- package/dist/es/chunk/HSv8BL8o.mjs +72 -0
- package/dist/es/chunk/JCIyOUEY.mjs +105 -0
- package/dist/es/chunk/O-uhUKF4.mjs +43 -0
- package/dist/es/chunk/Spa-JKB4.mjs +1046 -0
- package/dist/es/chunk/VAdRxe-1.mjs +16 -0
- package/dist/es/chunk/VCrtRnxt.mjs +1477 -0
- package/dist/es/chunk/ViP2SEY4.mjs +211 -0
- package/dist/es/chunk/aibQ9WSZ.mjs +249 -0
- package/dist/es/chunk/nWBcrYxV.mjs +690 -0
- package/dist/es/chunk/pcqpp-6-.mjs +9 -0
- package/dist/es/chunk/qY9OvNHY.mjs +283 -0
- package/dist/es/chunk/su2Zrql0.mjs +53 -0
- package/dist/es/chunk/zfg5SOj1.mjs +138 -0
- package/dist/es/components/awesome-icon/awesome-icon.d.ts +6 -0
- package/dist/es/components/awesome-icon/awesome-icon.mjs +41 -0
- package/dist/es/components/awesome-icon/awesome-icon.vue.d.ts +5 -0
- package/dist/es/components/awesome-icon/index.d.ts +4 -0
- package/dist/es/components/awesome-icon/index.mjs +6 -0
- package/dist/es/components/backbottom/backbottom.d.ts +7 -0
- package/dist/es/components/backbottom/backbottom.mjs +172 -0
- package/dist/es/components/backbottom/backbottom.vue.d.ts +7 -0
- package/dist/es/components/backbottom/components/child.vue.d.ts +30 -0
- package/dist/es/components/backbottom/index.d.ts +4 -0
- package/dist/es/components/backbottom/index.mjs +6 -0
- package/dist/es/components/button/button.d.ts +18 -0
- package/dist/es/components/button/button.mjs +313 -0
- package/dist/es/components/button/button.vue.d.ts +33 -0
- package/dist/es/components/button/index.css +9 -0
- package/dist/es/components/button/index.d.ts +4 -0
- package/dist/es/components/button/index.mjs +6 -0
- package/dist/es/components/cdn-tag.vue.d.ts +5 -0
- package/dist/es/components/chat-container/chat-container.d.ts +9 -0
- package/dist/es/components/chat-container/chat-container.mjs +77 -0
- package/dist/es/components/chat-container/chat-container.vue.d.ts +29 -0
- package/dist/es/components/chat-container/index.css +9 -0
- package/dist/es/components/chat-container/index.d.ts +4 -0
- package/dist/es/components/chat-container/index.mjs +6 -0
- package/dist/es/components/choice/choice.d.ts +6 -0
- package/dist/es/components/choice/choice.mjs +53 -0
- package/dist/es/components/choice/choice.vue.d.ts +5 -0
- package/dist/es/components/choice/index.css +7 -0
- package/dist/es/components/choice/index.d.ts +4 -0
- package/dist/es/components/choice/index.mjs +6 -0
- package/dist/es/components/choice-boolean/choice-boolean.d.ts +5 -0
- package/dist/es/components/choice-boolean/choice-boolean.mjs +32 -0
- package/dist/es/components/choice-boolean/choice-boolean.vue.d.ts +10 -0
- package/dist/es/components/choice-boolean/index.d.ts +4 -0
- package/dist/es/components/choice-boolean/index.mjs +6 -0
- package/dist/es/components/config-provider/config-provider.d.ts +16 -0
- package/dist/es/components/config-provider/config-provider.mjs +29 -0
- package/dist/es/components/config-provider/config-provider.vue.d.ts +18 -0
- package/dist/es/components/config-provider/config-provider2.mjs +6 -0
- package/dist/es/components/config-provider/index.d.ts +4 -0
- package/dist/es/components/config-provider/index.mjs +6 -0
- package/dist/es/components/cropper/cropper.d.ts +12 -0
- package/dist/es/components/cropper/cropper.mjs +333 -0
- package/dist/es/components/cropper/cropper.vue.d.ts +32 -0
- package/dist/es/components/cropper/index.css +4 -0
- package/dist/es/components/cropper/index.d.ts +4 -0
- package/dist/es/components/cropper/index.mjs +6 -0
- package/dist/es/components/currency/currency.d.ts +21 -0
- package/dist/es/components/currency/currency.mjs +185 -0
- package/dist/es/components/currency/currency.vue.d.ts +14 -0
- package/dist/es/components/currency/index.css +8 -0
- package/dist/es/components/currency/index.d.ts +4 -0
- package/dist/es/components/currency/index.mjs +6 -0
- package/dist/es/components/daterange-picker/daterange-picker.d.ts +6 -0
- package/dist/es/components/daterange-picker/daterange-picker.mjs +5550 -0
- package/dist/es/components/daterange-picker/daterange-picker.vue.d.ts +13 -0
- package/dist/es/components/daterange-picker/index.d.ts +4 -0
- package/dist/es/components/daterange-picker/index.mjs +6 -0
- package/dist/es/components/dialog/dialog.d.ts +13 -0
- package/dist/es/components/dialog/dialog.mjs +537 -0
- package/dist/es/components/dialog/dialog.vue.d.ts +38 -0
- package/dist/es/components/dialog/index.css +87 -0
- package/dist/es/components/dialog/index.d.ts +4 -0
- package/dist/es/components/dialog/index.mjs +6 -0
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.d.ts +33 -0
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +412 -0
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.vue.d.ts +23 -0
- package/dist/es/components/dialog-camera-upload/index.css +66 -0
- package/dist/es/components/dialog-camera-upload/index.d.ts +4 -0
- package/dist/es/components/dialog-camera-upload/index.mjs +6 -0
- package/dist/es/components/dialog-map-point/dialog-map-point.d.ts +9 -0
- package/dist/es/components/dialog-map-point/dialog-map-point.mjs +183 -0
- package/dist/es/components/dialog-map-point/dialog-map-point.vue.d.ts +22 -0
- package/dist/es/components/dialog-map-point/index.css +11 -0
- package/dist/es/components/dialog-map-point/index.d.ts +4 -0
- package/dist/es/components/dialog-map-point/index.mjs +6 -0
- package/dist/es/components/dialog-upload-images/dialog-upload-images.d.ts +16 -0
- package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +1391 -0
- package/dist/es/components/dialog-upload-images/dialog-upload-images.vue.d.ts +19 -0
- package/dist/es/components/dialog-upload-images/index.css +62 -0
- package/dist/es/components/dialog-upload-images/index.d.ts +4 -0
- package/dist/es/components/dialog-upload-images/index.mjs +6 -0
- package/dist/es/components/document.vue.d.ts +14 -0
- package/dist/es/components/drawer/drawer.d.ts +7 -0
- package/dist/es/components/drawer/drawer.mjs +412 -0
- package/dist/es/components/drawer/drawer.vue.d.ts +31 -0
- package/dist/es/components/drawer/index.css +56 -0
- package/dist/es/components/drawer/index.d.ts +4 -0
- package/dist/es/components/drawer/index.mjs +6 -0
- package/dist/es/components/easy-pagination/easy-pagination.d.ts +8 -0
- package/dist/es/components/easy-pagination/easy-pagination.mjs +74 -0
- package/dist/es/components/easy-pagination/easy-pagination.vue.d.ts +19 -0
- package/dist/es/components/easy-pagination/index.css +10 -0
- package/dist/es/components/easy-pagination/index.d.ts +4 -0
- package/dist/es/components/easy-pagination/index.mjs +6 -0
- package/dist/es/components/el-icon/el-icon.d.ts +6 -0
- package/dist/es/components/el-icon/el-icon.mjs +46 -0
- package/dist/es/components/el-icon/el-icon.vue.d.ts +6 -0
- package/dist/es/components/el-icon/index.css +7 -0
- package/dist/es/components/el-icon/index.d.ts +4 -0
- package/dist/es/components/el-icon/index.mjs +6 -0
- package/dist/es/components/example-wrapper.vue.d.ts +19 -0
- package/dist/es/components/flag/flag.mjs +44 -0
- package/dist/es/components/flag/flag.vue.d.ts +5 -0
- package/dist/es/components/flag/flags.d.ts +8 -0
- package/dist/es/components/flag/index.d.ts +4 -0
- package/dist/es/components/flag/index.mjs +6 -0
- package/dist/es/components/icon/icon.d.ts +6 -0
- package/dist/es/components/icon/icon.mjs +54 -0
- package/dist/es/components/icon/icon.vue.d.ts +3 -0
- package/dist/es/components/icon/icon2.mjs +27 -0
- package/dist/es/components/icon/index.css +9 -0
- package/dist/es/components/icon/index.d.ts +4 -0
- package/dist/es/components/icon/index.mjs +6 -0
- package/dist/es/components/image/image.d.ts +16 -0
- package/dist/es/components/image/image.mjs +167 -0
- package/dist/es/components/image/image.vue.d.ts +206 -0
- package/dist/es/components/image/index.css +20 -0
- package/dist/es/components/image/index.d.ts +4 -0
- package/dist/es/components/image/index.mjs +6 -0
- package/dist/es/components/input/index.css +9 -0
- package/dist/es/components/input/index.d.ts +4 -0
- package/dist/es/components/input/index.mjs +6 -0
- package/dist/es/components/input/input.d.ts +4 -0
- package/dist/es/components/input/input.mjs +85 -0
- package/dist/es/components/input/input.vue.d.ts +1232 -0
- package/dist/es/components/input-number/index.css +24 -0
- package/dist/es/components/input-number/index.d.ts +4 -0
- package/dist/es/components/input-number/index.mjs +6 -0
- package/dist/es/components/input-number/input-number.d.ts +8 -0
- package/dist/es/components/input-number/input-number.mjs +137 -0
- package/dist/es/components/input-number/input-number.vue.d.ts +35 -0
- package/dist/es/components/pca-picker/components/c.vue.d.ts +123 -0
- package/dist/es/components/pca-picker/components/elevator-item.vue.d.ts +7 -0
- package/dist/es/components/pca-picker/components/filter.vue.d.ts +2 -0
- package/dist/es/components/pca-picker/components/history.vue.d.ts +2 -0
- package/dist/es/components/pca-picker/components/hot.vue.d.ts +2 -0
- package/dist/es/components/pca-picker/components/p.vue.d.ts +2 -0
- package/dist/es/components/pca-picker/components/pca.vue.d.ts +9 -0
- package/dist/es/components/pca-picker/index.css +107 -0
- package/dist/es/components/pca-picker/index.d.ts +4 -0
- package/dist/es/components/pca-picker/index.mjs +6 -0
- package/dist/es/components/pca-picker/pca-picker.d.ts +78 -0
- package/dist/es/components/pca-picker/pca-picker.mjs +1667 -0
- package/dist/es/components/pca-picker/pca-picker.vue.d.ts +583 -0
- package/dist/es/components/qr-code/index.d.ts +4 -0
- package/dist/es/components/qr-code/index.mjs +6 -0
- package/dist/es/components/qr-code/qr-code.d.ts +9 -0
- package/dist/es/components/qr-code/qr-code.mjs +69 -0
- package/dist/es/components/qr-code/qr-code.vue.d.ts +13 -0
- package/dist/es/components/screenfull/index.css +14 -0
- package/dist/es/components/screenfull/index.d.ts +4 -0
- package/dist/es/components/screenfull/index.mjs +6 -0
- package/dist/es/components/screenfull/screenfull.d.ts +4 -0
- package/dist/es/components/screenfull/screenfull.mjs +91 -0
- package/dist/es/components/screenfull/screenfull.vue.d.ts +20 -0
- package/dist/es/components/select/index.css +9 -0
- package/dist/es/components/select/index.d.ts +4 -0
- package/dist/es/components/select/index.mjs +6 -0
- package/dist/es/components/select/select.d.ts +6 -0
- package/dist/es/components/select/select.mjs +63 -0
- package/dist/es/components/select/select.vue.d.ts +6 -0
- package/dist/es/components/single-player/index.css +45 -0
- package/dist/es/components/single-player/index.d.ts +4 -0
- package/dist/es/components/single-player/index.mjs +6 -0
- package/dist/es/components/single-player/single-player.d.ts +4 -0
- package/dist/es/components/single-player/single-player.mjs +1172 -0
- package/dist/es/components/single-player/single-player.vue.d.ts +13 -0
- package/dist/es/components/svg-icon/index.css +9 -0
- package/dist/es/components/svg-icon/index.d.ts +4 -0
- package/dist/es/components/svg-icon/index.mjs +6 -0
- package/dist/es/components/svg-icon/svg-icon.d.ts +5 -0
- package/dist/es/components/svg-icon/svg-icon.mjs +46 -0
- package/dist/es/components/svg-icon/svg-icon.vue.d.ts +18 -0
- package/dist/es/components/switch/index.css +15 -0
- package/dist/es/components/switch/index.d.ts +4 -0
- package/dist/es/components/switch/index.mjs +6 -0
- package/dist/es/components/switch/switch.d.ts +9 -0
- package/dist/es/components/switch/switch.mjs +82 -0
- package/dist/es/components/switch/switch.vue.d.ts +14 -0
- package/dist/es/components/sync-scroll-container/index.css +82 -0
- package/dist/es/components/sync-scroll-container/index.d.ts +4 -0
- package/dist/es/components/sync-scroll-container/index.mjs +6 -0
- package/dist/es/components/sync-scroll-container/sync-scroll-container.d.ts +6 -0
- package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +157 -0
- package/dist/es/components/sync-scroll-container/sync-scroll-container.vue.d.ts +36 -0
- package/dist/es/components/tags/index.css +17 -0
- package/dist/es/components/tags/index.d.ts +4 -0
- package/dist/es/components/tags/index.mjs +6 -0
- package/dist/es/components/tags/tags.d.ts +9 -0
- package/dist/es/components/tags/tags.mjs +296 -0
- package/dist/es/components/tags/tags.vue.d.ts +20 -0
- package/dist/es/components/text-ellipsis/index.css +15 -0
- package/dist/es/components/text-ellipsis/index.d.ts +4 -0
- package/dist/es/components/text-ellipsis/index.mjs +6 -0
- package/dist/es/components/text-ellipsis/text-ellipsis.d.ts +12 -0
- package/dist/es/components/text-ellipsis/text-ellipsis.mjs +137 -0
- package/dist/es/components/text-ellipsis/text-ellipsis.vue.d.ts +41 -0
- package/dist/es/components/thousand-input/index.css +4 -0
- package/dist/es/components/thousand-input/index.d.ts +4 -0
- package/dist/es/components/thousand-input/index.mjs +6 -0
- package/dist/es/components/thousand-input/thousand-input.d.ts +11 -0
- package/dist/es/components/thousand-input/thousand-input.mjs +159 -0
- package/dist/es/components/thousand-input/thousand-input.vue.d.ts +2558 -0
- package/dist/es/components/tinymce/config.d.ts +25 -0
- package/dist/es/components/tinymce/index.css +9 -0
- package/dist/es/components/tinymce/index.d.ts +4 -0
- package/dist/es/components/tinymce/index.mjs +6 -0
- package/dist/es/components/tinymce/tinymce.d.ts +9 -0
- package/dist/es/components/tinymce/tinymce.mjs +176 -0
- package/dist/es/components/tinymce/tinymce.vue.d.ts +20 -0
- package/dist/es/components/tree-picker/components/popover-cascader.d.ts +8 -0
- package/dist/es/components/tree-picker/components/popover-cascader.vue.d.ts +1361 -0
- package/dist/es/components/tree-picker/docs/data.d.ts +2 -0
- package/dist/es/components/tree-picker/index.css +41 -0
- package/dist/es/components/tree-picker/index.d.ts +4 -0
- package/dist/es/components/tree-picker/index.mjs +6 -0
- package/dist/es/components/tree-picker/popover-cascader.css +23 -0
- package/dist/es/components/tree-picker/tree-picker.d.ts +14 -0
- package/dist/es/components/tree-picker/tree-picker.mjs +173 -0
- package/dist/es/components/tree-picker/tree-picker.vue.d.ts +575 -0
- package/dist/es/components/upload-file/index.css +30 -0
- package/dist/es/components/upload-file/index.d.ts +4 -0
- package/dist/es/components/upload-file/index.mjs +6 -0
- package/dist/es/components/upload-file/upload-file.d.ts +39 -0
- package/dist/es/components/upload-file/upload-file.mjs +202 -0
- package/dist/es/components/upload-file/upload-file.vue.d.ts +30 -0
- package/dist/es/directives/cleave/index.d.ts +3 -0
- package/dist/es/directives/focus/index.d.ts +4 -0
- package/dist/es/directives/index.d.ts +3 -0
- package/dist/es/directives/thousand/index.d.ts +3 -0
- package/dist/es/index.d.ts +42 -0
- package/dist/es/index.mjs +122 -0
- package/dist/es/use/useSmallScreen/index.d.ts +4 -0
- package/dist/es/use/useSmallScreen/index.mjs +10 -0
- package/dist/es/use/useStore/index.d.ts +3 -0
- package/dist/es/use/useStore/index.mjs +22 -0
- package/dist/es/utils/index.d.ts +6 -0
- package/dist/es/utils/resolver.d.ts +3 -0
- package/dist/es/utils/resolver.mjs +24 -0
- package/dist/es/utils/typescript.d.ts +6 -0
- package/dist/global.d.ts +42 -0
- package/dist/index.css +869 -0
- package/package.json +58 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* source: src/components/dialog/dialog.vue */
|
|
2
|
+
:root{--el-popup-modal-bg-color:var(--el-color-black);--el-popup-modal-opacity:0.5}.v-modal-enter{animation:v-modal-in var(--el-transition-duration-fast) ease}.v-modal-leave{animation:v-modal-out var(--el-transition-duration-fast) ease forwards}@keyframes v-modal-in{0%{opacity:0}}@keyframes v-modal-out{to{opacity:0}}.v-modal{background:var(--el-popup-modal-bg-color);height:100%;left:0;opacity:var(--el-popup-modal-opacity);position:fixed;top:0;width:100%}.el-popup-parent--hidden{overflow:hidden}.el-dialog{--el-dialog-width:50%;--el-dialog-margin-top:15vh;--el-dialog-bg-color:var(--el-bg-color);--el-dialog-box-shadow:var(--el-box-shadow);--el-dialog-title-font-size:var(--el-font-size-large);--el-dialog-content-font-size:14px;--el-dialog-font-line-height:var(--el-font-line-height-primary);--el-dialog-padding-primary:16px;--el-dialog-border-radius:var(--el-border-radius-base);background:var(--el-dialog-bg-color);border-radius:var(--el-dialog-border-radius);box-shadow:var(--el-dialog-box-shadow);box-sizing:border-box;margin:var(--el-dialog-margin-top,15vh) auto 50px;overflow-wrap:break-word;padding:var(--el-dialog-padding-primary);position:relative;width:var(--el-dialog-width,50%)}.el-dialog:focus{outline:none!important}.el-dialog.is-align-center{margin:auto}.el-dialog.is-fullscreen{--el-dialog-width:100%;--el-dialog-margin-top:0;border-radius:0;height:100%;margin-bottom:0;overflow:auto}.el-dialog__wrapper{bottom:0;left:0;margin:0;overflow:auto;position:fixed;right:0;top:0}.el-dialog.is-draggable .el-dialog__header{cursor:move;-webkit-user-select:none;-moz-user-select:none;user-select:none}.el-dialog__header{padding-bottom:var(--el-dialog-padding-primary)}.el-dialog__header.show-close{padding-right:calc(var(--el-dialog-padding-primary) + var(--el-message-close-size, 16px))}.el-dialog__headerbtn{background:transparent;border:none;cursor:pointer;font-size:var(--el-message-close-size,16px);height:48px;outline:none;padding:0;position:absolute;right:0;top:0;width:48px}.el-dialog__headerbtn .el-dialog__close{color:var(--el-color-info);font-size:inherit}.el-dialog__headerbtn:focus .el-dialog__close,.el-dialog__headerbtn:hover .el-dialog__close{color:var(--el-color-primary)}.el-dialog__title{color:var(--el-text-color-primary);font-size:var(--el-dialog-title-font-size);line-height:var(--el-dialog-font-line-height)}.el-dialog__body{color:var(--el-text-color-regular);font-size:var(--el-dialog-content-font-size)}.el-dialog__footer{box-sizing:border-box;padding-top:var(--el-dialog-padding-primary);text-align:right}.el-dialog--center{text-align:center}.el-dialog--center .el-dialog__body{text-align:initial}.el-dialog--center .el-dialog__footer{text-align:inherit}.el-modal-dialog.is-penetrable{pointer-events:none}.el-modal-dialog.is-penetrable .el-dialog{pointer-events:auto}.el-overlay-dialog{bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0}.dialog-fade-enter-active{animation:modal-fade-in var(--el-transition-duration)}.dialog-fade-enter-active .el-overlay-dialog{animation:dialog-fade-in var(--el-transition-duration)}.dialog-fade-leave-active{animation:modal-fade-out var(--el-transition-duration)}.dialog-fade-leave-active .el-overlay-dialog{animation:dialog-fade-out var(--el-transition-duration)}@keyframes dialog-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes dialog-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}@keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes modal-fade-out{0%{opacity:1}to{opacity:0}}div._main_zs7g5_1 {
|
|
3
|
+
--el-dialog-padding-primary: 0;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
}
|
|
7
|
+
div._main_zs7g5_1 .el-dialog__header {
|
|
8
|
+
padding: 12px 16px;
|
|
9
|
+
margin-right: 0;
|
|
10
|
+
border-bottom: 1px solid var(--el-border-color-light);
|
|
11
|
+
}
|
|
12
|
+
div._main_zs7g5_1 .el-dialog__body {
|
|
13
|
+
flex-grow: 1;
|
|
14
|
+
padding: 0;
|
|
15
|
+
}
|
|
16
|
+
div._main_zs7g5_1 .el-dialog__footer {
|
|
17
|
+
padding: 12px 16px;
|
|
18
|
+
border-top: 1px solid var(--el-border-color-light);
|
|
19
|
+
}
|
|
20
|
+
div._main_zs7g5_1 > .el-dialog__body > .el-scrollbar {
|
|
21
|
+
position: relative;
|
|
22
|
+
}
|
|
23
|
+
div._main_zs7g5_1 > .el-dialog__body > .el-scrollbar::before {
|
|
24
|
+
content: "";
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 0;
|
|
27
|
+
left: 0;
|
|
28
|
+
width: calc(100% - 8px);
|
|
29
|
+
height: 100%;
|
|
30
|
+
background: var(--el-color-white);
|
|
31
|
+
height: 16px;
|
|
32
|
+
z-index: 3;
|
|
33
|
+
display: var(--v5830f752);
|
|
34
|
+
}
|
|
35
|
+
div._main_zs7g5_1 > .el-dialog__body > .el-scrollbar::after {
|
|
36
|
+
content: "";
|
|
37
|
+
position: absolute;
|
|
38
|
+
bottom: 0;
|
|
39
|
+
left: 0;
|
|
40
|
+
width: calc(100% - 8px);
|
|
41
|
+
height: 100%;
|
|
42
|
+
background: var(--el-color-white);
|
|
43
|
+
height: 16px;
|
|
44
|
+
z-index: 3;
|
|
45
|
+
display: var(--v5830f752);
|
|
46
|
+
}
|
|
47
|
+
div._main_zs7g5_1 ._header_zs7g5_46 h4 {
|
|
48
|
+
font-size: 1.2em;
|
|
49
|
+
font-weight: 600;
|
|
50
|
+
line-height: 1;
|
|
51
|
+
}
|
|
52
|
+
div._main_zs7g5_1 ._header_zs7g5_46 {
|
|
53
|
+
line-height: 1;
|
|
54
|
+
}
|
|
55
|
+
._header_zs7g5_46 {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: row;
|
|
58
|
+
justify-content: space-between;
|
|
59
|
+
}
|
|
60
|
+
._header_zs7g5_46 h4 {
|
|
61
|
+
padding: 0;
|
|
62
|
+
margin: 0 !important;
|
|
63
|
+
}
|
|
64
|
+
._title_zs7g5_65 {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
}
|
|
68
|
+
._scrollbar_zs7g5_70 > .el-scrollbar__wrap {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
}
|
|
72
|
+
._scrollbar_zs7g5_70 > .el-scrollbar__wrap > .el-scrollbar__view {
|
|
73
|
+
flex-grow: 1;
|
|
74
|
+
min-height: 100px;
|
|
75
|
+
}
|
|
76
|
+
._scrollbar_zs7g5_70._flex_zs7g5_78 > .el-scrollbar__wrap > .el-scrollbar__view {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
}
|
|
80
|
+
._body-container_zs7g5_83 {
|
|
81
|
+
padding: 16px;
|
|
82
|
+
}
|
|
83
|
+
._buttons_zs7g5_87 button {
|
|
84
|
+
padding: 8px;
|
|
85
|
+
font-size: 1.2em;
|
|
86
|
+
border: 0;
|
|
87
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as ICropper } from 'cropperjs';
|
|
2
|
+
export declare const TYPE_UPLOAD = "upload";
|
|
3
|
+
export declare const TYPE_CAMERA = "camera";
|
|
4
|
+
export declare const WINDOW_IMAGE = "image";
|
|
5
|
+
export declare const WINDOW_VIDEO = "video";
|
|
6
|
+
export declare const WINDOW_CANVAS = "canvas";
|
|
7
|
+
export declare const WINDOW_PLACEHOLDER = "placeholder";
|
|
8
|
+
export interface IDialogCameraUploadProps {
|
|
9
|
+
visible: boolean;
|
|
10
|
+
type?: ('upload' | 'camera')[];
|
|
11
|
+
width?: number;
|
|
12
|
+
fixWidth?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
accept?: string;
|
|
15
|
+
cropper?: boolean;
|
|
16
|
+
cropperOption?: ICropper.Options;
|
|
17
|
+
}
|
|
18
|
+
export declare function useVideosList(): {
|
|
19
|
+
cameras: globalThis.Ref<{
|
|
20
|
+
readonly deviceId: string;
|
|
21
|
+
readonly groupId: string;
|
|
22
|
+
readonly kind: MediaDeviceKind;
|
|
23
|
+
readonly label: string;
|
|
24
|
+
toJSON: () => any;
|
|
25
|
+
}[], MediaDeviceInfo[] | {
|
|
26
|
+
readonly deviceId: string;
|
|
27
|
+
readonly groupId: string;
|
|
28
|
+
readonly kind: MediaDeviceKind;
|
|
29
|
+
readonly label: string;
|
|
30
|
+
toJSON: () => any;
|
|
31
|
+
}[]>;
|
|
32
|
+
getVideosList: () => Promise<void>;
|
|
33
|
+
};
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import './index.css'
|
|
2
|
+
import '../../chunk/E_WRn0OP.mjs';
|
|
3
|
+
import { v as vLoading } from '../../chunk/CVlj9F0I.mjs';
|
|
4
|
+
import { E as ElButton } from '../../chunk/VCrtRnxt.mjs';
|
|
5
|
+
import '../../chunk/CZ4ggqDE.mjs';
|
|
6
|
+
import { E as ElSelect, a as ElOption } from '../../chunk/CMABHk8B.mjs';
|
|
7
|
+
import '../../chunk/CaTfZePA.mjs';
|
|
8
|
+
import '../../chunk/DqUIKX7f.mjs';
|
|
9
|
+
import { E as ElAlert } from '../../chunk/zfg5SOj1.mjs';
|
|
10
|
+
import { E as ElImage } from '../../chunk/BMzd-IS6.mjs';
|
|
11
|
+
import { ref, defineComponent, useTemplateRef, reactive, computed, watch, createBlock, openBlock, unref, isRef, withCtx, withDirectives, createElementBlock, normalizeStyle, normalizeClass, createCommentVNode, createVNode, vShow, createElementVNode, Transition, Fragment, renderList, createTextVNode } from 'vue';
|
|
12
|
+
import { Camera, Upload } from '@element-plus/icons-vue';
|
|
13
|
+
import { d as defaultWindow, f as file } from '../../chunk/BdDihk0t.mjs';
|
|
14
|
+
import { C as Component$3 } from '../cropper/cropper.mjs';
|
|
15
|
+
import { C as Component$1 } from '../dialog/dialog.mjs';
|
|
16
|
+
import { C as Component$2 } from '../upload-file/upload-file.mjs';
|
|
17
|
+
import { a as useUserMedia } from '../../chunk/CD98REcR.mjs';
|
|
18
|
+
import { E as ElIcon } from '../../chunk/DMHNh_tw.mjs';
|
|
19
|
+
import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
|
|
20
|
+
|
|
21
|
+
const TYPE_UPLOAD = "upload";
|
|
22
|
+
const TYPE_CAMERA = "camera";
|
|
23
|
+
const WINDOW_IMAGE = "image";
|
|
24
|
+
const WINDOW_VIDEO = "video";
|
|
25
|
+
const WINDOW_CANVAS = "canvas";
|
|
26
|
+
const WINDOW_PLACEHOLDER = "placeholder";
|
|
27
|
+
function useVideosList() {
|
|
28
|
+
const cameras = ref([]);
|
|
29
|
+
const getVideosList = async () => {
|
|
30
|
+
const temp = await navigator.mediaDevices.getUserMedia({ video: true });
|
|
31
|
+
temp.getTracks().forEach((t) => t.stop());
|
|
32
|
+
const devs = await navigator.mediaDevices.enumerateDevices();
|
|
33
|
+
cameras.value = devs.filter((d) => d.deviceId && d.kind === "videoinput");
|
|
34
|
+
};
|
|
35
|
+
return { cameras, getVideosList };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const _hoisted_1 = ["width", "height"];
|
|
39
|
+
const _hoisted_2 = ["width", "height"];
|
|
40
|
+
const _hoisted_3 = { key: 1 };
|
|
41
|
+
const TIPS_SHOOT_SUCCESS = "照片拍摄成功";
|
|
42
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
43
|
+
__name: "dialog-camera-upload",
|
|
44
|
+
props: {
|
|
45
|
+
visible: { type: Boolean },
|
|
46
|
+
type: { default: () => [TYPE_UPLOAD, TYPE_CAMERA] },
|
|
47
|
+
width: { default: 600 },
|
|
48
|
+
fixWidth: { default: 32 },
|
|
49
|
+
height: { default: 400 },
|
|
50
|
+
accept: { default: ".jpg,.jpeg,.png" },
|
|
51
|
+
cropper: { type: Boolean, default: true },
|
|
52
|
+
cropperOption: {}
|
|
53
|
+
},
|
|
54
|
+
emits: ["update:visible", "close", "error", "save"],
|
|
55
|
+
setup(__props, { emit: __emit }) {
|
|
56
|
+
const props = __props;
|
|
57
|
+
const emits = __emit;
|
|
58
|
+
const currentCamera = ref();
|
|
59
|
+
const { cameras, getVideosList } = useVideosList();
|
|
60
|
+
const { stream, start, stop, enabled } = useUserMedia({
|
|
61
|
+
constraints: {
|
|
62
|
+
video: {
|
|
63
|
+
width: props.width,
|
|
64
|
+
height: props.height,
|
|
65
|
+
deviceId: currentCamera.value
|
|
66
|
+
},
|
|
67
|
+
audio: false
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const videoRef = useTemplateRef("videoRef");
|
|
71
|
+
const canvasRef = useTemplateRef("canvasRef");
|
|
72
|
+
const currentWindow = ref("");
|
|
73
|
+
const blobImage = ref("");
|
|
74
|
+
const loading = ref(false);
|
|
75
|
+
const cropperVisible = ref(false);
|
|
76
|
+
const alert = reactive({ visible: false, type: "success", description: "" });
|
|
77
|
+
let myFile;
|
|
78
|
+
const dialogWidth = computed(() => `${props.width + props.fixWidth}px`);
|
|
79
|
+
const windowStyle = computed(() => ({ width: `${props.width}px`, height: `${props.height}px` }));
|
|
80
|
+
const cameraVisible = computed(() => props.type.includes(TYPE_CAMERA) && currentCamera.value);
|
|
81
|
+
const uploadVisible = computed(() => props.type.includes(TYPE_UPLOAD));
|
|
82
|
+
const imageVisible = computed(() => currentWindow.value === WINDOW_IMAGE);
|
|
83
|
+
const canvasVisible = computed(() => currentWindow.value === WINDOW_CANVAS);
|
|
84
|
+
const videoVisible = computed(() => currentWindow.value === WINDOW_VIDEO);
|
|
85
|
+
const placeholderVisible = computed(() => currentWindow.value === WINDOW_PLACEHOLDER || imageVisible.value || canvasVisible.value);
|
|
86
|
+
const placeholderOpacity = computed(() => currentWindow.value === WINDOW_PLACEHOLDER);
|
|
87
|
+
const confirmVisible = computed(() => {
|
|
88
|
+
const haveSource = !!blobImage.value;
|
|
89
|
+
const myWindow = [WINDOW_CANVAS, WINDOW_IMAGE].includes(currentWindow.value);
|
|
90
|
+
return haveSource && myWindow;
|
|
91
|
+
});
|
|
92
|
+
watch(stream, () => {
|
|
93
|
+
if (videoRef.value && stream.value) {
|
|
94
|
+
videoRef.value.srcObject = stream.value;
|
|
95
|
+
videoRef.value.play();
|
|
96
|
+
loading.value = false;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
const dialogVisible = computed({
|
|
100
|
+
get: () => props.visible,
|
|
101
|
+
set: (val) => {
|
|
102
|
+
emits("update:visible", val);
|
|
103
|
+
if (!val) {
|
|
104
|
+
emits("close");
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
function showAlert(type, description) {
|
|
109
|
+
alert.visible = true;
|
|
110
|
+
alert.description = description;
|
|
111
|
+
alert.type = type;
|
|
112
|
+
setTimeout(() => {
|
|
113
|
+
alert.visible = false;
|
|
114
|
+
}, 1500);
|
|
115
|
+
}
|
|
116
|
+
function handleClose() {
|
|
117
|
+
dialogVisible.value = false;
|
|
118
|
+
}
|
|
119
|
+
function toggleWindow(type) {
|
|
120
|
+
currentWindow.value = type;
|
|
121
|
+
}
|
|
122
|
+
async function initWindow() {
|
|
123
|
+
try {
|
|
124
|
+
if (props.type.includes(TYPE_CAMERA)) {
|
|
125
|
+
await getVideosList();
|
|
126
|
+
if (cameras.value.length) {
|
|
127
|
+
currentCamera.value = cameras.value[0].deviceId;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
} catch {
|
|
131
|
+
console.error(new Error("获取摄像头失败"));
|
|
132
|
+
}
|
|
133
|
+
toggleWindow(WINDOW_PLACEHOLDER);
|
|
134
|
+
blobImage.value = "";
|
|
135
|
+
}
|
|
136
|
+
watch(dialogVisible, (val) => {
|
|
137
|
+
val ? initWindow() : stop();
|
|
138
|
+
});
|
|
139
|
+
function handleBack() {
|
|
140
|
+
if (blobImage.value) {
|
|
141
|
+
toggleWindow(WINDOW_IMAGE);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
toggleWindow(WINDOW_PLACEHOLDER);
|
|
145
|
+
}
|
|
146
|
+
function handleSave() {
|
|
147
|
+
emits("save", myFile, blobImage.value);
|
|
148
|
+
handleClose();
|
|
149
|
+
}
|
|
150
|
+
function handleOpenCamera() {
|
|
151
|
+
loading.value = true;
|
|
152
|
+
toggleWindow(WINDOW_VIDEO);
|
|
153
|
+
if (enabled.value) {
|
|
154
|
+
loading.value = false;
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
start();
|
|
158
|
+
}
|
|
159
|
+
function handleShoot() {
|
|
160
|
+
if (!defaultWindow || !canvasRef.value || !videoRef.value) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
toggleWindow(WINDOW_CANVAS);
|
|
164
|
+
const context = canvasRef.value.getContext("2d");
|
|
165
|
+
context.drawImage(videoRef.value, 0, 0, props.width, props.height);
|
|
166
|
+
myFile = file.dataURLToFile(canvasRef.value.toDataURL(), "camera.png");
|
|
167
|
+
const localUrl = defaultWindow.URL.createObjectURL(myFile);
|
|
168
|
+
blobImage.value = localUrl;
|
|
169
|
+
showAlert("success", TIPS_SHOOT_SUCCESS);
|
|
170
|
+
}
|
|
171
|
+
function handleHttpRequest(file2, done, localUrl) {
|
|
172
|
+
done();
|
|
173
|
+
toggleWindow(WINDOW_IMAGE);
|
|
174
|
+
blobImage.value = localUrl;
|
|
175
|
+
myFile = file2;
|
|
176
|
+
}
|
|
177
|
+
const handleError = (message) => emits("error", message);
|
|
178
|
+
function handleCropperOpen() {
|
|
179
|
+
cropperVisible.value = true;
|
|
180
|
+
}
|
|
181
|
+
function handleFinished(_canvas, blob) {
|
|
182
|
+
if (!defaultWindow) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
myFile = file.blobToFile(blob, "cropper.png");
|
|
186
|
+
const localUrl = defaultWindow.URL.createObjectURL(myFile);
|
|
187
|
+
blobImage.value = localUrl;
|
|
188
|
+
toggleWindow(WINDOW_IMAGE);
|
|
189
|
+
}
|
|
190
|
+
return (_ctx, _cache) => {
|
|
191
|
+
const _component_ElImage = ElImage;
|
|
192
|
+
const _component_ElAlert = ElAlert;
|
|
193
|
+
const _component_ElIcon = ElIcon;
|
|
194
|
+
const _component_ElOption = ElOption;
|
|
195
|
+
const _component_ElSelect = ElSelect;
|
|
196
|
+
const _component_ElButton = ElButton;
|
|
197
|
+
const _directive_loading = vLoading;
|
|
198
|
+
return openBlock(), createBlock(Component$1, {
|
|
199
|
+
modelValue: unref(dialogVisible),
|
|
200
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(dialogVisible) ? dialogVisible.value = $event : null),
|
|
201
|
+
title: "拍照上传",
|
|
202
|
+
"close-on-click-modal": false,
|
|
203
|
+
width: unref(dialogWidth),
|
|
204
|
+
"show-close": false,
|
|
205
|
+
"append-to-body": "",
|
|
206
|
+
"destroy-on-close": "",
|
|
207
|
+
"show-fullscreen": false,
|
|
208
|
+
lazy: ""
|
|
209
|
+
}, {
|
|
210
|
+
footer: withCtx(() => [
|
|
211
|
+
createElementVNode("div", {
|
|
212
|
+
class: normalizeClass(_ctx.$style.footer)
|
|
213
|
+
}, [
|
|
214
|
+
unref(cameraVisible) ? (openBlock(), createBlock(_component_ElSelect, {
|
|
215
|
+
key: 0,
|
|
216
|
+
modelValue: unref(currentCamera),
|
|
217
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(currentCamera) ? currentCamera.value = $event : null),
|
|
218
|
+
class: normalizeClass(_ctx.$style.select)
|
|
219
|
+
}, {
|
|
220
|
+
default: withCtx(() => [
|
|
221
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(cameras), (item) => {
|
|
222
|
+
return openBlock(), createBlock(_component_ElOption, {
|
|
223
|
+
key: item.deviceId,
|
|
224
|
+
label: item.label,
|
|
225
|
+
value: item.deviceId
|
|
226
|
+
}, null, 8, ["label", "value"]);
|
|
227
|
+
}), 128))
|
|
228
|
+
]),
|
|
229
|
+
_: 1
|
|
230
|
+
}, 8, ["modelValue", "class"])) : (openBlock(), createElementBlock("span", _hoisted_3)),
|
|
231
|
+
createElementVNode("div", null, [
|
|
232
|
+
withDirectives(createVNode(_component_ElButton, { onClick: handleClose }, {
|
|
233
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
234
|
+
createTextVNode("取消", -1)
|
|
235
|
+
])]),
|
|
236
|
+
_: 1
|
|
237
|
+
}, 512), [
|
|
238
|
+
[vShow, !unref(videoVisible)]
|
|
239
|
+
]),
|
|
240
|
+
withDirectives(createVNode(_component_ElButton, {
|
|
241
|
+
loading: unref(loading),
|
|
242
|
+
onClick: handleBack
|
|
243
|
+
}, {
|
|
244
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
245
|
+
createTextVNode("返回", -1)
|
|
246
|
+
])]),
|
|
247
|
+
_: 1
|
|
248
|
+
}, 8, ["loading"]), [
|
|
249
|
+
[vShow, unref(videoVisible)]
|
|
250
|
+
]),
|
|
251
|
+
withDirectives(createVNode(_component_ElButton, {
|
|
252
|
+
loading: unref(loading),
|
|
253
|
+
type: "primary",
|
|
254
|
+
onClick: handleShoot
|
|
255
|
+
}, {
|
|
256
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
257
|
+
createTextVNode("拍摄", -1)
|
|
258
|
+
])]),
|
|
259
|
+
_: 1
|
|
260
|
+
}, 8, ["loading"]), [
|
|
261
|
+
[vShow, unref(videoVisible)]
|
|
262
|
+
]),
|
|
263
|
+
withDirectives(createVNode(_component_ElButton, { onClick: handleCropperOpen }, {
|
|
264
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
265
|
+
createTextVNode("裁剪", -1)
|
|
266
|
+
])]),
|
|
267
|
+
_: 1
|
|
268
|
+
}, 512), [
|
|
269
|
+
[vShow, unref(confirmVisible) && __props.cropper]
|
|
270
|
+
]),
|
|
271
|
+
withDirectives(createVNode(_component_ElButton, {
|
|
272
|
+
loading: unref(loading),
|
|
273
|
+
type: "primary",
|
|
274
|
+
onClick: handleSave
|
|
275
|
+
}, {
|
|
276
|
+
default: withCtx(() => [..._cache[7] || (_cache[7] = [
|
|
277
|
+
createTextVNode("保存", -1)
|
|
278
|
+
])]),
|
|
279
|
+
_: 1
|
|
280
|
+
}, 8, ["loading"]), [
|
|
281
|
+
[vShow, unref(confirmVisible)]
|
|
282
|
+
])
|
|
283
|
+
])
|
|
284
|
+
], 2)
|
|
285
|
+
]),
|
|
286
|
+
default: withCtx(() => [
|
|
287
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
288
|
+
class: normalizeClass(_ctx.$style.window),
|
|
289
|
+
style: normalizeStyle(unref(windowStyle))
|
|
290
|
+
}, [
|
|
291
|
+
withDirectives(createVNode(_component_ElImage, {
|
|
292
|
+
src: unref(blobImage),
|
|
293
|
+
fit: "contain"
|
|
294
|
+
}, null, 8, ["src"]), [
|
|
295
|
+
[vShow, unref(imageVisible)]
|
|
296
|
+
]),
|
|
297
|
+
withDirectives(createElementVNode("video", {
|
|
298
|
+
ref_key: "videoRef",
|
|
299
|
+
ref: videoRef,
|
|
300
|
+
width: __props.width,
|
|
301
|
+
height: __props.height,
|
|
302
|
+
muted: "",
|
|
303
|
+
onClick: handleShoot
|
|
304
|
+
}, null, 8, _hoisted_1), [
|
|
305
|
+
[vShow, unref(videoVisible)]
|
|
306
|
+
]),
|
|
307
|
+
withDirectives(createElementVNode("canvas", {
|
|
308
|
+
ref_key: "canvasRef",
|
|
309
|
+
ref: canvasRef,
|
|
310
|
+
width: __props.width,
|
|
311
|
+
height: __props.height
|
|
312
|
+
}, null, 8, _hoisted_2), [
|
|
313
|
+
[vShow, unref(canvasVisible)]
|
|
314
|
+
]),
|
|
315
|
+
withDirectives(createElementVNode("div", {
|
|
316
|
+
class: normalizeClass(_ctx.$style.alert)
|
|
317
|
+
}, [
|
|
318
|
+
createVNode(Transition, { mode: "out-in" }, {
|
|
319
|
+
default: withCtx(() => [
|
|
320
|
+
createVNode(_component_ElAlert, {
|
|
321
|
+
title: "提示",
|
|
322
|
+
type: unref(alert).type,
|
|
323
|
+
center: "",
|
|
324
|
+
"show-icon": "",
|
|
325
|
+
closable: false,
|
|
326
|
+
description: unref(alert).description
|
|
327
|
+
}, null, 8, ["type", "description"])
|
|
328
|
+
]),
|
|
329
|
+
_: 1
|
|
330
|
+
})
|
|
331
|
+
], 2), [
|
|
332
|
+
[vShow, unref(alert).visible]
|
|
333
|
+
]),
|
|
334
|
+
withDirectives(createElementVNode("div", {
|
|
335
|
+
class: normalizeClass([{ [_ctx.$style["placeholder-opacity"]]: unref(placeholderOpacity) }, _ctx.$style.placeholder])
|
|
336
|
+
}, [
|
|
337
|
+
unref(cameraVisible) ? (openBlock(), createElementBlock("div", {
|
|
338
|
+
key: 0,
|
|
339
|
+
onClick: handleOpenCamera
|
|
340
|
+
}, [
|
|
341
|
+
createVNode(_component_ElIcon, null, {
|
|
342
|
+
default: withCtx(() => [
|
|
343
|
+
createVNode(unref(Camera))
|
|
344
|
+
]),
|
|
345
|
+
_: 1
|
|
346
|
+
})
|
|
347
|
+
])) : createCommentVNode("", true),
|
|
348
|
+
unref(uploadVisible) ? (openBlock(), createBlock(Component$2, {
|
|
349
|
+
key: 1,
|
|
350
|
+
"http-request": handleHttpRequest,
|
|
351
|
+
type: "button",
|
|
352
|
+
onError: handleError
|
|
353
|
+
}, {
|
|
354
|
+
default: withCtx(() => [
|
|
355
|
+
createElementVNode("span", null, [
|
|
356
|
+
createVNode(_component_ElIcon, null, {
|
|
357
|
+
default: withCtx(() => [
|
|
358
|
+
createVNode(unref(Upload))
|
|
359
|
+
]),
|
|
360
|
+
_: 1
|
|
361
|
+
})
|
|
362
|
+
])
|
|
363
|
+
]),
|
|
364
|
+
_: 1
|
|
365
|
+
})) : createCommentVNode("", true)
|
|
366
|
+
], 2), [
|
|
367
|
+
[vShow, unref(placeholderVisible)]
|
|
368
|
+
]),
|
|
369
|
+
__props.cropper ? (openBlock(), createBlock(Component$3, {
|
|
370
|
+
key: 0,
|
|
371
|
+
visible: unref(cropperVisible),
|
|
372
|
+
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => isRef(cropperVisible) ? cropperVisible.value = $event : null),
|
|
373
|
+
image: unref(blobImage),
|
|
374
|
+
option: __props.cropperOption,
|
|
375
|
+
dialog: "",
|
|
376
|
+
onFinished: handleFinished
|
|
377
|
+
}, null, 8, ["visible", "image", "option"])) : createCommentVNode("", true)
|
|
378
|
+
], 6)), [
|
|
379
|
+
[_directive_loading, unref(loading)]
|
|
380
|
+
])
|
|
381
|
+
]),
|
|
382
|
+
_: 1
|
|
383
|
+
}, 8, ["modelValue", "width"]);
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
/* unplugin-vue-components disabled */const window = "_window_2ntq2_1";
|
|
389
|
+
const alert = "_alert_2ntq2_13";
|
|
390
|
+
const placeholder = "_placeholder_2ntq2_23";
|
|
391
|
+
const footer = "_footer_2ntq2_63";
|
|
392
|
+
const select = "_select_2ntq2_68";
|
|
393
|
+
const style0 = {
|
|
394
|
+
window: window,
|
|
395
|
+
alert: alert,
|
|
396
|
+
placeholder: placeholder,
|
|
397
|
+
"placeholder-opacity": "_placeholder-opacity_2ntq2_59",
|
|
398
|
+
footer: footer,
|
|
399
|
+
select: select
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
const cssModules = {
|
|
403
|
+
"$style": style0
|
|
404
|
+
};
|
|
405
|
+
const Component = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
406
|
+
|
|
407
|
+
const __vite_glob_0_10 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
408
|
+
__proto__: null,
|
|
409
|
+
default: Component
|
|
410
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
411
|
+
|
|
412
|
+
export { Component as C, __vite_glob_0_10 as _ };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IDialogCameraUploadProps } from './dialog-camera-upload';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<IDialogCameraUploadProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
close: (...args: any[]) => void;
|
|
4
|
+
error: (...args: any[]) => void;
|
|
5
|
+
"update:visible": (...args: any[]) => void;
|
|
6
|
+
save: (...args: any[]) => void;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<IDialogCameraUploadProps> & Readonly<{
|
|
8
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
9
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
11
|
+
onSave?: ((...args: any[]) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
cropper: boolean;
|
|
14
|
+
type: ("upload" | "camera")[];
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
accept: string;
|
|
18
|
+
fixWidth: number;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
20
|
+
videoRef: HTMLVideoElement;
|
|
21
|
+
canvasRef: HTMLCanvasElement;
|
|
22
|
+
}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* source: src/components/dialog-camera-upload/dialog-camera-upload.vue */
|
|
2
|
+
._window_2ntq2_1 {
|
|
3
|
+
position: relative;
|
|
4
|
+
box-shadow: 0 0 1px;
|
|
5
|
+
}
|
|
6
|
+
._window_2ntq2_1 > div {
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
}
|
|
13
|
+
div._alert_2ntq2_13 {
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 50%;
|
|
16
|
+
left: 50%;
|
|
17
|
+
z-index: 3;
|
|
18
|
+
width: 200px;
|
|
19
|
+
height: initial;
|
|
20
|
+
transform: translate(-50%, -50%);
|
|
21
|
+
}
|
|
22
|
+
._placeholder_2ntq2_23 {
|
|
23
|
+
z-index: 10;
|
|
24
|
+
display: flex;
|
|
25
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
26
|
+
opacity: 0;
|
|
27
|
+
transition: 0.3s all linear;
|
|
28
|
+
}
|
|
29
|
+
._placeholder_2ntq2_23:hover {
|
|
30
|
+
opacity: 1;
|
|
31
|
+
}
|
|
32
|
+
._placeholder_2ntq2_23 > div {
|
|
33
|
+
position: relative;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex: 1 0 50%;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
color: rgba(0, 0, 0, 0.2);
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
transition: 0.3s all linear;
|
|
41
|
+
}
|
|
42
|
+
._placeholder_2ntq2_23 > div i {
|
|
43
|
+
font-size: 72px;
|
|
44
|
+
color: rgba(255, 255, 255, 0.9);
|
|
45
|
+
transition: 0.3s all linear;
|
|
46
|
+
}
|
|
47
|
+
._placeholder_2ntq2_23 > div:hover {
|
|
48
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
49
|
+
}
|
|
50
|
+
._placeholder_2ntq2_23 > div:hover i {
|
|
51
|
+
transform: scale(1.2);
|
|
52
|
+
}
|
|
53
|
+
._placeholder_2ntq2_23 .el-upload {
|
|
54
|
+
width: 100%;
|
|
55
|
+
height: 100%;
|
|
56
|
+
}
|
|
57
|
+
._placeholder-opacity_2ntq2_59 {
|
|
58
|
+
opacity: 1;
|
|
59
|
+
}
|
|
60
|
+
._footer_2ntq2_63 {
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: space-between;
|
|
63
|
+
}
|
|
64
|
+
._select_2ntq2_68 {
|
|
65
|
+
flex: 0 0 50%;
|
|
66
|
+
}
|