hs-admin-ui 15.5.1 → 15.5.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.
Files changed (713) hide show
  1. package/LICENSE +21 -0
  2. package/dist/401-CaFGhD56.js +1 -0
  3. package/dist/401-dNBqBBQB.mjs +56 -0
  4. package/dist/404-BBjjPQnq.js +1 -0
  5. package/dist/404-BBjjPQnq.js.gz +0 -0
  6. package/dist/404-CXaFz1H_.mjs +61 -0
  7. package/dist/404-CXaFz1H_.mjs.gz +0 -0
  8. package/dist/account-Dl2F8kzB.mjs +215 -0
  9. package/dist/account-j6DmqhU5.js +1 -0
  10. package/dist/aside-DYuDthGf.js +1 -0
  11. package/dist/aside-U9WBrI1F.mjs +164 -0
  12. package/dist/baseBtnConfig-C6KLedE5.mjs +273 -0
  13. package/dist/baseBtnConfig-DRxjBT8Z.js +1 -0
  14. package/dist/baseFormConfig-BaFbaMWd.mjs +722 -0
  15. package/dist/baseFormConfig-BaFbaMWd.mjs.gz +0 -0
  16. package/dist/baseFormConfig-BfwuF6e2.mjs +504 -0
  17. package/dist/baseFormConfig-BfwuF6e2.mjs.gz +0 -0
  18. package/dist/baseFormConfig-D0n1_pUw.js +1 -0
  19. package/dist/baseFormConfig-D5Q35Bo3.js +1 -0
  20. package/dist/baseTableConfig-Cqz33Bik.mjs +2624 -0
  21. package/dist/baseTableConfig-Cqz33Bik.mjs.gz +0 -0
  22. package/dist/baseTableConfig-Tc9NkB4Z.js +1 -0
  23. package/dist/baseTableConfig-Tc9NkB4Z.js.gz +0 -0
  24. package/dist/bcFormConfig-De_NDIJX.js +1 -0
  25. package/dist/bcFormConfig-k01YVL7i.mjs +234 -0
  26. package/dist/bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-Cinv4rqH.mjs +131 -0
  27. package/dist/bcPageTreeBySystem.vue_vue_type_script_setup_true_lang-DYPKK-F9.js +1 -0
  28. package/dist/bcSwitchSystems.vue_vue_type_script_setup_true_lang-CBnZ0Gtd.js +1 -0
  29. package/dist/bcSwitchSystems.vue_vue_type_script_setup_true_lang-ap2SoWQx.mjs +101 -0
  30. package/dist/btnIndex-BWYqart_.js +1 -0
  31. package/dist/btnIndex-CIxuTGaV.mjs +287 -0
  32. package/dist/btnIndex-CIxuTGaV.mjs.gz +0 -0
  33. package/dist/classic-BHDWrphH.mjs +81 -0
  34. package/dist/classic-Cggtuvww.js +1 -0
  35. package/dist/cloneConfigDialog-C-Wgt6lp.mjs +817 -0
  36. package/dist/cloneConfigDialog-C-Wgt6lp.mjs.gz +0 -0
  37. package/dist/cloneConfigDialog-DStfblnx.js +1 -0
  38. package/dist/cloneConfigDialog-DStfblnx.js.gz +0 -0
  39. package/dist/columns-Co0sc2Vp.mjs +87 -0
  40. package/dist/columns-KUgBQ-bi.js +1 -0
  41. package/dist/columnsAside-6e_Rdbm2.js +1 -0
  42. package/dist/columnsAside-BqApWcwH.mjs +220 -0
  43. package/dist/contextmenu-0Efiyp1u.mjs +125 -0
  44. package/dist/contextmenu-BBMMi-TN.mjs +125 -0
  45. package/dist/contextmenu-CCDgfmrK.js +1 -0
  46. package/dist/contextmenu-D5Ssw8tr.js +1 -0
  47. package/dist/copyMenuConfig-M_voURcU.mjs +4 -0
  48. package/dist/copyMenuConfig-reOnQJ5_.js +1 -0
  49. package/dist/copyMenuConfig.vue_vue_type_script_setup_true_lang-1WltOLrD.mjs +85 -0
  50. package/dist/copyMenuConfig.vue_vue_type_script_setup_true_lang-Bn7uwbn6.js +1 -0
  51. package/dist/copySystem-BYNmlnJJ.js +1 -0
  52. package/dist/copySystem-CU-ec_wc.mjs +4 -0
  53. package/dist/copySystem.vue_vue_type_script_setup_true_lang-BQdZABZN.mjs +78 -0
  54. package/dist/copySystem.vue_vue_type_script_setup_true_lang-DVIPeHaZ.js +1 -0
  55. package/dist/defaults-C8u0Ixi6.js +1 -0
  56. package/dist/defaults-DbE_9uBD.mjs +86 -0
  57. package/dist/dialog-BpY5TPcI.mjs +365 -0
  58. package/dist/dialog-BpY5TPcI.mjs.gz +0 -0
  59. package/dist/dialog-C3qdP9_7.mjs +4 -0
  60. package/dist/dialog-CbtiX4bf.js +1 -0
  61. package/dist/dialog-Crw1svNb.mjs +4 -0
  62. package/dist/dialog-D2oaUQ1K.js +1 -0
  63. package/dist/dialog-DQP53khI.mjs +359 -0
  64. package/dist/dialog-DQP53khI.mjs.gz +0 -0
  65. package/dist/dialog-DpdeHbfb.js +1 -0
  66. package/dist/dialog-DxBOYlwo.js +1 -0
  67. package/dist/dialog-TFJ52Qpk.js +1 -0
  68. package/dist/dialog-yPzNGOhd.mjs +10 -0
  69. package/dist/dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-BXa1w9sl.js +1 -0
  70. package/dist/dialog.vue_vue_type_script_setup_true_name_dataAuthDialog_lang-Cj6QZ_1n.mjs +220 -0
  71. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-C-2ohzef.mjs +694 -0
  72. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-C-2ohzef.mjs.gz +0 -0
  73. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-DDxJaope.js +1 -0
  74. package/dist/dialog.vue_vue_type_script_setup_true_name_systemMenuDialog_lang-DDxJaope.js.gz +0 -0
  75. package/dist/dictDialog-2-XNTIeA.js +1 -0
  76. package/dist/dictDialog-Xiry_5wf.mjs +4 -0
  77. package/dist/dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-CYIV2qih.js +1 -0
  78. package/dist/dictDialog.vue_vue_type_script_setup_true_name_dictDialog_lang-nAtI0_qU.mjs +154 -0
  79. package/dist/dictItemDialog-Clje_DKj.mjs +4 -0
  80. package/dist/dictItemDialog-z9uIEmqs.js +1 -0
  81. package/dist/dictItemDialog.vue_vue_type_script_setup_true_lang-BYoT3YIw.mjs +231 -0
  82. package/dist/dictItemDialog.vue_vue_type_script_setup_true_lang-C7wUo8tZ.js +1 -0
  83. package/dist/favicon.ico +0 -0
  84. package/dist/formConfig-Ci7tuaaU.js +1 -0
  85. package/dist/formConfig-Ci7tuaaU.js.gz +0 -0
  86. package/dist/formConfig-DwB-R3is.mjs +592 -0
  87. package/dist/formConfig-DwB-R3is.mjs.gz +0 -0
  88. package/dist/header-BIFSpl3F.mjs +28 -0
  89. package/dist/header-SxlPkWE1.js +1 -0
  90. package/dist/horizontal-BMBXN_h_.js +1 -0
  91. package/dist/horizontal-DEV7AR_G.mjs +151 -0
  92. package/dist/hsAttrBtn-CFzqiBsx.mjs +4 -0
  93. package/dist/hsAttrBtn-R49LSu_d.js +1 -0
  94. package/dist/hsAttrBtn.vue_vue_type_script_setup_true_lang-BA5qD9D_.mjs +128 -0
  95. package/dist/hsAttrBtn.vue_vue_type_script_setup_true_lang-l3_0rFKn.js +1 -0
  96. package/dist/hsAttrForm-B2BhYTdK.mjs +4 -0
  97. package/dist/hsAttrForm-Dax6V0Jm.js +1 -0
  98. package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-CKrb7xs8.js +1 -0
  99. package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-CT1OxoWO.mjs +439 -0
  100. package/dist/hsAttrForm.vue_vue_type_script_setup_true_lang-CT1OxoWO.mjs.gz +0 -0
  101. package/dist/hsBtnConfigList-BOlR66mr.js +1 -0
  102. package/dist/hsBtnConfigList-CL1Pbm8t.mjs +117 -0
  103. package/dist/hsBtnItemConfig-ChdcqgZp.mjs +4 -0
  104. package/dist/hsBtnItemConfig-pecTB5lk.js +1 -0
  105. package/dist/hsBtnItemConfig.vue_vue_type_script_setup_true_lang-2guM43p0.js +1 -0
  106. package/dist/hsBtnItemConfig.vue_vue_type_script_setup_true_lang-lsmFzJFI.mjs +147 -0
  107. package/dist/hsBtnPanel-83nht1UQ.js +1 -0
  108. package/dist/hsBtnPanel-CDXIlZ_p.mjs +4 -0
  109. package/dist/hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-DA7FmG0n.mjs +67 -0
  110. package/dist/hsBtnPanel.vue_vue_type_script_setup_true_name_formPanel_lang-u2pZC_gR.js +1 -0
  111. package/dist/hsCheckbox-BKa_El3s.js +1 -0
  112. package/dist/hsCheckbox-CalDndlZ.mjs +4 -0
  113. package/dist/hsCheckbox.vue_vue_type_script_setup_true_lang-Dh-lqGjq.js +1 -0
  114. package/dist/hsCheckbox.vue_vue_type_script_setup_true_lang-XCUyHi8X.mjs +28 -0
  115. package/dist/hsExpand-B1cUAaAw.mjs +4 -0
  116. package/dist/hsExpand-Bwd73fvo.js +1 -0
  117. package/dist/hsExpand.vue_vue_type_script_setup_true_lang-BNyT0h7t.js +1 -0
  118. package/dist/hsExpand.vue_vue_type_script_setup_true_lang-ezt_aGUO.mjs +285 -0
  119. package/dist/hsFormConfig-B6c-_yYP.js +1 -0
  120. package/dist/hsFormConfig-XU9bJ3kx.mjs +207 -0
  121. package/dist/hsFormConfigList-TKRLW26e.mjs +414 -0
  122. package/dist/hsFormConfigList-TKRLW26e.mjs.gz +0 -0
  123. package/dist/hsFormConfigList-dZqSrJSK.js +1 -0
  124. package/dist/hsFormPanel-CGFysBUk.mjs +238 -0
  125. package/dist/hsFormPanel-CGFysBUk.mjs.gz +0 -0
  126. package/dist/hsFormPanel-kYjgElFR.js +1 -0
  127. package/dist/hsFormParse-BNbnHW6i.mjs +4 -0
  128. package/dist/hsFormParse-CORdqc6m.js +1 -0
  129. package/dist/hsFormParse.vue_vue_type_script_setup_true_lang-Ch8RhdXV.mjs +242 -0
  130. package/dist/hsFormParse.vue_vue_type_script_setup_true_lang-Dhlc8D2i.js +1 -0
  131. package/dist/hsPanelItem-BOZ1av6y.js +1 -0
  132. package/dist/hsPanelItem-tPpJnnJd.mjs +4 -0
  133. package/dist/hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-Dao7NDhZ.mjs +86 -0
  134. package/dist/hsPanelItem.vue_vue_type_script_setup_true_name_panelItem_lang-KozoMnkD.js +1 -0
  135. package/dist/iframes-CWdXFiYU.mjs +122 -0
  136. package/dist/iframes-DnAW1ZV2.js +1 -0
  137. package/dist/index copy-DFE_yWCx.mjs +69 -0
  138. package/dist/index copy-DkSt5nzl.js +1 -0
  139. package/dist/index copy-DtsDgBF8.mjs +134 -0
  140. package/dist/index copy-tJ9FVsS0.js +1 -0
  141. package/dist/index-0EMZK_Ri.mjs +10 -0
  142. package/dist/index-24BJiQB9.js +1 -0
  143. package/dist/index-3R5jyrHz.mjs +4 -0
  144. package/dist/index-4ncpQ4eO.js +1 -0
  145. package/dist/index-7sWorN-E.mjs +10 -0
  146. package/dist/index-B1OFpRFB.js +1 -0
  147. package/dist/index-B3waQo6j.mjs +331 -0
  148. package/dist/index-B3waQo6j.mjs.gz +0 -0
  149. package/dist/index-B9WSj98p.mjs +173 -0
  150. package/dist/index-BENZ2WH6.mjs +1009 -0
  151. package/dist/index-BENZ2WH6.mjs.gz +0 -0
  152. package/dist/index-BIgnSPCb.js +1 -0
  153. package/dist/index-BLGhN7h0.js +1 -0
  154. package/dist/index-BM5nAlyo.js +1 -0
  155. package/dist/index-BO1FveAU.js +1 -0
  156. package/dist/index-BPcf0Qgl.js +1 -0
  157. package/dist/index-BRmPrBX8.js +1 -0
  158. package/dist/index-BTs82niR.js +1 -0
  159. package/dist/index-BU8dO1hT.js +1 -0
  160. package/dist/index-BUojF4y6.mjs +4 -0
  161. package/dist/index-BXJWAHGd.mjs +254 -0
  162. package/dist/index-BfOP9sXo.js +1 -0
  163. package/dist/index-Bg2dWQkx.mjs +152 -0
  164. package/dist/index-BhMp70XH.mjs +94 -0
  165. package/dist/index-Bhj2Qelk.js +1 -0
  166. package/dist/index-BiE_2Gfj.js +1 -0
  167. package/dist/index-BmHxBvI1.js +1 -0
  168. package/dist/index-BoPRlzO3.mjs +4 -0
  169. package/dist/index-BpCPATgk.js +1 -0
  170. package/dist/index-BrlBUe6h.mjs +133 -0
  171. package/dist/index-Bvr5XYtq.mjs +73 -0
  172. package/dist/index-CF51_jlI.js +1 -0
  173. package/dist/index-CH_1fUdz.mjs +30 -0
  174. package/dist/index-CJNK6Cjy.js +1 -0
  175. package/dist/index-CLq_LQxX.js +1 -0
  176. package/dist/index-CLq_LQxX.js.gz +0 -0
  177. package/dist/index-CPj-Yh8g.js +1 -0
  178. package/dist/index-CPz6ggKd.mjs +4 -0
  179. package/dist/index-CUE6cOFE.mjs +76 -0
  180. package/dist/index-CVRPmktf.js +1 -0
  181. package/dist/index-CXgFr4Ld.mjs +65 -0
  182. package/dist/index-CYGyHWBv.mjs +258264 -0
  183. package/dist/index-CYGyHWBv.mjs.gz +0 -0
  184. package/dist/index-C_ugVEaP.mjs +119 -0
  185. package/dist/index-CbCppT2z.js +1 -0
  186. package/dist/index-CbgKih92.js +1 -0
  187. package/dist/index-Ci6RD5--.js +1 -0
  188. package/dist/index-Ci6RD5--.js.gz +0 -0
  189. package/dist/index-CjgoMe9f.mjs +5403 -0
  190. package/dist/index-CjgoMe9f.mjs.gz +0 -0
  191. package/dist/index-CnF3_P-G.js +1 -0
  192. package/dist/index-Cqp3Jnya.mjs +95 -0
  193. package/dist/index-CyV3ZVir.js +1 -0
  194. package/dist/index-D-2xfhbK.js +1 -0
  195. package/dist/index-D2GFhA-V.mjs +47 -0
  196. package/dist/index-D2Jd-mM6.mjs +4 -0
  197. package/dist/index-D6ZLwYDH.mjs +89 -0
  198. package/dist/index-DC-Js6Hi.js +1 -0
  199. package/dist/index-DCbmeDfO.js +1 -0
  200. package/dist/index-DCqtHRF9.mjs +23 -0
  201. package/dist/index-DDqY4_A5.mjs +14 -0
  202. package/dist/index-DEykAVeO.js +1 -0
  203. package/dist/index-DFIV43KD.js +1 -0
  204. package/dist/index-DHHcO6BG.js +1 -0
  205. package/dist/index-DJA7OrZO.js +1 -0
  206. package/dist/index-DKCFYKAH.js +1 -0
  207. package/dist/index-DNDaCoMF.js +1 -0
  208. package/dist/index-DRBjUBTG.mjs +65 -0
  209. package/dist/index-DT3c6iM1.mjs +49 -0
  210. package/dist/index-DTZW2hE_.js +1 -0
  211. package/dist/index-DWkT7_xS.mjs +200 -0
  212. package/dist/index-DXXKvOqN.mjs +67 -0
  213. package/dist/index-DZ_UFJE2.mjs +43 -0
  214. package/dist/index-Db25V09U.mjs +73 -0
  215. package/dist/index-DdVbsoiV.js +1 -0
  216. package/dist/index-Dgj5D7n5.mjs +262 -0
  217. package/dist/index-Dlp-NK3p.mjs +172 -0
  218. package/dist/index-DnFBRN9K.js +110 -0
  219. package/dist/index-DnFBRN9K.js.gz +0 -0
  220. package/dist/index-DvbPzC-6.js +1 -0
  221. package/dist/index-Dz9KzQ5V.mjs +50 -0
  222. package/dist/index-DzuU21Ls.js +1 -0
  223. package/dist/index-GKB-XroO.mjs +22 -0
  224. package/dist/index-J73yPVKq.mjs +285 -0
  225. package/dist/index-OdAUnbSV.mjs +131 -0
  226. package/dist/index-PCI3lWru.mjs +38 -0
  227. package/dist/index-PFUkwGmD.js +1 -0
  228. package/dist/index-PFUkwGmD.js.gz +0 -0
  229. package/dist/index-TmdsXxg4.mjs +403 -0
  230. package/dist/index-TmdsXxg4.mjs.gz +0 -0
  231. package/dist/index-URGFFXl5.js +1 -0
  232. package/dist/index-W8MzP83s.mjs +213 -0
  233. package/dist/index-YTNJNmBt.js +1 -0
  234. package/dist/index-Z83-84L3.js +1 -0
  235. package/dist/index-ZKhBU3tw.js +1 -0
  236. package/dist/index-aOzMz2B9.mjs +51 -0
  237. package/dist/index-bZH91HoC.mjs +2208 -0
  238. package/dist/index-bZH91HoC.mjs.gz +0 -0
  239. package/dist/index-feq0FF6W.mjs +23 -0
  240. package/dist/index-g_BDa62N.mjs +19 -0
  241. package/dist/index.js +1 -1
  242. package/dist/index.mjs +169 -171
  243. package/dist/index.vue_vue_type_script_setup_true_lang-B1f-mj3k.mjs +103 -0
  244. package/dist/index.vue_vue_type_script_setup_true_lang-BtDusFoW.js +1 -0
  245. package/dist/index.vue_vue_type_script_setup_true_lang-BxsT79jf.js +1 -0
  246. package/dist/index.vue_vue_type_script_setup_true_lang-C0UurXCc.js +1 -0
  247. package/dist/index.vue_vue_type_script_setup_true_lang-CFxpNArv.mjs +97 -0
  248. package/dist/index.vue_vue_type_script_setup_true_lang-Ch2lZaTn.mjs +194 -0
  249. package/dist/index.vue_vue_type_script_setup_true_lang-Dv-kZosQ.mjs +267 -0
  250. package/dist/index.vue_vue_type_script_setup_true_lang-Dv-kZosQ.mjs.gz +0 -0
  251. package/dist/index.vue_vue_type_script_setup_true_lang-IJKBTB3Y.js +1 -0
  252. package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-CZUzRg_n.js +1 -0
  253. package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-NkgQCBte.mjs +288 -0
  254. package/dist/index.vue_vue_type_script_setup_true_name_iconSelector_lang-NkgQCBte.mjs.gz +0 -0
  255. package/dist/lib-generate-test-usersig.min.js +2 -0
  256. package/dist/lib-generate-test-usersig.min.js.gz +0 -0
  257. package/dist/link-B9jZK3Co.js +1 -0
  258. package/dist/link-x-yMf2aU.mjs +63 -0
  259. package/dist/list-CGMCMNPw.js +1 -0
  260. package/dist/list-CpLsLqR3.mjs +85 -0
  261. package/dist/logo-mini-BQ9BrQ1U.mjs +4 -0
  262. package/dist/logo-mini-DwRdfcE7.js +1 -0
  263. package/dist/main-CeHb7mmf.mjs +72 -0
  264. package/dist/main-VC_qocWi.js +1 -0
  265. package/dist/mobile-BYhQ989p.mjs +115 -0
  266. package/dist/mobile-DKd-GevH.js +1 -0
  267. package/dist/parent-BrZUDcxI.mjs +131 -0
  268. package/dist/parent-Cqft6ke8.js +1 -0
  269. package/dist/popup-B8dQsRMA.mjs +4 -0
  270. package/dist/popup-BhaF4a5x.js +1 -0
  271. package/dist/popup.vue_vue_type_script_setup_true_name_replaceRules_lang-6oT8xreJ.mjs +89 -0
  272. package/dist/popup.vue_vue_type_script_setup_true_name_replaceRules_lang-UweFIPnt.js +1 -0
  273. package/dist/roleItem-sC4o_Aj4.mjs +103 -0
  274. package/dist/roleItem-yqdApgll.js +1 -0
  275. package/dist/saveForm-C2E9Y6ON.mjs +160 -0
  276. package/dist/saveForm-TjA9LESw.js +1 -0
  277. package/dist/scan-BnUS-AoC.js +1 -0
  278. package/dist/scan-BnUS-AoC.js.gz +0 -0
  279. package/dist/scan-DoY8mPqe.mjs +945 -0
  280. package/dist/scan-DoY8mPqe.mjs.gz +0 -0
  281. package/dist/search-BS0R6DrM.js +1 -0
  282. package/dist/search-DI-pcuZu.mjs +114 -0
  283. package/dist/selectConfig-CnxTVchz.mjs +546 -0
  284. package/dist/selectConfig-CnxTVchz.mjs.gz +0 -0
  285. package/dist/selectConfig-D2HVovD8.js +1 -0
  286. package/dist/shortcutList-BXBGQdNn.mjs +76 -0
  287. package/dist/shortcutList-WSi4lUlm.js +1 -0
  288. package/dist/style.css +1 -0
  289. package/dist/style.css.gz +0 -0
  290. package/dist/subItem-BfyxcMb4.js +1 -0
  291. package/dist/subItem-DUZskY5M.mjs +77 -0
  292. package/dist/tagsView-Dft974Qb.mjs +2695 -0
  293. package/dist/tagsView-Dft974Qb.mjs.gz +0 -0
  294. package/dist/tagsView-PBsI_cCp.js +8 -0
  295. package/dist/tagsView-PBsI_cCp.js.gz +0 -0
  296. package/dist/transverse-CjKbGMR0.js +1 -0
  297. package/dist/transverse-cTm57se-.mjs +65 -0
  298. package/dist/types/components/business/bcBox/bcBox.vue.d.ts +66 -0
  299. package/dist/types/{src/components → components}/business/bcBox/utils.d.ts +11 -10
  300. package/dist/types/components/business/bcBreadcrumb/bcBreadcrumb.vue.d.ts +23 -0
  301. package/dist/types/{src/components → components}/business/bcBreadcrumb/index.d.ts +2 -1
  302. package/dist/types/components/business/bcForm/baseForm.vue.d.ts +273 -0
  303. package/dist/types/components/business/bcForm/bcForm.vue.d.ts +42 -0
  304. package/dist/types/{src/components → components}/business/bcForm/type.d.ts +7 -6
  305. package/dist/types/components/business/bcForm/useGuide.d.ts +564 -0
  306. package/dist/types/components/business/bcSystemAuth/components/data.vue.d.ts +3 -0
  307. package/dist/types/components/business/bcSystemAuth/components/dict.vue.d.ts +3 -0
  308. package/dist/types/components/business/bcSystemAuth/components/fastSet/popup.vue.d.ts +17 -0
  309. package/dist/types/components/business/bcSystemAuth/components/field.vue.d.ts +3 -0
  310. package/dist/types/components/business/bcSystemAuth/components/form.vue.d.ts +13 -0
  311. package/dist/types/{src/components → components}/business/bcSystemAuth/components/selectAll/index.d.ts +3 -2
  312. package/dist/types/components/business/bcSystemAuth/components/selectAll/index.vue.d.ts +5 -0
  313. package/dist/types/components/business/bcSystemAuth/components/table.vue.d.ts +13 -0
  314. package/dist/types/components/business/bcSystemAuth/components/widget/btns.vue.d.ts +15 -0
  315. package/dist/types/components/business/bcSystemAuth/components/widget/form.vue.d.ts +15 -0
  316. package/dist/types/components/business/bcSystemAuth/components/widget/tab.vue.d.ts +45 -0
  317. package/dist/types/components/business/bcSystemAuth/components/widget/tables.vue.d.ts +15 -0
  318. package/dist/types/components/business/bcSystemAuth/components/widget/tablesWraper.vue.d.ts +15 -0
  319. package/dist/types/{src/components → components}/business/bcSystemAuth/fastStore.d.ts +49 -48
  320. package/dist/types/{src/components → components}/business/bcSystemAuth/fastUtils.d.ts +30 -28
  321. package/dist/types/components/business/bcSystemAuth/index.d.ts +3 -0
  322. package/dist/types/components/business/bcSystemAuth/index.vue.d.ts +26 -0
  323. package/dist/types/{src/components → components}/business/bcSystemAuth/store.d.ts +49 -48
  324. package/dist/types/components/business/bcSystemAuth/type.d.ts +42 -0
  325. package/dist/types/components/business/bcSystemAuth/useAuth.d.ts +28 -0
  326. package/dist/types/{src/components → components}/business/bcSystemAuth/utils.d.ts +30 -28
  327. package/dist/types/components/business/bcSystemField/components/field.vue.d.ts +3 -0
  328. package/dist/types/components/business/bcSystemField/components/form.vue.d.ts +13 -0
  329. package/dist/types/{src/components → components}/business/bcSystemField/components/selectAll/index.d.ts +5 -4
  330. package/dist/types/components/business/bcSystemField/components/selectAll/index.vue.d.ts +5 -0
  331. package/dist/types/components/business/bcSystemField/components/table.vue.d.ts +13 -0
  332. package/dist/types/components/business/bcSystemField/components/widget/form.vue.d.ts +15 -0
  333. package/dist/types/components/business/bcSystemField/components/widget/tab.vue.d.ts +45 -0
  334. package/dist/types/components/business/bcSystemField/components/widget/tables.vue.d.ts +15 -0
  335. package/dist/types/components/business/bcSystemField/components/widget/tablesWraper.vue.d.ts +15 -0
  336. package/dist/types/components/business/bcSystemField/index.d.ts +3 -0
  337. package/dist/types/components/business/bcSystemField/index.vue.d.ts +16 -0
  338. package/dist/types/{src/components → components}/business/bcSystemField/store.d.ts +40 -39
  339. package/dist/types/components/business/bcSystemField/useAuth.d.ts +16 -0
  340. package/dist/types/{src/components → components}/business/bcSystemField/utils.d.ts +21 -20
  341. package/dist/types/components/business/bcTable/bcFormTable.vue.d.ts +142 -0
  342. package/dist/types/components/business/bcTable/bcTable.vue.d.ts +51 -0
  343. package/dist/types/components/business/bcTable/components/btn/btn.vue.d.ts +77 -0
  344. package/dist/types/components/business/bcTable/components/popup/index.d.ts +3 -0
  345. package/dist/types/components/business/bcTable/components/query/components/sortForm/sortForm.vue.d.ts +23 -0
  346. package/dist/types/components/business/bcTable/components/query/drag.vue.d.ts +244 -0
  347. package/dist/types/components/business/bcTable/components/query/query.vue.d.ts +249 -0
  348. package/dist/types/{src/components → components}/business/bcTable/components/query/useQuickSearch.d.ts +3 -2
  349. package/dist/types/components/business/bcTable/components/table/colgroup.vue.d.ts +28 -0
  350. package/dist/types/components/business/bcTable/components/table/column.vue.d.ts +35 -0
  351. package/dist/types/components/business/bcTable/components/table/components/sortColumn/sortColumn.vue.d.ts +25 -0
  352. package/dist/types/{src/components → components}/business/bcTable/components/table/components/sortColumn/types.d.ts +2 -1
  353. package/dist/types/components/business/bcTable/components/table/table.vue.d.ts +67 -0
  354. package/dist/types/{src/components → components}/business/bcTable/components/table/useTable.d.ts +5 -5
  355. package/dist/types/components/business/bcTable/components/table/useTableHeight.d.ts +25 -0
  356. package/dist/types/{src/components → components}/business/bcTable/methods/cellDetailMethod.d.ts +1 -0
  357. package/dist/types/{src/components → components}/business/bcTable/methods/filterAgeMethod.d.ts +1 -0
  358. package/dist/types/{src/components → components}/business/bcTable/methods/footerMethod.d.ts +2 -1
  359. package/dist/types/{src/components → components}/business/bcTable/methods/formBtnMethod.d.ts +2 -1
  360. package/dist/types/{src/components → components}/business/bcTable/methods/index.d.ts +2 -1
  361. package/dist/types/{src/components → components}/business/bcTable/utils/authField.d.ts +2 -1
  362. package/dist/types/{src/components → components}/business/bcTable/utils/onFormKey.d.ts +5 -4
  363. package/dist/types/{src/components → components}/business/bcTable/utils/onTableKey.d.ts +6 -5
  364. package/dist/types/{src/components → components}/business/bcTable/utils/parseTable.d.ts +21 -20
  365. package/dist/types/{src/components → components}/business/bcTable/utils/type.d.ts +12 -11
  366. package/dist/types/{src/components → components}/business/bcTable/utils/useBcTable.d.ts +7080 -7070
  367. package/dist/types/{src/components → components}/business/bcTable/utils/useButon.d.ts +6 -5
  368. package/dist/types/components/business/bcTable/utils/useFormTableHeight.d.ts +20 -0
  369. package/dist/types/{src/components → components}/business/bcTable/utils/useKeydownEvent.d.ts +18 -17
  370. package/dist/types/{src/components → components}/business/bcVisual/bcVisual.vue.d.ts +8 -9
  371. package/dist/types/{src/components → components}/business/bcVisual/components/setting/dragItem.vue.d.ts +9 -16
  372. package/dist/types/components/business/bcVisual/components/setting/extendItem.vue.d.ts +13 -0
  373. package/dist/types/components/business/bcVisual/components/setting/setting.vue.d.ts +3 -0
  374. package/dist/types/{src/components → components}/business/bcVisual/components/setting/useDrag.d.ts +4 -2
  375. package/dist/types/components/business/bcVisual/components/table/table.vue.d.ts +6 -0
  376. package/dist/types/components/business/bcVisual/components/updateName/popup.vue.d.ts +17 -0
  377. package/dist/types/components/business/bcVisual/components/updateSql/addCondition.vue.d.ts +23 -0
  378. package/dist/types/{src/components → components}/business/bcVisual/components/updateSql/index.d.ts +2 -1
  379. package/dist/types/{src/components → components}/business/bcVisual/components/updateSql/nodeTree/index.d.ts +2 -1
  380. package/dist/types/components/business/bcVisual/components/updateSql/nodeTree/index.vue.d.ts +21 -0
  381. package/dist/types/components/business/bcVisual/components/updateSql/nodeTree/nodeTree.vue.d.ts +19 -0
  382. package/dist/types/components/business/bcVisual/components/updateSql/popup.vue.d.ts +17 -0
  383. package/dist/types/{src/components → components}/business/bcVisual/useTableFormat.d.ts +29 -28
  384. package/dist/types/{src/components → components}/business/bcVisual/utils.d.ts +3 -1
  385. package/dist/types/index.d.ts +1 -35
  386. package/dist/types/plugins/index.d.ts +33 -0
  387. package/dist/types/{src/types → types}/auth.d.ts +2 -1
  388. package/dist/types/{src/types → types}/components.d.ts +2 -1
  389. package/dist/types/{src/types → types}/customData.d.ts +18 -16
  390. package/dist/types/{src/types → types}/form.d.ts +2 -1
  391. package/dist/types/{src/types → types}/formItem/autocomplete.d.ts +2 -1
  392. package/dist/types/{src/types → types}/formItem/checkbox.d.ts +2 -1
  393. package/dist/types/{src/types → types}/formItem/input.d.ts +2 -1
  394. package/dist/types/{src/types → types}/formItem/inputGroup.d.ts +2 -1
  395. package/dist/types/{src/types → types}/formItem/inputNumber.d.ts +2 -1
  396. package/dist/types/{src/types → types}/formItem/radio.d.ts +2 -1
  397. package/dist/types/{src/types → types}/formItem/selelct.d.ts +2 -1
  398. package/dist/types/{src/types → types}/formItem/treeSelect.d.ts +2 -1
  399. package/dist/types/types/system.d.ts +14 -0
  400. package/dist/types/{src/utils → utils}/arrayOperation.d.ts +1 -1
  401. package/dist/types/utils/authFunction.d.ts +18 -0
  402. package/dist/types/utils/build.d.ts +11 -0
  403. package/dist/types/{src/utils → utils}/common.d.ts +4 -3
  404. package/dist/types/utils/commonFunction.d.ts +29 -0
  405. package/dist/types/{src/utils → utils}/download.d.ts +4 -4
  406. package/dist/types/utils/file.d.ts +6 -0
  407. package/dist/types/{src/utils → utils}/getDataType.d.ts +3 -2
  408. package/dist/types/utils/getStyleSheets.d.ts +11 -0
  409. package/dist/types/utils/index.d.ts +29 -0
  410. package/dist/types/{src/utils/loading/index.d.ts → utils/loading.d.ts} +1 -1
  411. package/dist/types/utils/lodash.d.ts +3 -0
  412. package/dist/types/{src/utils → utils}/mitt.d.ts +3 -2
  413. package/dist/types/{src/utils → utils}/number.d.ts +14 -2
  414. package/dist/types/{src/utils → utils}/other.d.ts +12 -11
  415. package/dist/types/utils/request/index.d.ts +6 -0
  416. package/dist/types/{src/utils → utils}/request/interceptors/request/authorization.interceptor.d.ts +2 -1
  417. package/dist/types/{src/utils → utils}/request/interceptors/request/result.type.interceptor.d.ts +2 -6
  418. package/dist/types/{src/utils → utils}/request/interceptors/request/undefined-params-handler.interceptor.d.ts +2 -13
  419. package/dist/types/{src/utils → utils}/request/interceptors/response/error-handler.interceptor.d.ts +2 -1
  420. package/dist/types/{src/utils → utils}/request/repeatRequest.d.ts +2 -1
  421. package/dist/types/utils/request/request.d.ts +7 -0
  422. package/dist/types/utils/setIconfont.d.ts +11 -0
  423. package/dist/types/utils/showMessage.d.ts +6 -0
  424. package/dist/types/utils/showMessageBox.d.ts +6 -0
  425. package/dist/types/utils/showNotification.d.ts +6 -0
  426. package/dist/types/{src/utils → utils}/showPopup/index.d.ts +6 -5
  427. package/dist/types/{src/utils → utils}/storage.d.ts +14 -12
  428. package/dist/types/{src/utils → utils}/tree.d.ts +4 -3
  429. package/dist/types/{src/utils → utils}/url.d.ts +3 -2
  430. package/dist/useConfigInfo-2zEYLSSs.js +1 -0
  431. package/dist/useConfigInfo-PTkkdx-l.mjs +19 -0
  432. package/dist/user-BVfFipEN.js +1 -0
  433. package/dist/user-BwTaSlHV.mjs +246 -0
  434. package/dist/userNews-Bu82hvh-.mjs +72 -0
  435. package/dist/userNews-CqtqTrvp.js +1 -0
  436. package/dist/userSelect-CTM8Fa6N.mjs +4 -0
  437. package/dist/userSelect-CpdC2OeS.js +1 -0
  438. package/dist/userSelect.vue_vue_type_script_setup_true_lang-BAeRpB4d.js +1 -0
  439. package/dist/userSelect.vue_vue_type_script_setup_true_lang-bmpwfuqr.mjs +100 -0
  440. package/dist/vertical-CQrO0kp6.js +1 -0
  441. package/dist/vertical-vdV35A3P.mjs +133 -0
  442. package/package.json +41 -16
  443. package/dist/bcIcon-Bn7YpkQ0.js +0 -1
  444. package/dist/bcIcon-DqkzkIx5.mjs +0 -4
  445. package/dist/index-BN12NNPY.js +0 -349
  446. package/dist/index-CB7zMO7C.mjs +0 -144143
  447. package/dist/index.css +0 -1
  448. package/dist/types/element-plus.d.ts +0 -2
  449. package/dist/types/src/components/base/Affix/index.d.ts +0 -1
  450. package/dist/types/src/components/base/Affix/src/Affix.vue.d.ts +0 -3
  451. package/dist/types/src/components/base/Alert/index.d.ts +0 -1
  452. package/dist/types/src/components/base/Alert/src/Alert.vue.d.ts +0 -3
  453. package/dist/types/src/components/base/Aside/index.d.ts +0 -1
  454. package/dist/types/src/components/base/Aside/src/Aside.vue.d.ts +0 -3
  455. package/dist/types/src/components/base/Autocomplete/index.d.ts +0 -1
  456. package/dist/types/src/components/base/Autocomplete/src/Autocomplete.vue.d.ts +0 -3
  457. package/dist/types/src/components/base/Badge/index.d.ts +0 -1
  458. package/dist/types/src/components/base/Badge/src/Badge.vue.d.ts +0 -3
  459. package/dist/types/src/components/base/Button/index.d.ts +0 -2
  460. package/dist/types/src/components/base/Button/src/Button.vue.d.ts +0 -3
  461. package/dist/types/src/components/base/Button/src/ButtonGroup.vue.d.ts +0 -3
  462. package/dist/types/src/components/base/Calendar/index.d.ts +0 -1
  463. package/dist/types/src/components/base/Calendar/src/Calendar.vue.d.ts +0 -3
  464. package/dist/types/src/components/base/Card/index.d.ts +0 -1
  465. package/dist/types/src/components/base/Card/src/Card.vue.d.ts +0 -3
  466. package/dist/types/src/components/base/Carousel/index.d.ts +0 -2
  467. package/dist/types/src/components/base/Carousel/src/Carousel.vue.d.ts +0 -3
  468. package/dist/types/src/components/base/Carousel/src/CarouselItem.vue.d.ts +0 -3
  469. package/dist/types/src/components/base/Cascader/index.d.ts +0 -2
  470. package/dist/types/src/components/base/Cascader/src/Cascader.vue.d.ts +0 -3
  471. package/dist/types/src/components/base/Cascader/src/CascaderPanel.vue.d.ts +0 -3
  472. package/dist/types/src/components/base/Checkbox/index.d.ts +0 -3
  473. package/dist/types/src/components/base/Checkbox/src/Checkbox.vue.d.ts +0 -3
  474. package/dist/types/src/components/base/Checkbox/src/CheckboxButton.vue.d.ts +0 -3
  475. package/dist/types/src/components/base/Checkbox/src/CheckboxGroup.vue.d.ts +0 -3
  476. package/dist/types/src/components/base/Col/index.d.ts +0 -1
  477. package/dist/types/src/components/base/Col/src/Col.vue.d.ts +0 -3
  478. package/dist/types/src/components/base/Collapse/index.d.ts +0 -2
  479. package/dist/types/src/components/base/Collapse/src/Collapse.vue.d.ts +0 -3
  480. package/dist/types/src/components/base/Collapse/src/CollapseItem.vue.d.ts +0 -3
  481. package/dist/types/src/components/base/ColorPicker/index.d.ts +0 -1
  482. package/dist/types/src/components/base/ColorPicker/src/ColorPicker.vue.d.ts +0 -3
  483. package/dist/types/src/components/base/Container/index.d.ts +0 -1
  484. package/dist/types/src/components/base/Container/src/Container.vue.d.ts +0 -3
  485. package/dist/types/src/components/base/DatePicker/index.d.ts +0 -1
  486. package/dist/types/src/components/base/DatePicker/src/DatePicker.vue.d.ts +0 -3
  487. package/dist/types/src/components/base/Descriptions/index.d.ts +0 -2
  488. package/dist/types/src/components/base/Descriptions/src/Descriptions.vue.d.ts +0 -3
  489. package/dist/types/src/components/base/Descriptions/src/DescriptionsItem.vue.d.ts +0 -3
  490. package/dist/types/src/components/base/Dialog/index.d.ts +0 -1
  491. package/dist/types/src/components/base/Dialog/src/Dialog.vue.d.ts +0 -3
  492. package/dist/types/src/components/base/Divider/index.d.ts +0 -1
  493. package/dist/types/src/components/base/Divider/src/Divider.vue.d.ts +0 -3
  494. package/dist/types/src/components/base/Drawer/index.d.ts +0 -1
  495. package/dist/types/src/components/base/Drawer/src/Drawer.vue.d.ts +0 -3
  496. package/dist/types/src/components/base/Dropdown/index.d.ts +0 -3
  497. package/dist/types/src/components/base/Dropdown/src/Dropdown.vue.d.ts +0 -3
  498. package/dist/types/src/components/base/Dropdown/src/DropdownItem.vue.d.ts +0 -3
  499. package/dist/types/src/components/base/Dropdown/src/DropdownMenu.vue.d.ts +0 -3
  500. package/dist/types/src/components/base/Empty/index.d.ts +0 -1
  501. package/dist/types/src/components/base/Empty/src/Empty.vue.d.ts +0 -3
  502. package/dist/types/src/components/base/Footer/index.d.ts +0 -1
  503. package/dist/types/src/components/base/Footer/src/Footer.vue.d.ts +0 -3
  504. package/dist/types/src/components/base/Form/index.d.ts +0 -2
  505. package/dist/types/src/components/base/Form/src/Form.vue.d.ts +0 -3
  506. package/dist/types/src/components/base/Form/src/FormItem.vue.d.ts +0 -3
  507. package/dist/types/src/components/base/Header/index.d.ts +0 -1
  508. package/dist/types/src/components/base/Header/src/Header.vue.d.ts +0 -3
  509. package/dist/types/src/components/base/Icon/index.d.ts +0 -1
  510. package/dist/types/src/components/base/Icon/src/Icon.vue.d.ts +0 -3
  511. package/dist/types/src/components/base/Image/index.d.ts +0 -1
  512. package/dist/types/src/components/base/Image/src/Image.vue.d.ts +0 -3
  513. package/dist/types/src/components/base/ImageViewer/index.d.ts +0 -1
  514. package/dist/types/src/components/base/ImageViewer/src/ImageViewer.vue.d.ts +0 -3
  515. package/dist/types/src/components/base/Input/index.d.ts +0 -1
  516. package/dist/types/src/components/base/Input/src/Input.vue.d.ts +0 -30
  517. package/dist/types/src/components/base/InputNumber/index.d.ts +0 -1
  518. package/dist/types/src/components/base/InputNumber/src/InputNumber.vue.d.ts +0 -3
  519. package/dist/types/src/components/base/Main/index.d.ts +0 -1
  520. package/dist/types/src/components/base/Main/src/Main.vue.d.ts +0 -3
  521. package/dist/types/src/components/base/Menu/index.d.ts +0 -3
  522. package/dist/types/src/components/base/Menu/src/Menu.vue.d.ts +0 -3
  523. package/dist/types/src/components/base/Menu/src/MenuItem.vue.d.ts +0 -3
  524. package/dist/types/src/components/base/Menu/src/SubMenu.vue.d.ts +0 -3
  525. package/dist/types/src/components/base/Pagination/index.d.ts +0 -1
  526. package/dist/types/src/components/base/Pagination/src/Pagination.vue.d.ts +0 -3
  527. package/dist/types/src/components/base/Popconfirm/index.d.ts +0 -1
  528. package/dist/types/src/components/base/Popconfirm/src/Popconfirm.vue.d.ts +0 -3
  529. package/dist/types/src/components/base/Popover/index.d.ts +0 -1
  530. package/dist/types/src/components/base/Popover/src/Popover.vue.d.ts +0 -3
  531. package/dist/types/src/components/base/Progress/index.d.ts +0 -1
  532. package/dist/types/src/components/base/Progress/src/Progress.vue.d.ts +0 -3
  533. package/dist/types/src/components/base/Qr/index.d.ts +0 -1
  534. package/dist/types/src/components/base/Qr/src/Qr.vue.d.ts +0 -3
  535. package/dist/types/src/components/base/Radio/index.d.ts +0 -3
  536. package/dist/types/src/components/base/Radio/src/Radio.vue.d.ts +0 -17
  537. package/dist/types/src/components/base/Radio/src/RadioButton.vue.d.ts +0 -3
  538. package/dist/types/src/components/base/Radio/src/RadioGroup.vue.d.ts +0 -3
  539. package/dist/types/src/components/base/Rate/index.d.ts +0 -1
  540. package/dist/types/src/components/base/Rate/src/Rate.vue.d.ts +0 -3
  541. package/dist/types/src/components/base/Result/index.d.ts +0 -1
  542. package/dist/types/src/components/base/Result/src/Result.vue.d.ts +0 -3
  543. package/dist/types/src/components/base/Row/index.d.ts +0 -1
  544. package/dist/types/src/components/base/Row/src/Row.vue.d.ts +0 -3
  545. package/dist/types/src/components/base/Scrollbar/index.d.ts +0 -1
  546. package/dist/types/src/components/base/Scrollbar/src/Scrollbar.vue.d.ts +0 -3
  547. package/dist/types/src/components/base/Select/index.d.ts +0 -3
  548. package/dist/types/src/components/base/Select/src/Option.vue.d.ts +0 -3
  549. package/dist/types/src/components/base/Select/src/OptionGroup.vue.d.ts +0 -3
  550. package/dist/types/src/components/base/Select/src/Select.vue.d.ts +0 -37
  551. package/dist/types/src/components/base/SelectV2/index.d.ts +0 -1
  552. package/dist/types/src/components/base/SelectV2/src/SelectV2.vue.d.ts +0 -3
  553. package/dist/types/src/components/base/Slider/index.d.ts +0 -1
  554. package/dist/types/src/components/base/Slider/src/Slider.vue.d.ts +0 -3
  555. package/dist/types/src/components/base/Steps/index.d.ts +0 -1
  556. package/dist/types/src/components/base/Steps/src/Step.vue.d.ts +0 -3
  557. package/dist/types/src/components/base/Steps/src/Steps.vue.d.ts +0 -3
  558. package/dist/types/src/components/base/Switch/index.d.ts +0 -1
  559. package/dist/types/src/components/base/Switch/src/Switch.vue.d.ts +0 -3
  560. package/dist/types/src/components/base/Table/index.d.ts +0 -2
  561. package/dist/types/src/components/base/Table/src/Table.vue.d.ts +0 -3
  562. package/dist/types/src/components/base/Table/src/TableColumn.vue.d.ts +0 -3
  563. package/dist/types/src/components/base/Tabs/index.d.ts +0 -2
  564. package/dist/types/src/components/base/Tabs/src/TabPane.vue.d.ts +0 -3
  565. package/dist/types/src/components/base/Tabs/src/Tabs.vue.d.ts +0 -3
  566. package/dist/types/src/components/base/Tag/index.d.ts +0 -2
  567. package/dist/types/src/components/base/Tag/src/CheckTag.vue.d.ts +0 -3
  568. package/dist/types/src/components/base/Tag/src/Tag.vue.d.ts +0 -3
  569. package/dist/types/src/components/base/Text/index.d.ts +0 -1
  570. package/dist/types/src/components/base/Text/src/Text.vue.d.ts +0 -3
  571. package/dist/types/src/components/base/Tooltip/index.d.ts +0 -1
  572. package/dist/types/src/components/base/Tooltip/src/Tooltip.vue.d.ts +0 -3
  573. package/dist/types/src/components/base/Tour/index.d.ts +0 -2
  574. package/dist/types/src/components/base/Tour/src/Tour.vue.d.ts +0 -3
  575. package/dist/types/src/components/base/Tour/src/TourStep.vue.d.ts +0 -3
  576. package/dist/types/src/components/base/Transfer/index.d.ts +0 -1
  577. package/dist/types/src/components/base/Transfer/src/Transfer.vue.d.ts +0 -3
  578. package/dist/types/src/components/base/Tree/index.d.ts +0 -1
  579. package/dist/types/src/components/base/Tree/src/Tree.vue.d.ts +0 -3
  580. package/dist/types/src/components/base/TreeSelect/index.d.ts +0 -1
  581. package/dist/types/src/components/base/TreeSelect/src/TreeSelect.vue.d.ts +0 -3
  582. package/dist/types/src/components/base/TreeV2/index.d.ts +0 -1
  583. package/dist/types/src/components/base/TreeV2/src/TreeV2.vue.d.ts +0 -3
  584. package/dist/types/src/components/base/Upload/index.d.ts +0 -1
  585. package/dist/types/src/components/base/Upload/src/Upload.vue.d.ts +0 -3
  586. package/dist/types/src/components/base/Watermark/index.d.ts +0 -1
  587. package/dist/types/src/components/base/Watermark/src/Watermark.vue.d.ts +0 -3
  588. package/dist/types/src/components/base/components.d.ts +0 -57
  589. package/dist/types/src/components/base/index.d.ts +0 -185
  590. package/dist/types/src/components/business/bcBox/bcBox.vue.d.ts +0 -48
  591. package/dist/types/src/components/business/bcBreadcrumb/bcBreadcrumb.vue.d.ts +0 -14
  592. package/dist/types/src/components/business/bcButton/bcButton.vue.d.ts +0 -13
  593. package/dist/types/src/components/business/bcCheckbox/bcCheckbox.vue.d.ts +0 -23
  594. package/dist/types/src/components/business/bcContextBox/bcContextBox.vue.d.ts +0 -40
  595. package/dist/types/src/components/business/bcContextBox/useContextMenu.d.ts +0 -34
  596. package/dist/types/src/components/business/bcDivider/bcDivider.vue.d.ts +0 -38
  597. package/dist/types/src/components/business/bcFace/bcFace.vue.d.ts +0 -24
  598. package/dist/types/src/components/business/bcForm/baseForm.vue.d.ts +0 -275
  599. package/dist/types/src/components/business/bcForm/bcForm.vue.d.ts +0 -33
  600. package/dist/types/src/components/business/bcForm/useGuide.d.ts +0 -559
  601. package/dist/types/src/components/business/bcGroup/bcGroup.vue.d.ts +0 -36
  602. package/dist/types/src/components/business/bcIcon/bcIcon.vue.d.ts +0 -27
  603. package/dist/types/src/components/business/bcInputGroup/bcInputGroup.vue.d.ts +0 -20
  604. package/dist/types/src/components/business/bcRadio/bcRadio.vue.d.ts +0 -18
  605. package/dist/types/src/components/business/bcSelect/bcSelect.vue.d.ts +0 -33
  606. package/dist/types/src/components/business/bcSignature/index.vue.d.ts +0 -19
  607. package/dist/types/src/components/business/bcSystemAuth/components/data.vue.d.ts +0 -3
  608. package/dist/types/src/components/business/bcSystemAuth/components/dict.vue.d.ts +0 -3
  609. package/dist/types/src/components/business/bcSystemAuth/components/fastSet/popup.vue.d.ts +0 -17
  610. package/dist/types/src/components/business/bcSystemAuth/components/field.vue.d.ts +0 -3
  611. package/dist/types/src/components/business/bcSystemAuth/components/form.vue.d.ts +0 -11
  612. package/dist/types/src/components/business/bcSystemAuth/components/selectAll/index.vue.d.ts +0 -5
  613. package/dist/types/src/components/business/bcSystemAuth/components/table.vue.d.ts +0 -11
  614. package/dist/types/src/components/business/bcSystemAuth/components/widget/btns.vue.d.ts +0 -11
  615. package/dist/types/src/components/business/bcSystemAuth/components/widget/form.vue.d.ts +0 -11
  616. package/dist/types/src/components/business/bcSystemAuth/components/widget/tab.vue.d.ts +0 -17
  617. package/dist/types/src/components/business/bcSystemAuth/components/widget/tables.vue.d.ts +0 -11
  618. package/dist/types/src/components/business/bcSystemAuth/components/widget/tablesWraper.vue.d.ts +0 -11
  619. package/dist/types/src/components/business/bcSystemAuth/index.d.ts +0 -2
  620. package/dist/types/src/components/business/bcSystemAuth/index.vue.d.ts +0 -17
  621. package/dist/types/src/components/business/bcSystemAuth/type.d.ts +0 -342
  622. package/dist/types/src/components/business/bcSystemAuth/useAuth.d.ts +0 -26
  623. package/dist/types/src/components/business/bcSystemField/components/field.vue.d.ts +0 -3
  624. package/dist/types/src/components/business/bcSystemField/components/form.vue.d.ts +0 -11
  625. package/dist/types/src/components/business/bcSystemField/components/selectAll/index.vue.d.ts +0 -5
  626. package/dist/types/src/components/business/bcSystemField/components/table.vue.d.ts +0 -11
  627. package/dist/types/src/components/business/bcSystemField/components/widget/form.vue.d.ts +0 -11
  628. package/dist/types/src/components/business/bcSystemField/components/widget/tab.vue.d.ts +0 -17
  629. package/dist/types/src/components/business/bcSystemField/components/widget/tables.vue.d.ts +0 -11
  630. package/dist/types/src/components/business/bcSystemField/components/widget/tablesWraper.vue.d.ts +0 -11
  631. package/dist/types/src/components/business/bcSystemField/index.d.ts +0 -2
  632. package/dist/types/src/components/business/bcSystemField/index.vue.d.ts +0 -7
  633. package/dist/types/src/components/business/bcSystemField/useAuth.d.ts +0 -14
  634. package/dist/types/src/components/business/bcTable/bcFormTable.vue.d.ts +0 -143
  635. package/dist/types/src/components/business/bcTable/bcTable.vue.d.ts +0 -32
  636. package/dist/types/src/components/business/bcTable/components/btn/btn.vue.d.ts +0 -58
  637. package/dist/types/src/components/business/bcTable/components/popup/index.d.ts +0 -2
  638. package/dist/types/src/components/business/bcTable/components/popup/popup.vue.d.ts +0 -49
  639. package/dist/types/src/components/business/bcTable/components/query/components/sortForm/sortForm.vue.d.ts +0 -14
  640. package/dist/types/src/components/business/bcTable/components/query/drag.vue.d.ts +0 -222
  641. package/dist/types/src/components/business/bcTable/components/query/query.vue.d.ts +0 -226
  642. package/dist/types/src/components/business/bcTable/components/table/colgroup.vue.d.ts +0 -25
  643. package/dist/types/src/components/business/bcTable/components/table/column.vue.d.ts +0 -49
  644. package/dist/types/src/components/business/bcTable/components/table/components/sortColumn/sortColumn.vue.d.ts +0 -16
  645. package/dist/types/src/components/business/bcTable/components/table/table.vue.d.ts +0 -64
  646. package/dist/types/src/components/business/bcTable/components/table/useTableHeight.d.ts +0 -23
  647. package/dist/types/src/components/business/bcTable/utils/useFormTableHeight.d.ts +0 -18
  648. package/dist/types/src/components/business/bcTabs/bcTabs.vue.d.ts +0 -61
  649. package/dist/types/src/components/business/bcTabs/components/BetterScroll/index.d.ts +0 -2
  650. package/dist/types/src/components/business/bcTabs/components/BetterScroll/index.vue.d.ts +0 -33
  651. package/dist/types/src/components/business/bcTreeSearch/bcTreeSearch.vue.d.ts +0 -55
  652. package/dist/types/src/components/business/bcTreeSelect/bcTreeSelect.vue.d.ts +0 -28
  653. package/dist/types/src/components/business/bcTrtc/bcTrtc.vue.d.ts +0 -104
  654. package/dist/types/src/components/business/bcTrtc/hooks/useOperateLog.d.ts +0 -8
  655. package/dist/types/src/components/business/bcTrtc/hooks/useTrtcRoomEvent.d.ts +0 -50
  656. package/dist/types/src/components/business/bcTrtc/type.d.ts +0 -124
  657. package/dist/types/src/components/business/bcTrtc/useTrtc.d.ts +0 -39
  658. package/dist/types/src/components/business/bcTrtc/util/generateTestUserSig.d.ts +0 -64
  659. package/dist/types/src/components/business/bcTrtc/util/lib-generate-test-usersig-es.min.d.ts +0 -20
  660. package/dist/types/src/components/business/bcTrtc/util/utils.d.ts +0 -4
  661. package/dist/types/src/components/business/bcUpload/bcUpload.vue.d.ts +0 -13
  662. package/dist/types/src/components/business/bcUpload/component/highSpeedCamera.vue.d.ts +0 -19
  663. package/dist/types/src/components/business/bcUpload/component/qwebchannel.d.ts +0 -15
  664. package/dist/types/src/components/business/bcUpload/component/type.d.ts +0 -44
  665. package/dist/types/src/components/business/bcUpload/type.d.ts +0 -83
  666. package/dist/types/src/components/business/bcUpload/upload.vue.d.ts +0 -272
  667. package/dist/types/src/components/business/bcUpload/useUpload.d.ts +0 -21
  668. package/dist/types/src/components/business/bcVisual/components/setting/extendItem.vue.d.ts +0 -13
  669. package/dist/types/src/components/business/bcVisual/components/setting/setting.vue.d.ts +0 -3
  670. package/dist/types/src/components/business/bcVisual/components/table/table.vue.d.ts +0 -6
  671. package/dist/types/src/components/business/bcVisual/components/updateName/popup.vue.d.ts +0 -17
  672. package/dist/types/src/components/business/bcVisual/components/updateSql/addCondition.vue.d.ts +0 -23
  673. package/dist/types/src/components/business/bcVisual/components/updateSql/nodeTree/index.vue.d.ts +0 -21
  674. package/dist/types/src/components/business/bcVisual/components/updateSql/nodeTree/nodeTree.vue.d.ts +0 -27
  675. package/dist/types/src/components/business/bcVisual/components/updateSql/popup.vue.d.ts +0 -17
  676. package/dist/types/src/components/business/index.d.ts +0 -52
  677. package/dist/types/src/hooks/index.d.ts +0 -3
  678. package/dist/types/src/hooks/onKeyStroke.d.ts +0 -13
  679. package/dist/types/src/hooks/useExpose.d.ts +0 -23
  680. package/dist/types/src/hooks/useKeyStroke.d.ts +0 -22
  681. package/dist/types/src/utils/commonFunction.d.ts +0 -14
  682. package/dist/types/src/utils/index.d.ts +0 -26
  683. package/dist/types/src/utils/lodash.d.ts +0 -2
  684. package/dist/types/src/utils/request/index.d.ts +0 -6
  685. package/dist/types/src/utils/request/request.d.ts +0 -6
  686. package/dist/types/src/utils/showMessage.d.ts +0 -3
  687. package/dist/types/src/utils/showMessageBox.d.ts +0 -3
  688. package/dist/types/src/utils/showNotification.d.ts +0 -3
  689. package/dist/types/src/utils/showPopup/showPopup.vue.d.ts +0 -56
  690. /package/dist/types/{src/components → components}/business/bcSystemAuth/components/fastSet/index.d.ts +0 -0
  691. /package/dist/types/{src/components → components}/business/bcSystemAuth/components/index.d.ts +0 -0
  692. /package/dist/types/{src/components → components}/business/bcSystemAuth/components/widget/index.d.ts +0 -0
  693. /package/dist/types/{src/components → components}/business/bcSystemField/components/index.d.ts +0 -0
  694. /package/dist/types/{src/components → components}/business/bcSystemField/components/widget/index.d.ts +0 -0
  695. /package/dist/types/{src/components → components}/business/bcTable/components/index.d.ts +0 -0
  696. /package/dist/types/{src/components → components}/business/bcTable/components/query/components/sortForm/index.d.ts +0 -0
  697. /package/dist/types/{src/components → components}/business/bcTable/components/table/components/sortColumn/index.d.ts +0 -0
  698. /package/dist/types/{src/components → components}/business/bcVisual/components/updateName/index.d.ts +0 -0
  699. /package/dist/types/{src/components → components}/business/bcVisual/type.d.ts +0 -0
  700. /package/dist/types/{src/types → types}/formItem/button.d.ts +0 -0
  701. /package/dist/types/{src/types → types}/formItem/index.d.ts +0 -0
  702. /package/dist/types/{src/types → types}/index.d.ts +0 -0
  703. /package/dist/types/{src/utils → utils}/cfprint.d.ts +0 -0
  704. /package/dist/types/{src/utils → utils}/crypto.d.ts +0 -0
  705. /package/dist/types/{src/utils → utils}/device_info.d.ts +0 -0
  706. /package/dist/types/{src/utils → utils}/formatTime.d.ts +0 -0
  707. /package/dist/types/{src/utils → utils}/request/interceptors/request/index.d.ts +0 -0
  708. /package/dist/types/{src/utils → utils}/request/interceptors/response/index.d.ts +0 -0
  709. /package/dist/types/{src/utils → utils}/shortcutList.d.ts +0 -0
  710. /package/dist/types/{src/utils → utils}/theme.d.ts +0 -0
  711. /package/dist/types/{src/utils → utils}/toolsValidate.d.ts +0 -0
  712. /package/dist/types/{src/utils → utils}/update.d.ts +0 -0
  713. /package/dist/types/{src/utils → utils}/watermark.d.ts +0 -0
@@ -0,0 +1,2208 @@
1
+ import { createElementBlock, openBlock, createCommentVNode, createElementVNode, withDirectives, normalizeStyle, vShow, normalizeClass, toDisplayString, defineComponent, ref, onMounted, toRefs, reactive, resolveComponent, createVNode, withCtx, unref, createTextVNode } from "vue";
2
+ import { _ as _export_sfc, T as systemStore, b as ElMessage, U as useFileController } from "./index-CYGyHWBv.mjs";
3
+ const Exif = {};
4
+ Exif.getData = (img) => new Promise((reslove, reject) => {
5
+ let obj = {};
6
+ getImageData(img).then((data) => {
7
+ obj.arrayBuffer = data;
8
+ try {
9
+ obj.orientation = getOrientation(data);
10
+ } catch {
11
+ obj.orientation = -1;
12
+ }
13
+ reslove(obj);
14
+ }).catch((error2) => {
15
+ reject(error2);
16
+ });
17
+ });
18
+ function getImageData(img) {
19
+ let data = null;
20
+ return new Promise((reslove, reject) => {
21
+ if (img.src) {
22
+ if (/^data\:/i.test(img.src)) {
23
+ data = base64ToArrayBuffer(img.src);
24
+ reslove(data);
25
+ } else if (/^blob\:/i.test(img.src)) {
26
+ var fileReader = new FileReader();
27
+ fileReader.onload = function(e) {
28
+ data = e.target.result;
29
+ reslove(data);
30
+ };
31
+ objectURLToBlob(img.src, function(blob) {
32
+ fileReader.readAsArrayBuffer(blob);
33
+ });
34
+ } else {
35
+ var http = new XMLHttpRequest();
36
+ http.onload = function() {
37
+ if (this.status == 200 || this.status === 0) {
38
+ data = http.response;
39
+ reslove(data);
40
+ } else {
41
+ throw "Could not load image";
42
+ }
43
+ http = null;
44
+ };
45
+ http.open("GET", img.src, true);
46
+ http.responseType = "arraybuffer";
47
+ http.send(null);
48
+ }
49
+ } else {
50
+ reject("img error");
51
+ }
52
+ });
53
+ }
54
+ function objectURLToBlob(url, callback) {
55
+ var http = new XMLHttpRequest();
56
+ http.open("GET", url, true);
57
+ http.responseType = "blob";
58
+ http.onload = function(e) {
59
+ if (this.status == 200 || this.status === 0) {
60
+ callback(this.response);
61
+ }
62
+ };
63
+ http.send();
64
+ }
65
+ function base64ToArrayBuffer(base64, contentType) {
66
+ contentType = contentType || base64.match(/^data\:([^\;]+)\;base64,/mi)[1] || "";
67
+ base64 = base64.replace(/^data\:([^\;]+)\;base64,/gmi, "");
68
+ var binary = atob(base64);
69
+ var len = binary.length % 2 == 0 ? binary.length : binary.length + 1;
70
+ var buffer = new ArrayBuffer(len);
71
+ var view = new Uint16Array(buffer);
72
+ for (var i = 0; i < len; i++) {
73
+ view[i] = binary.charCodeAt(i);
74
+ }
75
+ return buffer;
76
+ }
77
+ function getStringFromCharCode(dataView, start, length) {
78
+ var str = "";
79
+ var i;
80
+ for (i = start, length += start; i < length; i++) {
81
+ str += String.fromCharCode(dataView.getUint8(i));
82
+ }
83
+ return str;
84
+ }
85
+ function getOrientation(arrayBuffer) {
86
+ var dataView = new DataView(arrayBuffer);
87
+ var length = dataView.byteLength;
88
+ var orientation;
89
+ var exifIDCode;
90
+ var tiffOffset;
91
+ var firstIFDOffset;
92
+ var littleEndian;
93
+ var endianness;
94
+ var app1Start;
95
+ var ifdStart;
96
+ var offset;
97
+ var i;
98
+ if (dataView.getUint8(0) === 255 && dataView.getUint8(1) === 216) {
99
+ offset = 2;
100
+ while (offset < length) {
101
+ if (dataView.getUint8(offset) === 255 && dataView.getUint8(offset + 1) === 225) {
102
+ app1Start = offset;
103
+ break;
104
+ }
105
+ offset++;
106
+ }
107
+ }
108
+ if (app1Start) {
109
+ exifIDCode = app1Start + 4;
110
+ tiffOffset = app1Start + 10;
111
+ if (getStringFromCharCode(dataView, exifIDCode, 4) === "Exif") {
112
+ endianness = dataView.getUint16(tiffOffset);
113
+ littleEndian = endianness === 18761;
114
+ if (littleEndian || endianness === 19789) {
115
+ if (dataView.getUint16(tiffOffset + 2, littleEndian) === 42) {
116
+ firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian);
117
+ if (firstIFDOffset >= 8) {
118
+ ifdStart = tiffOffset + firstIFDOffset;
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ if (ifdStart) {
125
+ length = dataView.getUint16(ifdStart, littleEndian);
126
+ for (i = 0; i < length; i++) {
127
+ offset = ifdStart + i * 12 + 2;
128
+ if (dataView.getUint16(offset, littleEndian) === 274) {
129
+ offset += 8;
130
+ orientation = dataView.getUint16(offset, littleEndian);
131
+ break;
132
+ }
133
+ }
134
+ }
135
+ return orientation;
136
+ }
137
+ const _sfc_main$1 = {
138
+ data: function() {
139
+ return {
140
+ // 容器高宽
141
+ w: 0,
142
+ h: 0,
143
+ // 图片缩放比例
144
+ scale: 1,
145
+ // 图片偏移x轴
146
+ x: 0,
147
+ // 图片偏移y轴
148
+ y: 0,
149
+ // 图片加载
150
+ loading: true,
151
+ // 图片真实宽度
152
+ trueWidth: 0,
153
+ // 图片真实高度
154
+ trueHeight: 0,
155
+ move: true,
156
+ // 移动的x
157
+ moveX: 0,
158
+ // 移动的y
159
+ moveY: 0,
160
+ // 开启截图
161
+ crop: false,
162
+ // 正在截图
163
+ cropping: false,
164
+ // 裁剪框大小
165
+ cropW: 0,
166
+ cropH: 0,
167
+ cropOldW: 0,
168
+ cropOldH: 0,
169
+ // 判断是否能够改变
170
+ canChangeX: false,
171
+ canChangeY: false,
172
+ // 改变的基准点
173
+ changeCropTypeX: 1,
174
+ changeCropTypeY: 1,
175
+ // 裁剪框的坐标轴
176
+ cropX: 0,
177
+ cropY: 0,
178
+ cropChangeX: 0,
179
+ cropChangeY: 0,
180
+ cropOffsertX: 0,
181
+ cropOffsertY: 0,
182
+ // 支持的滚动事件
183
+ support: "",
184
+ // 移动端手指缩放
185
+ touches: [],
186
+ touchNow: false,
187
+ // 图片旋转
188
+ rotate: 0,
189
+ isIos: false,
190
+ orientation: 0,
191
+ imgs: "",
192
+ // 图片缩放系数
193
+ coe: 0.2,
194
+ // 是否正在多次缩放
195
+ scaling: false,
196
+ scalingSet: "",
197
+ coeStatus: "",
198
+ // 控制emit触发频率
199
+ isCanShow: true,
200
+ // 图片是否等于截图大小
201
+ imgIsQqualCrop: false
202
+ };
203
+ },
204
+ props: {
205
+ img: {
206
+ type: [String, Blob, null, File],
207
+ default: ""
208
+ },
209
+ // 输出图片压缩比
210
+ outputSize: {
211
+ type: Number,
212
+ default: 1
213
+ },
214
+ outputType: {
215
+ type: String,
216
+ default: "jpeg"
217
+ },
218
+ info: {
219
+ type: Boolean,
220
+ default: true
221
+ },
222
+ // 是否开启滚轮放大缩小
223
+ canScale: {
224
+ type: Boolean,
225
+ default: true
226
+ },
227
+ // 是否自成截图框
228
+ autoCrop: {
229
+ type: Boolean,
230
+ default: false
231
+ },
232
+ autoCropWidth: {
233
+ type: [Number, String],
234
+ default: 0
235
+ },
236
+ autoCropHeight: {
237
+ type: [Number, String],
238
+ default: 0
239
+ },
240
+ // 是否开启固定宽高比
241
+ fixed: {
242
+ type: Boolean,
243
+ default: false
244
+ },
245
+ // 宽高比 w/h
246
+ fixedNumber: {
247
+ type: Array,
248
+ default: () => {
249
+ return [1, 1];
250
+ }
251
+ },
252
+ // 固定大小 禁止改变截图框大小
253
+ fixedBox: {
254
+ type: Boolean,
255
+ default: false
256
+ },
257
+ // 输出截图是否缩放
258
+ full: {
259
+ type: Boolean,
260
+ default: false
261
+ },
262
+ // 是否可以拖动图片
263
+ canMove: {
264
+ type: Boolean,
265
+ default: true
266
+ },
267
+ // 是否可以拖动截图框
268
+ canMoveBox: {
269
+ type: Boolean,
270
+ default: true
271
+ },
272
+ // 上传图片按照原始比例显示
273
+ original: {
274
+ type: Boolean,
275
+ default: false
276
+ },
277
+ // 截图框能否超过图片
278
+ centerBox: {
279
+ type: Boolean,
280
+ default: false
281
+ },
282
+ // 是否根据dpr输出高清图片
283
+ high: {
284
+ type: Boolean,
285
+ default: true
286
+ },
287
+ // 截图框展示宽高类型
288
+ infoTrue: {
289
+ type: Boolean,
290
+ default: false
291
+ },
292
+ // 可以压缩图片宽高 默认不超过200
293
+ maxImgSize: {
294
+ type: [Number, String],
295
+ default: 2e3
296
+ },
297
+ // 倍数 可渲染当前截图框的n倍 0 - 1000;
298
+ enlarge: {
299
+ type: [Number, String],
300
+ default: 1
301
+ },
302
+ // 自动预览的固定宽度
303
+ preW: {
304
+ type: [Number, String],
305
+ default: 0
306
+ },
307
+ /*
308
+ 图片布局方式 mode 实现和css背景一样的效果
309
+ contain 居中布局 默认不会缩放 保证图片在容器里面 mode: 'contain'
310
+ cover 拉伸布局 填充整个容器 mode: 'cover'
311
+ 如果仅有一个数值被给定,这个数值将作为宽度值大小,高度值将被设定为auto。 mode: '50px'
312
+ 如果有两个数值被给定,第一个将作为宽度值大小,第二个作为高度值大小。 mode: '50px 60px'
313
+ */
314
+ mode: {
315
+ type: String,
316
+ default: "contain"
317
+ },
318
+ //限制最小区域,可传1以上的数字和字符串,限制长宽都是这么大
319
+ // 也可以传数组[90,90]
320
+ limitMinSize: {
321
+ type: [Number, Array, String],
322
+ default: () => {
323
+ return 10;
324
+ },
325
+ validator: function(value) {
326
+ if (Array.isArray(value)) {
327
+ return Number(value[0]) >= 0 && Number(value[1]) >= 0;
328
+ } else {
329
+ return Number(value) >= 0;
330
+ }
331
+ }
332
+ },
333
+ // 导出时,填充背景颜色
334
+ fillColor: {
335
+ type: String,
336
+ default: ""
337
+ }
338
+ },
339
+ computed: {
340
+ cropInfo() {
341
+ let obj = {};
342
+ obj.top = this.cropOffsertY > 21 ? "-21px" : "0px";
343
+ obj.width = this.cropW > 0 ? this.cropW : 0;
344
+ obj.height = this.cropH > 0 ? this.cropH : 0;
345
+ if (this.infoTrue) {
346
+ let dpr = 1;
347
+ if (this.high && !this.full) {
348
+ dpr = window.devicePixelRatio;
349
+ }
350
+ if (this.enlarge !== 1 & !this.full) {
351
+ dpr = Math.abs(Number(this.enlarge));
352
+ }
353
+ obj.width = obj.width * dpr;
354
+ obj.height = obj.height * dpr;
355
+ if (this.full) {
356
+ obj.width = obj.width / this.scale;
357
+ obj.height = obj.height / this.scale;
358
+ }
359
+ }
360
+ obj.width = obj.width.toFixed(0);
361
+ obj.height = obj.height.toFixed(0);
362
+ return obj;
363
+ },
364
+ isIE() {
365
+ const isIE = !!window.ActiveXObject || "ActiveXObject" in window;
366
+ return isIE;
367
+ },
368
+ passive() {
369
+ return this.isIE ? null : {
370
+ passive: false
371
+ };
372
+ }
373
+ },
374
+ watch: {
375
+ // 如果图片改变, 重新布局
376
+ img() {
377
+ this.checkedImg();
378
+ },
379
+ imgs(val) {
380
+ if (val === "") {
381
+ return;
382
+ }
383
+ this.reload();
384
+ },
385
+ cropW() {
386
+ this.showPreview();
387
+ },
388
+ cropH() {
389
+ this.showPreview();
390
+ },
391
+ cropOffsertX() {
392
+ this.showPreview();
393
+ },
394
+ cropOffsertY() {
395
+ this.showPreview();
396
+ },
397
+ scale(val, oldVal) {
398
+ this.showPreview();
399
+ },
400
+ x() {
401
+ this.showPreview();
402
+ },
403
+ y() {
404
+ this.showPreview();
405
+ },
406
+ autoCrop(val) {
407
+ if (val) {
408
+ this.goAutoCrop();
409
+ }
410
+ },
411
+ // 修改了自动截图框
412
+ autoCropWidth() {
413
+ if (this.autoCrop) {
414
+ this.goAutoCrop();
415
+ }
416
+ },
417
+ autoCropHeight() {
418
+ if (this.autoCrop) {
419
+ this.goAutoCrop();
420
+ }
421
+ },
422
+ mode() {
423
+ this.checkedImg();
424
+ },
425
+ rotate() {
426
+ this.showPreview();
427
+ if (this.autoCrop) {
428
+ this.goAutoCrop(this.cropW, this.cropH);
429
+ } else {
430
+ if (this.cropW > 0 || this.cropH > 0) {
431
+ this.goAutoCrop(this.cropW, this.cropH);
432
+ }
433
+ }
434
+ }
435
+ },
436
+ methods: {
437
+ getVersion(name) {
438
+ var arr = navigator.userAgent.split(" ");
439
+ var chromeVersion = "";
440
+ let result = 0;
441
+ const reg = new RegExp(name, "i");
442
+ for (var i = 0; i < arr.length; i++) {
443
+ if (reg.test(arr[i]))
444
+ chromeVersion = arr[i];
445
+ }
446
+ if (chromeVersion) {
447
+ result = chromeVersion.split("/")[1].split(".");
448
+ } else {
449
+ result = ["0", "0", "0"];
450
+ }
451
+ return result;
452
+ },
453
+ checkOrientationImage(img, orientation, width, height) {
454
+ if (this.getVersion("chrome")[0] >= 81) {
455
+ orientation = -1;
456
+ } else {
457
+ if (this.getVersion("safari")[0] >= 605) {
458
+ const safariVersion = this.getVersion("version");
459
+ if (safariVersion[0] > 13 && safariVersion[1] > 1) {
460
+ orientation = -1;
461
+ }
462
+ } else {
463
+ const isIos = navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);
464
+ if (isIos) {
465
+ let version = isIos[1];
466
+ version = version.split("_");
467
+ if (version[0] > 13 || version[0] >= 13 && version[1] >= 4) {
468
+ orientation = -1;
469
+ }
470
+ }
471
+ }
472
+ }
473
+ let canvas = document.createElement("canvas");
474
+ let ctx = canvas.getContext("2d");
475
+ ctx.save();
476
+ switch (orientation) {
477
+ case 2:
478
+ canvas.width = width;
479
+ canvas.height = height;
480
+ ctx.translate(width, 0);
481
+ ctx.scale(-1, 1);
482
+ break;
483
+ case 3:
484
+ canvas.width = width;
485
+ canvas.height = height;
486
+ ctx.translate(width / 2, height / 2);
487
+ ctx.rotate(180 * Math.PI / 180);
488
+ ctx.translate(-width / 2, -height / 2);
489
+ break;
490
+ case 4:
491
+ canvas.width = width;
492
+ canvas.height = height;
493
+ ctx.translate(0, height);
494
+ ctx.scale(1, -1);
495
+ break;
496
+ case 5:
497
+ canvas.height = width;
498
+ canvas.width = height;
499
+ ctx.rotate(0.5 * Math.PI);
500
+ ctx.scale(1, -1);
501
+ break;
502
+ case 6:
503
+ canvas.width = height;
504
+ canvas.height = width;
505
+ ctx.translate(height / 2, width / 2);
506
+ ctx.rotate(90 * Math.PI / 180);
507
+ ctx.translate(-width / 2, -height / 2);
508
+ break;
509
+ case 7:
510
+ canvas.height = width;
511
+ canvas.width = height;
512
+ ctx.rotate(0.5 * Math.PI);
513
+ ctx.translate(width, -height);
514
+ ctx.scale(-1, 1);
515
+ break;
516
+ case 8:
517
+ canvas.height = width;
518
+ canvas.width = height;
519
+ ctx.translate(height / 2, width / 2);
520
+ ctx.rotate(-90 * Math.PI / 180);
521
+ ctx.translate(-width / 2, -height / 2);
522
+ break;
523
+ default:
524
+ canvas.width = width;
525
+ canvas.height = height;
526
+ }
527
+ ctx.drawImage(img, 0, 0, width, height);
528
+ ctx.restore();
529
+ canvas.toBlob(
530
+ (blob) => {
531
+ let data = URL.createObjectURL(blob);
532
+ URL.revokeObjectURL(this.imgs);
533
+ this.imgs = data;
534
+ },
535
+ "image/" + this.outputType,
536
+ 1
537
+ );
538
+ },
539
+ // checkout img
540
+ checkedImg() {
541
+ if (this.img === null || this.img === "") {
542
+ this.imgs = "";
543
+ this.clearCrop();
544
+ return;
545
+ }
546
+ this.loading = true;
547
+ this.scale = 1;
548
+ this.rotate = 0;
549
+ this.clearCrop();
550
+ let img = new Image();
551
+ img.onload = () => {
552
+ if (this.img === "") {
553
+ this.$emit("imgLoad", "error");
554
+ this.$emit("img-load", "error");
555
+ this.$emit("img-load", new Error("图片不能为空"));
556
+ return false;
557
+ }
558
+ let width = img.width;
559
+ let height = img.height;
560
+ Exif.getData(img).then((data) => {
561
+ this.orientation = data.orientation || 1;
562
+ let max = Number(this.maxImgSize);
563
+ if (!this.orientation && width < max & height < max) {
564
+ this.imgs = this.img;
565
+ return;
566
+ }
567
+ if (width > max) {
568
+ height = height / width * max;
569
+ width = max;
570
+ }
571
+ if (height > max) {
572
+ width = width / height * max;
573
+ height = max;
574
+ }
575
+ this.checkOrientationImage(img, this.orientation, width, height);
576
+ }).catch((error2) => {
577
+ this.$emit("img-load", "error");
578
+ this.$emit("img-load-error", error2);
579
+ });
580
+ };
581
+ img.onerror = () => {
582
+ this.$emit("imgLoad", "error");
583
+ this.$emit("img-load", "error");
584
+ this.$emit("img-load-error", error);
585
+ };
586
+ if (this.img.substr(0, 4) !== "data") {
587
+ img.crossOrigin = "";
588
+ }
589
+ if (this.isIE) {
590
+ var xhr = new XMLHttpRequest();
591
+ xhr.onload = function() {
592
+ var url = URL.createObjectURL(this.response);
593
+ img.src = url;
594
+ };
595
+ xhr.open("GET", this.img, true);
596
+ xhr.responseType = "blob";
597
+ xhr.send();
598
+ } else {
599
+ img.src = this.img;
600
+ }
601
+ },
602
+ // 当按下鼠标键
603
+ startMove(e) {
604
+ e.preventDefault();
605
+ if (this.move && !this.crop) {
606
+ if (!this.canMove) {
607
+ return false;
608
+ }
609
+ this.moveX = ("clientX" in e ? e.clientX : e.touches[0].clientX) - this.x;
610
+ this.moveY = ("clientY" in e ? e.clientY : e.touches[0].clientY) - this.y;
611
+ if (e.touches) {
612
+ window.addEventListener("touchmove", this.moveImg);
613
+ window.addEventListener("touchend", this.leaveImg);
614
+ if (e.touches.length == 2) {
615
+ this.touches = e.touches;
616
+ window.addEventListener("touchmove", this.touchScale);
617
+ window.addEventListener("touchend", this.cancelTouchScale);
618
+ }
619
+ } else {
620
+ window.addEventListener("mousemove", this.moveImg);
621
+ window.addEventListener("mouseup", this.leaveImg);
622
+ }
623
+ this.$emit("imgMoving", {
624
+ moving: true,
625
+ axis: this.getImgAxis()
626
+ });
627
+ this.$emit("img-moving", {
628
+ moving: true,
629
+ axis: this.getImgAxis()
630
+ });
631
+ } else {
632
+ this.cropping = true;
633
+ window.addEventListener("mousemove", this.createCrop);
634
+ window.addEventListener("mouseup", this.endCrop);
635
+ window.addEventListener("touchmove", this.createCrop);
636
+ window.addEventListener("touchend", this.endCrop);
637
+ this.cropOffsertX = e.offsetX ? e.offsetX : e.touches[0].pageX - this.$refs.cropper.offsetLeft;
638
+ this.cropOffsertY = e.offsetY ? e.offsetY : e.touches[0].pageY - this.$refs.cropper.offsetTop;
639
+ this.cropX = "clientX" in e ? e.clientX : e.touches[0].clientX;
640
+ this.cropY = "clientY" in e ? e.clientY : e.touches[0].clientY;
641
+ this.cropChangeX = this.cropOffsertX;
642
+ this.cropChangeY = this.cropOffsertY;
643
+ this.cropW = 0;
644
+ this.cropH = 0;
645
+ }
646
+ },
647
+ // 移动端缩放
648
+ touchScale(e) {
649
+ e.preventDefault();
650
+ let scale = this.scale;
651
+ var oldTouch1 = {
652
+ x: this.touches[0].clientX,
653
+ y: this.touches[0].clientY
654
+ };
655
+ var newTouch1 = {
656
+ x: e.touches[0].clientX,
657
+ y: e.touches[0].clientY
658
+ };
659
+ var oldTouch2 = {
660
+ x: this.touches[1].clientX,
661
+ y: this.touches[1].clientY
662
+ };
663
+ var newTouch2 = {
664
+ x: e.touches[1].clientX,
665
+ y: e.touches[1].clientY
666
+ };
667
+ var oldL = Math.sqrt(
668
+ Math.pow(oldTouch1.x - oldTouch2.x, 2) + Math.pow(oldTouch1.y - oldTouch2.y, 2)
669
+ );
670
+ var newL = Math.sqrt(
671
+ Math.pow(newTouch1.x - newTouch2.x, 2) + Math.pow(newTouch1.y - newTouch2.y, 2)
672
+ );
673
+ var cha = newL - oldL;
674
+ var coe = 1;
675
+ coe = coe / this.trueWidth > coe / this.trueHeight ? coe / this.trueHeight : coe / this.trueWidth;
676
+ coe = coe > 0.1 ? 0.1 : coe;
677
+ var num = coe * cha;
678
+ if (!this.touchNow) {
679
+ this.touchNow = true;
680
+ if (cha > 0) {
681
+ scale += Math.abs(num);
682
+ } else if (cha < 0) {
683
+ scale > Math.abs(num) ? scale -= Math.abs(num) : scale;
684
+ }
685
+ this.touches = e.touches;
686
+ setTimeout(() => {
687
+ this.touchNow = false;
688
+ }, 8);
689
+ if (!this.checkoutImgAxis(this.x, this.y, scale)) {
690
+ return false;
691
+ }
692
+ this.scale = scale;
693
+ }
694
+ },
695
+ cancelTouchScale(e) {
696
+ window.removeEventListener("touchmove", this.touchScale);
697
+ },
698
+ // 移动图片
699
+ moveImg(e) {
700
+ e.preventDefault();
701
+ if (e.touches && e.touches.length === 2) {
702
+ this.touches = e.touches;
703
+ window.addEventListener("touchmove", this.touchScale);
704
+ window.addEventListener("touchend", this.cancelTouchScale);
705
+ window.removeEventListener("touchmove", this.moveImg);
706
+ return false;
707
+ }
708
+ let nowX = "clientX" in e ? e.clientX : e.touches[0].clientX;
709
+ let nowY = "clientY" in e ? e.clientY : e.touches[0].clientY;
710
+ let changeX, changeY;
711
+ changeX = nowX - this.moveX;
712
+ changeY = nowY - this.moveY;
713
+ this.$nextTick(() => {
714
+ if (this.centerBox) {
715
+ let axis = this.getImgAxis(changeX, changeY, this.scale);
716
+ let cropAxis = this.getCropAxis();
717
+ let imgW = this.trueHeight * this.scale;
718
+ let imgH = this.trueWidth * this.scale;
719
+ let maxLeft, maxTop, maxRight, maxBottom;
720
+ switch (this.rotate) {
721
+ case 1:
722
+ case -1:
723
+ case 3:
724
+ case -3:
725
+ maxLeft = this.cropOffsertX - this.trueWidth * (1 - this.scale) / 2 + (imgW - imgH) / 2;
726
+ maxTop = this.cropOffsertY - this.trueHeight * (1 - this.scale) / 2 + (imgH - imgW) / 2;
727
+ maxRight = maxLeft - imgW + this.cropW;
728
+ maxBottom = maxTop - imgH + this.cropH;
729
+ break;
730
+ default:
731
+ maxLeft = this.cropOffsertX - this.trueWidth * (1 - this.scale) / 2;
732
+ maxTop = this.cropOffsertY - this.trueHeight * (1 - this.scale) / 2;
733
+ maxRight = maxLeft - imgH + this.cropW;
734
+ maxBottom = maxTop - imgW + this.cropH;
735
+ break;
736
+ }
737
+ if (axis.x1 >= cropAxis.x1) {
738
+ changeX = maxLeft;
739
+ }
740
+ if (axis.y1 >= cropAxis.y1) {
741
+ changeY = maxTop;
742
+ }
743
+ if (axis.x2 <= cropAxis.x2) {
744
+ changeX = maxRight;
745
+ }
746
+ if (axis.y2 <= cropAxis.y2) {
747
+ changeY = maxBottom;
748
+ }
749
+ }
750
+ this.x = changeX;
751
+ this.y = changeY;
752
+ this.$emit("imgMoving", {
753
+ moving: true,
754
+ axis: this.getImgAxis()
755
+ });
756
+ this.$emit("img-moving", {
757
+ moving: true,
758
+ axis: this.getImgAxis()
759
+ });
760
+ });
761
+ },
762
+ // 移动图片结束
763
+ leaveImg(e) {
764
+ window.removeEventListener("mousemove", this.moveImg);
765
+ window.removeEventListener("touchmove", this.moveImg);
766
+ window.removeEventListener("mouseup", this.leaveImg);
767
+ window.removeEventListener("touchend", this.leaveImg);
768
+ this.$emit("imgMoving", {
769
+ moving: false,
770
+ axis: this.getImgAxis()
771
+ });
772
+ this.$emit("img-moving", {
773
+ moving: false,
774
+ axis: this.getImgAxis()
775
+ });
776
+ },
777
+ // 缩放图片
778
+ scaleImg() {
779
+ if (this.canScale) {
780
+ window.addEventListener(this.support, this.changeSize, this.passive);
781
+ }
782
+ },
783
+ // 移出框
784
+ cancelScale() {
785
+ if (this.canScale) {
786
+ window.removeEventListener(this.support, this.changeSize);
787
+ }
788
+ },
789
+ // 改变大小函数
790
+ changeSize(e) {
791
+ e.preventDefault();
792
+ let scale = this.scale;
793
+ var change = e.deltaY || e.wheelDelta;
794
+ var isFirefox = navigator.userAgent.indexOf("Firefox");
795
+ change = isFirefox > 0 ? change * 30 : change;
796
+ if (this.isIE) {
797
+ change = -change;
798
+ }
799
+ var coe = this.coe;
800
+ coe = coe / this.trueWidth > coe / this.trueHeight ? coe / this.trueHeight : coe / this.trueWidth;
801
+ var num = coe * change;
802
+ num < 0 ? scale += Math.abs(num) : scale > Math.abs(num) ? scale -= Math.abs(num) : scale;
803
+ let status = num < 0 ? "add" : "reduce";
804
+ if (status !== this.coeStatus) {
805
+ this.coeStatus = status;
806
+ this.coe = 0.2;
807
+ }
808
+ if (!this.scaling) {
809
+ this.scalingSet = setTimeout(() => {
810
+ this.scaling = false;
811
+ this.coe = this.coe += 0.01;
812
+ }, 50);
813
+ }
814
+ this.scaling = true;
815
+ if (!this.checkoutImgAxis(this.x, this.y, scale)) {
816
+ return false;
817
+ }
818
+ this.scale = scale;
819
+ },
820
+ // 修改图片大小函数
821
+ changeScale(num) {
822
+ let scale = this.scale;
823
+ num = num || 1;
824
+ var coe = 20;
825
+ coe = coe / this.trueWidth > coe / this.trueHeight ? coe / this.trueHeight : coe / this.trueWidth;
826
+ num = num * coe;
827
+ num > 0 ? scale += Math.abs(num) : scale > Math.abs(num) ? scale -= Math.abs(num) : scale;
828
+ if (!this.checkoutImgAxis(this.x, this.y, scale)) {
829
+ return false;
830
+ }
831
+ this.scale = scale;
832
+ },
833
+ // 创建截图框
834
+ createCrop(e) {
835
+ e.preventDefault();
836
+ var nowX = "clientX" in e ? e.clientX : e.touches ? e.touches[0].clientX : 0;
837
+ var nowY = "clientY" in e ? e.clientY : e.touches ? e.touches[0].clientY : 0;
838
+ this.$nextTick(() => {
839
+ var fw = nowX - this.cropX;
840
+ var fh = nowY - this.cropY;
841
+ if (fw > 0) {
842
+ this.cropW = fw + this.cropChangeX > this.w ? this.w - this.cropChangeX : fw;
843
+ this.cropOffsertX = this.cropChangeX;
844
+ } else {
845
+ this.cropW = this.w - this.cropChangeX + Math.abs(fw) > this.w ? this.cropChangeX : Math.abs(fw);
846
+ this.cropOffsertX = this.cropChangeX + fw > 0 ? this.cropChangeX + fw : 0;
847
+ }
848
+ if (!this.fixed) {
849
+ if (fh > 0) {
850
+ this.cropH = fh + this.cropChangeY > this.h ? this.h - this.cropChangeY : fh;
851
+ this.cropOffsertY = this.cropChangeY;
852
+ } else {
853
+ this.cropH = this.h - this.cropChangeY + Math.abs(fh) > this.h ? this.cropChangeY : Math.abs(fh);
854
+ this.cropOffsertY = this.cropChangeY + fh > 0 ? this.cropChangeY + fh : 0;
855
+ }
856
+ } else {
857
+ var fixedHeight = this.cropW / this.fixedNumber[0] * this.fixedNumber[1];
858
+ if (fixedHeight + this.cropOffsertY > this.h) {
859
+ this.cropH = this.h - this.cropOffsertY;
860
+ this.cropW = this.cropH / this.fixedNumber[1] * this.fixedNumber[0];
861
+ if (fw > 0) {
862
+ this.cropOffsertX = this.cropChangeX;
863
+ } else {
864
+ this.cropOffsertX = this.cropChangeX - this.cropW;
865
+ }
866
+ } else {
867
+ this.cropH = fixedHeight;
868
+ }
869
+ this.cropOffsertY = this.cropOffsertY;
870
+ }
871
+ });
872
+ },
873
+ // 改变截图框大小
874
+ changeCropSize(e, w, h, typeW, typeH) {
875
+ e.preventDefault();
876
+ window.addEventListener("mousemove", this.changeCropNow);
877
+ window.addEventListener("mouseup", this.changeCropEnd);
878
+ window.addEventListener("touchmove", this.changeCropNow);
879
+ window.addEventListener("touchend", this.changeCropEnd);
880
+ this.canChangeX = w;
881
+ this.canChangeY = h;
882
+ this.changeCropTypeX = typeW;
883
+ this.changeCropTypeY = typeH;
884
+ this.cropX = "clientX" in e ? e.clientX : e.touches[0].clientX;
885
+ this.cropY = "clientY" in e ? e.clientY : e.touches[0].clientY;
886
+ this.cropOldW = this.cropW;
887
+ this.cropOldH = this.cropH;
888
+ this.cropChangeX = this.cropOffsertX;
889
+ this.cropChangeY = this.cropOffsertY;
890
+ if (this.fixed) {
891
+ if (this.canChangeX && this.canChangeY) {
892
+ this.canChangeY = 0;
893
+ }
894
+ }
895
+ this.$emit("changeCropSize", {
896
+ width: this.cropW,
897
+ height: this.cropH
898
+ });
899
+ this.$emit("change-crop-size", {
900
+ width: this.cropW,
901
+ height: this.cropH
902
+ });
903
+ },
904
+ // 正在改变
905
+ changeCropNow(e) {
906
+ e.preventDefault();
907
+ var nowX = "clientX" in e ? e.clientX : e.touches ? e.touches[0].clientX : 0;
908
+ var nowY = "clientY" in e ? e.clientY : e.touches ? e.touches[0].clientY : 0;
909
+ let wrapperW = this.w;
910
+ let wrapperH = this.h;
911
+ let minX = 0;
912
+ let minY = 0;
913
+ if (this.centerBox) {
914
+ let axis = this.getImgAxis();
915
+ let imgW = axis.x2;
916
+ let imgH = axis.y2;
917
+ minX = axis.x1 > 0 ? axis.x1 : 0;
918
+ minY = axis.y1 > 0 ? axis.y1 : 0;
919
+ if (wrapperW > imgW) {
920
+ wrapperW = imgW;
921
+ }
922
+ if (wrapperH > imgH) {
923
+ wrapperH = imgH;
924
+ }
925
+ }
926
+ const [minCropW, minCropH] = this.checkCropLimitSize();
927
+ this.$nextTick(() => {
928
+ var fw = nowX - this.cropX;
929
+ var fh = nowY - this.cropY;
930
+ if (this.canChangeX) {
931
+ if (this.changeCropTypeX === 1) {
932
+ if (this.cropOldW - fw < minCropW) {
933
+ this.cropW = minCropW;
934
+ this.cropOffsertX = this.cropOldW + this.cropChangeX - minX - minCropW;
935
+ } else if (this.cropOldW - fw > 0) {
936
+ this.cropW = wrapperW - this.cropChangeX - fw <= wrapperW - minX ? this.cropOldW - fw : this.cropOldW + this.cropChangeX - minX;
937
+ this.cropOffsertX = wrapperW - this.cropChangeX - fw <= wrapperW - minX ? this.cropChangeX + fw : minX;
938
+ } else {
939
+ this.cropW = Math.abs(fw) + this.cropChangeX <= wrapperW ? Math.abs(fw) - this.cropOldW : wrapperW - this.cropOldW - this.cropChangeX;
940
+ this.cropOffsertX = this.cropChangeX + this.cropOldW;
941
+ }
942
+ } else if (this.changeCropTypeX === 2) {
943
+ if (this.cropOldW + fw < minCropW) {
944
+ this.cropW = minCropW;
945
+ } else if (this.cropOldW + fw > 0) {
946
+ this.cropW = this.cropOldW + fw + this.cropOffsertX <= wrapperW ? this.cropOldW + fw : wrapperW - this.cropOffsertX;
947
+ this.cropOffsertX = this.cropChangeX;
948
+ } else {
949
+ this.cropW = wrapperW - this.cropChangeX + Math.abs(fw + this.cropOldW) <= wrapperW - minX ? Math.abs(fw + this.cropOldW) : this.cropChangeX - minX;
950
+ this.cropOffsertX = wrapperW - this.cropChangeX + Math.abs(fw + this.cropOldW) <= wrapperW - minX ? this.cropChangeX - Math.abs(fw + this.cropOldW) : minX;
951
+ }
952
+ }
953
+ }
954
+ if (this.canChangeY) {
955
+ if (this.changeCropTypeY === 1) {
956
+ if (this.cropOldH - fh < minCropH) {
957
+ this.cropH = minCropH;
958
+ this.cropOffsertY = this.cropOldH + this.cropChangeY - minY - minCropH;
959
+ } else if (this.cropOldH - fh > 0) {
960
+ this.cropH = wrapperH - this.cropChangeY - fh <= wrapperH - minY ? this.cropOldH - fh : this.cropOldH + this.cropChangeY - minY;
961
+ this.cropOffsertY = wrapperH - this.cropChangeY - fh <= wrapperH - minY ? this.cropChangeY + fh : minY;
962
+ } else {
963
+ this.cropH = Math.abs(fh) + this.cropChangeY <= wrapperH ? Math.abs(fh) - this.cropOldH : wrapperH - this.cropOldH - this.cropChangeY;
964
+ this.cropOffsertY = this.cropChangeY + this.cropOldH;
965
+ }
966
+ } else if (this.changeCropTypeY === 2) {
967
+ if (this.cropOldH + fh < minCropH) {
968
+ this.cropH = minCropH;
969
+ } else if (this.cropOldH + fh > 0) {
970
+ this.cropH = this.cropOldH + fh + this.cropOffsertY <= wrapperH ? this.cropOldH + fh : wrapperH - this.cropOffsertY;
971
+ this.cropOffsertY = this.cropChangeY;
972
+ } else {
973
+ this.cropH = wrapperH - this.cropChangeY + Math.abs(fh + this.cropOldH) <= wrapperH - minY ? Math.abs(fh + this.cropOldH) : this.cropChangeY - minY;
974
+ this.cropOffsertY = wrapperH - this.cropChangeY + Math.abs(fh + this.cropOldH) <= wrapperH - minY ? this.cropChangeY - Math.abs(fh + this.cropOldH) : minY;
975
+ }
976
+ }
977
+ }
978
+ if (this.canChangeX && this.fixed) {
979
+ var fixedHeight = this.cropW / this.fixedNumber[0] * this.fixedNumber[1];
980
+ if (fixedHeight < minCropH) {
981
+ this.cropH = minCropH;
982
+ this.cropW = this.fixedNumber[0] * minCropH / this.fixedNumber[1];
983
+ if (this.changeCropTypeX === 1) {
984
+ this.cropOffsertX = this.cropChangeX + (this.cropOldW - this.cropW);
985
+ }
986
+ } else if (fixedHeight + this.cropOffsertY > wrapperH) {
987
+ this.cropH = wrapperH - this.cropOffsertY;
988
+ this.cropW = this.cropH / this.fixedNumber[1] * this.fixedNumber[0];
989
+ if (this.changeCropTypeX === 1) {
990
+ this.cropOffsertX = this.cropChangeX + (this.cropOldW - this.cropW);
991
+ }
992
+ } else {
993
+ this.cropH = fixedHeight;
994
+ }
995
+ }
996
+ if (this.canChangeY && this.fixed) {
997
+ var fixedWidth = this.cropH / this.fixedNumber[1] * this.fixedNumber[0];
998
+ if (fixedWidth < minCropW) {
999
+ this.cropW = minCropW;
1000
+ this.cropH = this.fixedNumber[1] * minCropW / this.fixedNumber[0];
1001
+ } else if (fixedWidth + this.cropOffsertX > wrapperW) {
1002
+ this.cropW = wrapperW - this.cropOffsertX;
1003
+ this.cropH = this.cropW / this.fixedNumber[0] * this.fixedNumber[1];
1004
+ } else {
1005
+ this.cropW = fixedWidth;
1006
+ }
1007
+ }
1008
+ this.$emit("cropSizing", { cropW: this.cropW, cropH: this.cropH });
1009
+ this.$emit("crop-sizing", { cropW: this.cropW, cropH: this.cropH });
1010
+ });
1011
+ },
1012
+ checkCropLimitSize() {
1013
+ let { cropW, cropH, limitMinSize } = this;
1014
+ let limitMinNum = new Array();
1015
+ if (!Array.isArray(limitMinSize)) {
1016
+ limitMinNum = [limitMinSize, limitMinSize];
1017
+ } else {
1018
+ limitMinNum = limitMinSize;
1019
+ }
1020
+ cropW = parseFloat(limitMinNum[0]);
1021
+ cropH = parseFloat(limitMinNum[1]);
1022
+ return [cropW, cropH];
1023
+ },
1024
+ // 结束改变
1025
+ changeCropEnd(e) {
1026
+ window.removeEventListener("mousemove", this.changeCropNow);
1027
+ window.removeEventListener("mouseup", this.changeCropEnd);
1028
+ window.removeEventListener("touchmove", this.changeCropNow);
1029
+ window.removeEventListener("touchend", this.changeCropEnd);
1030
+ },
1031
+ // 根据比例x/y,最小宽度,最小高度,现有宽度,现有高度,得到应该有的宽度和高度
1032
+ calculateSize(x, y, minX, minY, w, h) {
1033
+ const ratio = x / y;
1034
+ let width = w;
1035
+ let height = h;
1036
+ if (width < minX) {
1037
+ width = minX;
1038
+ height = Math.ceil(width / ratio);
1039
+ }
1040
+ if (height < minY) {
1041
+ height = minY;
1042
+ width = Math.ceil(height * ratio);
1043
+ if (width < minX) {
1044
+ width = minX;
1045
+ height = Math.ceil(width / ratio);
1046
+ }
1047
+ }
1048
+ if (width < w) {
1049
+ width = w;
1050
+ height = Math.ceil(width / ratio);
1051
+ }
1052
+ if (height < h) {
1053
+ height = h;
1054
+ width = Math.ceil(height * ratio);
1055
+ }
1056
+ return { width, height };
1057
+ },
1058
+ // 创建完成
1059
+ endCrop() {
1060
+ if (this.cropW === 0 && this.cropH === 0) {
1061
+ this.cropping = false;
1062
+ }
1063
+ let [minCropW, minCropH] = this.checkCropLimitSize();
1064
+ const { width, height } = this.fixed ? this.calculateSize(
1065
+ this.fixedNumber[0],
1066
+ this.fixedNumber[1],
1067
+ minCropW,
1068
+ minCropH,
1069
+ this.cropW,
1070
+ this.cropH
1071
+ ) : { width: minCropW, height: minCropH };
1072
+ if (width > this.cropW) {
1073
+ this.cropW = width;
1074
+ if (this.cropOffsertX + width > this.w) {
1075
+ this.cropOffsertX = this.w - width;
1076
+ }
1077
+ }
1078
+ if (height > this.cropH) {
1079
+ this.cropH = height;
1080
+ if (this.cropOffsertY + height > this.h) {
1081
+ this.cropOffsertY = this.h - height;
1082
+ }
1083
+ }
1084
+ window.removeEventListener("mousemove", this.createCrop);
1085
+ window.removeEventListener("mouseup", this.endCrop);
1086
+ window.removeEventListener("touchmove", this.createCrop);
1087
+ window.removeEventListener("touchend", this.endCrop);
1088
+ },
1089
+ // 开始截图
1090
+ startCrop() {
1091
+ this.crop = true;
1092
+ },
1093
+ // 停止截图
1094
+ stopCrop() {
1095
+ this.crop = false;
1096
+ },
1097
+ // 清除截图
1098
+ clearCrop() {
1099
+ this.cropping = false;
1100
+ this.cropW = 0;
1101
+ this.cropH = 0;
1102
+ },
1103
+ // 截图移动
1104
+ cropMove(e) {
1105
+ e.preventDefault();
1106
+ if (!this.canMoveBox) {
1107
+ this.crop = false;
1108
+ this.startMove(e);
1109
+ return false;
1110
+ }
1111
+ if (e.touches && e.touches.length === 2) {
1112
+ this.crop = false;
1113
+ this.startMove(e);
1114
+ this.leaveCrop();
1115
+ return false;
1116
+ }
1117
+ window.addEventListener("mousemove", this.moveCrop);
1118
+ window.addEventListener("mouseup", this.leaveCrop);
1119
+ window.addEventListener("touchmove", this.moveCrop);
1120
+ window.addEventListener("touchend", this.leaveCrop);
1121
+ let x = "clientX" in e ? e.clientX : e.touches[0].clientX;
1122
+ let y = "clientY" in e ? e.clientY : e.touches[0].clientY;
1123
+ let newX, newY;
1124
+ newX = x - this.cropOffsertX;
1125
+ newY = y - this.cropOffsertY;
1126
+ this.cropX = newX;
1127
+ this.cropY = newY;
1128
+ this.$emit("cropMoving", {
1129
+ moving: true,
1130
+ axis: this.getCropAxis()
1131
+ });
1132
+ this.$emit("crop-moving", {
1133
+ moving: true,
1134
+ axis: this.getCropAxis()
1135
+ });
1136
+ },
1137
+ moveCrop(e, isMove) {
1138
+ let nowX = 0;
1139
+ let nowY = 0;
1140
+ if (e) {
1141
+ e.preventDefault();
1142
+ nowX = "clientX" in e ? e.clientX : e.touches[0].clientX;
1143
+ nowY = "clientY" in e ? e.clientY : e.touches[0].clientY;
1144
+ }
1145
+ this.$nextTick(() => {
1146
+ let cx, cy;
1147
+ let fw = nowX - this.cropX;
1148
+ let fh = nowY - this.cropY;
1149
+ if (isMove) {
1150
+ fw = this.cropOffsertX;
1151
+ fh = this.cropOffsertY;
1152
+ }
1153
+ if (fw <= 0) {
1154
+ cx = 0;
1155
+ } else if (fw + this.cropW > this.w) {
1156
+ cx = this.w - this.cropW;
1157
+ } else {
1158
+ cx = fw;
1159
+ }
1160
+ if (fh <= 0) {
1161
+ cy = 0;
1162
+ } else if (fh + this.cropH > this.h) {
1163
+ cy = this.h - this.cropH;
1164
+ } else {
1165
+ cy = fh;
1166
+ }
1167
+ if (this.centerBox) {
1168
+ let axis = this.getImgAxis();
1169
+ if (cx <= axis.x1) {
1170
+ cx = axis.x1;
1171
+ }
1172
+ if (cx + this.cropW > axis.x2) {
1173
+ cx = axis.x2 - this.cropW;
1174
+ }
1175
+ if (cy <= axis.y1) {
1176
+ cy = axis.y1;
1177
+ }
1178
+ if (cy + this.cropH > axis.y2) {
1179
+ cy = axis.y2 - this.cropH;
1180
+ }
1181
+ }
1182
+ this.cropOffsertX = cx;
1183
+ this.cropOffsertY = cy;
1184
+ this.$emit("cropMoving", {
1185
+ moving: true,
1186
+ axis: this.getCropAxis()
1187
+ });
1188
+ this.$emit("crop-moving", {
1189
+ moving: true,
1190
+ axis: this.getCropAxis()
1191
+ });
1192
+ });
1193
+ },
1194
+ // 算出不同场景下面 图片相对于外层容器的坐标轴
1195
+ getImgAxis(x, y, scale) {
1196
+ x = x || this.x;
1197
+ y = y || this.y;
1198
+ scale = scale || this.scale;
1199
+ let obj = {
1200
+ x1: 0,
1201
+ x2: 0,
1202
+ y1: 0,
1203
+ y2: 0
1204
+ };
1205
+ let imgW = this.trueWidth * scale;
1206
+ let imgH = this.trueHeight * scale;
1207
+ switch (this.rotate) {
1208
+ case 0:
1209
+ obj.x1 = x + this.trueWidth * (1 - scale) / 2;
1210
+ obj.x2 = obj.x1 + this.trueWidth * scale;
1211
+ obj.y1 = y + this.trueHeight * (1 - scale) / 2;
1212
+ obj.y2 = obj.y1 + this.trueHeight * scale;
1213
+ break;
1214
+ case 1:
1215
+ case -1:
1216
+ case 3:
1217
+ case -3:
1218
+ obj.x1 = x + this.trueWidth * (1 - scale) / 2 + (imgW - imgH) / 2;
1219
+ obj.x2 = obj.x1 + this.trueHeight * scale;
1220
+ obj.y1 = y + this.trueHeight * (1 - scale) / 2 + (imgH - imgW) / 2;
1221
+ obj.y2 = obj.y1 + this.trueWidth * scale;
1222
+ break;
1223
+ default:
1224
+ obj.x1 = x + this.trueWidth * (1 - scale) / 2;
1225
+ obj.x2 = obj.x1 + this.trueWidth * scale;
1226
+ obj.y1 = y + this.trueHeight * (1 - scale) / 2;
1227
+ obj.y2 = obj.y1 + this.trueHeight * scale;
1228
+ break;
1229
+ }
1230
+ return obj;
1231
+ },
1232
+ // 获取截图框的坐标轴
1233
+ getCropAxis() {
1234
+ let obj = {
1235
+ x1: 0,
1236
+ x2: 0,
1237
+ y1: 0,
1238
+ y2: 0
1239
+ };
1240
+ obj.x1 = this.cropOffsertX;
1241
+ obj.x2 = obj.x1 + this.cropW;
1242
+ obj.y1 = this.cropOffsertY;
1243
+ obj.y2 = obj.y1 + this.cropH;
1244
+ return obj;
1245
+ },
1246
+ leaveCrop(e) {
1247
+ window.removeEventListener("mousemove", this.moveCrop);
1248
+ window.removeEventListener("mouseup", this.leaveCrop);
1249
+ window.removeEventListener("touchmove", this.moveCrop);
1250
+ window.removeEventListener("touchend", this.leaveCrop);
1251
+ this.$emit("cropMoving", {
1252
+ moving: false,
1253
+ axis: this.getCropAxis()
1254
+ });
1255
+ this.$emit("crop-moving", {
1256
+ moving: false,
1257
+ axis: this.getCropAxis()
1258
+ });
1259
+ },
1260
+ getCropChecked(cb) {
1261
+ let canvas = document.createElement("canvas");
1262
+ let ctx = canvas.getContext("2d");
1263
+ let img = new Image();
1264
+ let rotate = this.rotate;
1265
+ let trueWidth = this.trueWidth;
1266
+ let trueHeight = this.trueHeight;
1267
+ let cropOffsertX = this.cropOffsertX;
1268
+ let cropOffsertY = this.cropOffsertY;
1269
+ img.onload = () => {
1270
+ if (this.cropW !== 0) {
1271
+ let dpr = 1;
1272
+ if (this.high & !this.full) {
1273
+ dpr = window.devicePixelRatio;
1274
+ }
1275
+ if (this.enlarge !== 1 & !this.full) {
1276
+ dpr = Math.abs(Number(this.enlarge));
1277
+ }
1278
+ let width = this.cropW * dpr;
1279
+ let height = this.cropH * dpr;
1280
+ let imgW = trueWidth * this.scale * dpr;
1281
+ let imgH = trueHeight * this.scale * dpr;
1282
+ let dx = (this.x - cropOffsertX + this.trueWidth * (1 - this.scale) / 2) * dpr;
1283
+ let dy = (this.y - cropOffsertY + this.trueHeight * (1 - this.scale) / 2) * dpr;
1284
+ setCanvasSize(width, height);
1285
+ ctx.save();
1286
+ switch (rotate) {
1287
+ case 0:
1288
+ if (!this.full) {
1289
+ ctx.drawImage(img, dx, dy, imgW, imgH);
1290
+ } else {
1291
+ setCanvasSize(width / this.scale, height / this.scale);
1292
+ ctx.drawImage(
1293
+ img,
1294
+ dx / this.scale,
1295
+ dy / this.scale,
1296
+ imgW / this.scale,
1297
+ imgH / this.scale
1298
+ );
1299
+ }
1300
+ break;
1301
+ case 1:
1302
+ case -3:
1303
+ if (!this.full) {
1304
+ dx = dx + (imgW - imgH) / 2;
1305
+ dy = dy + (imgH - imgW) / 2;
1306
+ ctx.rotate(rotate * 90 * Math.PI / 180);
1307
+ ctx.drawImage(img, dy, -dx - imgH, imgW, imgH);
1308
+ } else {
1309
+ setCanvasSize(width / this.scale, height / this.scale);
1310
+ dx = dx / this.scale + (imgW / this.scale - imgH / this.scale) / 2;
1311
+ dy = dy / this.scale + (imgH / this.scale - imgW / this.scale) / 2;
1312
+ ctx.rotate(rotate * 90 * Math.PI / 180);
1313
+ ctx.drawImage(
1314
+ img,
1315
+ dy,
1316
+ -dx - imgH / this.scale,
1317
+ imgW / this.scale,
1318
+ imgH / this.scale
1319
+ );
1320
+ }
1321
+ break;
1322
+ case 2:
1323
+ case -2:
1324
+ if (!this.full) {
1325
+ ctx.rotate(rotate * 90 * Math.PI / 180);
1326
+ ctx.drawImage(img, -dx - imgW, -dy - imgH, imgW, imgH);
1327
+ } else {
1328
+ setCanvasSize(width / this.scale, height / this.scale);
1329
+ ctx.rotate(rotate * 90 * Math.PI / 180);
1330
+ dx = dx / this.scale;
1331
+ dy = dy / this.scale;
1332
+ ctx.drawImage(
1333
+ img,
1334
+ -dx - imgW / this.scale,
1335
+ -dy - imgH / this.scale,
1336
+ imgW / this.scale,
1337
+ imgH / this.scale
1338
+ );
1339
+ }
1340
+ break;
1341
+ case 3:
1342
+ case -1:
1343
+ if (!this.full) {
1344
+ dx = dx + (imgW - imgH) / 2;
1345
+ dy = dy + (imgH - imgW) / 2;
1346
+ ctx.rotate(rotate * 90 * Math.PI / 180);
1347
+ ctx.drawImage(img, -dy - imgW, dx, imgW, imgH);
1348
+ } else {
1349
+ setCanvasSize(width / this.scale, height / this.scale);
1350
+ dx = dx / this.scale + (imgW / this.scale - imgH / this.scale) / 2;
1351
+ dy = dy / this.scale + (imgH / this.scale - imgW / this.scale) / 2;
1352
+ ctx.rotate(rotate * 90 * Math.PI / 180);
1353
+ ctx.drawImage(
1354
+ img,
1355
+ -dy - imgW / this.scale,
1356
+ dx,
1357
+ imgW / this.scale,
1358
+ imgH / this.scale
1359
+ );
1360
+ }
1361
+ break;
1362
+ default:
1363
+ if (!this.full) {
1364
+ ctx.drawImage(img, dx, dy, imgW, imgH);
1365
+ } else {
1366
+ setCanvasSize(width / this.scale, height / this.scale);
1367
+ ctx.drawImage(
1368
+ img,
1369
+ dx / this.scale,
1370
+ dy / this.scale,
1371
+ imgW / this.scale,
1372
+ imgH / this.scale
1373
+ );
1374
+ }
1375
+ }
1376
+ ctx.restore();
1377
+ } else {
1378
+ let width = trueWidth * this.scale;
1379
+ let height = trueHeight * this.scale;
1380
+ ctx.save();
1381
+ switch (rotate) {
1382
+ case 0:
1383
+ setCanvasSize(width, height);
1384
+ ctx.drawImage(img, 0, 0, width, height);
1385
+ break;
1386
+ case 1:
1387
+ case -3:
1388
+ setCanvasSize(height, width);
1389
+ ctx.rotate(rotate * 90 * Math.PI / 180);
1390
+ ctx.drawImage(img, 0, -height, width, height);
1391
+ break;
1392
+ case 2:
1393
+ case -2:
1394
+ setCanvasSize(width, height);
1395
+ ctx.rotate(rotate * 90 * Math.PI / 180);
1396
+ ctx.drawImage(img, -width, -height, width, height);
1397
+ break;
1398
+ case 3:
1399
+ case -1:
1400
+ setCanvasSize(height, width);
1401
+ ctx.rotate(rotate * 90 * Math.PI / 180);
1402
+ ctx.drawImage(img, -width, 0, width, height);
1403
+ break;
1404
+ default:
1405
+ setCanvasSize(width, height);
1406
+ ctx.drawImage(img, 0, 0, width, height);
1407
+ }
1408
+ ctx.restore();
1409
+ }
1410
+ cb(canvas);
1411
+ };
1412
+ var s = this.img.substr(0, 4);
1413
+ if (s !== "data") {
1414
+ img.crossOrigin = "Anonymous";
1415
+ }
1416
+ img.src = this.imgs;
1417
+ const fillColor = this.fillColor;
1418
+ function setCanvasSize(width, height) {
1419
+ canvas.width = Math.round(width);
1420
+ canvas.height = Math.round(height);
1421
+ if (fillColor) {
1422
+ ctx.fillStyle = fillColor;
1423
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
1424
+ }
1425
+ }
1426
+ },
1427
+ // 获取转换成base64 的图片信息
1428
+ getCropData(cb) {
1429
+ this.getCropChecked((data) => {
1430
+ cb(data.toDataURL("image/" + this.outputType, this.outputSize));
1431
+ });
1432
+ },
1433
+ //canvas获取为blob对象
1434
+ getCropBlob(cb) {
1435
+ this.getCropChecked((data) => {
1436
+ data.toBlob(
1437
+ (blob) => cb(blob),
1438
+ "image/" + this.outputType,
1439
+ this.outputSize
1440
+ );
1441
+ });
1442
+ },
1443
+ // 自动预览函数
1444
+ showPreview() {
1445
+ if (this.isCanShow) {
1446
+ this.isCanShow = false;
1447
+ setTimeout(() => {
1448
+ this.isCanShow = true;
1449
+ }, 16);
1450
+ } else {
1451
+ return false;
1452
+ }
1453
+ let w = this.cropW;
1454
+ let h = this.cropH;
1455
+ let scale = this.scale;
1456
+ var obj = {};
1457
+ obj.div = {
1458
+ width: `${w}px`,
1459
+ height: `${h}px`
1460
+ };
1461
+ let transformX = (this.x - this.cropOffsertX) / scale;
1462
+ let transformY = (this.y - this.cropOffsertY) / scale;
1463
+ let transformZ = 0;
1464
+ obj.w = w;
1465
+ obj.h = h;
1466
+ obj.url = this.imgs;
1467
+ obj.img = {
1468
+ width: `${this.trueWidth}px`,
1469
+ height: `${this.trueHeight}px`,
1470
+ transform: `scale(${scale})translate3d(${transformX}px, ${transformY}px, ${transformZ}px)rotateZ(${this.rotate * 90}deg)`
1471
+ };
1472
+ obj.html = `
1473
+ <div class="show-preview" style="width: ${obj.w}px; height: ${obj.h}px; overflow: hidden">
1474
+ <div style="width: ${w}px; height: ${h}px">
1475
+ <img src=${obj.url} style="width: ${this.trueWidth}px; height: ${this.trueHeight}px; transform:
1476
+ scale(${scale})translate3d(${transformX}px, ${transformY}px, ${transformZ}px)rotateZ(${this.rotate * 90}deg)">
1477
+ </div>
1478
+ </div>`;
1479
+ this.$emit("realTime", obj);
1480
+ this.$emit("real-time", obj);
1481
+ },
1482
+ // reload 图片布局函数
1483
+ reload() {
1484
+ let img = new Image();
1485
+ img.onload = () => {
1486
+ this.w = parseFloat(window.getComputedStyle(this.$refs.cropper).width);
1487
+ this.h = parseFloat(window.getComputedStyle(this.$refs.cropper).height);
1488
+ this.trueWidth = img.width;
1489
+ this.trueHeight = img.height;
1490
+ if (!this.original) {
1491
+ this.scale = this.checkedMode();
1492
+ } else {
1493
+ this.scale = 1;
1494
+ }
1495
+ this.$nextTick(() => {
1496
+ this.x = -(this.trueWidth - this.trueWidth * this.scale) / 2 + (this.w - this.trueWidth * this.scale) / 2;
1497
+ this.y = -(this.trueHeight - this.trueHeight * this.scale) / 2 + (this.h - this.trueHeight * this.scale) / 2;
1498
+ this.loading = false;
1499
+ if (this.autoCrop) {
1500
+ this.goAutoCrop();
1501
+ }
1502
+ this.$emit("img-load", "success");
1503
+ this.$emit("imgLoad", "success");
1504
+ setTimeout(() => {
1505
+ this.showPreview();
1506
+ }, 20);
1507
+ });
1508
+ };
1509
+ img.onerror = () => {
1510
+ this.$emit("imgLoad", "error");
1511
+ this.$emit("img-load", "error");
1512
+ };
1513
+ img.src = this.imgs;
1514
+ },
1515
+ // 背景布局的函数
1516
+ checkedMode() {
1517
+ let scale = 1;
1518
+ let imgW = this.trueWidth;
1519
+ let imgH = this.trueHeight;
1520
+ const arr = this.mode.split(" ");
1521
+ switch (arr[0]) {
1522
+ case "contain":
1523
+ if (this.trueWidth > this.w) {
1524
+ scale = this.w / this.trueWidth;
1525
+ }
1526
+ if (this.trueHeight * scale > this.h) {
1527
+ scale = this.h / this.trueHeight;
1528
+ }
1529
+ break;
1530
+ case "cover":
1531
+ imgW = this.w;
1532
+ scale = imgW / this.trueWidth;
1533
+ imgH = imgH * scale;
1534
+ if (imgH < this.h) {
1535
+ imgH = this.h;
1536
+ scale = imgH / this.trueHeight;
1537
+ }
1538
+ break;
1539
+ default:
1540
+ try {
1541
+ let str = arr[0];
1542
+ if (str.search("px") !== -1) {
1543
+ str = str.replace("px", "");
1544
+ imgW = parseFloat(str);
1545
+ const scaleX = imgW / this.trueWidth;
1546
+ let scaleY = 1;
1547
+ let strH = arr[1];
1548
+ if (strH.search("px") !== -1) {
1549
+ strH = strH.replace("px", "");
1550
+ imgH = parseFloat(strH);
1551
+ scaleY = imgH / this.trueHeight;
1552
+ }
1553
+ scale = Math.min(scaleX, scaleY);
1554
+ }
1555
+ if (str.search("%") !== -1) {
1556
+ str = str.replace("%", "");
1557
+ imgW = parseFloat(str) / 100 * this.w;
1558
+ scale = imgW / this.trueWidth;
1559
+ }
1560
+ if (arr.length === 2 && str === "auto") {
1561
+ let str2 = arr[1];
1562
+ if (str2.search("px") !== -1) {
1563
+ str2 = str2.replace("px", "");
1564
+ imgH = parseFloat(str2);
1565
+ scale = imgH / this.trueHeight;
1566
+ }
1567
+ if (str2.search("%") !== -1) {
1568
+ str2 = str2.replace("%", "");
1569
+ imgH = parseFloat(str2) / 100 * this.h;
1570
+ scale = imgH / this.trueHeight;
1571
+ }
1572
+ }
1573
+ } catch (error2) {
1574
+ scale = 1;
1575
+ }
1576
+ }
1577
+ return scale;
1578
+ },
1579
+ // 自动截图函数
1580
+ goAutoCrop(cw, ch) {
1581
+ if (this.imgs === "" || this.imgs === null) return;
1582
+ this.clearCrop();
1583
+ this.cropping = true;
1584
+ let maxWidth = this.w;
1585
+ let maxHeight = this.h;
1586
+ if (this.centerBox) {
1587
+ const switchWH = Math.abs(this.rotate) % 2 > 0;
1588
+ let imgW = (switchWH ? this.trueHeight : this.trueWidth) * this.scale;
1589
+ let imgH = (switchWH ? this.trueWidth : this.trueHeight) * this.scale;
1590
+ maxWidth = imgW < maxWidth ? imgW : maxWidth;
1591
+ maxHeight = imgH < maxHeight ? imgH : maxHeight;
1592
+ }
1593
+ var w = cw ? cw : parseFloat(this.autoCropWidth);
1594
+ var h = ch ? ch : parseFloat(this.autoCropHeight);
1595
+ if (w === 0 || h === 0) {
1596
+ w = maxWidth * 0.8;
1597
+ h = maxHeight * 0.8;
1598
+ }
1599
+ w = w > maxWidth ? maxWidth : w;
1600
+ h = h > maxHeight ? maxHeight : h;
1601
+ if (this.fixed) {
1602
+ h = w / this.fixedNumber[0] * this.fixedNumber[1];
1603
+ }
1604
+ if (h > this.h) {
1605
+ h = this.h;
1606
+ w = h / this.fixedNumber[1] * this.fixedNumber[0];
1607
+ }
1608
+ this.changeCrop(w, h);
1609
+ },
1610
+ // 手动改变截图框大小函数
1611
+ changeCrop(w, h) {
1612
+ if (this.centerBox) {
1613
+ let axis = this.getImgAxis();
1614
+ if (w > axis.x2 - axis.x1) {
1615
+ w = axis.x2 - axis.x1;
1616
+ h = w / this.fixedNumber[0] * this.fixedNumber[1];
1617
+ }
1618
+ if (h > axis.y2 - axis.y1) {
1619
+ h = axis.y2 - axis.y1;
1620
+ w = h / this.fixedNumber[1] * this.fixedNumber[0];
1621
+ }
1622
+ }
1623
+ this.cropW = w;
1624
+ this.cropH = h;
1625
+ this.checkCropLimitSize();
1626
+ this.$nextTick(() => {
1627
+ this.cropOffsertX = (this.w - this.cropW) / 2;
1628
+ this.cropOffsertY = (this.h - this.cropH) / 2;
1629
+ if (this.centerBox) {
1630
+ this.moveCrop(null, true);
1631
+ }
1632
+ });
1633
+ },
1634
+ // 重置函数, 恢复组件置初始状态
1635
+ refresh() {
1636
+ this.img;
1637
+ this.imgs = "";
1638
+ this.scale = 1;
1639
+ this.crop = false;
1640
+ this.rotate = 0;
1641
+ this.w = 0;
1642
+ this.h = 0;
1643
+ this.trueWidth = 0;
1644
+ this.trueHeight = 0;
1645
+ this.clearCrop();
1646
+ this.$nextTick(() => {
1647
+ this.checkedImg();
1648
+ });
1649
+ },
1650
+ // 向左边旋转
1651
+ rotateLeft() {
1652
+ this.rotate = this.rotate <= -3 ? 0 : this.rotate - 1;
1653
+ },
1654
+ // 向右边旋转
1655
+ rotateRight() {
1656
+ this.rotate = this.rotate >= 3 ? 0 : this.rotate + 1;
1657
+ },
1658
+ // 清除旋转
1659
+ rotateClear() {
1660
+ this.rotate = 0;
1661
+ },
1662
+ // 图片坐标点校验
1663
+ checkoutImgAxis(x, y, scale) {
1664
+ x = x || this.x;
1665
+ y = y || this.y;
1666
+ scale = scale || this.scale;
1667
+ let canGo = true;
1668
+ if (this.centerBox) {
1669
+ let axis = this.getImgAxis(x, y, scale);
1670
+ let cropAxis = this.getCropAxis();
1671
+ if (axis.x1 >= cropAxis.x1) {
1672
+ canGo = false;
1673
+ }
1674
+ if (axis.x2 <= cropAxis.x2) {
1675
+ canGo = false;
1676
+ }
1677
+ if (axis.y1 >= cropAxis.y1) {
1678
+ canGo = false;
1679
+ }
1680
+ if (axis.y2 <= cropAxis.y2) {
1681
+ canGo = false;
1682
+ }
1683
+ if (!canGo) {
1684
+ this.changeImgScale(axis, cropAxis, scale);
1685
+ }
1686
+ }
1687
+ return canGo;
1688
+ },
1689
+ // 缩放图片,将图片坐标适配截图框坐标
1690
+ changeImgScale(axis, cropAxis, scale) {
1691
+ let trueWidth = this.trueWidth;
1692
+ let trueHeight = this.trueHeight;
1693
+ let imgW = trueWidth * scale;
1694
+ let imgH = trueHeight * scale;
1695
+ if (imgW >= this.cropW && imgH >= this.cropH) {
1696
+ this.scale = scale;
1697
+ } else {
1698
+ const cropWScale = this.cropW / trueWidth;
1699
+ const cropHScale = this.cropH / trueHeight;
1700
+ const cropScale = this.cropH <= trueHeight * cropWScale ? cropWScale : cropHScale;
1701
+ this.scale = cropScale;
1702
+ imgW = trueWidth * cropScale;
1703
+ imgH = trueHeight * cropScale;
1704
+ }
1705
+ if (!this.imgIsQqualCrop) {
1706
+ if (axis.x1 >= cropAxis.x1) {
1707
+ if (this.isRotateRightOrLeft) {
1708
+ this.x = cropAxis.x1 - (trueWidth - imgW) / 2 - (imgW - imgH) / 2;
1709
+ } else {
1710
+ this.x = cropAxis.x1 - (trueWidth - imgW) / 2;
1711
+ }
1712
+ }
1713
+ if (axis.x2 <= cropAxis.x2) {
1714
+ if (this.isRotateRightOrLeft) {
1715
+ this.x = cropAxis.x1 - (trueWidth - imgW) / 2 - (imgW - imgH) / 2 - imgH + this.cropW;
1716
+ } else {
1717
+ this.x = cropAxis.x2 - (trueWidth - imgW) / 2 - imgW;
1718
+ }
1719
+ }
1720
+ if (axis.y1 >= cropAxis.y1) {
1721
+ if (this.isRotateRightOrLeft) {
1722
+ this.y = cropAxis.y1 - (trueHeight - imgH) / 2 - (imgH - imgW) / 2;
1723
+ } else {
1724
+ this.y = cropAxis.y1 - (trueHeight - imgH) / 2;
1725
+ }
1726
+ }
1727
+ if (axis.y2 <= cropAxis.y2) {
1728
+ if (this.isRotateRightOrLeft) {
1729
+ this.y = cropAxis.y2 - (trueHeight - imgH) / 2 - (imgH - imgW) / 2 - imgW;
1730
+ } else {
1731
+ this.y = cropAxis.y2 - (trueHeight - imgH) / 2 - imgH;
1732
+ }
1733
+ }
1734
+ }
1735
+ if (imgW < this.cropW || imgH < this.cropH) {
1736
+ this.imgIsQqualCrop = true;
1737
+ }
1738
+ }
1739
+ },
1740
+ mounted() {
1741
+ this.support = "onwheel" in document.createElement("div") ? "wheel" : document.onmousewheel !== void 0 ? "mousewheel" : "DOMMouseScroll";
1742
+ let that = this;
1743
+ var u = navigator.userAgent;
1744
+ this.isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
1745
+ if (!HTMLCanvasElement.prototype.toBlob) {
1746
+ Object.defineProperty(HTMLCanvasElement.prototype, "toBlob", {
1747
+ value: function(callback, type, quality) {
1748
+ var binStr = atob(this.toDataURL(type, quality).split(",")[1]), len = binStr.length, arr = new Uint8Array(len);
1749
+ for (var i = 0; i < len; i++) {
1750
+ arr[i] = binStr.charCodeAt(i);
1751
+ }
1752
+ callback(new Blob([arr], { type: that.type || "image/png" }));
1753
+ }
1754
+ });
1755
+ }
1756
+ this.showPreview();
1757
+ this.checkedImg();
1758
+ },
1759
+ destroyed() {
1760
+ window.removeEventListener("mousemove", this.moveCrop);
1761
+ window.removeEventListener("mouseup", this.leaveCrop);
1762
+ window.removeEventListener("touchmove", this.moveCrop);
1763
+ window.removeEventListener("touchend", this.leaveCrop);
1764
+ this.cancelScale();
1765
+ }
1766
+ };
1767
+ const _hoisted_1$1 = {
1768
+ key: 0,
1769
+ class: "cropper-box"
1770
+ };
1771
+ const _hoisted_2$1 = ["src"];
1772
+ const _hoisted_3$1 = { class: "cropper-view-box" };
1773
+ const _hoisted_4 = ["src"];
1774
+ const _hoisted_5 = { key: 1 };
1775
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1776
+ return openBlock(), createElementBlock("div", {
1777
+ class: "vue-cropper",
1778
+ ref: "cropper",
1779
+ onMouseover: _cache[28] || (_cache[28] = (...args) => $options.scaleImg && $options.scaleImg(...args)),
1780
+ onMouseout: _cache[29] || (_cache[29] = (...args) => $options.cancelScale && $options.cancelScale(...args))
1781
+ }, [
1782
+ _ctx.imgs ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
1783
+ withDirectives(createElementVNode("div", {
1784
+ class: "cropper-box-canvas",
1785
+ style: normalizeStyle({
1786
+ "width": _ctx.trueWidth + "px",
1787
+ "height": _ctx.trueHeight + "px",
1788
+ "transform": "scale(" + _ctx.scale + "," + _ctx.scale + ") translate3d(" + _ctx.x / _ctx.scale + "px," + _ctx.y / _ctx.scale + "px,0)rotateZ(" + _ctx.rotate * 90 + "deg)"
1789
+ })
1790
+ }, [
1791
+ createElementVNode("img", {
1792
+ src: _ctx.imgs,
1793
+ alt: "cropper-img",
1794
+ ref: "cropperImg"
1795
+ }, null, 8, _hoisted_2$1)
1796
+ ], 4), [
1797
+ [vShow, !_ctx.loading]
1798
+ ])
1799
+ ])) : createCommentVNode("", true),
1800
+ createElementVNode("div", {
1801
+ class: normalizeClass(["cropper-drag-box", { "cropper-move": _ctx.move && !_ctx.crop, "cropper-crop": _ctx.crop, "cropper-modal": _ctx.cropping }]),
1802
+ onMousedown: _cache[0] || (_cache[0] = (...args) => $options.startMove && $options.startMove(...args)),
1803
+ onTouchstart: _cache[1] || (_cache[1] = (...args) => $options.startMove && $options.startMove(...args))
1804
+ }, null, 34),
1805
+ withDirectives(createElementVNode("div", {
1806
+ class: "cropper-crop-box",
1807
+ style: normalizeStyle({
1808
+ "width": _ctx.cropW + "px",
1809
+ "height": _ctx.cropH + "px",
1810
+ "transform": "translate3d(" + _ctx.cropOffsertX + "px," + _ctx.cropOffsertY + "px,0)"
1811
+ })
1812
+ }, [
1813
+ createElementVNode("span", _hoisted_3$1, [
1814
+ createElementVNode("img", {
1815
+ style: normalizeStyle({
1816
+ "width": _ctx.trueWidth + "px",
1817
+ "height": _ctx.trueHeight + "px",
1818
+ "transform": "scale(" + _ctx.scale + "," + _ctx.scale + ") translate3d(" + (_ctx.x - _ctx.cropOffsertX) / _ctx.scale + "px," + (_ctx.y - _ctx.cropOffsertY) / _ctx.scale + "px,0)rotateZ(" + _ctx.rotate * 90 + "deg)"
1819
+ }),
1820
+ src: _ctx.imgs,
1821
+ alt: "cropper-img"
1822
+ }, null, 12, _hoisted_4)
1823
+ ]),
1824
+ createElementVNode("span", {
1825
+ class: "cropper-face cropper-move",
1826
+ onMousedown: _cache[2] || (_cache[2] = (...args) => $options.cropMove && $options.cropMove(...args)),
1827
+ onTouchstart: _cache[3] || (_cache[3] = (...args) => $options.cropMove && $options.cropMove(...args))
1828
+ }, null, 32),
1829
+ $props.info ? (openBlock(), createElementBlock("span", {
1830
+ key: 0,
1831
+ class: "crop-info",
1832
+ style: normalizeStyle({ "top": $options.cropInfo.top })
1833
+ }, toDisplayString($options.cropInfo.width) + " × " + toDisplayString($options.cropInfo.height), 5)) : createCommentVNode("", true),
1834
+ !$props.fixedBox ? (openBlock(), createElementBlock("span", _hoisted_5, [
1835
+ createElementVNode("span", {
1836
+ class: "crop-line line-w",
1837
+ onMousedown: _cache[4] || (_cache[4] = ($event) => $options.changeCropSize($event, false, true, 0, 1)),
1838
+ onTouchstart: _cache[5] || (_cache[5] = ($event) => $options.changeCropSize($event, false, true, 0, 1))
1839
+ }, null, 32),
1840
+ createElementVNode("span", {
1841
+ class: "crop-line line-a",
1842
+ onMousedown: _cache[6] || (_cache[6] = ($event) => $options.changeCropSize($event, true, false, 1, 0)),
1843
+ onTouchstart: _cache[7] || (_cache[7] = ($event) => $options.changeCropSize($event, true, false, 1, 0))
1844
+ }, null, 32),
1845
+ createElementVNode("span", {
1846
+ class: "crop-line line-s",
1847
+ onMousedown: _cache[8] || (_cache[8] = ($event) => $options.changeCropSize($event, false, true, 0, 2)),
1848
+ onTouchstart: _cache[9] || (_cache[9] = ($event) => $options.changeCropSize($event, false, true, 0, 2))
1849
+ }, null, 32),
1850
+ createElementVNode("span", {
1851
+ class: "crop-line line-d",
1852
+ onMousedown: _cache[10] || (_cache[10] = ($event) => $options.changeCropSize($event, true, false, 2, 0)),
1853
+ onTouchstart: _cache[11] || (_cache[11] = ($event) => $options.changeCropSize($event, true, false, 2, 0))
1854
+ }, null, 32),
1855
+ createElementVNode("span", {
1856
+ class: "crop-point point1",
1857
+ onMousedown: _cache[12] || (_cache[12] = ($event) => $options.changeCropSize($event, true, true, 1, 1)),
1858
+ onTouchstart: _cache[13] || (_cache[13] = ($event) => $options.changeCropSize($event, true, true, 1, 1))
1859
+ }, null, 32),
1860
+ createElementVNode("span", {
1861
+ class: "crop-point point2",
1862
+ onMousedown: _cache[14] || (_cache[14] = ($event) => $options.changeCropSize($event, false, true, 0, 1)),
1863
+ onTouchstart: _cache[15] || (_cache[15] = ($event) => $options.changeCropSize($event, false, true, 0, 1))
1864
+ }, null, 32),
1865
+ createElementVNode("span", {
1866
+ class: "crop-point point3",
1867
+ onMousedown: _cache[16] || (_cache[16] = ($event) => $options.changeCropSize($event, true, true, 2, 1)),
1868
+ onTouchstart: _cache[17] || (_cache[17] = ($event) => $options.changeCropSize($event, true, true, 2, 1))
1869
+ }, null, 32),
1870
+ createElementVNode("span", {
1871
+ class: "crop-point point4",
1872
+ onMousedown: _cache[18] || (_cache[18] = ($event) => $options.changeCropSize($event, true, false, 1, 0)),
1873
+ onTouchstart: _cache[19] || (_cache[19] = ($event) => $options.changeCropSize($event, true, false, 1, 0))
1874
+ }, null, 32),
1875
+ createElementVNode("span", {
1876
+ class: "crop-point point5",
1877
+ onMousedown: _cache[20] || (_cache[20] = ($event) => $options.changeCropSize($event, true, false, 2, 0)),
1878
+ onTouchstart: _cache[21] || (_cache[21] = ($event) => $options.changeCropSize($event, true, false, 2, 0))
1879
+ }, null, 32),
1880
+ createElementVNode("span", {
1881
+ class: "crop-point point6",
1882
+ onMousedown: _cache[22] || (_cache[22] = ($event) => $options.changeCropSize($event, true, true, 1, 2)),
1883
+ onTouchstart: _cache[23] || (_cache[23] = ($event) => $options.changeCropSize($event, true, true, 1, 2))
1884
+ }, null, 32),
1885
+ createElementVNode("span", {
1886
+ class: "crop-point point7",
1887
+ onMousedown: _cache[24] || (_cache[24] = ($event) => $options.changeCropSize($event, false, true, 0, 2)),
1888
+ onTouchstart: _cache[25] || (_cache[25] = ($event) => $options.changeCropSize($event, false, true, 0, 2))
1889
+ }, null, 32),
1890
+ createElementVNode("span", {
1891
+ class: "crop-point point8",
1892
+ onMousedown: _cache[26] || (_cache[26] = ($event) => $options.changeCropSize($event, true, true, 2, 2)),
1893
+ onTouchstart: _cache[27] || (_cache[27] = ($event) => $options.changeCropSize($event, true, true, 2, 2))
1894
+ }, null, 32)
1895
+ ])) : createCommentVNode("", true)
1896
+ ], 4), [
1897
+ [vShow, _ctx.cropping]
1898
+ ])
1899
+ ], 544);
1900
+ }
1901
+ const VueCropper = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-8e42ffcf"]]);
1902
+ const _hoisted_1 = { class: "h-full" };
1903
+ const _hoisted_2 = { class: "avatar-upload-preview" };
1904
+ const _hoisted_3 = ["src"];
1905
+ const __default__ = defineComponent({
1906
+ name: "cropper"
1907
+ });
1908
+ const _sfc_main = /* @__PURE__ */ defineComponent({
1909
+ ...__default__,
1910
+ props: {
1911
+ avatar: { default: "" },
1912
+ close: { type: Function, default: close },
1913
+ proxyId: { default: "" }
1914
+ },
1915
+ setup(__props) {
1916
+ const { postSinglefile, postUpdateFile } = useFileController();
1917
+ const props = __props;
1918
+ let userInfos = ref({});
1919
+ onMounted(async () => {
1920
+ userInfos.value = await systemStore.get(
1921
+ "userInfo"
1922
+ );
1923
+ });
1924
+ let { avatar } = toRefs(props);
1925
+ const options = reactive({
1926
+ img: "",
1927
+ // 需要剪裁的图片
1928
+ autoCrop: true,
1929
+ // 是否默认生成截图框
1930
+ autoCropWidth: 200,
1931
+ // 默认生成截图框的宽度
1932
+ autoCropHeight: 200,
1933
+ // 默认生成截图框的长度
1934
+ fixedBox: false,
1935
+ // 是否固定截图框的大小 不允许改变
1936
+ // info: true, // 裁剪框的大小信息
1937
+ outputSize: 0.5,
1938
+ // 裁剪生成图片的质量 [1至0.1]
1939
+ outputType: "jpeg",
1940
+ // 裁剪生成图片的格式
1941
+ canScale: false,
1942
+ // 图片是否允许滚轮缩放
1943
+ fixed: false,
1944
+ // 是否开启截图框宽高固定比例
1945
+ fixedNumber: [1, 1],
1946
+ // 截图框的宽高比例 需要配合centerBox一起使用才能生效
1947
+ full: true,
1948
+ // 是否输出原图比例的截图
1949
+ canMoveBox: false,
1950
+ // 截图框能否拖动
1951
+ original: false,
1952
+ // 上传图片按照原始比例渲染
1953
+ centerBox: false,
1954
+ // 截图框是否被限制在图片里面
1955
+ infoTrue: true,
1956
+ // true 为展示真实输出图片宽高 false 展示看到的截图框宽高
1957
+ filename: ""
1958
+ // 文件名
1959
+ });
1960
+ const previews = ref({});
1961
+ const cropperRef = ref({});
1962
+ ref(false);
1963
+ let rotateClick = (type) => {
1964
+ if (type == "left") {
1965
+ cropperRef.value.rotateLeft();
1966
+ }
1967
+ if (type == "right") {
1968
+ cropperRef.value.rotateRight();
1969
+ }
1970
+ };
1971
+ let changeScale = (num) => {
1972
+ const scale = num || 1;
1973
+ cropperRef.value.changeScale(scale);
1974
+ };
1975
+ let refreshCrop = () => {
1976
+ cropperRef.value.refresh();
1977
+ };
1978
+ const realTime = (data) => {
1979
+ previews.value = data;
1980
+ };
1981
+ let requestUpload = () => {
1982
+ };
1983
+ let beforeUpload = (file) => {
1984
+ let img = [
1985
+ "image/png",
1986
+ "image/jpg",
1987
+ "image/jpeg",
1988
+ "image/PNG",
1989
+ "image/JPG",
1990
+ "image/JPEG",
1991
+ "image/gif"
1992
+ ];
1993
+ if (!img.includes(file.type)) {
1994
+ ElMessage.error("图片格式有误,请重新上传");
1995
+ return false;
1996
+ } else {
1997
+ const reader = new FileReader();
1998
+ reader.readAsDataURL(file);
1999
+ reader.onload = () => {
2000
+ options.img = reader.result;
2001
+ options.filename = file.name;
2002
+ };
2003
+ }
2004
+ };
2005
+ let uploadImg = () => {
2006
+ if (!options.img) {
2007
+ ElMessage.warning("请先选择图片");
2008
+ }
2009
+ cropperRef.value.getCropBlob(async (data) => {
2010
+ const photoRes = await postSinglefile({
2011
+ data: { file: data },
2012
+ proxy: props.proxyId
2013
+ });
2014
+ const res = await postUpdateFile({
2015
+ data: {
2016
+ id: userInfos.value.id,
2017
+ attchIdArrStr: photoRes.data.id,
2018
+ attachType: 2
2019
+ },
2020
+ proxy: props.proxyId
2021
+ });
2022
+ props.close(res);
2023
+ });
2024
+ };
2025
+ onMounted(() => {
2026
+ setTimeout(() => {
2027
+ options.img = avatar.value;
2028
+ }, 100);
2029
+ });
2030
+ return (_ctx, _cache) => {
2031
+ const _component_el_col = resolveComponent("el-col");
2032
+ const _component_el_row = resolveComponent("el-row");
2033
+ const _component_bc_icon = resolveComponent("bc-icon");
2034
+ const _component_el_button = resolveComponent("el-button");
2035
+ const _component_hs_upload = resolveComponent("hs-upload");
2036
+ return openBlock(), createElementBlock("div", _hoisted_1, [
2037
+ createVNode(_component_el_row, null, {
2038
+ default: withCtx(() => [
2039
+ createVNode(_component_el_col, {
2040
+ xs: 24,
2041
+ md: 13,
2042
+ style: { height: "350px" }
2043
+ }, {
2044
+ default: withCtx(() => [
2045
+ createVNode(VueCropper, {
2046
+ ref_key: "cropperRef",
2047
+ ref: cropperRef,
2048
+ img: options.img,
2049
+ info: true,
2050
+ infoTrue: options.infoTrue,
2051
+ "auto-crop": options.autoCrop,
2052
+ "fixed-box": options.fixedBox,
2053
+ fixedNumber: options.fixedNumber,
2054
+ fixed: options.fixed,
2055
+ centerBox: options.centerBox,
2056
+ outputType: "png",
2057
+ onRealTime: realTime
2058
+ }, null, 8, ["img", "infoTrue", "auto-crop", "fixed-box", "fixedNumber", "fixed", "centerBox"])
2059
+ ]),
2060
+ _: 1
2061
+ }),
2062
+ createVNode(_component_el_col, {
2063
+ xs: 24,
2064
+ md: 11,
2065
+ style: { height: "350px" }
2066
+ }, {
2067
+ default: withCtx(() => [
2068
+ createElementVNode("div", _hoisted_2, [
2069
+ createElementVNode("img", {
2070
+ src: previews.value.url,
2071
+ style: normalizeStyle(previews.value.img)
2072
+ }, null, 12, _hoisted_3)
2073
+ ])
2074
+ ]),
2075
+ _: 1
2076
+ })
2077
+ ]),
2078
+ _: 1
2079
+ }),
2080
+ createVNode(_component_el_row, { class: "ptb2 py-3" }, {
2081
+ default: withCtx(() => [
2082
+ createVNode(_component_el_col, {
2083
+ lg: 2,
2084
+ md: 2
2085
+ }, {
2086
+ default: withCtx(() => [
2087
+ createVNode(_component_hs_upload, {
2088
+ action: "#",
2089
+ "http-request": unref(requestUpload),
2090
+ "show-file-list": false,
2091
+ "before-upload": unref(beforeUpload),
2092
+ accept: "image/*"
2093
+ }, {
2094
+ default: withCtx(() => [
2095
+ createVNode(_component_el_button, { size: "default" }, {
2096
+ default: withCtx(() => [
2097
+ _cache[6] || (_cache[6] = createTextVNode(" 选择 ")),
2098
+ createVNode(_component_bc_icon, { name: "ele-UploadFilled" })
2099
+ ]),
2100
+ _: 1,
2101
+ __: [6]
2102
+ })
2103
+ ]),
2104
+ _: 1
2105
+ }, 8, ["http-request", "before-upload"])
2106
+ ]),
2107
+ _: 1
2108
+ }),
2109
+ createVNode(_component_el_col, {
2110
+ lg: { span: 1, offset: 1 },
2111
+ md: 2
2112
+ }, {
2113
+ default: withCtx(() => [
2114
+ createVNode(_component_el_button, {
2115
+ size: "default",
2116
+ icon: "ele-Plus",
2117
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(changeScale)(1))
2118
+ })
2119
+ ]),
2120
+ _: 1
2121
+ }),
2122
+ createVNode(_component_el_col, {
2123
+ lg: { span: 1, offset: 1 },
2124
+ md: 2
2125
+ }, {
2126
+ default: withCtx(() => [
2127
+ createVNode(_component_el_button, {
2128
+ size: "default",
2129
+ icon: "ele-Minus",
2130
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(changeScale)(-1))
2131
+ })
2132
+ ]),
2133
+ _: 1
2134
+ }),
2135
+ createVNode(_component_el_col, {
2136
+ lg: { span: 1, offset: 1 },
2137
+ md: 2
2138
+ }, {
2139
+ default: withCtx(() => [
2140
+ createVNode(_component_el_button, {
2141
+ size: "default",
2142
+ icon: "ele-RefreshLeft",
2143
+ onClick: _cache[2] || (_cache[2] = ($event) => unref(rotateClick)("left"))
2144
+ })
2145
+ ]),
2146
+ _: 1
2147
+ }),
2148
+ createVNode(_component_el_col, {
2149
+ lg: { span: 1, offset: 1 },
2150
+ md: 2
2151
+ }, {
2152
+ default: withCtx(() => [
2153
+ createVNode(_component_el_button, {
2154
+ size: "default",
2155
+ icon: "ele-RefreshRight",
2156
+ onClick: _cache[3] || (_cache[3] = ($event) => unref(rotateClick)("right"))
2157
+ })
2158
+ ]),
2159
+ _: 1
2160
+ }),
2161
+ createVNode(_component_el_col, {
2162
+ lg: { span: 1, offset: 1 },
2163
+ md: 2
2164
+ }, {
2165
+ default: withCtx(() => [
2166
+ createVNode(_component_el_button, {
2167
+ size: "default",
2168
+ onClick: _cache[4] || (_cache[4] = ($event) => unref(refreshCrop)())
2169
+ }, {
2170
+ default: withCtx(() => _cache[7] || (_cache[7] = [
2171
+ createTextVNode("重 置")
2172
+ ])),
2173
+ _: 1,
2174
+ __: [7]
2175
+ })
2176
+ ]),
2177
+ _: 1
2178
+ }),
2179
+ createVNode(_component_el_col, {
2180
+ lg: { span: 1, offset: 7 },
2181
+ md: 2
2182
+ }, {
2183
+ default: withCtx(() => [
2184
+ createVNode(_component_el_button, {
2185
+ size: "default",
2186
+ type: "primary",
2187
+ onClick: _cache[5] || (_cache[5] = ($event) => unref(uploadImg)())
2188
+ }, {
2189
+ default: withCtx(() => _cache[8] || (_cache[8] = [
2190
+ createTextVNode("提 交")
2191
+ ])),
2192
+ _: 1,
2193
+ __: [8]
2194
+ })
2195
+ ]),
2196
+ _: 1
2197
+ })
2198
+ ]),
2199
+ _: 1
2200
+ })
2201
+ ]);
2202
+ };
2203
+ }
2204
+ });
2205
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-730d1d41"]]);
2206
+ export {
2207
+ index as default
2208
+ };