hs-admin-ui 14.7.1 → 14.7.3
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/{401-DZgKEsAB.js → 401-B6P35bPY.js} +1 -1
- package/dist/{401-VwlinITr.mjs → 401-MIoHCvya.mjs} +1 -1
- package/dist/{404-CbrLIBlR.mjs → 404-C3NTC4kO.mjs} +1 -1
- package/dist/{404-CbrLIBlR.mjs.gz → 404-C3NTC4kO.mjs.gz} +0 -0
- package/dist/{404-DghRHzJs.js → 404-s7Hnihdy.js} +1 -1
- package/dist/404-s7Hnihdy.js.gz +0 -0
- package/dist/{account-BdgRJMw2.mjs → account-B_iOBSaL.mjs} +1 -1
- package/dist/{account-BhdX_7fE.js → account-DHrcFaRi.js} +1 -1
- package/dist/{aside-CzZLthQ-.js → aside-c47r-wES.js} +1 -1
- package/dist/{aside-BzxhdlY6.mjs → aside-jX5tESpn.mjs} +3 -3
- package/dist/{baseFormConfig-DifzO4MU.mjs → baseFormConfig-CRjimGDL.mjs} +1 -1
- package/dist/baseFormConfig-CRjimGDL.mjs.gz +0 -0
- package/dist/{baseFormConfig-DWSR0Aey.js → baseFormConfig-t3C5VjlN.js} +1 -1
- package/dist/{baseTableConfig-DwVzxY7X.mjs → baseTableConfig-B76iWD0q.mjs} +1 -1
- package/dist/baseTableConfig-B76iWD0q.mjs.gz +0 -0
- package/dist/{baseTableConfig-BZK2THJc.js → baseTableConfig-BC1ehoUi.js} +1 -1
- package/dist/baseTableConfig-BC1ehoUi.js.gz +0 -0
- package/dist/{bcFormConfig-C0ewsLEc.mjs → bcFormConfig-B_Y_3rDY.mjs} +1 -1
- package/dist/{bcFormConfig-CGoYLUV0.js → bcFormConfig-DFDLnynl.js} +1 -1
- package/dist/{bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-Dh0vVPj2.mjs → bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-0yivi3Ej.mjs} +2 -2
- package/dist/{bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-CvXtiz_m.js → bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-Fg6bTLMc.js} +1 -1
- package/dist/{bcSwitchSystems.vue_vue_type_script_setup_true_lang-Df5OrYsm.mjs → bcSwitchSystems.vue_vue_type_script_setup_true_lang-BP_X8ou_.mjs} +2 -2
- package/dist/{bcSwitchSystems.vue_vue_type_script_setup_true_lang-BomratUF.js → bcSwitchSystems.vue_vue_type_script_setup_true_lang-Lafa8w9e.js} +1 -1
- package/dist/{btnIndex-DBv24cYY.js → btnIndex-DHIdL5je.js} +1 -1
- package/dist/{btnIndex-Bt9FMdS_.mjs → btnIndex-kp8KqYYm.mjs} +3 -3
- package/dist/btnIndex-kp8KqYYm.mjs.gz +0 -0
- package/dist/{classic-D_2yCfUJ.js → classic-BR3kP1C5.js} +1 -1
- package/dist/{classic-CnD546MW.mjs → classic-D1xyOb2p.mjs} +5 -5
- package/dist/{cloneConfigDialog-BWWwmAp0.mjs → cloneConfigDialog--YzevjTS.mjs} +3 -3
- package/dist/cloneConfigDialog--YzevjTS.mjs.gz +0 -0
- package/dist/{cloneConfigDialog-bZ3Tn0_g.js → cloneConfigDialog-BhagkvQn.js} +1 -1
- package/dist/cloneConfigDialog-BhagkvQn.js.gz +0 -0
- package/dist/{columns-yBGefgF2.mjs → columns-0f0pss9T.mjs} +5 -5
- package/dist/{columns-zEzWkHHs.js → columns-PZMdqd45.js} +1 -1
- package/dist/{columnsAside-8ip1KpKW.mjs → columnsAside-DQYmAxP1.mjs} +1 -1
- package/dist/{columnsAside-CfJRfJrl.js → columnsAside-mgb3MDFa.js} +1 -1
- package/dist/{contextmenu-Cthc1Vw1.js → contextmenu-Bb0Y_X1t.js} +1 -1
- package/dist/{contextmenu-Ciy35FWm.mjs → contextmenu-C5P-Ugx7.mjs} +1 -1
- package/dist/{contextmenu-D0fWSFw6.mjs → contextmenu-DnZUtPzo.mjs} +1 -1
- package/dist/{contextmenu-DB2hlEGR.js → contextmenu-c7TTrRPC.js} +1 -1
- package/dist/{copyMenuConfig-BK9nBpj6.mjs → copyMenuConfig-BHXT0m8D.mjs} +1 -1
- package/dist/{copyMenuConfig-Bh8hBi4M.js → copyMenuConfig-sDa4G-d2.js} +1 -1
- package/dist/{copyMenuConfig.vue_vue_type_script_setup_true_lang-DKPkDUux.mjs → copyMenuConfig.vue_vue_type_script_setup_true_lang-CbYzLGMy.mjs} +2 -2
- package/dist/{copyMenuConfig.vue_vue_type_script_setup_true_lang-CtiFVK7w.js → copyMenuConfig.vue_vue_type_script_setup_true_lang-cg8UGKLr.js} +1 -1
- package/dist/{copySystem-Bi_L8KzC.mjs → copySystem-B8-y5BYy.mjs} +1 -1
- package/dist/{copySystem-UAZ6ZwM0.js → copySystem-ChSQKpDi.js} +1 -1
- package/dist/{copySystem.vue_vue_type_script_setup_true_lang-DTjuTSww.mjs → copySystem.vue_vue_type_script_setup_true_lang-Cm8qw1Iy.mjs} +2 -2
- package/dist/{copySystem.vue_vue_type_script_setup_true_lang-BU-V69tY.js → copySystem.vue_vue_type_script_setup_true_lang-DuOeNd-X.js} +1 -1
- package/dist/{defaults-ZqlWy3Cw.js → defaults-2wibBPMr.js} +1 -1
- package/dist/{defaults-BL4xOCbd.mjs → defaults-D2cyFbDD.mjs} +4 -4
- package/dist/{dialog-e8zI78Na.mjs → dialog-D2I7BY_K.mjs} +1 -1
- package/dist/{dialog-D-LKuBcl.js → dialog-D3Rp0nCA.js} +1 -1
- package/dist/{dialog-J-YYFotO.mjs → dialog-DImsPSnX.mjs} +1 -1
- package/dist/{dialog-BmF8sdj4.mjs → dialog-DNrq6Wji.mjs} +1 -1
- package/dist/{dialog-acAmV8bC.js → dialog-DWeoqO_z.js} +1 -1
- package/dist/{dialog-L21FKxnF.js → dialog-DvMhQ1Dj.js} +1 -1
- package/dist/{dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-Di3uae-Y.js → dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-BiYM5Zly.js} +1 -1
- package/dist/{dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-BDpPVvxy.mjs → dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-Lz5D2W9e.mjs} +3 -3
- package/dist/{dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-CYSQzTuH.mjs → dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-Bba1SxR8.mjs} +2 -2
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-Bba1SxR8.mjs.gz +0 -0
- package/dist/{dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-DBQyG4vL.js → dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-a-D8kBLS.js} +1 -1
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-a-D8kBLS.js.gz +0 -0
- package/dist/{dictDialog-BxTKSn7m.mjs → dictDialog-DRyjni53.mjs} +1 -1
- package/dist/{dictDialog-Opjt2yNv.js → dictDialog-Dm3HhGe-.js} +1 -1
- package/dist/{dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-C77zOEhN.mjs → dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-CG8JpNLo.mjs} +2 -2
- package/dist/{dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-BFfeT_oA.js → dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-CIwTZpMh.js} +1 -1
- package/dist/{dictItemDialog-CiY2BSHY.mjs → dictItemDialog-CR2tifm0.mjs} +1 -1
- package/dist/{dictItemDialog-Be743KmE.js → dictItemDialog-Dkp9JR0t.js} +1 -1
- package/dist/{dictItemDialog.vue_vue_type_script_setup_true_lang-BkgIjyoH.mjs → dictItemDialog.vue_vue_type_script_setup_true_lang-1qxkHIl4.mjs} +2 -2
- package/dist/{dictItemDialog.vue_vue_type_script_setup_true_lang-RwaCZHAS.js → dictItemDialog.vue_vue_type_script_setup_true_lang-DzFiMPZ1.js} +1 -1
- package/dist/{formConfig-2nyG8lg9.js → formConfig-C_iwHDxv.js} +1 -1
- package/dist/formConfig-C_iwHDxv.js.gz +0 -0
- package/dist/{formConfig-iQfNhbjr.mjs → formConfig-DNKBJBfY.mjs} +6 -6
- package/dist/formConfig-DNKBJBfY.mjs.gz +0 -0
- package/dist/{header-2rEyfQ7O.mjs → header-Fdq2xRxn.mjs} +2 -2
- package/dist/{header-CPszgrj-.js → header-w_dXnyaF.js} +1 -1
- package/dist/{horizontal-CQ7GEePI.js → horizontal-D2BznniY.js} +1 -1
- package/dist/{horizontal-CzRpTEpn.mjs → horizontal-DBsoMx4l.mjs} +2 -2
- package/dist/{hsAttrBtn-D2XKeYeQ.js → hsAttrBtn-BcTpMldw.js} +1 -1
- package/dist/{hsAttrBtn-CPT0r09o.mjs → hsAttrBtn-C_0l0-di.mjs} +1 -1
- package/dist/{hsAttrBtn.vue_vue_type_script_setup_true_lang-mhgNO0IH.js → hsAttrBtn.vue_vue_type_script_setup_true_lang-DrmVLHrc.js} +1 -1
- package/dist/{hsAttrBtn.vue_vue_type_script_setup_true_lang-pE0i-DoG.mjs → hsAttrBtn.vue_vue_type_script_setup_true_lang-kjW-SiIa.mjs} +4 -4
- package/dist/{hsAttrForm-CRe8S42U.mjs → hsAttrForm-BCgfHf6r.mjs} +1 -1
- package/dist/{hsAttrForm-ufZGNqbZ.js → hsAttrForm-CZy_Takn.js} +1 -1
- package/dist/{hsAttrForm.vue_vue_type_script_setup_true_lang-ezIoSl8h.js → hsAttrForm.vue_vue_type_script_setup_true_lang-COX1mb0k.js} +1 -1
- package/dist/{hsAttrForm.vue_vue_type_script_setup_true_lang-B3O0yvH9.mjs → hsAttrForm.vue_vue_type_script_setup_true_lang-DQZuKMud.mjs} +4 -4
- package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-DQZuKMud.mjs.gz +0 -0
- package/dist/{hsBtnConfigList-e8jIgRv5.js → hsBtnConfigList-B8fDVe8o.js} +1 -1
- package/dist/{hsBtnConfigList-BLVUAOBu.mjs → hsBtnConfigList-OlnAPlpX.mjs} +1 -1
- package/dist/{hsBtnItemConfig-CKDVmUtr.mjs → hsBtnItemConfig-7fFf9ORG.mjs} +1 -1
- package/dist/{hsBtnItemConfig-Dnq_6EKg.js → hsBtnItemConfig-D3ONvAzx.js} +1 -1
- package/dist/{hsBtnItemConfig.vue_vue_type_script_setup_true_lang-Do7D-8cW.mjs → hsBtnItemConfig.vue_vue_type_script_setup_true_lang-BpVufsyn.mjs} +3 -3
- package/dist/{hsBtnItemConfig.vue_vue_type_script_setup_true_lang-BtaY6G64.js → hsBtnItemConfig.vue_vue_type_script_setup_true_lang-DaOh8V0h.js} +1 -1
- package/dist/{hsBtnPanel-DpouYMBi.js → hsBtnPanel-B40URPPI.js} +1 -1
- package/dist/{hsBtnPanel-X-jiPNSO.mjs → hsBtnPanel-C0J0UXft.mjs} +1 -1
- package/dist/{hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-DynDkZkk.js → hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-B31jf6f7.js} +1 -1
- package/dist/{hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-C2jRMyG-.mjs → hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-qXm1k2KF.mjs} +4 -4
- package/dist/{hsExpand-Sdvi7K80.mjs → hsExpand-BdSNWhvU.mjs} +1 -1
- package/dist/{hsExpand-cSf-jY29.js → hsExpand-Cxq4SYxL.js} +1 -1
- package/dist/{hsExpand.vue_vue_type_script_setup_true_lang-DycprH0V.js → hsExpand.vue_vue_type_script_setup_true_lang-CVkLb88Q.js} +1 -1
- package/dist/{hsExpand.vue_vue_type_script_setup_true_lang-BY15uFQp.mjs → hsExpand.vue_vue_type_script_setup_true_lang-xPbGDKIM.mjs} +1 -1
- package/dist/{hsFormConfig-5F9qheXR.mjs → hsFormConfig-BABExNe5.mjs} +1 -1
- package/dist/{hsFormConfig-BTk0NF7x.js → hsFormConfig-Brh9XKNN.js} +1 -1
- package/dist/{hsFormConfigList-C3PfhgZX.js → hsFormConfigList-Dvtffjdy.js} +1 -1
- package/dist/{hsFormConfigList-OzP5dYDX.mjs → hsFormConfigList-dwNPFBTh.mjs} +2 -2
- package/dist/hsFormConfigList-dwNPFBTh.mjs.gz +0 -0
- package/dist/{hsFormPanel-DjbQvZVy.js → hsFormPanel-BJLpvf9I.js} +1 -1
- package/dist/{hsFormPanel-BvSwlcgQ.mjs → hsFormPanel-TQa4plL5.mjs} +6 -6
- package/dist/hsFormPanel-TQa4plL5.mjs.gz +0 -0
- package/dist/{hsFormParse-B8rSgiPF.mjs → hsFormParse-CIGoHjen.mjs} +1 -1
- package/dist/{hsFormParse-B3oflF5V.js → hsFormParse-DvgzMhjM.js} +1 -1
- package/dist/{hsFormParse.vue_vue_type_script_setup_true_lang-CzEkDzTm.js → hsFormParse.vue_vue_type_script_setup_true_lang-C73EpiVi.js} +1 -1
- package/dist/{hsFormParse.vue_vue_type_script_setup_true_lang-BV0vBcCc.mjs → hsFormParse.vue_vue_type_script_setup_true_lang-tl6oCWk6.mjs} +3 -3
- package/dist/{hsPanelItem-BXQA1yKg.mjs → hsPanelItem-Xk5ZeLMV.mjs} +1 -1
- package/dist/{hsPanelItem-c7o9PfSF.js → hsPanelItem-jA-3Crab.js} +1 -1
- package/dist/{hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-CdgVUC0Z.mjs → hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-Co0zLhOy.mjs} +1 -1
- package/dist/{hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-Lv2QaFsm.js → hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-n4uo5DKd.js} +1 -1
- package/dist/{index copy-DAXBVZkr.js → index copy-DShx9Sqn.js } +1 -1
- package/dist/{index copy-BmmG2kyD.mjs → index copy-DibqQyuQ.mjs } +1 -1
- package/dist/{index-BIG0PmQv.mjs → index-545D5PQ6.mjs} +1 -1
- package/dist/{index-W-QWIzzm.mjs → index-59yUOcxr.mjs} +2 -2
- package/dist/{index-BZX860xc.mjs → index-7VW2ti4g.mjs} +1 -1
- package/dist/{index-BjGZFE2M.mjs → index-8oB03RJ_.mjs} +1 -1
- package/dist/{index-8TBq2bzK.mjs → index-AQfn_FBp.mjs} +1 -1
- package/dist/{index-eXn8tsAF.js → index-B-MB4N0m.js} +1 -1
- package/dist/{index-oyjByR86.js → index-B52nC9qH.js} +1 -1
- package/dist/{index-CfIe1XWn.mjs → index-B5hrDkEk.mjs} +4 -4
- package/dist/index-B5hrDkEk.mjs.gz +0 -0
- package/dist/{index-CxHuQ2rH.mjs → index-B6zSMRtn.mjs} +1 -1
- package/dist/{index-C88vZqjq.mjs → index-B9R8okhN.mjs} +4 -4
- package/dist/{index-ak7rdCw9.js → index-BEryPlIG.js} +1 -1
- package/dist/{index-DXb64ZZY.mjs → index-BEwzBjDG.mjs} +3 -3
- package/dist/index-BIgnSPCb.js +1 -0
- package/dist/{index-BD0VBfV-.mjs → index-BJgOqWqU.mjs} +4 -4
- package/dist/{index-C8T0-WDa.js → index-BKoOD-yD.js} +1 -1
- package/dist/{index-Cwc7VLr6.mjs → index-BM0WephW.mjs} +1 -1
- package/dist/{index-aEv4tD3l.js → index-BOljFI6c.js} +5 -5
- package/dist/{index-aEv4tD3l.js.gz → index-BOljFI6c.js.gz} +0 -0
- package/dist/{index-BnoL72wa.mjs → index-BRFq9frZ.mjs} +1 -1
- package/dist/{index-CKbZ6Nw3.mjs → index-BU-0TEPD.mjs} +3 -3
- package/dist/{index-DT8AVIFx.mjs → index-BUgPsbqX.mjs} +3 -3
- package/dist/{index-BiUikL-I.js → index-BZWSd32R.js} +1 -1
- package/dist/{index-B1JQnBpR.mjs → index-Bb-4PORN.mjs} +1 -1
- package/dist/{index-fOg6Pp3u.mjs → index-BcmSzqKM.mjs} +1 -1
- package/dist/{index-Dsv9Mj4T.js → index-BeyPYq7f.js} +1 -1
- package/dist/{index-YHn9Lf_N.mjs → index-BftpuC9d.mjs} +1 -1
- package/dist/{index-Q4CJxHl2.mjs → index-BiMfBYtr.mjs} +5 -5
- package/dist/{index-r82mW2Nv.mjs → index-BoF9aji9.mjs} +1 -1
- package/dist/{index-C68aQgef.js → index-Bq1Xk_Ow.js} +1 -1
- package/dist/{index-D7aH9Q57.js → index-Bw7ZFOLA.js} +1 -1
- package/dist/{index-ixEx6-Y8.mjs → index-C1lcFSDk.mjs} +3 -3
- package/dist/{index-BoHRykT4.js → index-CFEEDRCY.js} +1 -1
- package/dist/{index-Cd5ZHRoD.js → index-CFEFbAt2.js} +1 -1
- package/dist/{index-BFWITrvE.mjs → index-CPeepNpM.mjs} +5 -5
- package/dist/{index-Bl1B63E3.js → index-CRDlgjAa.js} +1 -1
- package/dist/{index-BQPqr8OW.mjs → index-CXQuFHu1.mjs} +1 -1
- package/dist/{index-wjbrQeYY.js → index-Co_fX9LW.js} +1 -1
- package/dist/{index-BT65Ax9H.mjs → index-Cw9-sg4N.mjs} +1 -1
- package/dist/{index-V-ghK49n.js → index-CySl39ff.js} +1 -1
- package/dist/index-CySl39ff.js.gz +0 -0
- package/dist/{index-D_309lV5.mjs → index-Czxmn9fk.mjs} +4 -4
- package/dist/index-Czxmn9fk.mjs.gz +0 -0
- package/dist/{index-Bx427t8p.js → index-D-2CjGE4.js} +1 -1
- package/dist/{index-CQSS1j32.mjs → index-D1KcLHd9.mjs} +1 -1
- package/dist/{index-BcYnMUnW.js → index-D1oN1daB.js} +1 -1
- package/dist/{index-BCp_zGUZ.js → index-D1ptUF_V.js} +1 -1
- package/dist/index-D1ptUF_V.js.gz +0 -0
- package/dist/{index-DPO0lAeL.js → index-D2Ico3Hi.js} +1 -1
- package/dist/{index-BLybpWXk.js → index-D4D4DgIa.js} +1 -1
- package/dist/{index-B6bxKCxn.js → index-DCCQmA1m.js} +1 -1
- package/dist/{index-CZMABV48.js → index-DHGEqdwc.js} +1 -1
- package/dist/index-DHHcO6BG.js +1 -0
- package/dist/{index-BKJybj1e.mjs → index-DKyEDpvP.mjs} +129 -112
- package/dist/index-DKyEDpvP.mjs.gz +0 -0
- package/dist/{index-Bs8X2wb1.js → index-DLTKUxB8.js} +1 -1
- package/dist/{index-B5fFnKju.mjs → index-DLgGwAOQ.mjs} +6 -3
- package/dist/{index-CKRFR4V8.mjs → index-DZfMttzX.mjs} +4 -4
- package/dist/{index-DJT-VDY9.mjs → index-Dklu-LAp.mjs} +1 -1
- package/dist/{index-pjlBWhv9.js → index-DuokFMFN.js} +1 -1
- package/dist/index-DyE6gOii.js +1 -0
- package/dist/index-Dzcb8xAF.js +1 -0
- package/dist/{index-D1cHBTWC.js → index-Eg0Oxuvl.js} +1 -1
- package/dist/{uploadAvatar-fj1sOFRE.mjs → index-G9SlGjKA.mjs} +157 -8
- package/dist/index-G9SlGjKA.mjs.gz +0 -0
- package/dist/{index-bOQIREyV.mjs → index-GC-ZE8nA.mjs} +2 -2
- package/dist/index-GC-ZE8nA.mjs.gz +0 -0
- package/dist/{index-B8rHtpKm.js → index-GG8DDIBh.js} +1 -1
- package/dist/{index-D6QagHZ_.js → index-HouIQZUe.js} +1 -1
- package/dist/{index-C_GZUgqW.js → index-J0imrvig.js} +1 -1
- package/dist/{index-B8-3auQC.js → index-OGEPDJy0.js} +1 -1
- package/dist/index-PCI3lWru.mjs +38 -0
- package/dist/index-R8nAElWM.js +1 -0
- package/dist/index-R8nAElWM.js.gz +0 -0
- package/dist/{index-DroWDp9U.js → index-TbZDAaw-.js} +1 -1
- package/dist/{index-DqFWDzZl.js → index-Xg6EpFPt.js} +1 -1
- package/dist/index-ZcdBjLAL.mjs +14 -0
- package/dist/{index-DrQ7oC03.js → index-_s7zur05.js} +1 -1
- package/dist/{index-mjgC8wzm.js → index-cKXBY6qW.js} +1 -1
- package/dist/{index-Dhm9XQyP.mjs → index-cZ8_cnh1.mjs} +10 -10
- package/dist/index-cZ8_cnh1.mjs.gz +0 -0
- package/dist/{index-Bx24wRl9.mjs → index-dH9_b1Qu.mjs} +4 -4
- package/dist/{index-H3LemiMl.mjs → index-feq0FF6W.mjs} +1 -1
- package/dist/{index-Ct0hunLG.mjs → index-mNWobrqf.mjs} +1 -1
- package/dist/{index-vJn8mKui.js → index-oXW_3vtS.js} +1 -1
- package/dist/{index-CfFKXqAv.mjs → index-opqGNraF.mjs} +1 -1
- package/dist/{index-CW1X5_Zz.mjs → index-sKHPhaXj.mjs} +1 -1
- package/dist/{index-pu6AEYnX.mjs → index-uEV3_EA6.mjs} +1 -1
- package/dist/{index-CqXAMjbL.js → index-uHhpvrQi.js} +1 -1
- package/dist/{index-tPUm_UDq.js → index-zM_DvAdy.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-DUCRLKGc.mjs → index.vue_vue_type_script_setup_true_lang-9kFCHSZl.mjs} +4 -4
- package/dist/index.vue_vue_type_script_setup_true_lang-9kFCHSZl.mjs.gz +0 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-CrIUzGTC.js → index.vue_vue_type_script_setup_true_lang-B42GekWm.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-D9fNQpq3.mjs → index.vue_vue_type_script_setup_true_lang-BAPOKx2l.mjs} +3 -3
- package/dist/{index.vue_vue_type_script_setup_true_lang-D3sIIaFm.js → index.vue_vue_type_script_setup_true_lang-BeAkF_85.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-RLHBkJ8N.mjs → index.vue_vue_type_script_setup_true_lang-C-SfBu_l.mjs} +6 -6
- package/dist/{index.vue_vue_type_script_setup_true_lang-Cyo60p4O.js → index.vue_vue_type_script_setup_true_lang-D9zFSabF.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-Bzl3IiHn.mjs → index.vue_vue_type_script_setup_true_lang-R0BzXrtJ.mjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CpaXjRDF.js → index.vue_vue_type_script_setup_true_lang-tzGWV7PN.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_name_iconSelector_lang-CcS1Miso.js → index.vue_vue_type_script_setup_true_name_iconSelector_lang-CTkLnEci.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_name_iconSelector_lang-BDbvzkCd.mjs → index.vue_vue_type_script_setup_true_name_iconSelector_lang-CwOt0p8m.mjs} +2 -2
- package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-CwOt0p8m.mjs.gz +0 -0
- package/dist/{link-Dnl3Nswf.js → link-Ci-FMDC5.js} +1 -1
- package/dist/{link-D7qG9YIE.mjs → link-v_uHt4tR.mjs} +1 -1
- package/dist/{list-BPvUkbf6.js → list-1ydrFB1C.js} +1 -1
- package/dist/{list-DMRoSLpC.mjs → list-Pgfx9sN2.mjs} +1 -1
- package/dist/{main-BV_ONW1E.mjs → main-BSQcZP4b.mjs} +3 -3
- package/dist/{main-DP7tv12h.js → main-BsmJ8k5Y.js} +1 -1
- package/dist/{mobile-TofQ9jZb.js → mobile-BIWv1LWV.js} +1 -1
- package/dist/{mobile-D2o13ydf.mjs → mobile-DcyOxIfk.mjs} +1 -1
- package/dist/{parent-CgT1eTvx.js → parent-BQu8sf9M.js} +1 -1
- package/dist/{parent-BAFX59oS.mjs → parent-TuxYlSJN.mjs} +1 -1
- package/dist/{popup-Cy-HHBOw.mjs → popup-DtKvNPd8.mjs} +1 -1
- package/dist/{popup-BxqAaalr.js → popup-q--smglg.js} +1 -1
- package/dist/{popup.vue_vue_type_script_setup_true_name_replaceRules_lang-BSKn3cxJ.mjs → popup.vue_vue_type_script_setup_true_name_replaceRules_lang-B2Fav84e.mjs} +1 -1
- package/dist/{popup.vue_vue_type_script_setup_true_name_replaceRules_lang-Ck-eDBrC.js → popup.vue_vue_type_script_setup_true_name_replaceRules_lang-BymUYdbu.js} +1 -1
- package/dist/{roleItem-BQtHFB5m.js → roleItem-CRBENSML.js} +1 -1
- package/dist/{roleItem-BgwT8ogJ.mjs → roleItem-CtOFPe8A.mjs} +1 -1
- package/dist/{saveForm-DTkBCv6N.mjs → saveForm-BNz8xX0K.mjs} +3 -3
- package/dist/{saveForm-C1OJ64nx.js → saveForm-BkAkaL5W.js} +1 -1
- package/dist/{scan-xJodM36m.js → scan-KFHiOPXG.js} +1 -1
- package/dist/scan-KFHiOPXG.js.gz +0 -0
- package/dist/{scan-Cxheo-y7.mjs → scan-sHaPNAnW.mjs} +1 -1
- package/dist/scan-sHaPNAnW.mjs.gz +0 -0
- package/dist/{search-BxnO3NbM.js → search-BJ91aVZl.js} +1 -1
- package/dist/{search-B7R3D0bv.mjs → search-BM7R-nXN.mjs} +1 -1
- package/dist/{selectConfig-Biqg7TT0.mjs → selectConfig-Cau-PFyO.mjs} +1 -1
- package/dist/selectConfig-Cau-PFyO.mjs.gz +0 -0
- package/dist/{selectConfig-DuNPMDrp.js → selectConfig-OmAl_ckr.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/style.css.gz +0 -0
- package/dist/{subItem-86uKe9I9.js → subItem-CQHk3Xy9.js} +1 -1
- package/dist/{subItem-RhxsK0og.mjs → subItem-DXSurq4z.mjs} +1 -1
- package/dist/{tagsView-CzvHA6go.mjs → tagsView-BNX9wtvn.mjs} +2 -2
- package/dist/tagsView-BNX9wtvn.mjs.gz +0 -0
- package/dist/{tagsView-CJEwP61J.js → tagsView-DAOA_KRO.js} +2 -2
- package/dist/tagsView-DAOA_KRO.js.gz +0 -0
- package/dist/{transverse-B9qWEvDF.js → transverse-BtXdtSj4.js} +1 -1
- package/dist/{transverse-CVT_IJRq.mjs → transverse-PDnp2xpt.mjs} +3 -3
- package/dist/{user-CkKMKWxO.js → user-Bo0TvpyO.js} +1 -1
- package/dist/{user-DteTfgAu.mjs → user-C7w5qdAC.mjs} +3 -3
- package/dist/{userNews-DncAP-8Y.mjs → userNews-Da0jqi6-.mjs} +1 -1
- package/dist/{userNews-ByiH4YGe.js → userNews-DrB4twz8.js} +1 -1
- package/dist/{userSelect-fSfP44E5.js → userSelect-Beom5Z6y.js} +1 -1
- package/dist/{userSelect-DgdmYQMk.mjs → userSelect-DrPXKeqe.mjs} +1 -1
- package/dist/{userSelect.vue_vue_type_script_setup_true_lang-Da3yLGvo.mjs → userSelect.vue_vue_type_script_setup_true_lang-B8IdOK-W.mjs} +1 -1
- package/dist/{userSelect.vue_vue_type_script_setup_true_lang-NyY3hYee.js → userSelect.vue_vue_type_script_setup_true_lang-CSZPH5JO.js} +1 -1
- package/dist/{vertical-CQO3TycS.js → vertical-B2RLRL87.js} +1 -1
- package/dist/{vertical-5Fu_S3Xs.mjs → vertical-ga_n45pr.mjs} +2 -2
- package/package.json +1 -1
- package/dist/404-DghRHzJs.js.gz +0 -0
- package/dist/auth_test-CMJmGyJR.mjs +0 -24
- package/dist/auth_test-Wym_Jcd0.js +0 -1
- package/dist/baseFormConfig-DifzO4MU.mjs.gz +0 -0
- package/dist/baseTableConfig-BZK2THJc.js.gz +0 -0
- package/dist/baseTableConfig-DwVzxY7X.mjs.gz +0 -0
- package/dist/btnIndex-Bt9FMdS_.mjs.gz +0 -0
- package/dist/cloneConfigDialog-BWWwmAp0.mjs.gz +0 -0
- package/dist/cloneConfigDialog-bZ3Tn0_g.js.gz +0 -0
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-CYSQzTuH.mjs.gz +0 -0
- package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-DBQyG4vL.js.gz +0 -0
- package/dist/formConfig-2nyG8lg9.js.gz +0 -0
- package/dist/formConfig-iQfNhbjr.mjs.gz +0 -0
- package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-B3O0yvH9.mjs.gz +0 -0
- package/dist/hsFormConfigList-OzP5dYDX.mjs.gz +0 -0
- package/dist/hsFormPanel-BvSwlcgQ.mjs.gz +0 -0
- package/dist/index copy-D23lPMJP.js +0 -6
- package/dist/index copy-D23lPMJP.js.gz +0 -0
- package/dist/index copy-Elt_ZTIW.mjs +0 -10585
- package/dist/index copy-Elt_ZTIW.mjs.gz +0 -0
- package/dist/index-BCp_zGUZ.js.gz +0 -0
- package/dist/index-BKJybj1e.mjs.gz +0 -0
- package/dist/index-CfIe1XWn.mjs.gz +0 -0
- package/dist/index-D_309lV5.mjs.gz +0 -0
- package/dist/index-Dhm9XQyP.mjs.gz +0 -0
- package/dist/index-DkzdygR1.js +0 -1
- package/dist/index-Dsgu_XO6.js +0 -1
- package/dist/index-Dt-axamm.mjs +0 -130
- package/dist/index-V-ghK49n.js.gz +0 -0
- package/dist/index-bOQIREyV.mjs.gz +0 -0
- package/dist/index-k0M3MSJq.js +0 -1
- package/dist/index.vue_vue_type_script_setup_true_lang-DUCRLKGc.mjs.gz +0 -0
- package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-BDbvzkCd.mjs.gz +0 -0
- package/dist/scan-Cxheo-y7.mjs.gz +0 -0
- package/dist/scan-xJodM36m.js.gz +0 -0
- package/dist/selectConfig-Biqg7TT0.mjs.gz +0 -0
- package/dist/tagsView-CJEwP61J.js.gz +0 -0
- package/dist/tagsView-CzvHA6go.mjs.gz +0 -0
- package/dist/uploadAvatar-BaHgrUwd.js +0 -1
- package/dist/uploadAvatar-BaHgrUwd.js.gz +0 -0
- package/dist/uploadAvatar-fj1sOFRE.mjs.gz +0 -0
- package/dist/uploadAvatar.vue_vue_type_style_index_0_scoped_8e10f7e4_lang-B-YXXUWn.js +0 -1
- package/dist/uploadAvatar.vue_vue_type_style_index_0_scoped_8e10f7e4_lang-DOiOwYLl.mjs +0 -137
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index-DkzdygR1.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("./index-aEv4tD3l.js"),l={class:"wrap1"},a={class:"wrap2"},n=e.defineComponent({__name:"index",props:{showFull:{type:Boolean,default:!0}},emits:["save"],setup(n,{emit:o}){const s=e.ref(null),{width:c,height:i}=t.useElementSize(s),r=n,u=e.ref(!1),v=e.ref(null),d=e.ref(null),m=e.ref(null),f=e.ref(null),h=o,p=()=>{var e,t;u.value=!u.value,null==(e=null==m?void 0:m.value)||e.clear(),null==(t=null==f?void 0:f.value)||t.clear()},E=()=>{m.value.clear()},g=()=>{f.value.clear()},w=()=>{m.value.undo()},N=()=>{f.value.undo()},V=()=>{const e=m.value;if(e.isEmpty())return void alert("isEmpty");const t=e.getJPG();h("save",t)},b=()=>{const e=f.value;if(e.isEmpty())return void alert("isEmpty");const t=e.getRotateCanvas(-90).toDataURL();h("save",t)};return e.onMounted((()=>{u.value=r.showFull,setTimeout((()=>{(()=>{const e=d.value,l={width:c.value-30,height:200,minWidth:2,maxWidth:6,openSmooth:!1,bgColor:"#ffffff"};m.value=new t.SmoothSignature(e,l)})(),(()=>{const e=v.value,l={width:c.value-120,height:i.value-60,minWidth:3,maxWidth:10,openSmooth:!1,bgColor:"#ffffff"};f.value=new t.SmoothSignature(e,l)})()}),100)})),(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:"h-full w-full sign-finish",ref_key:"signFinish",ref:s},[e.withDirectives(e.createElementVNode("div",l,[n[0]||(n[0]=e.createElementVNode("span",{class:"sign-title"},"请在区域内签字",-1)),e.createElementVNode("canvas",{class:"canvas1",ref_key:"canvas1",ref:d},null,512),e.createElementVNode("div",{class:"actions"},[e.createElementVNode("button",{class:"danger",onClick:E},"清除"),e.createElementVNode("button",{class:"warning",onClick:w},"撤销"),e.createElementVNode("button",{class:"primary",onClick:p},"横屏"),e.createElementVNode("button",{class:"success",onClick:V},"保存")])],512),[[e.vShow,u.value]]),e.withDirectives(e.createElementVNode("div",a,[e.createElementVNode("div",{class:"actionsWrap"},[e.createElementVNode("div",{class:"actions"},[e.createElementVNode("button",{class:"danger",onClick:g},"清除"),e.createElementVNode("button",{class:"warning",onClick:N},"撤销"),e.createElementVNode("button",{class:"primary",onClick:p},"竖屏"),e.createElementVNode("button",{class:"success",onClick:b},"保存")])]),e.createElementVNode("canvas",{class:"canvas",ref_key:"canvas2",ref:v},null,512)],512),[[e.vShow,!u.value]])],512))}}),o=t._export_sfc(n,[["__scopeId","data-v-3795cfb3"]]);exports.default=o;
|
package/dist/index-Dsgu_XO6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t={class:"system-menu-container layout-padding"},o=e.defineComponent({name:"authorityManage"}),n=e.defineComponent({...o,setup:o=>(o,n)=>{const a=e.resolveComponent("bc-system-auth");return e.openBlock(),e.createElementBlock("div",t,[e.createVNode(a,{projectCode:"lsms","show-company":"",class:"h-full auth-manage"})])}});exports.default=n;
|
package/dist/index-Dt-axamm.mjs
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { ref, computed, onMounted, defineComponent, resolveComponent, resolveDirective, withDirectives, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createVNode, isRef, withCtx, createTextVNode } from "vue";
|
|
2
|
-
import { V as systemStore, k as HsMessage, H as HsMessageBox, _ as _export_sfc } from "./index-BKJybj1e.mjs";
|
|
3
|
-
function useScanCodeUpload(props) {
|
|
4
|
-
const fileList = ref([]);
|
|
5
|
-
const isDisabled = ref(false);
|
|
6
|
-
const loading = ref(false);
|
|
7
|
-
let userInfos = ref({});
|
|
8
|
-
const getProxy = computed(() => {
|
|
9
|
-
var _a;
|
|
10
|
-
return props.proxy || "/" + ((_a = userInfos.value) == null ? void 0 : _a.project_code) + "-web";
|
|
11
|
-
});
|
|
12
|
-
const getCompanyId = computed(() => {
|
|
13
|
-
var _a;
|
|
14
|
-
return props.companyId || ((_a = userInfos.value) == null ? void 0 : _a.company_id);
|
|
15
|
-
});
|
|
16
|
-
computed(() => {
|
|
17
|
-
var _a;
|
|
18
|
-
return props.userId || ((_a = userInfos.value) == null ? void 0 : _a.id);
|
|
19
|
-
});
|
|
20
|
-
onMounted(async () => {
|
|
21
|
-
userInfos.value = await systemStore.getUserByProject();
|
|
22
|
-
});
|
|
23
|
-
const submit = () => {
|
|
24
|
-
if (fileList.value.length == 0) {
|
|
25
|
-
HsMessage.warning("请上传图片");
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
HsMessageBox.confirm("图片上传成功后页面会禁用,是否确定上传图片?", "提示", {}).then(() => {
|
|
29
|
-
loading.value = true;
|
|
30
|
-
setTimeout(() => {
|
|
31
|
-
fileList.value = [];
|
|
32
|
-
isDisabled.value = true;
|
|
33
|
-
loading.value = false;
|
|
34
|
-
}, 1e3);
|
|
35
|
-
}).catch(() => {
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
return { fileList, isDisabled, getProxy, getCompanyId, loading, submit };
|
|
39
|
-
}
|
|
40
|
-
const _hoisted_1 = { class: "flex-1 overflow-auto custom-upload" };
|
|
41
|
-
const _hoisted_2 = { class: "flex justify-center items-center" };
|
|
42
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
43
|
-
__name: "index",
|
|
44
|
-
props: {
|
|
45
|
-
action: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: "/pub_token/singlefileBatch"
|
|
48
|
-
},
|
|
49
|
-
proxy: {
|
|
50
|
-
type: String,
|
|
51
|
-
default: ""
|
|
52
|
-
},
|
|
53
|
-
limit: {
|
|
54
|
-
type: Number,
|
|
55
|
-
default: 1
|
|
56
|
-
},
|
|
57
|
-
deleteUrl: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: "/pub_token/deleteFile"
|
|
60
|
-
},
|
|
61
|
-
mobileAttachPushUrl: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: "/pub_token/mobile_attach_push"
|
|
64
|
-
},
|
|
65
|
-
isPubToken: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: true
|
|
68
|
-
},
|
|
69
|
-
pubTokenUrl: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: "/sys/get_pub_token"
|
|
72
|
-
},
|
|
73
|
-
companyId: {
|
|
74
|
-
type: String,
|
|
75
|
-
default: ""
|
|
76
|
-
},
|
|
77
|
-
userId: {
|
|
78
|
-
type: String,
|
|
79
|
-
default: ""
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
setup(__props) {
|
|
83
|
-
const props = __props;
|
|
84
|
-
const { fileList, isDisabled, getProxy, getCompanyId, loading, submit } = useScanCodeUpload(props);
|
|
85
|
-
return (_ctx, _cache) => {
|
|
86
|
-
const _component_bc_upload = resolveComponent("bc-upload");
|
|
87
|
-
const _component_hs_button = resolveComponent("hs-button");
|
|
88
|
-
const _directive_loading = resolveDirective("loading");
|
|
89
|
-
return withDirectives((openBlock(), createElementBlock("div", {
|
|
90
|
-
class: normalizeClass(["h-full w-full flex flex-col p-[20px] box-border", [unref(isDisabled) ? "disabled" : ""]])
|
|
91
|
-
}, [
|
|
92
|
-
createElementVNode("div", _hoisted_1, [
|
|
93
|
-
createVNode(_component_bc_upload, {
|
|
94
|
-
action: __props.action,
|
|
95
|
-
proxy: unref(getProxy),
|
|
96
|
-
limit: __props.limit,
|
|
97
|
-
deleteUrl: __props.deleteUrl,
|
|
98
|
-
isModelValue: false,
|
|
99
|
-
showPat: false,
|
|
100
|
-
isPubToken: __props.isPubToken,
|
|
101
|
-
fileList: unref(fileList),
|
|
102
|
-
"onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => isRef(fileList) ? fileList.value = $event : null),
|
|
103
|
-
data: { company_id: unref(getCompanyId) },
|
|
104
|
-
name: "files"
|
|
105
|
-
}, null, 8, ["action", "proxy", "limit", "deleteUrl", "isPubToken", "fileList", "data"])
|
|
106
|
-
]),
|
|
107
|
-
createElementVNode("div", _hoisted_2, [
|
|
108
|
-
createVNode(_component_hs_button, {
|
|
109
|
-
round: "",
|
|
110
|
-
class: "flex-1",
|
|
111
|
-
type: "primary",
|
|
112
|
-
onClick: unref(submit)
|
|
113
|
-
}, {
|
|
114
|
-
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
115
|
-
createTextVNode("上传图片")
|
|
116
|
-
])),
|
|
117
|
-
_: 1,
|
|
118
|
-
__: [1]
|
|
119
|
-
}, 8, ["onClick"])
|
|
120
|
-
])
|
|
121
|
-
], 2)), [
|
|
122
|
-
[_directive_loading, unref(loading)]
|
|
123
|
-
]);
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9a80090e"]]);
|
|
128
|
-
export {
|
|
129
|
-
index as default
|
|
130
|
-
};
|
|
Binary file
|
|
Binary file
|
package/dist/index-k0M3MSJq.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("./index-aEv4tD3l.js");const l={class:"flex-1 overflow-auto custom-upload"},o={class:"flex justify-center items-center"},n=e.defineComponent({__name:"index",props:{action:{type:String,default:"/pub_token/singlefileBatch"},proxy:{type:String,default:""},limit:{type:Number,default:1},deleteUrl:{type:String,default:"/pub_token/deleteFile"},mobileAttachPushUrl:{type:String,default:"/pub_token/mobile_attach_push"},isPubToken:{type:Boolean,default:!0},pubTokenUrl:{type:String,default:"/sys/get_pub_token"},companyId:{type:String,default:""},userId:{type:String,default:""}},setup(n){const i=n,{fileList:r,isDisabled:a,getProxy:u,getCompanyId:s,loading:d,submit:c}=function(l){const o=e.ref([]),n=e.ref(!1),i=e.ref(!1);let r=e.ref({});const a=e.computed((()=>{var e;return l.proxy||"/"+(null==(e=r.value)?void 0:e.project_code)+"-web"})),u=e.computed((()=>{var e;return l.companyId||(null==(e=r.value)?void 0:e.company_id)}));return e.computed((()=>{var e;return l.userId||(null==(e=r.value)?void 0:e.id)})),e.onMounted((async()=>{r.value=await t.systemStore.getUserByProject()})),{fileList:o,isDisabled:n,getProxy:a,getCompanyId:u,loading:i,submit:()=>{0!=o.value.length?t.HsMessageBox.confirm("图片上传成功后页面会禁用,是否确定上传图片?","提示",{}).then((()=>{i.value=!0,setTimeout((()=>{o.value=[],n.value=!0,i.value=!1}),1e3)})).catch((()=>{})):t.HsMessage.warning("请上传图片")}}}(i);return(t,i)=>{const p=e.resolveComponent("bc-upload"),f=e.resolveComponent("hs-button"),m=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["h-full w-full flex flex-col p-[20px] box-border",[e.unref(a)?"disabled":""]])},[e.createElementVNode("div",l,[e.createVNode(p,{action:n.action,proxy:e.unref(u),limit:n.limit,deleteUrl:n.deleteUrl,isModelValue:!1,showPat:!1,isPubToken:n.isPubToken,fileList:e.unref(r),"onUpdate:fileList":i[0]||(i[0]=t=>e.isRef(r)?r.value=t:null),data:{company_id:e.unref(s)},name:"files"},null,8,["action","proxy","limit","deleteUrl","isPubToken","fileList","data"])]),e.createElementVNode("div",o,[e.createVNode(f,{round:"",class:"flex-1",type:"primary",onClick:e.unref(c)},{default:e.withCtx((()=>i[1]||(i[1]=[e.createTextVNode("上传图片")]))),_:1,__:[1]},8,["onClick"])])],2)),[[m,e.unref(d)]])}}}),i=t._export_sfc(n,[["__scopeId","data-v-9a80090e"]]);exports.default=i;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/scan-xJodM36m.js.gz
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),e=require("./uploadAvatar.vue_vue_type_style_index_0_scoped_8e10f7e4_lang-B-YXXUWn.js"),i=require("./index-aEv4tD3l.js"),s={data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0,imgIsQqualCrop:!1}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:()=>[1,1]},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:()=>10,validator:function(t){return Array.isArray(t)?Number(t[0])>=0&&Number(t[1])>=0:Number(t)>=0}},fillColor:{type:String,default:""}},computed:{cropInfo(){let t={};if(t.top=this.cropOffsertY>21?"-21px":"0px",t.width=this.cropW>0?this.cropW:0,t.height=this.cropH>0?this.cropH:0,this.infoTrue){let e=1;this.high&&!this.full&&(e=window.devicePixelRatio),1!==this.enlarge&!this.full&&(e=Math.abs(Number(this.enlarge))),t.width=t.width*e,t.height=t.height*e,this.full&&(t.width=t.width/this.scale,t.height=t.height/this.scale)}return t.width=t.width.toFixed(0),t.height=t.height.toFixed(0),t},isIE:()=>!!window.ActiveXObject||"ActiveXObject"in window,passive(){return this.isIE?null:{passive:!1}}},watch:{img(){this.checkedImg()},imgs(t){""!==t&&this.reload()},cropW(){this.showPreview()},cropH(){this.showPreview()},cropOffsertX(){this.showPreview()},cropOffsertY(){this.showPreview()},scale(t,e){this.showPreview()},x(){this.showPreview()},y(){this.showPreview()},autoCrop(t){t&&this.goAutoCrop()},autoCropWidth(){this.autoCrop&&this.goAutoCrop()},autoCropHeight(){this.autoCrop&&this.goAutoCrop()},mode(){this.checkedImg()},rotate(){this.showPreview(),(this.autoCrop||this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion(t){var e=navigator.userAgent.split(" "),i="";let s=0;const h=new RegExp(t,"i");for(var o=0;o<e.length;o++)h.test(e[o])&&(i=e[o]);return s=i?i.split("/")[1].split("."):["0","0","0"],s},checkOrientationImage(t,e,i,s){if(this.getVersion("chrome")[0]>=81)e=-1;else if(this.getVersion("safari")[0]>=605){const t=this.getVersion("version");t[0]>13&&t[1]>1&&(e=-1)}else{const t=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(t){let i=t[1];i=i.split("_"),(i[0]>13||i[0]>=13&&i[1]>=4)&&(e=-1)}}let h=document.createElement("canvas"),o=h.getContext("2d");switch(o.save(),e){case 2:h.width=i,h.height=s,o.translate(i,0),o.scale(-1,1);break;case 3:h.width=i,h.height=s,o.translate(i/2,s/2),o.rotate(180*Math.PI/180),o.translate(-i/2,-s/2);break;case 4:h.width=i,h.height=s,o.translate(0,s),o.scale(1,-1);break;case 5:h.height=i,h.width=s,o.rotate(.5*Math.PI),o.scale(1,-1);break;case 6:h.width=s,h.height=i,o.translate(s/2,i/2),o.rotate(90*Math.PI/180),o.translate(-i/2,-s/2);break;case 7:h.height=i,h.width=s,o.rotate(.5*Math.PI),o.translate(i,-s),o.scale(-1,1);break;case 8:h.height=i,h.width=s,o.translate(s/2,i/2),o.rotate(-90*Math.PI/180),o.translate(-i/2,-s/2);break;default:h.width=i,h.height=s}o.drawImage(t,0,0,i,s),o.restore(),h.toBlob((t=>{let e=URL.createObjectURL(t);URL.revokeObjectURL(this.imgs),this.imgs=e}),"image/"+this.outputType,1)},checkedImg(){if(null===this.img||""===this.img)return this.imgs="",void this.clearCrop();this.loading=!0,this.scale=1,this.rotate=0,this.clearCrop();let t=new Image;if(t.onload=()=>{if(""===this.img)return this.$emit("imgLoad","error"),this.$emit("img-load","error"),this.$emit("img-load",new Error("图片不能为空")),!1;let i=t.width,s=t.height;e.Exif.getData(t).then((e=>{this.orientation=e.orientation||1;let h=Number(this.maxImgSize);!this.orientation&&i<h&s<h?this.imgs=this.img:(i>h&&(s=s/i*h,i=h),s>h&&(i=i/s*h,s=h),this.checkOrientationImage(t,this.orientation,i,s))})).catch((t=>{this.$emit("img-load","error"),this.$emit("img-load-error",t)}))},t.onerror=()=>{this.$emit("imgLoad","error"),this.$emit("img-load","error"),this.$emit("img-load-error",error)},"data"!==this.img.substr(0,4)&&(t.crossOrigin=""),this.isIE){var i=new XMLHttpRequest;i.onload=function(){var e=URL.createObjectURL(this.response);t.src=e},i.open("GET",this.img,!0),i.responseType="blob",i.send()}else t.src=this.img},startMove(t){if(t.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in t?t.clientX:t.touches[0].clientX)-this.x,this.moveY=("clientY"in t?t.clientY:t.touches[0].clientY)-this.y,t.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),2==t.touches.length&&(this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("imgMoving",{moving:!0,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=t.offsetX?t.offsetX:t.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=t.offsetY?t.offsetY:t.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale(t){t.preventDefault();let e=this.scale;var i=this.touches[0].clientX,s=this.touches[0].clientY,h=t.touches[0].clientX,o=t.touches[0].clientY,r=this.touches[1].clientX,a=this.touches[1].clientY,c=t.touches[1].clientX,n=t.touches[1].clientY,p=Math.sqrt(Math.pow(i-r,2)+Math.pow(s-a,2)),l=Math.sqrt(Math.pow(h-c,2)+Math.pow(o-n,2))-p,d=1,u=(d=(d=d/this.trueWidth>d/this.trueHeight?d/this.trueHeight:d/this.trueWidth)>.1?.1:d)*l;if(!this.touchNow){if(this.touchNow=!0,l>0?e+=Math.abs(u):l<0&&e>Math.abs(u)&&(e-=Math.abs(u)),this.touches=t.touches,setTimeout((()=>{this.touchNow=!1}),8),!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e}},cancelTouchScale(t){window.removeEventListener("touchmove",this.touchScale)},moveImg(t){if(t.preventDefault(),t.touches&&2===t.touches.length)return this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;let e,i,s="clientX"in t?t.clientX:t.touches[0].clientX,h="clientY"in t?t.clientY:t.touches[0].clientY;e=s-this.moveX,i=h-this.moveY,this.$nextTick((()=>{if(this.centerBox){let t,s,h,o,r=this.getImgAxis(e,i,this.scale),a=this.getCropAxis(),c=this.trueHeight*this.scale,n=this.trueWidth*this.scale;switch(this.rotate){case 1:case-1:case 3:case-3:t=this.cropOffsertX-this.trueWidth*(1-this.scale)/2+(c-n)/2,s=this.cropOffsertY-this.trueHeight*(1-this.scale)/2+(n-c)/2,h=t-c+this.cropW,o=s-n+this.cropH;break;default:t=this.cropOffsertX-this.trueWidth*(1-this.scale)/2,s=this.cropOffsertY-this.trueHeight*(1-this.scale)/2,h=t-n+this.cropW,o=s-c+this.cropH}r.x1>=a.x1&&(e=t),r.y1>=a.y1&&(i=s),r.x2<=a.x2&&(e=h),r.y2<=a.y2&&(i=o)}this.x=e,this.y=i,this.$emit("imgMoving",{moving:!0,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}))},leaveImg(t){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("imgMoving",{moving:!1,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize(t){t.preventDefault();let e=this.scale;var i=t.deltaY||t.wheelDelta;i=navigator.userAgent.indexOf("Firefox")>0?30*i:i,this.isIE&&(i=-i);var s=this.coe,h=(s=s/this.trueWidth>s/this.trueHeight?s/this.trueHeight:s/this.trueWidth)*i;h<0?e+=Math.abs(h):e>Math.abs(h)&&(e-=Math.abs(h));let o=h<0?"add":"reduce";if(o!==this.coeStatus&&(this.coeStatus=o,this.coe=.2),this.scaling||(this.scalingSet=setTimeout((()=>{this.scaling=!1,this.coe=this.coe+=.01}),50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e},changeScale(t){let e=this.scale;t=t||1;var i=20;if((t*=i=i/this.trueWidth>i/this.trueHeight?i/this.trueHeight:i/this.trueWidth)>0?e+=Math.abs(t):e>Math.abs(t)&&(e-=Math.abs(t)),!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e},createCrop(t){t.preventDefault();var e="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,i="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;this.$nextTick((()=>{var t=e-this.cropX,s=i-this.cropY;if(t>0?(this.cropW=t+this.cropChangeX>this.w?this.w-this.cropChangeX:t,this.cropOffsertX=this.cropChangeX):(this.cropW=this.w-this.cropChangeX+Math.abs(t)>this.w?this.cropChangeX:Math.abs(t),this.cropOffsertX=this.cropChangeX+t>0?this.cropChangeX+t:0),this.fixed){var h=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];h+this.cropOffsertY>this.h?(this.cropH=this.h-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],this.cropOffsertX=t>0?this.cropChangeX:this.cropChangeX-this.cropW):this.cropH=h,this.cropOffsertY=this.cropOffsertY}else s>0?(this.cropH=s+this.cropChangeY>this.h?this.h-this.cropChangeY:s,this.cropOffsertY=this.cropChangeY):(this.cropH=this.h-this.cropChangeY+Math.abs(s)>this.h?this.cropChangeY:Math.abs(s),this.cropOffsertY=this.cropChangeY+s>0?this.cropChangeY+s:0)}))},changeCropSize(t,e,i,s,h){t.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=e,this.canChangeY=i,this.changeCropTypeX=s,this.changeCropTypeY=h,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("changeCropSize",{width:this.cropW,height:this.cropH}),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow(t){t.preventDefault();var e="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,i="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;let s=this.w,h=this.h,o=0,r=0;if(this.centerBox){let t=this.getImgAxis(),e=t.x2,i=t.y2;o=t.x1>0?t.x1:0,r=t.y1>0?t.y1:0,s>e&&(s=e),h>i&&(h=i)}const[a,c]=this.checkCropLimitSize();this.$nextTick((()=>{var t=e-this.cropX,n=i-this.cropY;if(this.canChangeX&&(1===this.changeCropTypeX?this.cropOldW-t<a?(this.cropW=a,this.cropOffsertX=this.cropOldW+this.cropChangeX-o-a):this.cropOldW-t>0?(this.cropW=s-this.cropChangeX-t<=s-o?this.cropOldW-t:this.cropOldW+this.cropChangeX-o,this.cropOffsertX=s-this.cropChangeX-t<=s-o?this.cropChangeX+t:o):(this.cropW=Math.abs(t)+this.cropChangeX<=s?Math.abs(t)-this.cropOldW:s-this.cropOldW-this.cropChangeX,this.cropOffsertX=this.cropChangeX+this.cropOldW):2===this.changeCropTypeX&&(this.cropOldW+t<a?this.cropW=a:this.cropOldW+t>0?(this.cropW=this.cropOldW+t+this.cropOffsertX<=s?this.cropOldW+t:s-this.cropOffsertX,this.cropOffsertX=this.cropChangeX):(this.cropW=s-this.cropChangeX+Math.abs(t+this.cropOldW)<=s-o?Math.abs(t+this.cropOldW):this.cropChangeX-o,this.cropOffsertX=s-this.cropChangeX+Math.abs(t+this.cropOldW)<=s-o?this.cropChangeX-Math.abs(t+this.cropOldW):o))),this.canChangeY&&(1===this.changeCropTypeY?this.cropOldH-n<c?(this.cropH=c,this.cropOffsertY=this.cropOldH+this.cropChangeY-r-c):this.cropOldH-n>0?(this.cropH=h-this.cropChangeY-n<=h-r?this.cropOldH-n:this.cropOldH+this.cropChangeY-r,this.cropOffsertY=h-this.cropChangeY-n<=h-r?this.cropChangeY+n:r):(this.cropH=Math.abs(n)+this.cropChangeY<=h?Math.abs(n)-this.cropOldH:h-this.cropOldH-this.cropChangeY,this.cropOffsertY=this.cropChangeY+this.cropOldH):2===this.changeCropTypeY&&(this.cropOldH+n<c?this.cropH=c:this.cropOldH+n>0?(this.cropH=this.cropOldH+n+this.cropOffsertY<=h?this.cropOldH+n:h-this.cropOffsertY,this.cropOffsertY=this.cropChangeY):(this.cropH=h-this.cropChangeY+Math.abs(n+this.cropOldH)<=h-r?Math.abs(n+this.cropOldH):this.cropChangeY-r,this.cropOffsertY=h-this.cropChangeY+Math.abs(n+this.cropOldH)<=h-r?this.cropChangeY-Math.abs(n+this.cropOldH):r))),this.canChangeX&&this.fixed){var p=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];p<c?(this.cropH=c,this.cropW=this.fixedNumber[0]*c/this.fixedNumber[1],1===this.changeCropTypeX&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):p+this.cropOffsertY>h?(this.cropH=h-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],1===this.changeCropTypeX&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):this.cropH=p}if(this.canChangeY&&this.fixed){var l=this.cropH/this.fixedNumber[1]*this.fixedNumber[0];l<a?(this.cropW=a,this.cropH=this.fixedNumber[1]*a/this.fixedNumber[0]):l+this.cropOffsertX>s?(this.cropW=s-this.cropOffsertX,this.cropH=this.cropW/this.fixedNumber[0]*this.fixedNumber[1]):this.cropW=l}this.$emit("cropSizing",{cropW:this.cropW,cropH:this.cropH}),this.$emit("crop-sizing",{cropW:this.cropW,cropH:this.cropH})}))},checkCropLimitSize(){let{cropW:t,cropH:e,limitMinSize:i}=this,s=new Array;return s=Array.isArray(i)?i:[i,i],t=parseFloat(s[0]),e=parseFloat(s[1]),[t,e]},changeCropEnd(t){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},calculateSize(t,e,i,s,h,o){const r=t/e;let a=h,c=o;return a<i&&(a=i,c=Math.ceil(a/r)),c<s&&(c=s,a=Math.ceil(c*r),a<i&&(a=i,c=Math.ceil(a/r))),a<h&&(a=h,c=Math.ceil(a/r)),c<o&&(c=o,a=Math.ceil(c*r)),{width:a,height:c}},endCrop(){0===this.cropW&&0===this.cropH&&(this.cropping=!1);let[t,e]=this.checkCropLimitSize();const{width:i,height:s}=this.fixed?this.calculateSize(this.fixedNumber[0],this.fixedNumber[1],t,e,this.cropW,this.cropH):{width:t,height:e};i>this.cropW&&(this.cropW=i,this.cropOffsertX+i>this.w&&(this.cropOffsertX=this.w-i)),s>this.cropH&&(this.cropH=s,this.cropOffsertY+s>this.h&&(this.cropOffsertY=this.h-s)),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop(){this.crop=!0},stopCrop(){this.crop=!1},clearCrop(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove(t){if(t.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(t),!1;if(t.touches&&2===t.touches.length)return this.crop=!1,this.startMove(t),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);let e,i,s="clientX"in t?t.clientX:t.touches[0].clientX,h="clientY"in t?t.clientY:t.touches[0].clientY;e=s-this.cropOffsertX,i=h-this.cropOffsertY,this.cropX=e,this.cropY=i,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop(t,e){let i=0,s=0;t&&(t.preventDefault(),i="clientX"in t?t.clientX:t.touches[0].clientX,s="clientY"in t?t.clientY:t.touches[0].clientY),this.$nextTick((()=>{let t,h,o=i-this.cropX,r=s-this.cropY;if(e&&(o=this.cropOffsertX,r=this.cropOffsertY),t=o<=0?0:o+this.cropW>this.w?this.w-this.cropW:o,h=r<=0?0:r+this.cropH>this.h?this.h-this.cropH:r,this.centerBox){let e=this.getImgAxis();t<=e.x1&&(t=e.x1),t+this.cropW>e.x2&&(t=e.x2-this.cropW),h<=e.y1&&(h=e.y1),h+this.cropH>e.y2&&(h=e.y2-this.cropH)}this.cropOffsertX=t,this.cropOffsertY=h,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})}))},getImgAxis(t,e,i){t=t||this.x,e=e||this.y,i=i||this.scale;let s={x1:0,x2:0,y1:0,y2:0},h=this.trueWidth*i,o=this.trueHeight*i;switch(this.rotate){case 0:s.x1=t+this.trueWidth*(1-i)/2,s.x2=s.x1+this.trueWidth*i,s.y1=e+this.trueHeight*(1-i)/2,s.y2=s.y1+this.trueHeight*i;break;case 1:case-1:case 3:case-3:s.x1=t+this.trueWidth*(1-i)/2+(h-o)/2,s.x2=s.x1+this.trueHeight*i,s.y1=e+this.trueHeight*(1-i)/2+(o-h)/2,s.y2=s.y1+this.trueWidth*i;break;default:s.x1=t+this.trueWidth*(1-i)/2,s.x2=s.x1+this.trueWidth*i,s.y1=e+this.trueHeight*(1-i)/2,s.y2=s.y1+this.trueHeight*i}return s},getCropAxis(){let t={x1:0,x2:0,y1:0,y2:0};return t.x1=this.cropOffsertX,t.x2=t.x1+this.cropW,t.y1=this.cropOffsertY,t.y2=t.y1+this.cropH,t},leaveCrop(t){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("cropMoving",{moving:!1,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked(t){let e=document.createElement("canvas"),i=e.getContext("2d"),s=new Image,h=this.rotate,o=this.trueWidth,r=this.trueHeight,a=this.cropOffsertX,c=this.cropOffsertY;s.onload=()=>{if(0!==this.cropW){let t=1;this.high&!this.full&&(t=window.devicePixelRatio),1!==this.enlarge&!this.full&&(t=Math.abs(Number(this.enlarge)));let e=this.cropW*t,n=this.cropH*t,l=o*this.scale*t,d=r*this.scale*t,u=(this.x-a+this.trueWidth*(1-this.scale)/2)*t,g=(this.y-c+this.trueHeight*(1-this.scale)/2)*t;switch(p(e,n),i.save(),h){case 0:this.full?(p(e/this.scale,n/this.scale),i.drawImage(s,u/this.scale,g/this.scale,l/this.scale,d/this.scale)):i.drawImage(s,u,g,l,d);break;case 1:case-3:this.full?(p(e/this.scale,n/this.scale),u=u/this.scale+(l/this.scale-d/this.scale)/2,g=g/this.scale+(d/this.scale-l/this.scale)/2,i.rotate(90*h*Math.PI/180),i.drawImage(s,g,-u-d/this.scale,l/this.scale,d/this.scale)):(u+=(l-d)/2,g+=(d-l)/2,i.rotate(90*h*Math.PI/180),i.drawImage(s,g,-u-d,l,d));break;case 2:case-2:this.full?(p(e/this.scale,n/this.scale),i.rotate(90*h*Math.PI/180),u/=this.scale,g/=this.scale,i.drawImage(s,-u-l/this.scale,-g-d/this.scale,l/this.scale,d/this.scale)):(i.rotate(90*h*Math.PI/180),i.drawImage(s,-u-l,-g-d,l,d));break;case 3:case-1:this.full?(p(e/this.scale,n/this.scale),u=u/this.scale+(l/this.scale-d/this.scale)/2,g=g/this.scale+(d/this.scale-l/this.scale)/2,i.rotate(90*h*Math.PI/180),i.drawImage(s,-g-l/this.scale,u,l/this.scale,d/this.scale)):(u+=(l-d)/2,g+=(d-l)/2,i.rotate(90*h*Math.PI/180),i.drawImage(s,-g-l,u,l,d));break;default:this.full?(p(e/this.scale,n/this.scale),i.drawImage(s,u/this.scale,g/this.scale,l/this.scale,d/this.scale)):i.drawImage(s,u,g,l,d)}i.restore()}else{let t=o*this.scale,e=r*this.scale;switch(i.save(),h){case 0:p(t,e),i.drawImage(s,0,0,t,e);break;case 1:case-3:p(e,t),i.rotate(90*h*Math.PI/180),i.drawImage(s,0,-e,t,e);break;case 2:case-2:p(t,e),i.rotate(90*h*Math.PI/180),i.drawImage(s,-t,-e,t,e);break;case 3:case-1:p(e,t),i.rotate(90*h*Math.PI/180),i.drawImage(s,-t,0,t,e);break;default:p(t,e),i.drawImage(s,0,0,t,e)}i.restore()}t(e)},"data"!==this.img.substr(0,4)&&(s.crossOrigin="Anonymous"),s.src=this.imgs;const n=this.fillColor;function p(t,s){e.width=Math.round(t),e.height=Math.round(s),n&&(i.fillStyle=n,i.fillRect(0,0,e.width,e.height))}},getCropData(t){this.getCropChecked((e=>{t(e.toDataURL("image/"+this.outputType,this.outputSize))}))},getCropBlob(t){this.getCropChecked((e=>{e.toBlob((e=>t(e)),"image/"+this.outputType,this.outputSize)}))},showPreview(){if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout((()=>{this.isCanShow=!0}),16);let t=this.cropW,e=this.cropH,i=this.scale;var s={};s.div={width:`${t}px`,height:`${e}px`};let h=(this.x-this.cropOffsertX)/i,o=(this.y-this.cropOffsertY)/i;s.w=t,s.h=e,s.url=this.imgs,s.img={width:`${this.trueWidth}px`,height:`${this.trueHeight}px`,transform:`scale(${i})translate3d(${h}px, ${o}px, 0px)rotateZ(${90*this.rotate}deg)`},s.html=`\n <div class="show-preview" style="width: ${s.w}px; height: ${s.h}px; overflow: hidden">\n <div style="width: ${t}px; height: ${e}px">\n <img src=${s.url} style="width: ${this.trueWidth}px; height: ${this.trueHeight}px; transform:\n scale(${i})translate3d(${h}px, ${o}px, 0px)rotateZ(${90*this.rotate}deg)">\n </div>\n </div>`,this.$emit("realTime",s),this.$emit("real-time",s)},reload(){let t=new Image;t.onload=()=>{this.w=parseFloat(window.getComputedStyle(this.$refs.cropper).width),this.h=parseFloat(window.getComputedStyle(this.$refs.cropper).height),this.trueWidth=t.width,this.trueHeight=t.height,this.original?this.scale=1:this.scale=this.checkedMode(),this.$nextTick((()=>{this.x=-(this.trueWidth-this.trueWidth*this.scale)/2+(this.w-this.trueWidth*this.scale)/2,this.y=-(this.trueHeight-this.trueHeight*this.scale)/2+(this.h-this.trueHeight*this.scale)/2,this.loading=!1,this.autoCrop&&this.goAutoCrop(),this.$emit("img-load","success"),this.$emit("imgLoad","success"),setTimeout((()=>{this.showPreview()}),20)}))},t.onerror=()=>{this.$emit("imgLoad","error"),this.$emit("img-load","error")},t.src=this.imgs},checkedMode(){let t=1,e=this.trueWidth,i=this.trueHeight;const s=this.mode.split(" ");switch(s[0]){case"contain":this.trueWidth>this.w&&(t=this.w/this.trueWidth),this.trueHeight*t>this.h&&(t=this.h/this.trueHeight);break;case"cover":e=this.w,t=e/this.trueWidth,i*=t,i<this.h&&(i=this.h,t=i/this.trueHeight);break;default:try{let h=s[0];if(-1!==h.search("px")){h=h.replace("px",""),e=parseFloat(h);const o=e/this.trueWidth;let r=1,a=s[1];-1!==a.search("px")&&(a=a.replace("px",""),i=parseFloat(a),r=i/this.trueHeight),t=Math.min(o,r)}if(-1!==h.search("%")&&(h=h.replace("%",""),e=parseFloat(h)/100*this.w,t=e/this.trueWidth),2===s.length&&"auto"===h){let e=s[1];-1!==e.search("px")&&(e=e.replace("px",""),i=parseFloat(e),t=i/this.trueHeight),-1!==e.search("%")&&(e=e.replace("%",""),i=parseFloat(e)/100*this.h,t=i/this.trueHeight)}}catch(h){t=1}}return t},goAutoCrop(t,e){if(""===this.imgs||null===this.imgs)return;this.clearCrop(),this.cropping=!0;let i=this.w,s=this.h;if(this.centerBox){const t=Math.abs(this.rotate)%2>0;let e=(t?this.trueHeight:this.trueWidth)*this.scale,h=(t?this.trueWidth:this.trueHeight)*this.scale;i=e<i?e:i,s=h<s?h:s}var h=t||parseFloat(this.autoCropWidth),o=e||parseFloat(this.autoCropHeight);0!==h&&0!==o||(h=.8*i,o=.8*s),h=h>i?i:h,o=o>s?s:o,this.fixed&&(o=h/this.fixedNumber[0]*this.fixedNumber[1]),o>this.h&&(h=(o=this.h)/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(h,o)},changeCrop(t,e){if(this.centerBox){let i=this.getImgAxis();t>i.x2-i.x1&&(e=(t=i.x2-i.x1)/this.fixedNumber[0]*this.fixedNumber[1]),e>i.y2-i.y1&&(t=(e=i.y2-i.y1)/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=t,this.cropH=e,this.checkCropLimitSize(),this.$nextTick((()=>{this.cropOffsertX=(this.w-this.cropW)/2,this.cropOffsertY=(this.h-this.cropH)/2,this.centerBox&&this.moveCrop(null,!0)}))},refresh(){this.img,this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.clearCrop(),this.$nextTick((()=>{this.checkedImg()}))},rotateLeft(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear(){this.rotate=0},checkoutImgAxis(t,e,i){t=t||this.x,e=e||this.y,i=i||this.scale;let s=!0;if(this.centerBox){let h=this.getImgAxis(t,e,i),o=this.getCropAxis();h.x1>=o.x1&&(s=!1),h.x2<=o.x2&&(s=!1),h.y1>=o.y1&&(s=!1),h.y2<=o.y2&&(s=!1),s||this.changeImgScale(h,o,i)}return s},changeImgScale(t,e,i){let s=this.trueWidth,h=this.trueHeight,o=s*i,r=h*i;if(o>=this.cropW&&r>=this.cropH)this.scale=i;else{const t=this.cropW/s,e=this.cropH/h,i=this.cropH<=h*t?t:e;this.scale=i,o=s*i,r=h*i}this.imgIsQqualCrop||(t.x1>=e.x1&&(this.isRotateRightOrLeft?this.x=e.x1-(s-o)/2-(o-r)/2:this.x=e.x1-(s-o)/2),t.x2<=e.x2&&(this.isRotateRightOrLeft?this.x=e.x1-(s-o)/2-(o-r)/2-r+this.cropW:this.x=e.x2-(s-o)/2-o),t.y1>=e.y1&&(this.isRotateRightOrLeft?this.y=e.y1-(h-r)/2-(r-o)/2:this.y=e.y1-(h-r)/2),t.y2<=e.y2&&(this.isRotateRightOrLeft?this.y=e.y2-(h-r)/2-(r-o)/2-o:this.y=e.y2-(h-r)/2-r)),(o<this.cropW||r<this.cropH)&&(this.imgIsQqualCrop=!0)}},mounted(){this.support="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";let t=this;var e=navigator.userAgent;this.isIOS=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,i,s){for(var h=atob(this.toDataURL(i,s).split(",")[1]),o=h.length,r=new Uint8Array(o),a=0;a<o;a++)r[a]=h.charCodeAt(a);e(new Blob([r],{type:t.type||"image/png"}))}}),this.showPreview(),this.checkedImg()},destroyed(){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.cancelScale()}},h={key:0,class:"cropper-box"},o=["src"],r={class:"cropper-view-box"},a=["src"],c={key:1};const n=i._export_sfc(s,[["render",function(e,i,s,n,p,l){return t.openBlock(),t.createElementBlock("div",{class:"vue-cropper",ref:"cropper",onMouseover:i[28]||(i[28]=(...t)=>l.scaleImg&&l.scaleImg(...t)),onMouseout:i[29]||(i[29]=(...t)=>l.cancelScale&&l.cancelScale(...t))},[e.imgs?(t.openBlock(),t.createElementBlock("div",h,[t.withDirectives(t.createElementVNode("div",{class:"cropper-box-canvas",style:t.normalizeStyle({width:e.trueWidth+"px",height:e.trueHeight+"px",transform:"scale("+e.scale+","+e.scale+") translate3d("+e.x/e.scale+"px,"+e.y/e.scale+"px,0)rotateZ("+90*e.rotate+"deg)"})},[t.createElementVNode("img",{src:e.imgs,alt:"cropper-img",ref:"cropperImg"},null,8,o)],4),[[t.vShow,!e.loading]])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["cropper-drag-box",{"cropper-move":e.move&&!e.crop,"cropper-crop":e.crop,"cropper-modal":e.cropping}]),onMousedown:i[0]||(i[0]=(...t)=>l.startMove&&l.startMove(...t)),onTouchstart:i[1]||(i[1]=(...t)=>l.startMove&&l.startMove(...t))},null,34),t.withDirectives(t.createElementVNode("div",{class:"cropper-crop-box",style:t.normalizeStyle({width:e.cropW+"px",height:e.cropH+"px",transform:"translate3d("+e.cropOffsertX+"px,"+e.cropOffsertY+"px,0)"})},[t.createElementVNode("span",r,[t.createElementVNode("img",{style:t.normalizeStyle({width:e.trueWidth+"px",height:e.trueHeight+"px",transform:"scale("+e.scale+","+e.scale+") translate3d("+(e.x-e.cropOffsertX)/e.scale+"px,"+(e.y-e.cropOffsertY)/e.scale+"px,0)rotateZ("+90*e.rotate+"deg)"}),src:e.imgs,alt:"cropper-img"},null,12,a)]),t.createElementVNode("span",{class:"cropper-face cropper-move",onMousedown:i[2]||(i[2]=(...t)=>l.cropMove&&l.cropMove(...t)),onTouchstart:i[3]||(i[3]=(...t)=>l.cropMove&&l.cropMove(...t))},null,32),s.info?(t.openBlock(),t.createElementBlock("span",{key:0,class:"crop-info",style:t.normalizeStyle({top:l.cropInfo.top})},t.toDisplayString(l.cropInfo.width)+" × "+t.toDisplayString(l.cropInfo.height),5)):t.createCommentVNode("",!0),s.fixedBox?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",c,[t.createElementVNode("span",{class:"crop-line line-w",onMousedown:i[4]||(i[4]=t=>l.changeCropSize(t,!1,!0,0,1)),onTouchstart:i[5]||(i[5]=t=>l.changeCropSize(t,!1,!0,0,1))},null,32),t.createElementVNode("span",{class:"crop-line line-a",onMousedown:i[6]||(i[6]=t=>l.changeCropSize(t,!0,!1,1,0)),onTouchstart:i[7]||(i[7]=t=>l.changeCropSize(t,!0,!1,1,0))},null,32),t.createElementVNode("span",{class:"crop-line line-s",onMousedown:i[8]||(i[8]=t=>l.changeCropSize(t,!1,!0,0,2)),onTouchstart:i[9]||(i[9]=t=>l.changeCropSize(t,!1,!0,0,2))},null,32),t.createElementVNode("span",{class:"crop-line line-d",onMousedown:i[10]||(i[10]=t=>l.changeCropSize(t,!0,!1,2,0)),onTouchstart:i[11]||(i[11]=t=>l.changeCropSize(t,!0,!1,2,0))},null,32),t.createElementVNode("span",{class:"crop-point point1",onMousedown:i[12]||(i[12]=t=>l.changeCropSize(t,!0,!0,1,1)),onTouchstart:i[13]||(i[13]=t=>l.changeCropSize(t,!0,!0,1,1))},null,32),t.createElementVNode("span",{class:"crop-point point2",onMousedown:i[14]||(i[14]=t=>l.changeCropSize(t,!1,!0,0,1)),onTouchstart:i[15]||(i[15]=t=>l.changeCropSize(t,!1,!0,0,1))},null,32),t.createElementVNode("span",{class:"crop-point point3",onMousedown:i[16]||(i[16]=t=>l.changeCropSize(t,!0,!0,2,1)),onTouchstart:i[17]||(i[17]=t=>l.changeCropSize(t,!0,!0,2,1))},null,32),t.createElementVNode("span",{class:"crop-point point4",onMousedown:i[18]||(i[18]=t=>l.changeCropSize(t,!0,!1,1,0)),onTouchstart:i[19]||(i[19]=t=>l.changeCropSize(t,!0,!1,1,0))},null,32),t.createElementVNode("span",{class:"crop-point point5",onMousedown:i[20]||(i[20]=t=>l.changeCropSize(t,!0,!1,2,0)),onTouchstart:i[21]||(i[21]=t=>l.changeCropSize(t,!0,!1,2,0))},null,32),t.createElementVNode("span",{class:"crop-point point6",onMousedown:i[22]||(i[22]=t=>l.changeCropSize(t,!0,!0,1,2)),onTouchstart:i[23]||(i[23]=t=>l.changeCropSize(t,!0,!0,1,2))},null,32),t.createElementVNode("span",{class:"crop-point point7",onMousedown:i[24]||(i[24]=t=>l.changeCropSize(t,!1,!0,0,2)),onTouchstart:i[25]||(i[25]=t=>l.changeCropSize(t,!1,!0,0,2))},null,32),t.createElementVNode("span",{class:"crop-point point8",onMousedown:i[26]||(i[26]=t=>l.changeCropSize(t,!0,!0,2,2)),onTouchstart:i[27]||(i[27]=t=>l.changeCropSize(t,!0,!0,2,2))},null,32)]))],4),[[t.vShow,e.cropping]])],544)}],["__scopeId","data-v-8e42ffcf"]]),p={class:"h-full"},l={class:"avatar-upload-preview"},d=["src"],u=t.defineComponent({__name:"uploadAvatar",props:{avatar:{default:""},close:{type:Function,default:close},proxyId:{default:""}},setup(e){const{postSinglefile:s,postUpdateFile:h}=i.useFileController(),o=e;let r=t.ref({});t.onMounted((async()=>{r.value=await i.systemStore.get("userInfo")}));let{avatar:a}=t.toRefs(o);const c=t.reactive({img:"",autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!1,outputSize:.5,outputType:"jpeg",canScale:!1,fixed:!1,fixedNumber:[1,1],full:!0,canMoveBox:!1,original:!1,centerBox:!1,infoTrue:!0,filename:""}),u=t.ref({}),g=t.ref({});t.ref(!1);let m=t=>{"left"==t&&g.value.rotateLeft(),"right"==t&&g.value.rotateRight()},f=t=>{const e=t||1;g.value.changeScale(e)},v=()=>{g.value.refresh()};const w=t=>{u.value=t};let x=()=>{},C=t=>{if(!["image/png","image/jpg","image/jpeg","image/PNG","image/JPG","image/JPEG","image/gif"].includes(t.type))return i.ElMessage.error("图片格式有误,请重新上传"),!1;{const e=new FileReader;e.readAsDataURL(t),e.onload=()=>{c.img=e.result,c.filename=t.name}}},y=()=>{c.img||i.ElMessage.warning("请先选择图片"),g.value.getCropBlob((async t=>{const e=await s({data:{file:t},proxy:o.proxyId}),i=await h({data:{id:r.value.id,attchIdArrStr:e.data.id,attachType:2},proxy:o.proxyId});o.close(i)}))};return t.onMounted((()=>{setTimeout((()=>{c.img=a.value}),100)})),(e,i)=>{const s=t.resolveComponent("el-col"),h=t.resolveComponent("el-row"),o=t.resolveComponent("bc-icon"),r=t.resolveComponent("el-button"),a=t.resolveComponent("hs-upload");return t.openBlock(),t.createElementBlock("div",p,[t.createVNode(h,null,{default:t.withCtx((()=>[t.createVNode(s,{xs:24,md:13,style:{height:"350px"}},{default:t.withCtx((()=>[t.createVNode(n,{ref_key:"cropperRef",ref:g,img:c.img,info:!0,infoTrue:c.infoTrue,"auto-crop":c.autoCrop,"fixed-box":c.fixedBox,fixedNumber:c.fixedNumber,fixed:c.fixed,centerBox:c.centerBox,outputType:"png",onRealTime:w},null,8,["img","infoTrue","auto-crop","fixed-box","fixedNumber","fixed","centerBox"])])),_:1}),t.createVNode(s,{xs:24,md:11,style:{height:"350px"}},{default:t.withCtx((()=>[t.createElementVNode("div",l,[t.createElementVNode("img",{src:u.value.url,style:t.normalizeStyle(u.value.img)},null,12,d)])])),_:1})])),_:1}),t.createVNode(h,{class:"ptb2 py-3"},{default:t.withCtx((()=>[t.createVNode(s,{lg:2,md:2},{default:t.withCtx((()=>[t.createVNode(a,{action:"#","http-request":t.unref(x),"show-file-list":!1,"before-upload":t.unref(C),accept:"image/*"},{default:t.withCtx((()=>[t.createVNode(r,{size:"default"},{default:t.withCtx((()=>[i[6]||(i[6]=t.createTextVNode(" 选择 ")),t.createVNode(o,{name:"ele-UploadFilled"})])),_:1,__:[6]})])),_:1},8,["http-request","before-upload"])])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",icon:"ele-Plus",onClick:i[0]||(i[0]=e=>t.unref(f)(1))})])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",icon:"ele-Minus",onClick:i[1]||(i[1]=e=>t.unref(f)(-1))})])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",icon:"ele-RefreshLeft",onClick:i[2]||(i[2]=e=>t.unref(m)("left"))})])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",icon:"ele-RefreshRight",onClick:i[3]||(i[3]=e=>t.unref(m)("right"))})])),_:1}),t.createVNode(s,{lg:{span:1,offset:1},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",onClick:i[4]||(i[4]=e=>t.unref(v)())},{default:t.withCtx((()=>i[7]||(i[7]=[t.createTextVNode("重 置")]))),_:1,__:[7]})])),_:1}),t.createVNode(s,{lg:{span:1,offset:7},md:2},{default:t.withCtx((()=>[t.createVNode(r,{size:"default",type:"primary",onClick:i[5]||(i[5]=e=>t.unref(y)())},{default:t.withCtx((()=>i[8]||(i[8]=[t.createTextVNode("提 交")]))),_:1,__:[8]})])),_:1})])),_:1})])}}}),g=i._export_sfc(u,[["__scopeId","data-v-8e10f7e4"]]);exports.default=g;
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t={};t.getData=t=>new Promise(((e,n)=>{let r={};(function(t){let e=null;return new Promise(((n,r)=>{if(t.src)if(/^data\:/i.test(t.src))e=function(t,e){e=e||t.match(/^data\:([^\;]+)\;base64,/im)[1]||"",t=t.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var n=atob(t),r=n.length%2==0?n.length:n.length+1,i=new ArrayBuffer(r),a=new Uint16Array(i),s=0;s<r;s++)a[s]=n.charCodeAt(s);return i}(t.src),n(e);else if(/^blob\:/i.test(t.src)){var i=new FileReader;i.onload=function(t){e=t.target.result,n(e)},function(t,e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(t){200!=this.status&&0!==this.status||e(this.response)},n.send()}(t.src,(function(t){i.readAsArrayBuffer(t)}))}else{var a=new XMLHttpRequest;a.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";e=a.response,n(e),a=null},a.open("GET",t.src,!0),a.responseType="arraybuffer",a.send(null)}else r("img error")}))})(t).then((t=>{r.arrayBuffer=t;try{r.orientation=function(t){var e,n,r,i,a,s,o,f,u,c=new DataView(t),l=c.byteLength;if(255===c.getUint8(0)&&216===c.getUint8(1))for(f=2;f<l;){if(255===c.getUint8(f)&&225===c.getUint8(f+1)){s=f;break}f++}s&&(n=s+10,"Exif"===function(t,e,n){var r,i="";for(r=e,n+=e;r<n;r++)i+=String.fromCharCode(t.getUint8(r));return i}(c,s+4,4)&&((i=18761===(a=c.getUint16(n)))||19789===a)&&42===c.getUint16(n+2,i)&&(r=c.getUint32(n+4,i))>=8&&(o=n+r));if(o)for(l=c.getUint16(o,i),u=0;u<l;u++)if(f=o+12*u+2,274===c.getUint16(f,i)){f+=8,e=c.getUint16(f,i);break}return e}(t)}catch{r.orientation=-1}e(r)})).catch((t=>{n(t)}))})),exports.Exif=t;
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
const Exif = {};
|
|
2
|
-
Exif.getData = (img) => new Promise((reslove, reject) => {
|
|
3
|
-
let obj = {};
|
|
4
|
-
getImageData(img).then((data) => {
|
|
5
|
-
obj.arrayBuffer = data;
|
|
6
|
-
try {
|
|
7
|
-
obj.orientation = getOrientation(data);
|
|
8
|
-
} catch {
|
|
9
|
-
obj.orientation = -1;
|
|
10
|
-
}
|
|
11
|
-
reslove(obj);
|
|
12
|
-
}).catch((error) => {
|
|
13
|
-
reject(error);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
function getImageData(img) {
|
|
17
|
-
let data = null;
|
|
18
|
-
return new Promise((reslove, reject) => {
|
|
19
|
-
if (img.src) {
|
|
20
|
-
if (/^data\:/i.test(img.src)) {
|
|
21
|
-
data = base64ToArrayBuffer(img.src);
|
|
22
|
-
reslove(data);
|
|
23
|
-
} else if (/^blob\:/i.test(img.src)) {
|
|
24
|
-
var fileReader = new FileReader();
|
|
25
|
-
fileReader.onload = function(e) {
|
|
26
|
-
data = e.target.result;
|
|
27
|
-
reslove(data);
|
|
28
|
-
};
|
|
29
|
-
objectURLToBlob(img.src, function(blob) {
|
|
30
|
-
fileReader.readAsArrayBuffer(blob);
|
|
31
|
-
});
|
|
32
|
-
} else {
|
|
33
|
-
var http = new XMLHttpRequest();
|
|
34
|
-
http.onload = function() {
|
|
35
|
-
if (this.status == 200 || this.status === 0) {
|
|
36
|
-
data = http.response;
|
|
37
|
-
reslove(data);
|
|
38
|
-
} else {
|
|
39
|
-
throw "Could not load image";
|
|
40
|
-
}
|
|
41
|
-
http = null;
|
|
42
|
-
};
|
|
43
|
-
http.open("GET", img.src, true);
|
|
44
|
-
http.responseType = "arraybuffer";
|
|
45
|
-
http.send(null);
|
|
46
|
-
}
|
|
47
|
-
} else {
|
|
48
|
-
reject("img error");
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function objectURLToBlob(url, callback) {
|
|
53
|
-
var http = new XMLHttpRequest();
|
|
54
|
-
http.open("GET", url, true);
|
|
55
|
-
http.responseType = "blob";
|
|
56
|
-
http.onload = function(e) {
|
|
57
|
-
if (this.status == 200 || this.status === 0) {
|
|
58
|
-
callback(this.response);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
http.send();
|
|
62
|
-
}
|
|
63
|
-
function base64ToArrayBuffer(base64, contentType) {
|
|
64
|
-
contentType = contentType || base64.match(/^data\:([^\;]+)\;base64,/mi)[1] || "";
|
|
65
|
-
base64 = base64.replace(/^data\:([^\;]+)\;base64,/gmi, "");
|
|
66
|
-
var binary = atob(base64);
|
|
67
|
-
var len = binary.length % 2 == 0 ? binary.length : binary.length + 1;
|
|
68
|
-
var buffer = new ArrayBuffer(len);
|
|
69
|
-
var view = new Uint16Array(buffer);
|
|
70
|
-
for (var i = 0; i < len; i++) {
|
|
71
|
-
view[i] = binary.charCodeAt(i);
|
|
72
|
-
}
|
|
73
|
-
return buffer;
|
|
74
|
-
}
|
|
75
|
-
function getStringFromCharCode(dataView, start, length) {
|
|
76
|
-
var str = "";
|
|
77
|
-
var i;
|
|
78
|
-
for (i = start, length += start; i < length; i++) {
|
|
79
|
-
str += String.fromCharCode(dataView.getUint8(i));
|
|
80
|
-
}
|
|
81
|
-
return str;
|
|
82
|
-
}
|
|
83
|
-
function getOrientation(arrayBuffer) {
|
|
84
|
-
var dataView = new DataView(arrayBuffer);
|
|
85
|
-
var length = dataView.byteLength;
|
|
86
|
-
var orientation;
|
|
87
|
-
var exifIDCode;
|
|
88
|
-
var tiffOffset;
|
|
89
|
-
var firstIFDOffset;
|
|
90
|
-
var littleEndian;
|
|
91
|
-
var endianness;
|
|
92
|
-
var app1Start;
|
|
93
|
-
var ifdStart;
|
|
94
|
-
var offset;
|
|
95
|
-
var i;
|
|
96
|
-
if (dataView.getUint8(0) === 255 && dataView.getUint8(1) === 216) {
|
|
97
|
-
offset = 2;
|
|
98
|
-
while (offset < length) {
|
|
99
|
-
if (dataView.getUint8(offset) === 255 && dataView.getUint8(offset + 1) === 225) {
|
|
100
|
-
app1Start = offset;
|
|
101
|
-
break;
|
|
102
|
-
}
|
|
103
|
-
offset++;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
if (app1Start) {
|
|
107
|
-
exifIDCode = app1Start + 4;
|
|
108
|
-
tiffOffset = app1Start + 10;
|
|
109
|
-
if (getStringFromCharCode(dataView, exifIDCode, 4) === "Exif") {
|
|
110
|
-
endianness = dataView.getUint16(tiffOffset);
|
|
111
|
-
littleEndian = endianness === 18761;
|
|
112
|
-
if (littleEndian || endianness === 19789) {
|
|
113
|
-
if (dataView.getUint16(tiffOffset + 2, littleEndian) === 42) {
|
|
114
|
-
firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian);
|
|
115
|
-
if (firstIFDOffset >= 8) {
|
|
116
|
-
ifdStart = tiffOffset + firstIFDOffset;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (ifdStart) {
|
|
123
|
-
length = dataView.getUint16(ifdStart, littleEndian);
|
|
124
|
-
for (i = 0; i < length; i++) {
|
|
125
|
-
offset = ifdStart + i * 12 + 2;
|
|
126
|
-
if (dataView.getUint16(offset, littleEndian) === 274) {
|
|
127
|
-
offset += 8;
|
|
128
|
-
orientation = dataView.getUint16(offset, littleEndian);
|
|
129
|
-
break;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
return orientation;
|
|
134
|
-
}
|
|
135
|
-
export {
|
|
136
|
-
Exif as E
|
|
137
|
-
};
|