hs-admin-ui 14.7.0 → 14.7.2

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.
Files changed (314) hide show
  1. package/dist/{401-BMNbsyF9.js → 401-D0AnigLv.js} +1 -1
  2. package/dist/{401-DG07v61x.mjs → 401-Dt9xE4Fw.mjs} +1 -1
  3. package/dist/{404-Bn3CBvnV.mjs → 404-BjPWDVzi.mjs} +1 -1
  4. package/dist/404-BjPWDVzi.mjs.gz +0 -0
  5. package/dist/{404-DeJDDdpg.js → 404-D1Ylaj48.js} +1 -1
  6. package/dist/{404-DeJDDdpg.js.gz → 404-D1Ylaj48.js.gz} +0 -0
  7. package/dist/{account-SbCBkQMZ.mjs → account-B-qSr8WK.mjs} +1 -1
  8. package/dist/{account-CBnNQs5n.js → account-DKr9_7IF.js} +1 -1
  9. package/dist/{aside-Bvb4LXHl.js → aside-CUkouA4N.js} +1 -1
  10. package/dist/{aside-BJCa2vyy.mjs → aside-DEoi_mpX.mjs} +3 -3
  11. package/dist/{baseFormConfig-CtFAmy2n.js → baseFormConfig-CFAmUVg_.js} +1 -1
  12. package/dist/{baseFormConfig-BCgmwrGD.mjs → baseFormConfig-CxQshD8D.mjs} +1 -1
  13. package/dist/baseFormConfig-CxQshD8D.mjs.gz +0 -0
  14. package/dist/{baseTableConfig-7Hpf03RS.mjs → baseTableConfig-DRrUyKzS.mjs} +1 -1
  15. package/dist/baseTableConfig-DRrUyKzS.mjs.gz +0 -0
  16. package/dist/{baseTableConfig-CMOwP1p2.js → baseTableConfig-DV60ycxs.js} +1 -1
  17. package/dist/baseTableConfig-DV60ycxs.js.gz +0 -0
  18. package/dist/{bcFormConfig-D-3HK8Ce.mjs → bcFormConfig-BkWXe3aL.mjs} +1 -1
  19. package/dist/{bcFormConfig-BuQnuH-q.js → bcFormConfig-C3JKWrbH.js} +1 -1
  20. package/dist/{bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-Buk67QKX.js → bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-3O3288Fq.js} +1 -1
  21. package/dist/{bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-H0S3r1hj.mjs → bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-XThcTHOz.mjs} +2 -2
  22. package/dist/{bcSwitchSystems.vue_vue_type_script_setup_true_lang-DydqyNmq.js → bcSwitchSystems.vue_vue_type_script_setup_true_lang-BGuwBHC8.js} +1 -1
  23. package/dist/{bcSwitchSystems.vue_vue_type_script_setup_true_lang-wS0__ZAH.mjs → bcSwitchSystems.vue_vue_type_script_setup_true_lang-t0mbpb4Z.mjs} +2 -2
  24. package/dist/{btnIndex-D95XPM4B.mjs → btnIndex-CVpa26xG.mjs} +3 -3
  25. package/dist/btnIndex-CVpa26xG.mjs.gz +0 -0
  26. package/dist/{btnIndex-B20MYb79.js → btnIndex-U0Wg9QnT.js} +1 -1
  27. package/dist/{classic-DWVKtqDz.mjs → classic-Bp8P6DjP.mjs} +5 -5
  28. package/dist/{classic-zcIPEzj2.js → classic-D5-ZeoXm.js} +1 -1
  29. package/dist/{cloneConfigDialog-CwLeyVd3.js → cloneConfigDialog-C5QaWpN6.js} +1 -1
  30. package/dist/cloneConfigDialog-C5QaWpN6.js.gz +0 -0
  31. package/dist/{cloneConfigDialog-Bx7CUmX-.mjs → cloneConfigDialog-idJE5KXX.mjs} +3 -3
  32. package/dist/cloneConfigDialog-idJE5KXX.mjs.gz +0 -0
  33. package/dist/{columns-HdG3Ugve.js → columns-DOJGS0gT.js} +1 -1
  34. package/dist/{columns-CgAstmU4.mjs → columns-pCesW5nS.mjs} +5 -5
  35. package/dist/{columnsAside-D1pdWY2S.mjs → columnsAside-B_mO68om.mjs} +1 -1
  36. package/dist/{columnsAside-CGMkvcHu.js → columnsAside-C5BTxt2W.js} +1 -1
  37. package/dist/{contextmenu-DVYXF4pa.js → contextmenu-C7l2BQqB.js} +1 -1
  38. package/dist/{contextmenu-SGtI0T7Y.mjs → contextmenu-CCw0BuWf.mjs} +1 -1
  39. package/dist/{contextmenu-B65aTF9N.js → contextmenu-ClVIzbtL.js} +1 -1
  40. package/dist/{contextmenu-8tozX5u4.mjs → contextmenu-DnsWRN1B.mjs} +1 -1
  41. package/dist/{copyMenuConfig-DigDE4L_.js → copyMenuConfig-BP0J4j-b.js} +1 -1
  42. package/dist/{copyMenuConfig-d2A8a7Qc.mjs → copyMenuConfig-MhL7csTl.mjs} +1 -1
  43. package/dist/{copyMenuConfig.vue_vue_type_script_setup_true_lang-JAAVjR6V.mjs → copyMenuConfig.vue_vue_type_script_setup_true_lang-BIOHHvRF.mjs} +2 -2
  44. package/dist/{copyMenuConfig.vue_vue_type_script_setup_true_lang-DJdDrx-O.js → copyMenuConfig.vue_vue_type_script_setup_true_lang-BZ8I0Uzy.js} +1 -1
  45. package/dist/{copySystem-CipJH4UB.js → copySystem-B1H-bxp1.js} +1 -1
  46. package/dist/{copySystem-CpA94ikP.mjs → copySystem-qXIEt-n3.mjs} +1 -1
  47. package/dist/{copySystem.vue_vue_type_script_setup_true_lang-CM6-yBCh.mjs → copySystem.vue_vue_type_script_setup_true_lang-BvbQXwKr.mjs} +2 -2
  48. package/dist/{copySystem.vue_vue_type_script_setup_true_lang-BZJP_wJt.js → copySystem.vue_vue_type_script_setup_true_lang-D95Hi1J1.js} +1 -1
  49. package/dist/{defaults-B2mLNhz8.js → defaults-B-QaiyiZ.js} +1 -1
  50. package/dist/{defaults-BP5mFBAG.mjs → defaults-CC25U6u4.mjs} +4 -4
  51. package/dist/{dialog-CEf3FOx6.mjs → dialog-BFWZkGRL.mjs} +1 -1
  52. package/dist/{dialog-BUn5XQcP.mjs → dialog-BbJ5FJvu.mjs} +1 -1
  53. package/dist/{dialog-jKJO42qd.js → dialog-DJ4Ba4E9.js} +1 -1
  54. package/dist/{dialog-RIZ8_H6G.js → dialog-DMtqnWQL.js} +1 -1
  55. package/dist/{dialog-D_E2mZJh.js → dialog-DjXTT07z.js} +1 -1
  56. package/dist/{dialog-Cz7-nJ38.mjs → dialog-U8GgAM2W.mjs} +1 -1
  57. package/dist/{dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-CsWtx-vj.js → dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-BpReZIrQ.js} +1 -1
  58. package/dist/{dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-PwiLRNNG.mjs → dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-DEhUOWnq.mjs} +3 -3
  59. package/dist/{dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-YvhECgcy.mjs → dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-MvgyOcz4.mjs} +2 -2
  60. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-MvgyOcz4.mjs.gz +0 -0
  61. package/dist/{dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-CbREaEMN.js → dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-xpAhNcHu.js} +1 -1
  62. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-xpAhNcHu.js.gz +0 -0
  63. package/dist/{dictDialog-De3tAk-b.mjs → dictDialog-Cuhdd-hZ.mjs} +1 -1
  64. package/dist/{dictDialog-BnrsZshl.js → dictDialog-FVFAhBii.js} +1 -1
  65. package/dist/{dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-CB_5-0ca.js → dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-BhBri9Hi.js} +1 -1
  66. package/dist/{dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-K_7HdA4d.mjs → dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-f1qIbcki.mjs} +2 -2
  67. package/dist/{dictItemDialog--9Wl1gw2.js → dictItemDialog-BCgVdY3G.js} +1 -1
  68. package/dist/{dictItemDialog-C45L17CC.mjs → dictItemDialog-CBgw29L0.mjs} +1 -1
  69. package/dist/{dictItemDialog.vue_vue_type_script_setup_true_lang-DTGMK4Dk.js → dictItemDialog.vue_vue_type_script_setup_true_lang-CDkFle__.js} +1 -1
  70. package/dist/{dictItemDialog.vue_vue_type_script_setup_true_lang-nI52R_J0.mjs → dictItemDialog.vue_vue_type_script_setup_true_lang-DiK9Nr3I.mjs} +2 -2
  71. package/dist/{formConfig-C74ZfKZc.js → formConfig-BYEIq_B8.js} +1 -1
  72. package/dist/formConfig-BYEIq_B8.js.gz +0 -0
  73. package/dist/{formConfig-DpYVxOyk.mjs → formConfig-DukrdQdk.mjs} +6 -6
  74. package/dist/formConfig-DukrdQdk.mjs.gz +0 -0
  75. package/dist/{header-WDdvP0OC.js → header-D0xtjJkz.js} +1 -1
  76. package/dist/{header-CSnzEvoL.mjs → header-Dj6vddTE.mjs} +2 -2
  77. package/dist/{horizontal-D87BiThY.js → horizontal-DFJi1nQM.js} +1 -1
  78. package/dist/{horizontal-Bzo8AMl6.mjs → horizontal-rlmmhnZb.mjs} +2 -2
  79. package/dist/{hsAttrBtn-CV9s2lYW.js → hsAttrBtn-BZGrzCEb.js} +1 -1
  80. package/dist/{hsAttrBtn-BS3OO0WU.mjs → hsAttrBtn-wqvEX__x.mjs} +1 -1
  81. package/dist/{hsAttrBtn.vue_vue_type_script_setup_true_lang-DlKOOI-d.js → hsAttrBtn.vue_vue_type_script_setup_true_lang-BWhRAqS3.js} +1 -1
  82. package/dist/{hsAttrBtn.vue_vue_type_script_setup_true_lang-CC-ZNy01.mjs → hsAttrBtn.vue_vue_type_script_setup_true_lang-D4dbqJCz.mjs} +4 -4
  83. package/dist/{hsAttrForm-RhYx5CdL.js → hsAttrForm-D-xkYwtx.js} +1 -1
  84. package/dist/{hsAttrForm-CX8NqFJc.mjs → hsAttrForm-D13Bf5Hd.mjs} +1 -1
  85. package/dist/{hsAttrForm.vue_vue_type_script_setup_true_lang-DVWF0m7c.mjs → hsAttrForm.vue_vue_type_script_setup_true_lang-C65sqlOx.mjs} +4 -4
  86. package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-C65sqlOx.mjs.gz +0 -0
  87. package/dist/{hsAttrForm.vue_vue_type_script_setup_true_lang-DCkWA6P1.js → hsAttrForm.vue_vue_type_script_setup_true_lang-ukD-MlPN.js} +1 -1
  88. package/dist/{hsBtnConfigList-C4Wyc_HR.js → hsBtnConfigList-DCPFD8ZT.js} +1 -1
  89. package/dist/{hsBtnConfigList-DvUq75eH.mjs → hsBtnConfigList-DC_sCmaE.mjs} +1 -1
  90. package/dist/{hsBtnItemConfig-BeCeBQ8x.js → hsBtnItemConfig-BtMa2Ina.js} +1 -1
  91. package/dist/{hsBtnItemConfig-C_Jva_WY.mjs → hsBtnItemConfig-Bxug-FrG.mjs} +1 -1
  92. package/dist/{hsBtnItemConfig.vue_vue_type_script_setup_true_lang-FRRL7t88.mjs → hsBtnItemConfig.vue_vue_type_script_setup_true_lang-C0M7TGgv.mjs} +3 -3
  93. package/dist/{hsBtnItemConfig.vue_vue_type_script_setup_true_lang-C4quDCnp.js → hsBtnItemConfig.vue_vue_type_script_setup_true_lang-Cw0rxwMI.js} +1 -1
  94. package/dist/{hsBtnPanel-Cc_3cru_.js → hsBtnPanel-BnNSUHA6.js} +1 -1
  95. package/dist/{hsBtnPanel-Cc955slp.mjs → hsBtnPanel-CnXG4dEJ.mjs} +1 -1
  96. package/dist/{hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-fvs9Yw5l.js → hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-Dn6hZmDT.js} +1 -1
  97. package/dist/{hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-6fl4zOAI.mjs → hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-ElRDIZgU.mjs} +4 -4
  98. package/dist/{hsExpand-ChHHHkdb.js → hsExpand-Br2EEZAa.js} +1 -1
  99. package/dist/{hsExpand-BEHKJ4Km.mjs → hsExpand-DMZk1PUJ.mjs} +1 -1
  100. package/dist/{hsExpand.vue_vue_type_script_setup_true_lang-CmVh8_re.js → hsExpand.vue_vue_type_script_setup_true_lang-ABoC0aAj.js} +1 -1
  101. package/dist/{hsExpand.vue_vue_type_script_setup_true_lang-Dlm7eBGh.mjs → hsExpand.vue_vue_type_script_setup_true_lang-C02npH0A.mjs} +1 -1
  102. package/dist/{hsFormConfig-B55l2t_N.mjs → hsFormConfig-CU4MNHrM.mjs} +1 -1
  103. package/dist/{hsFormConfig-C0z4EzyX.js → hsFormConfig-DnoasOLj.js} +1 -1
  104. package/dist/{hsFormConfigList-CQprYtB6.js → hsFormConfigList-Bwdo4XHA.js} +1 -1
  105. package/dist/{hsFormConfigList-B7bSZdNf.mjs → hsFormConfigList-DHPwB4ns.mjs} +2 -2
  106. package/dist/hsFormConfigList-DHPwB4ns.mjs.gz +0 -0
  107. package/dist/{hsFormPanel-lzJC1V5V.js → hsFormPanel-BB9i9aQI.js} +1 -1
  108. package/dist/{hsFormPanel-DcraLPIE.mjs → hsFormPanel-CUYHfyqu.mjs} +6 -6
  109. package/dist/hsFormPanel-CUYHfyqu.mjs.gz +0 -0
  110. package/dist/{hsFormParse-Cnc2s4XK.js → hsFormParse-CpQaKfhE.js} +1 -1
  111. package/dist/{hsFormParse-CCWHos7o.mjs → hsFormParse-pLxlPDwZ.mjs} +1 -1
  112. package/dist/{hsFormParse.vue_vue_type_script_setup_true_lang-5sHeujut.mjs → hsFormParse.vue_vue_type_script_setup_true_lang-D_0R8jHT.mjs} +3 -3
  113. package/dist/{hsFormParse.vue_vue_type_script_setup_true_lang-CSul2GG-.js → hsFormParse.vue_vue_type_script_setup_true_lang-Du74zG_N.js} +1 -1
  114. package/dist/{hsPanelItem-DJUkKEBn.mjs → hsPanelItem-BIztLa3E.mjs} +1 -1
  115. package/dist/{hsPanelItem-4Ggmz57w.js → hsPanelItem-daLT4J7A.js} +1 -1
  116. package/dist/{hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-87_cs_2M.mjs → hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-DgCXhteR.mjs} +1 -1
  117. package/dist/{hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-BJoLpF2R.js → hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-I5163oi9.js} +1 -1
  118. package/dist/{index copy-8T9U4Im_.js → index copy-C6POS4OA.js } +1 -1
  119. package/dist/{index copy-BCgZ9Mdh.mjs → index copy-qasLxhKk.mjs } +1 -1
  120. package/dist/{index-XHxNnlrW.js → index--MNBzAGU.js} +1 -1
  121. package/dist/{index-BDVKiiOO.mjs → index-B0ughRDh.mjs} +1 -1
  122. package/dist/{index-CzGkRysY.js → index-B1P29z2e.js} +1 -1
  123. package/dist/{index-CHJcFZrA.js → index-B1VuJKrL.js} +1 -1
  124. package/dist/{index-mgDzNKaK.mjs → index-B82FetWv.mjs} +3 -3
  125. package/dist/{index-Bc2QvL_Y.mjs → index-BAAwqbCq.mjs} +1 -1
  126. package/dist/{index-Ctac9DhP.js → index-BAIh0p78.js} +5 -5
  127. package/dist/{index-Ctac9DhP.js.gz → index-BAIh0p78.js.gz} +0 -0
  128. package/dist/{index-nVLLgI1e.js → index-BGby3_sQ.js} +1 -1
  129. package/dist/index-BIgnSPCb.js +1 -0
  130. package/dist/{index-CE9XOWRX.js → index-BJzPreHV.js} +1 -1
  131. package/dist/{index-DO12AioS.mjs → index-BNdJ5VFB.mjs} +1 -1
  132. package/dist/{index-aEvd0TJc.mjs → index-BcvaTRHp.mjs} +1 -1
  133. package/dist/{index-DlBlFm7T.js → index-BdG6bwHK.js} +1 -1
  134. package/dist/index-Bhw9gFnd.mjs +4 -0
  135. package/dist/{index-DIUjnKjo.mjs → index-BiodTxgQ.mjs} +3 -3
  136. package/dist/{index-CPh_-7A3.mjs → index-BkigQxm_.mjs} +1 -1
  137. package/dist/{index-0c_tadpy.mjs → index-Bkuic_9y.mjs} +5 -5
  138. package/dist/{index-B-wVKPeJ.mjs → index-Bnw9T5kP.mjs} +4 -4
  139. package/dist/index-Bnw9T5kP.mjs.gz +0 -0
  140. package/dist/{index-BgRFWHYU.js → index-BoxdrTtD.js} +1 -1
  141. package/dist/{index-Cd1tv4HM.js → index-Bwd6XI7H.js} +1 -1
  142. package/dist/{index-BiRqhtSh.mjs → index-ByGIKRJM.mjs} +1 -1
  143. package/dist/{index-D3cubeKb.js → index-C3pC0PO7.js} +1 -1
  144. package/dist/{index-BOW5o3Ef.mjs → index-C4oymfM4.mjs} +1 -1
  145. package/dist/{index-DDUigNqa.js → index-C8v6a3yk.js} +1 -1
  146. package/dist/{index-B2zgU4Ae.js → index-CC8DbdMF.js} +1 -1
  147. package/dist/{index-BO7jnm66.mjs → index-CD9QgZ-c.mjs} +3 -3
  148. package/dist/{index-vamGQgS9.js → index-CDla234b.js} +1 -1
  149. package/dist/{index-Cx876U60.js → index-CLUGYawi.js} +1 -1
  150. package/dist/{index-B9LqepHg.js → index-CMCZLfEr.js} +1 -1
  151. package/dist/{index-Z5QzxHHA.js → index-CP6QMwam.js} +1 -1
  152. package/dist/index-CP6QMwam.js.gz +0 -0
  153. package/dist/{index-zS5jAh8_.js → index-CPtLpV1w.js} +1 -1
  154. package/dist/{index-Bfe1hd9c.mjs → index-CRoqeJW3.mjs} +1 -1
  155. package/dist/{index-D_Xeavyp.js → index-CT4AQenc.js} +1 -1
  156. package/dist/{index-BGxwzlbg.js → index-CYTeBRkh.js} +1 -1
  157. package/dist/index-CYTeBRkh.js.gz +0 -0
  158. package/dist/{index-D1z0u72B.js → index-C_QnnEew.js} +1 -1
  159. package/dist/{index-jR4pG9Df.js → index-CaGd5M17.js} +1 -1
  160. package/dist/{index-CdJW1Ww4.mjs → index-CcKKTFG0.mjs} +1 -1
  161. package/dist/{index-BgD7QZe5.mjs → index-CcvY5Lh3.mjs} +6 -3
  162. package/dist/{index-B0FOtifx.js → index-CeP3lbjg.js} +1 -1
  163. package/dist/{index-Ctir2xWm.mjs → index-CfCqrmCW.mjs} +2 -2
  164. package/dist/{index-DEcSzeDw.mjs → index-Ch1i8kE1.mjs} +2 -2
  165. package/dist/index-Ch1i8kE1.mjs.gz +0 -0
  166. package/dist/index-CmBsu76F.js +1 -0
  167. package/dist/{index-CcUOQOje.mjs → index-CoRPHWa3.mjs} +1 -1
  168. package/dist/{index-ChHHMO2V.mjs → index-Cr2ajvle.mjs} +1 -1
  169. package/dist/{index-BdTZB86n.mjs → index-CweEBRMk.mjs} +1 -1
  170. package/dist/{index-D1ghGH5p.mjs → index-CxTmvQtI.mjs} +1 -1
  171. package/dist/{index-BdzTJY0s.mjs → index-CyVgqpQW.mjs} +10 -10
  172. package/dist/index-CyVgqpQW.mjs.gz +0 -0
  173. package/dist/{index-BZ12NUxP.js → index-D0s2BCdv.js} +1 -1
  174. package/dist/{index-CS0DR8mY.js → index-D400uexF.js} +1 -1
  175. package/dist/{index-Ct4DW5V2.mjs → index-D5QO6ZOg.mjs} +3 -3
  176. package/dist/{index-DGS__xFt.js → index-D6MLKG7d.js} +1 -1
  177. package/dist/index-DHHcO6BG.js +1 -0
  178. package/dist/{index-B3ImmDjX.mjs → index-DONIb4St.mjs} +4 -4
  179. package/dist/{index-fBIOCP-i.js → index-DQevSKPr.js} +1 -1
  180. package/dist/index-DRPU_MKa.js +1 -0
  181. package/dist/index-DRPU_MKa.js.gz +0 -0
  182. package/dist/{index-DyovEDls.mjs → index-DT03xtZy.mjs} +1 -1
  183. package/dist/{index-BEkzC2lS.mjs → index-Ddf7PDQu.mjs} +4 -4
  184. package/dist/{uploadAvatar-BUP65NVq.mjs → index-Dle5t9nr.mjs} +157 -8
  185. package/dist/index-Dle5t9nr.mjs.gz +0 -0
  186. package/dist/index-DrsCPbc2.js +1 -0
  187. package/dist/{index-BhHYt6OG.mjs → index-Du13z9uB.mjs} +4 -4
  188. package/dist/index-Du13z9uB.mjs.gz +0 -0
  189. package/dist/{index-DT9_0Q9S.js → index-Dxdi7MJz.js} +1 -1
  190. package/dist/{index-sAET3LO7.js → index-Dy3RzFY-.js} +1 -1
  191. package/dist/{index-Cr0YHey-.js → index-DznIu8I-.js} +1 -1
  192. package/dist/{index-Cg5pv7bM.js → index-GA-bNrwy.js} +1 -1
  193. package/dist/{index-Cp3jFtWK.js → index-LtS282W-.js} +1 -1
  194. package/dist/index-M7laIL8M.mjs +14 -0
  195. package/dist/{index-B3oDUazc.mjs → index-N0NTkzpi.mjs} +4 -4
  196. package/dist/index-PCI3lWru.mjs +38 -0
  197. package/dist/{index-DapESYAl.js → index-QfSubczm.js} +1 -1
  198. package/dist/{index-COThYuBw.mjs → index-Vq6FDIty.mjs} +5 -5
  199. package/dist/{index-CwGX1hh8.js → index-WXShGbQ2.js} +1 -1
  200. package/dist/{index-VXD4wF1s.js → index-Y8vo48Zm.js} +1 -1
  201. package/dist/{index-CUs07Pvy.js → index-axEORR9X.js} +1 -1
  202. package/dist/{index-Ca4tpl36.mjs → index-beUYJL8H.mjs} +1 -1
  203. package/dist/{index-H3LemiMl.mjs → index-feq0FF6W.mjs} +1 -1
  204. package/dist/{index-BS5epFvv.mjs → index-fz3_33YG.mjs} +1 -1
  205. package/dist/{index-CSS-8EuA.mjs → index-lF4bHilZ.mjs} +132 -112
  206. package/dist/index-lF4bHilZ.mjs.gz +0 -0
  207. package/dist/{index-D88FMk9a.mjs → index-qZ1HIhlv.mjs} +4 -4
  208. package/dist/{index-DmycxewC.mjs → index-tNxjIReb.mjs} +1 -1
  209. package/dist/{index-DAhIZCNt.mjs → index-yFO2vqjB.mjs} +1 -1
  210. package/dist/index.js +1 -1
  211. package/dist/index.mjs +1 -1
  212. package/dist/{index.vue_vue_type_script_setup_true_lang-BEj8ALus.mjs → index.vue_vue_type_script_setup_true_lang-1fpvFvAe.mjs} +3 -3
  213. package/dist/{index.vue_vue_type_script_setup_true_lang-vVPLjGUP.js → index.vue_vue_type_script_setup_true_lang-Berhqgio.js} +1 -1
  214. package/dist/{index.vue_vue_type_script_setup_true_lang-BWNbE7J6.mjs → index.vue_vue_type_script_setup_true_lang-C8JpeLDs.mjs} +4 -4
  215. package/dist/index.vue_vue_type_script_setup_true_lang-C8JpeLDs.mjs.gz +0 -0
  216. package/dist/{index.vue_vue_type_script_setup_true_lang-Dp17_51Z.mjs → index.vue_vue_type_script_setup_true_lang-CIHaOL2A.mjs} +6 -6
  217. package/dist/{index.vue_vue_type_script_setup_true_lang-oKop8oht.js → index.vue_vue_type_script_setup_true_lang-CS-xBXYj.js} +1 -1
  218. package/dist/{index.vue_vue_type_script_setup_true_lang-ByrxeKFF.js → index.vue_vue_type_script_setup_true_lang-DK5RFYYl.js} +1 -1
  219. package/dist/{index.vue_vue_type_script_setup_true_lang-BVRAt1_8.js → index.vue_vue_type_script_setup_true_lang-DqgKj0xy.js} +1 -1
  220. package/dist/{index.vue_vue_type_script_setup_true_lang-BvHEQ2cA.mjs → index.vue_vue_type_script_setup_true_lang-bfg0A7aJ.mjs} +1 -1
  221. package/dist/{index.vue_vue_type_script_setup_true_name_iconSelector_lang-DBheRBIs.mjs → index.vue_vue_type_script_setup_true_name_iconSelector_lang-BM_a1FDB.mjs} +2 -2
  222. package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-BM_a1FDB.mjs.gz +0 -0
  223. package/dist/{index.vue_vue_type_script_setup_true_name_iconSelector_lang-BLCyf-fN.js → index.vue_vue_type_script_setup_true_name_iconSelector_lang-BqQCrztm.js} +1 -1
  224. package/dist/{link-BvEESi2y.js → link-BB6c_SON.js} +1 -1
  225. package/dist/{link-Dh0PVQrG.mjs → link-DmGSPAHs.mjs} +1 -1
  226. package/dist/{list-D2gMd9va.js → list-BZ4q_t8g.js} +1 -1
  227. package/dist/{list-B7bwQIAf.mjs → list-BcAm4A26.mjs} +1 -1
  228. package/dist/{main-DnxtofrY.js → main-B_dtgINv.js} +1 -1
  229. package/dist/{main-CspIbXNH.mjs → main-C_czno4v.mjs} +3 -3
  230. package/dist/{mobile-c5duAZav.mjs → mobile-Cnw7f9_7.mjs} +1 -1
  231. package/dist/{mobile-CfVOtzpZ.js → mobile-DXHBWTyQ.js} +1 -1
  232. package/dist/{parent-LFJvwwZw.js → parent-DGMLY2-D.js} +1 -1
  233. package/dist/{parent-8xiv6jr_.mjs → parent-to5Q6Mbl.mjs} +1 -1
  234. package/dist/{popup-5uo64U3S.js → popup-Ch1qFD0l.js} +1 -1
  235. package/dist/{popup-DcphaT_U.mjs → popup-K8HKQzI_.mjs} +1 -1
  236. package/dist/{popup.vue_vue_type_script_setup_true_name_replaceRules_lang-tcuXJaxX.js → popup.vue_vue_type_script_setup_true_name_replaceRules_lang-D5UAPjA4.js} +1 -1
  237. package/dist/{popup.vue_vue_type_script_setup_true_name_replaceRules_lang-Bc8DtEDP.mjs → popup.vue_vue_type_script_setup_true_name_replaceRules_lang-vY2kC-d_.mjs} +1 -1
  238. package/dist/{roleItem-CDLXDTeH.mjs → roleItem-BFVUZ8Wu.mjs} +1 -1
  239. package/dist/{roleItem-2yeXVr5v.js → roleItem-uLkUpYBF.js} +1 -1
  240. package/dist/{saveForm-CVcp_L9K.mjs → saveForm-Bk-zTgql.mjs} +3 -3
  241. package/dist/{saveForm-CKLrIO4h.js → saveForm-D-X-b0IO.js} +1 -1
  242. package/dist/{scan-CA-c5aJi.mjs → scan-Cigvaeeh.mjs} +1 -1
  243. package/dist/scan-Cigvaeeh.mjs.gz +0 -0
  244. package/dist/{scan-pS5APpHP.js → scan-DKcMpEjL.js} +1 -1
  245. package/dist/scan-DKcMpEjL.js.gz +0 -0
  246. package/dist/{search-C1d5aW0-.mjs → search-BdCqUJYq.mjs} +1 -1
  247. package/dist/{search-DuLTuqoI.js → search-zbczAJwb.js} +1 -1
  248. package/dist/{selectConfig-CbUE_WFM.js → selectConfig-DiiKlmLE.js} +1 -1
  249. package/dist/{selectConfig-8KbKARGn.mjs → selectConfig-WfUJiZ6M.mjs} +1 -1
  250. package/dist/selectConfig-WfUJiZ6M.mjs.gz +0 -0
  251. package/dist/style.css +1 -1
  252. package/dist/style.css.gz +0 -0
  253. package/dist/{subItem-CaklDqm2.mjs → subItem-CyNqi4sn.mjs} +1 -1
  254. package/dist/{subItem-jhzCZK9g.js → subItem-_d8vjQ_H.js} +1 -1
  255. package/dist/{tagsView-CM1yraW5.js → tagsView-BLYoOlKU.js} +2 -2
  256. package/dist/tagsView-BLYoOlKU.js.gz +0 -0
  257. package/dist/{tagsView-CraYDEiG.mjs → tagsView-Cz90C6Yd.mjs} +2 -2
  258. package/dist/{tagsView-CraYDEiG.mjs.gz → tagsView-Cz90C6Yd.mjs.gz} +0 -0
  259. package/dist/{transverse-CkgRBKPA.mjs → transverse-C-12bh1z.mjs} +3 -3
  260. package/dist/{transverse-NxI4FPgq.js → transverse-DmG7i1Lo.js} +1 -1
  261. package/dist/{user-iLplwO6H.js → user-31MAQMD4.js} +1 -1
  262. package/dist/{user-DiV8MfOQ.mjs → user-Drg6_Bee.mjs} +3 -3
  263. package/dist/{userNews-Bd87Spta.mjs → userNews-CqUZHJKQ.mjs} +1 -1
  264. package/dist/{userNews-CVhJCGVx.js → userNews-Dh6_n4HO.js} +1 -1
  265. package/dist/{userSelect-DIktRT06.mjs → userSelect-C90tn6Rq.mjs} +1 -1
  266. package/dist/{userSelect-BdpIz2vF.js → userSelect-DBTw4fhp.js} +1 -1
  267. package/dist/{userSelect.vue_vue_type_script_setup_true_lang-BgNboBgV.mjs → userSelect.vue_vue_type_script_setup_true_lang-CJRBjJMl.mjs} +1 -1
  268. package/dist/{userSelect.vue_vue_type_script_setup_true_lang-CvHpOkNN.js → userSelect.vue_vue_type_script_setup_true_lang-Cwq7J0vm.js} +1 -1
  269. package/dist/{vertical-S1VQPVpO.js → vertical-BjE2s-F4.js} +1 -1
  270. package/dist/{vertical-CsCnQXAb.mjs → vertical-CSKP1joS.mjs} +2 -2
  271. package/package.json +1 -1
  272. package/dist/404-Bn3CBvnV.mjs.gz +0 -0
  273. package/dist/auth_test-DE3g3zb7.js +0 -1
  274. package/dist/auth_test-DinGxEsf.mjs +0 -24
  275. package/dist/baseFormConfig-BCgmwrGD.mjs.gz +0 -0
  276. package/dist/baseTableConfig-7Hpf03RS.mjs.gz +0 -0
  277. package/dist/baseTableConfig-CMOwP1p2.js.gz +0 -0
  278. package/dist/btnIndex-D95XPM4B.mjs.gz +0 -0
  279. package/dist/cloneConfigDialog-Bx7CUmX-.mjs.gz +0 -0
  280. package/dist/cloneConfigDialog-CwLeyVd3.js.gz +0 -0
  281. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-CbREaEMN.js.gz +0 -0
  282. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-YvhECgcy.mjs.gz +0 -0
  283. package/dist/formConfig-C74ZfKZc.js.gz +0 -0
  284. package/dist/formConfig-DpYVxOyk.mjs.gz +0 -0
  285. package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-DVWF0m7c.mjs.gz +0 -0
  286. package/dist/hsFormConfigList-B7bSZdNf.mjs.gz +0 -0
  287. package/dist/hsFormPanel-DcraLPIE.mjs.gz +0 -0
  288. package/dist/index copy-DGNpsaor.mjs +0 -10585
  289. package/dist/index copy-DGNpsaor.mjs.gz +0 -0
  290. package/dist/index copy-DvBlwQ4H.js +0 -6
  291. package/dist/index copy-DvBlwQ4H.js.gz +0 -0
  292. package/dist/index-2zEvP2NX.js +0 -1
  293. package/dist/index-B-wVKPeJ.mjs.gz +0 -0
  294. package/dist/index-BGxwzlbg.js.gz +0 -0
  295. package/dist/index-BdzTJY0s.mjs.gz +0 -0
  296. package/dist/index-BgP_1Y7h.mjs +0 -130
  297. package/dist/index-BhHYt6OG.mjs.gz +0 -0
  298. package/dist/index-CSS-8EuA.mjs.gz +0 -0
  299. package/dist/index-DEcSzeDw.mjs.gz +0 -0
  300. package/dist/index-Dsgu_XO6.js +0 -1
  301. package/dist/index-Dv7fAEaK.mjs +0 -4
  302. package/dist/index-DvItclFd.js +0 -1
  303. package/dist/index-Z5QzxHHA.js.gz +0 -0
  304. package/dist/index.vue_vue_type_script_setup_true_lang-BWNbE7J6.mjs.gz +0 -0
  305. package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-DBheRBIs.mjs.gz +0 -0
  306. package/dist/scan-CA-c5aJi.mjs.gz +0 -0
  307. package/dist/scan-pS5APpHP.js.gz +0 -0
  308. package/dist/selectConfig-8KbKARGn.mjs.gz +0 -0
  309. package/dist/tagsView-CM1yraW5.js.gz +0 -0
  310. package/dist/uploadAvatar-BUP65NVq.mjs.gz +0 -0
  311. package/dist/uploadAvatar-Cdzbmt8E.js +0 -1
  312. package/dist/uploadAvatar-Cdzbmt8E.js.gz +0 -0
  313. package/dist/uploadAvatar.vue_vue_type_style_index_0_scoped_8e10f7e4_lang-B-YXXUWn.js +0 -1
  314. package/dist/uploadAvatar.vue_vue_type_style_index_0_scoped_8e10f7e4_lang-DOiOwYLl.mjs +0 -137
Binary file
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("./index-Ctac9DhP.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
@@ -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-CSS-8EuA.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
Binary file
@@ -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;
@@ -1,4 +0,0 @@
1
- import { _ as _sfc_main } from "./index.vue_vue_type_script_setup_true_name_iconSelector_lang-DBheRBIs.mjs";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("./index-Ctac9DhP.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;
Binary file
Binary file
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-Ctac9DhP.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
@@ -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
- };