@10yun/cv-mobile-ui 0.5.56 → 0.5.58

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 (368) hide show
  1. package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/config-ucharts.js +605 -605
  2. package/{ui-sdks → other}/qiun-data-charts/package.json +2 -1
  3. package/other/qiun-data-charts_2.5.0-20230101_example/App.vue +20 -0
  4. package/other/qiun-data-charts_2.5.0-20230101_example/common/uni-icons.css +542 -0
  5. package/other/qiun-data-charts_2.5.0-20230101_example/common/uni.css +246 -0
  6. package/other/qiun-data-charts_2.5.0-20230101_example/components/qiun-title-bar/qiun-title-bar.vue +51 -0
  7. package/other/qiun-data-charts_2.5.0-20230101_example/components/test-charts/test-charts.vue +48 -0
  8. package/other/qiun-data-charts_2.5.0-20230101_example/main.js +13 -0
  9. package/other/qiun-data-charts_2.5.0-20230101_example/manifest.json +75 -0
  10. package/other/qiun-data-charts_2.5.0-20230101_example/mockdata/demodata.json +448 -0
  11. package/other/qiun-data-charts_2.5.0-20230101_example/mockdata/mapdata.json +1 -0
  12. package/other/qiun-data-charts_2.5.0-20230101_example/pages/canvas/canvas.vue +142 -0
  13. package/other/qiun-data-charts_2.5.0-20230101_example/pages/echarts/echarts.vue +228 -0
  14. package/other/qiun-data-charts_2.5.0-20230101_example/pages/format-e/format-e.vue +113 -0
  15. package/other/qiun-data-charts_2.5.0-20230101_example/pages/format-u/format-u.vue +110 -0
  16. package/other/qiun-data-charts_2.5.0-20230101_example/pages/index/index.vue +58 -0
  17. package/other/qiun-data-charts_2.5.0-20230101_example/pages/layout/layout.vue +174 -0
  18. package/other/qiun-data-charts_2.5.0-20230101_example/pages/other/other.vue +233 -0
  19. package/other/qiun-data-charts_2.5.0-20230101_example/pages/tab/tab.vue +115 -0
  20. package/other/qiun-data-charts_2.5.0-20230101_example/pages/ucharts/ucharts.vue +339 -0
  21. package/other/qiun-data-charts_2.5.0-20230101_example/pages/unicloud/unicloud.vue +117 -0
  22. package/other/qiun-data-charts_2.5.0-20230101_example/pages/updata/updata.vue +212 -0
  23. package/other/qiun-data-charts_2.5.0-20230101_example/pages.json +79 -0
  24. package/other/qiun-data-charts_2.5.0-20230101_example/static/logo.png +0 -0
  25. package/other/qiun-data-charts_2.5.0-20230101_example/uni.scss +76 -0
  26. package/other/qiun-data-charts_2.5.0-20230101_example/uniCloud-aliyun/database/db_init.json +455 -0
  27. package/other/qiun-data-charts_2.5.0-20230101_example/uniCloud-aliyun/database/qiun-charts-demo.schema.json +76 -0
  28. package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate0.vue +2 -1
  29. package/other/{u-parse-2019 → u-parse}/libs/html2json.js +2 -2
  30. package/other/{uParse → u-parse}/libs/wxDiscode.js +1 -1
  31. package/other/u-parse/readme.md +102 -0
  32. package/other/{u-parse-2019 → u-parse}/u-parse.vue +1 -6
  33. package/other/u-parse2026/libs/html2json.js +2 -2
  34. package/other/u-parse2026/libs/wxDiscode.js +1 -1
  35. package/other/u-parse2026/u-parse.css +1 -0
  36. package/other/u-parse2026/u-parse.vue +1 -3
  37. package/other/uParse2/components/wxParseAudio.vue +1 -0
  38. package/other/{uParse → uParse2}/components/wxParseImg.vue +4 -4
  39. package/other/{uParse → uParse2}/components/wxParseTable.vue +15 -6
  40. package/other/{uParse → uParse2}/components/wxParseTemplate0.vue +7 -6
  41. package/other/{uParse → uParse2}/components/wxParseTemplate1.vue +10 -0
  42. package/other/{uParse → uParse2}/libs/html2json.js +2 -2
  43. package/other/{u-parse-2019 → uParse2}/libs/wxDiscode.js +1 -1
  44. package/other/{uParse/wxParse.css → uParse2/u-parse.css} +4 -4
  45. package/other/{uParse/wxParse.vue → uParse2/u-parse.vue} +18 -11
  46. package/other/uParse2/u-parse2.css +264 -0
  47. package/package.json +1 -1
  48. package/ui-cv/components/cv-dialog-bottom/cv-dialog-bottom.vue +35 -58
  49. package/ui-cv/components/cv-dialog-full/cv-dialog-full.vue +55 -62
  50. package/ui-cv/components/cv-dialog-share/cv-dialog-share.vue +7 -7
  51. package/ui-cv/components/cv-dialog-share/share.vue +1 -10
  52. package/ui-cv/components/cv-dialog-share/tui-share.vue +2 -2
  53. package/ui-cv/components/cv-filter-hm/cv-filter-hm.vue +8 -6
  54. package/ui-cv/components/cv-geo-local/cv-geo-local.vue +1 -1
  55. package/ui-cv/components/cv-icons/cv-icons.vue +29 -62
  56. package/ui-cv/components/cv-icons/iconfont/font-default-icons.js +127 -131
  57. package/ui-cv/components/cv-input-password/cv-input-password.vue +1 -1
  58. package/ui-cv/components/cv-mask-svg/cv-mask-svg.vue +1 -1
  59. package/ui-cv/components/cv-mask-svg/mixins.js +16 -12
  60. package/ui-cv/components/cv-upload-image/cv-upload-image.vue +4 -4
  61. package/ui-cv/components/cv-upload-image/demo.vue +1 -1
  62. package/ui-fireui/components/u-share-model/u-share-model.vue +1 -1
  63. package/ui-fireui/components/u-uploadsamll/u-uploadsamll.vue +1 -1
  64. package/uview-plus/components/u-button/props-old.js +159 -0
  65. package/uview-plus/components/u-button/props.js +7 -0
  66. package/uview-plus/components/u-button/u-button-old.vue +476 -0
  67. package/uview-plus/components/u-button/u-button-wu.vue +13 -10
  68. package/uview-plus/components/u-button/u-button.vue +47 -14
  69. package/uview-plus/components/u-form/form.js +13 -12
  70. package/uview-plus/components/u-parse/README.md +192 -0
  71. package/uview-plus/components/u-parse/changelog.md +163 -0
  72. package/uview-plus/components/u-parse/node/node.vue +37 -3
  73. package/{uni-ui/lib/uni-breadcrumb → uview-plus/components/u-parse}/package.json +24 -29
  74. package/uview-plus/components/u-parse/parser.js +8 -3
  75. package/uview-plus/components/u-parse/static/app-plus/up-parse/js/handler.js +1 -0
  76. package/uview-plus/components/u-parse/static/app-plus/up-parse/local-2.5.2.html +29 -0
  77. package/uview-plus/components/u-parse/u-parse.vue +29 -1
  78. package/uview-plus/components/u-upload/file.js +186 -0
  79. package/uview-plus/components/u-upload/props-old.js +176 -0
  80. package/uview-plus/components/u-upload/props.js +12 -0
  81. package/uview-plus/components/u-upload/u-upload.vue +100 -15
  82. package/uview-plus/components/u-upload/u-upload2.vue +854 -0
  83. package/uview-plus/libs/mixin/openType.js +35 -0
  84. package/other/lime-painter2/README2.md +0 -576
  85. package/other/lime-painter2/changelog.md +0 -225
  86. package/other/lime-painter2/package.json +0 -93
  87. package/other/lime-painter2/readme.md +0 -758
  88. package/other/lime-painter2/test.md +0 -45
  89. package/other/qiun-data-charts/qiun-data-charts.vue +0 -1618
  90. package/other/u-parse-2019/readme.md +0 -99
  91. package/other/uParse/components/style.css +0 -1
  92. package/other/uParse/components/wxParseAudio.vue +0 -1
  93. package/other/xt-parse/changelog.md +0 -41
  94. package/other/xt-parse/node/node.vue +0 -752
  95. package/other/xt-parse/package.json +0 -129
  96. package/other/xt-parse/parser.js +0 -1461
  97. package/other/xt-parse/props.js +0 -49
  98. package/other/xt-parse/readme.md +0 -145
  99. package/other/xt-parse/static/app-plus/u-parse/js/handler.js +0 -1
  100. package/other/xt-parse/u-parse.vue +0 -510
  101. package/plugins/luch-request/adapters/index.js +0 -131
  102. package/plugins/luch-request/core/InterceptorManager.js +0 -50
  103. package/plugins/luch-request/core/Request.js +0 -199
  104. package/plugins/luch-request/core/buildFullPath.js +0 -20
  105. package/plugins/luch-request/core/defaults.js +0 -32
  106. package/plugins/luch-request/core/dispatchRequest.js +0 -5
  107. package/plugins/luch-request/core/mergeConfig.js +0 -125
  108. package/plugins/luch-request/core/settle.js +0 -16
  109. package/plugins/luch-request/helpers/buildURL.js +0 -71
  110. package/plugins/luch-request/helpers/combineURLs.js +0 -12
  111. package/plugins/luch-request/helpers/isAbsoluteURL.js +0 -14
  112. package/plugins/luch-request/index.d.ts +0 -197
  113. package/plugins/luch-request/index.js +0 -2
  114. package/plugins/luch-request/readme.md +0 -3
  115. package/plugins/luch-request/utils/clone.js +0 -260
  116. package/plugins/luch-request/utils.js +0 -131
  117. package/ui-cv/components/cv-cell-row/cv-cell-row.vue +0 -220
  118. package/ui-cv/components/cv-dialog-share/uni-popup-share.vue +0 -139
  119. package/ui-cv/components/cv-icons/iconfont/font-action-icons.js +0 -73
  120. package/ui-cv/components/cv-icons/iconfont/font-action.css +0 -7
  121. package/ui-cv/components/cv-icons/iconfont/font-action.js +0 -5
  122. package/ui-cv/components/cv-icons/iconfont/font-arrow-icons.js +0 -47
  123. package/ui-cv/components/cv-icons/iconfont/font-arrow.css +0 -6
  124. package/ui-cv/components/cv-icons/iconfont/font-arrow.js +0 -5
  125. package/ui-cv/components/cv-icons/iconfont/font-base-icons.js +0 -92
  126. package/ui-cv/components/cv-icons/iconfont/font-base.css +0 -6
  127. package/ui-cv/components/cv-icons/iconfont/font-base.js +0 -5
  128. package/ui-cv/components/cv-icons/iconfont/font-mall-icons.js +0 -35
  129. package/ui-cv/components/cv-icons/iconfont/font-mall.css +0 -7
  130. package/ui-cv/components/cv-icons/iconfont/font-mall.js +0 -5
  131. package/ui-cv/components/cv-icons/iconfont/font-media-icons.js +0 -45
  132. package/ui-cv/components/cv-icons/iconfont/font-media.css +0 -7
  133. package/ui-cv/components/cv-icons/iconfont/font-media.js +0 -5
  134. package/ui-cv/components/cv-icons/iconfont/font-order-icons.js +0 -34
  135. package/ui-cv/components/cv-icons/iconfont/font-order.css +0 -6
  136. package/ui-cv/components/cv-icons/iconfont/font-order.js +0 -5
  137. package/ui-cv/components/cv-icons/iconfont/font-people-icons.js +0 -49
  138. package/ui-cv/components/cv-icons/iconfont/font-people.css +0 -7
  139. package/ui-cv/components/cv-icons/iconfont/font-people.js +0 -5
  140. package/ui-cv/components/cv-icons/iconfont/font-status-icons.js +0 -34
  141. package/ui-cv/components/cv-icons/iconfont/font-status.css +0 -6
  142. package/ui-cv/components/cv-icons/iconfont/font-status.js +0 -5
  143. package/ui-cv/components/cv-icons/iconfont/font-wallet-icons.js +0 -17
  144. package/ui-cv/components/cv-icons/iconfont/font-wallet.css +0 -6
  145. package/ui-cv/components/cv-icons/iconfont/font-wallet.js +0 -5
  146. package/ui-cv/components/cv-icons/icons/default-icons.js +0 -132
  147. package/ui-cv/components/cv-icons/icons/icons-action.js +0 -72
  148. package/ui-cv/components/cv-icons/icons/icons-arrow.js +0 -46
  149. package/ui-cv/components/cv-icons/icons/icons-base.js +0 -89
  150. package/ui-cv/components/cv-icons/icons/icons-mall.js +0 -34
  151. package/ui-cv/components/cv-icons/icons/icons-media.js +0 -44
  152. package/ui-cv/components/cv-icons/icons/icons-order.js +0 -33
  153. package/ui-cv/components/cv-icons/icons/icons-people.js +0 -46
  154. package/ui-cv/components/cv-icons/icons/icons-status.js +0 -32
  155. package/ui-cv/components/cv-icons/icons/icons-wallet.js +0 -15
  156. package/ui-sdks/sdk-app-update/img/logo.png +0 -0
  157. package/ui-sdks/sdk-app-update/img/update_bg.png +0 -0
  158. package/ui-sdks/sdk-app-update/img/update_bg_top.png +0 -0
  159. package/ui-sdks/sdk-app-update/sdk-app-update.vue +0 -396
  160. package/ui-sdks/sdk-app-update/xxxx +0 -62
  161. package/ui-sdks/sdk-privacy-policy/sdk-privacy-policy.vue +0 -113
  162. package/ui-sdks/sdk-u-charts/config-echarts.js +0 -420
  163. package/ui-sdks/sdk-u-charts/config-ucharts.js +0 -630
  164. package/ui-sdks/sdk-u-charts/u-charts.js +0 -7398
  165. package/ui-sdks/sdk-u-charts/u-charts.min.js +0 -1
  166. package/ui-sdks/sdk-webview-main/WebViewMain.vue +0 -1
  167. package/ui-sdks/sdk-webview-main/main.js +0 -0
  168. package/ui-sdks/sdk-webview-main/mixin.js +0 -0
  169. package/uni-ui/lib/uni-badge/changelog.md +0 -33
  170. package/uni-ui/lib/uni-badge/package.json +0 -107
  171. package/uni-ui/lib/uni-badge/readme.md +0 -8
  172. package/uni-ui/lib/uni-breadcrumb/changelog.md +0 -6
  173. package/uni-ui/lib/uni-breadcrumb/readme.md +0 -66
  174. package/uni-ui/lib/uni-calendar/changelog.md +0 -30
  175. package/uni-ui/lib/uni-calendar/package.json +0 -105
  176. package/uni-ui/lib/uni-calendar/readme.md +0 -103
  177. package/uni-ui/lib/uni-card/changelog.md +0 -26
  178. package/uni-ui/lib/uni-card/package.json +0 -107
  179. package/uni-ui/lib/uni-card/readme.md +0 -10
  180. package/uni-ui/lib/uni-collapse/changelog.md +0 -48
  181. package/uni-ui/lib/uni-collapse/package.json +0 -106
  182. package/uni-ui/lib/uni-collapse/readme.md +0 -11
  183. package/uni-ui/lib/uni-combox/changelog.md +0 -17
  184. package/uni-ui/lib/uni-combox/package.json +0 -107
  185. package/uni-ui/lib/uni-combox/readme.md +0 -10
  186. package/uni-ui/lib/uni-countdown/changelog.md +0 -30
  187. package/uni-ui/lib/uni-countdown/package.json +0 -105
  188. package/uni-ui/lib/uni-countdown/readme.md +0 -9
  189. package/uni-ui/lib/uni-data-checkbox/changelog.md +0 -51
  190. package/uni-ui/lib/uni-data-checkbox/package.json +0 -107
  191. package/uni-ui/lib/uni-data-checkbox/readme.md +0 -17
  192. package/uni-ui/lib/uni-data-picker/changelog.md +0 -81
  193. package/uni-ui/lib/uni-data-picker/package.json +0 -109
  194. package/uni-ui/lib/uni-data-picker/readme.md +0 -21
  195. package/uni-ui/lib/uni-data-select/changelog.md +0 -51
  196. package/uni-ui/lib/uni-data-select/package.json +0 -106
  197. package/uni-ui/lib/uni-data-select/readme.md +0 -7
  198. package/uni-ui/lib/uni-dateformat/changelog.md +0 -10
  199. package/uni-ui/lib/uni-dateformat/package.json +0 -107
  200. package/uni-ui/lib/uni-dateformat/readme.md +0 -10
  201. package/uni-ui/lib/uni-datetime-picker/changelog.md +0 -177
  202. package/uni-ui/lib/uni-datetime-picker/package.json +0 -107
  203. package/uni-ui/lib/uni-datetime-picker/readme.md +0 -20
  204. package/uni-ui/lib/uni-drawer/changelog.md +0 -13
  205. package/uni-ui/lib/uni-drawer/package.json +0 -106
  206. package/uni-ui/lib/uni-drawer/readme.md +0 -9
  207. package/uni-ui/lib/uni-easyinput/changelog.md +0 -121
  208. package/uni-ui/lib/uni-easyinput/package.json +0 -107
  209. package/uni-ui/lib/uni-easyinput/readme.md +0 -10
  210. package/uni-ui/lib/uni-fab/changelog.md +0 -25
  211. package/uni-ui/lib/uni-fab/package.json +0 -107
  212. package/uni-ui/lib/uni-fab/readme.md +0 -8
  213. package/uni-ui/lib/uni-fav/changelog.md +0 -19
  214. package/uni-ui/lib/uni-fav/package.json +0 -106
  215. package/uni-ui/lib/uni-fav/readme.md +0 -9
  216. package/uni-ui/lib/uni-file-picker/changelog.md +0 -91
  217. package/uni-ui/lib/uni-file-picker/package.json +0 -105
  218. package/uni-ui/lib/uni-file-picker/readme.md +0 -10
  219. package/uni-ui/lib/uni-forms/changelog.md +0 -100
  220. package/uni-ui/lib/uni-forms/package.json +0 -107
  221. package/uni-ui/lib/uni-forms/readme.md +0 -22
  222. package/uni-ui/lib/uni-goods-nav/changelog.md +0 -18
  223. package/uni-ui/lib/uni-goods-nav/package.json +0 -105
  224. package/uni-ui/lib/uni-goods-nav/readme.md +0 -9
  225. package/uni-ui/lib/uni-grid/changelog.md +0 -13
  226. package/uni-ui/lib/uni-grid/package.json +0 -106
  227. package/uni-ui/lib/uni-grid/readme.md +0 -10
  228. package/uni-ui/lib/uni-group/changelog.md +0 -16
  229. package/uni-ui/lib/uni-group/package.json +0 -106
  230. package/uni-ui/lib/uni-group/readme.md +0 -8
  231. package/uni-ui/lib/uni-icons/changelog.md +0 -44
  232. package/uni-ui/lib/uni-icons/package.json +0 -111
  233. package/uni-ui/lib/uni-icons/readme.md +0 -7
  234. package/uni-ui/lib/uni-indexed-list/changelog.md +0 -19
  235. package/uni-ui/lib/uni-indexed-list/package.json +0 -107
  236. package/uni-ui/lib/uni-indexed-list/readme.md +0 -10
  237. package/uni-ui/lib/uni-link/changelog.md +0 -17
  238. package/uni-ui/lib/uni-link/package.json +0 -106
  239. package/uni-ui/lib/uni-link/readme.md +0 -10
  240. package/uni-ui/lib/uni-list/changelog.md +0 -52
  241. package/uni-ui/lib/uni-list/package.json +0 -108
  242. package/uni-ui/lib/uni-list/readme.md +0 -44
  243. package/uni-ui/lib/uni-load-more/changelog.md +0 -27
  244. package/uni-ui/lib/uni-load-more/package.json +0 -105
  245. package/uni-ui/lib/uni-load-more/readme.md +0 -12
  246. package/uni-ui/lib/uni-nav-bar/changelog.md +0 -64
  247. package/uni-ui/lib/uni-nav-bar/package.json +0 -106
  248. package/uni-ui/lib/uni-nav-bar/readme.md +0 -13
  249. package/uni-ui/lib/uni-notice-bar/changelog.md +0 -22
  250. package/uni-ui/lib/uni-notice-bar/package.json +0 -107
  251. package/uni-ui/lib/uni-notice-bar/readme.md +0 -11
  252. package/uni-ui/lib/uni-number-box/changelog.md +0 -39
  253. package/uni-ui/lib/uni-number-box/package.json +0 -104
  254. package/uni-ui/lib/uni-number-box/readme.md +0 -11
  255. package/uni-ui/lib/uni-pagination/changelog.md +0 -27
  256. package/uni-ui/lib/uni-pagination/package.json +0 -106
  257. package/uni-ui/lib/uni-pagination/readme.md +0 -10
  258. package/uni-ui/lib/uni-popup/changelog.md +0 -102
  259. package/uni-ui/lib/uni-popup/package.json +0 -107
  260. package/uni-ui/lib/uni-popup/readme.md +0 -15
  261. package/uni-ui/lib/uni-rate/changelog.md +0 -27
  262. package/uni-ui/lib/uni-rate/package.json +0 -106
  263. package/uni-ui/lib/uni-rate/readme.md +0 -11
  264. package/uni-ui/lib/uni-row/changelog.md +0 -10
  265. package/uni-ui/lib/uni-row/package.json +0 -106
  266. package/uni-ui/lib/uni-row/readme.md +0 -9
  267. package/uni-ui/lib/uni-scss/changelog.md +0 -8
  268. package/uni-ui/lib/uni-scss/package.json +0 -99
  269. package/uni-ui/lib/uni-scss/readme.md +0 -3
  270. package/uni-ui/lib/uni-search-bar/changelog.md +0 -47
  271. package/uni-ui/lib/uni-search-bar/package.json +0 -106
  272. package/uni-ui/lib/uni-search-bar/readme.md +0 -12
  273. package/uni-ui/lib/uni-section/changelog.md +0 -2
  274. package/uni-ui/lib/uni-section/package.json +0 -104
  275. package/uni-ui/lib/uni-section/readme.md +0 -7
  276. package/uni-ui/lib/uni-segmented-control/changelog.md +0 -15
  277. package/uni-ui/lib/uni-segmented-control/package.json +0 -106
  278. package/uni-ui/lib/uni-segmented-control/readme.md +0 -11
  279. package/uni-ui/lib/uni-steps/changelog.md +0 -18
  280. package/uni-ui/lib/uni-steps/package.json +0 -106
  281. package/uni-ui/lib/uni-steps/readme.md +0 -11
  282. package/uni-ui/lib/uni-swipe-action/changelog.md +0 -60
  283. package/uni-ui/lib/uni-swipe-action/package.json +0 -113
  284. package/uni-ui/lib/uni-swipe-action/readme.md +0 -10
  285. package/uni-ui/lib/uni-swiper-dot/changelog.md +0 -12
  286. package/uni-ui/lib/uni-swiper-dot/package.json +0 -106
  287. package/uni-ui/lib/uni-swiper-dot/readme.md +0 -10
  288. package/uni-ui/lib/uni-table/changelog.md +0 -35
  289. package/uni-ui/lib/uni-table/package.json +0 -106
  290. package/uni-ui/lib/uni-table/readme.md +0 -11
  291. package/uni-ui/lib/uni-tag/changelog.md +0 -25
  292. package/uni-ui/lib/uni-tag/package.json +0 -106
  293. package/uni-ui/lib/uni-tag/readme.md +0 -11
  294. package/uni-ui/lib/uni-title/changelog.md +0 -10
  295. package/uni-ui/lib/uni-title/package.json +0 -107
  296. package/uni-ui/lib/uni-title/readme.md +0 -12
  297. package/uni-ui/lib/uni-tooltip/changelog.md +0 -16
  298. package/uni-ui/lib/uni-tooltip/package.json +0 -104
  299. package/uni-ui/lib/uni-tooltip/readme.md +0 -7
  300. package/uni-ui/lib/uni-transition/changelog.md +0 -31
  301. package/uni-ui/lib/uni-transition/package.json +0 -112
  302. package/uni-ui/lib/uni-transition/readme.md +0 -10
  303. package/uni-ui/lib/uni-ui/changelog.md +0 -639
  304. package/uni-ui/lib/uni-ui/package.json +0 -148
  305. package/uni-ui/lib/uni-ui/readme.md +0 -247
  306. package/uview-plus/libs/mixin/openType2.js +0 -60
  307. /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/canvas.js +0 -0
  308. /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/draw.js +0 -0
  309. /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/draw2.js +0 -0
  310. /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/gradient.js +0 -0
  311. /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/index.vue +0 -0
  312. /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/index2.vue +0 -0
  313. /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/layout.js +0 -0
  314. /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/qrcode.js +0 -0
  315. /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/utils.js +0 -0
  316. /package/{ui-sdks → other}/qiun-data-charts/changelog.md +0 -0
  317. /package/{ui-sdks → other}/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue +0 -0
  318. /package/{ui-sdks → other}/qiun-data-charts/components/qiun-error/qiun-error.vue +0 -0
  319. /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading1.vue +0 -0
  320. /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading2.vue +0 -0
  321. /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading3.vue +0 -0
  322. /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading4.vue +0 -0
  323. /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading5.vue +0 -0
  324. /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/qiun-loading.vue +0 -0
  325. /package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/config-echarts.js +0 -0
  326. /package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/readme.md +0 -0
  327. /package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/u-charts.js +0 -0
  328. /package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/u-charts.min.js +0 -0
  329. /package/{ui-sdks/sdk-u-charts → other/qiun-data-charts/js_sdk2}/app-echarts.min.js +0 -0
  330. /package/{ui-sdks/sdk-u-charts → other/qiun-data-charts/js_sdk2}/h5-echarts.min.js +0 -0
  331. /package/{ui-sdks → other}/qiun-data-charts/license.md +0 -0
  332. /package/{ui-sdks → other}/qiun-data-charts/readme.md +0 -0
  333. /package/{ui-sdks → other}/qiun-data-charts/static/app-plus/echarts.min.js +0 -0
  334. /package/{ui-sdks → other}/qiun-data-charts/static/h5/echarts.min.js +0 -0
  335. /package/{ui-sdks → other}/tui-clipboard/tui-clipboard.js +0 -0
  336. /package/other/{u-parse-2019 → u-parse}/components/wxParseAudio.vue +0 -0
  337. /package/other/{u-parse-2019 → u-parse}/components/wxParseImg.vue +0 -0
  338. /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate1.vue +0 -0
  339. /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate10.vue +0 -0
  340. /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate11.vue +0 -0
  341. /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate2.vue +0 -0
  342. /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate3.vue +0 -0
  343. /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate4.vue +0 -0
  344. /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate5.vue +0 -0
  345. /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate6.vue +0 -0
  346. /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate7.vue +0 -0
  347. /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate8.vue +0 -0
  348. /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate9.vue +0 -0
  349. /package/other/{u-parse-2019 → u-parse}/components/wxParseVideo.vue +0 -0
  350. /package/other/{u-parse-2019 → u-parse}/libs/htmlparser.js +0 -0
  351. /package/other/{u-parse-2019 → u-parse}/u-parse.css +0 -0
  352. /package/other/{uParse → uParse2}/components/wxParseTemplate10.vue +0 -0
  353. /package/other/{uParse → uParse2}/components/wxParseTemplate11.vue +0 -0
  354. /package/other/{uParse → uParse2}/components/wxParseTemplate2.vue +0 -0
  355. /package/other/{uParse → uParse2}/components/wxParseTemplate3.vue +0 -0
  356. /package/other/{uParse → uParse2}/components/wxParseTemplate4.vue +0 -0
  357. /package/other/{uParse → uParse2}/components/wxParseTemplate5.vue +0 -0
  358. /package/other/{uParse → uParse2}/components/wxParseTemplate6.vue +0 -0
  359. /package/other/{uParse → uParse2}/components/wxParseTemplate7.vue +0 -0
  360. /package/other/{uParse → uParse2}/components/wxParseTemplate8.vue +0 -0
  361. /package/other/{uParse → uParse2}/components/wxParseTemplate9.vue +0 -0
  362. /package/other/{uParse → uParse2}/components/wxParseVideo.vue +0 -0
  363. /package/other/{uParse → uParse2}/editor.css +0 -0
  364. /package/other/{uParse → uParse2}/libs/htmlparser.js +0 -0
  365. /package/{other/xt-parse/static/app-plus/u-parse → uview-plus/components/u-parse/static/app-plus/up-parse}/js/handler2.js +0 -0
  366. /package/{other/xt-parse/static/app-plus/u-parse → uview-plus/components/u-parse/static/app-plus/up-parse}/js/uni.webview.min.js +0 -0
  367. /package/{other/xt-parse/static/app-plus/u-parse → uview-plus/components/u-parse/static/app-plus/up-parse}/js/uni.webview.min2.js +0 -0
  368. /package/{other/xt-parse/static/app-plus/u-parse → uview-plus/components/u-parse/static/app-plus/up-parse}/local.html +0 -0
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <view :id="attrs.id" :class="'_block _' + name + ' ' + attrs.class" :style="attrs.style">
3
- <block v-for="(n, i) in childs" v-bind:key="i">
3
+ <block v-for="(n, i) in nodes" v-bind:key="i">
4
4
  <!-- 图片 -->
5
5
  <!-- 占位图 -->
6
6
  <image
@@ -145,6 +145,8 @@
145
145
  :src="n.src[ctrl[i] || 0]"
146
146
  :data-i="i"
147
147
  @play="play"
148
+ @pause="mediaEvent"
149
+ @fullscreenchange="mediaEvent"
148
150
  @error="mediaError"
149
151
  />
150
152
  <!-- #endif -->
@@ -173,6 +175,7 @@
173
175
  :src="n.src[ctrl[i] || 0]"
174
176
  :data-i="i"
175
177
  @play="play"
178
+ @pause="mediaEvent"
176
179
  @error="mediaError"
177
180
  />
178
181
  <!-- #endif -->
@@ -212,7 +215,7 @@
212
215
  </block>
213
216
  </view>
214
217
  </view>
215
- <!-- insert -->
218
+
216
219
  <!-- 富文本 -->
217
220
  <!-- #ifdef H5 || ((MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE2) -->
218
221
  <rich-text
@@ -298,8 +301,9 @@ export default {
298
301
  data() {
299
302
  return {
300
303
  ctrl: {},
304
+ nodes: [],
301
305
  // #ifdef MP-WEIXIN
302
- isiOS: uni.getSystemInfoSync().system.includes('iOS')
306
+ isiOS: (uni.canIUse('getDeviceInfo') ? uni.getDeviceInfo() : uni.getSystemInfoSync()).system.includes('iOS')
303
307
  // #endif
304
308
  };
305
309
  },
@@ -314,6 +318,18 @@ export default {
314
318
  childs: Array,
315
319
  opts: Array
316
320
  },
321
+ watch: {
322
+ childs: {
323
+ handler(nodes) {
324
+ // 列表缩短会刷新整个列表,因此进行空填充
325
+ while (this.nodes.length > nodes.length) {
326
+ nodes.push({});
327
+ }
328
+ this.nodes = nodes;
329
+ },
330
+ immediate: true
331
+ }
332
+ },
317
333
  components: {
318
334
  // #ifndef ((H5 || APP-PLUS) && VUE3) || APP-HARMONY
319
335
  node
@@ -321,6 +337,7 @@ export default {
321
337
  },
322
338
  mounted() {
323
339
  this.$nextTick(() => {
340
+ // for (this.root = this.$parent; this.root.$options.name !== 'mp-html'; this.root = this.root.$parent);
324
341
  // 修复可能导致死循环的问题
325
342
  for (this.root = this?.$parent; this.root && this.root?.$options.name !== 'up-parse'; this.root = this.root?.$parent);
326
343
  });
@@ -401,6 +418,23 @@ export default {
401
418
  }
402
419
  // #endif
403
420
  },
421
+ /**
422
+ * @description 音视频其他事件
423
+ * @param {Event} e
424
+ */
425
+ mediaEvent(e) {
426
+ const i = e.currentTarget.dataset.i;
427
+ const node = this.childs[i];
428
+ this.root.$emit(e.type, {
429
+ ...e.detail,
430
+ source: node.name,
431
+ attrs: {
432
+ ...node.attrs,
433
+ src: node.src[this.ctrl[i] || 0]
434
+ }
435
+ });
436
+ },
437
+
404
438
  /**
405
439
  * @description 图片点击事件
406
440
  * @param {Event} e
@@ -1,24 +1,16 @@
1
1
  {
2
- "id": "uni-breadcrumb",
3
- "displayName": "uni-breadcrumb 面包屑",
4
- "version": "0.1.2",
5
- "description": "Breadcrumb 面包屑",
2
+ "id": "mp-html",
3
+ "displayName": "mp-html 富文本组件【全端支持,支持编辑、latex等扩展】",
4
+ "version": "v2.5.2",
5
+ "description": "一个强大的富文本组件,高效轻量,功能丰富",
6
6
  "keywords": [
7
- "uni-breadcrumb",
8
- "breadcrumb",
9
- "uni-ui",
10
- "面包屑导航",
11
- "面包屑"
7
+ "富文本",
8
+ "编辑器",
9
+ "html",
10
+ "rich-text",
11
+ "editor"
12
12
  ],
13
- "repository": "",
14
- "engines": {
15
- "HBuilderX": "^3.1.0",
16
- "uni-app": "^4.05",
17
- "uni-app-x": ""
18
- },
19
- "directories": {
20
- "example": "../../temps/example_temps"
21
- },
13
+ "repository": "https://github.com/jin-yufeng/mp-html",
22
14
  "dcloudext": {
23
15
  "sale": {
24
16
  "regular": {
@@ -36,19 +28,17 @@
36
28
  "data": "无",
37
29
  "permissions": "无"
38
30
  },
39
- "npmurl": "",
31
+ "npmurl": "https://www.npmjs.com/package/mp-html",
40
32
  "type": "component-vue",
41
33
  "darkmode": "x",
42
34
  "i18n": "x",
43
35
  "widescreen": "x"
44
36
  },
45
37
  "uni_modules": {
46
- "dependencies": [],
47
- "encrypt": [],
48
38
  "platforms": {
49
39
  "cloud": {
50
- "tcb": "x",
51
- "aliyun": "x",
40
+ "tcb": "",
41
+ "aliyun": "",
52
42
  "alipay": "x"
53
43
  },
54
44
  "client": {
@@ -66,22 +56,22 @@
66
56
  "nvue": "√",
67
57
  "android": "√",
68
58
  "ios": "√",
69
- "harmony": ""
59
+ "harmony": "-"
70
60
  },
71
61
  "mp": {
72
62
  "weixin": "√",
73
63
  "alipay": "√",
74
- "toutiao": "",
64
+ "toutiao": "-",
75
65
  "baidu": "√",
76
66
  "kuaishou": "-",
77
67
  "jd": "-",
78
68
  "harmony": "-",
79
69
  "qq": "√",
80
- "lark": "-"
70
+ "lark": ""
81
71
  },
82
72
  "quickapp": {
83
- "huawei": "",
84
- "union": ""
73
+ "huawei": "-",
74
+ "union": "-"
85
75
  }
86
76
  },
87
77
  "uni-app-x": {
@@ -100,5 +90,10 @@
100
90
  }
101
91
  }
102
92
  }
93
+ },
94
+ "engines": {
95
+ "HBuilderX": "^3.1.0",
96
+ "uni-app": "^3.6.15",
97
+ "uni-app-x": ""
103
98
  }
104
- }
99
+ }
@@ -79,13 +79,18 @@ const tagSelector = {}
79
79
  let windowWidth, system
80
80
 
81
81
  // #ifdef APP || H5 || MP-WEIXIN
82
- windowWidth = uni.getWindowInfo().windowWidth
83
- system = uni.getDeviceInfo().system
82
+ if (uni.canIUse('getWindowInfo')) {
83
+ windowWidth = uni.getWindowInfo().windowWidth
84
+ system = uni.getDeviceInfo().system
85
+ } else {
86
+ const systemInfo = uni.getSystemInfoSync()
87
+ windowWidth = systemInfo.windowWidth
88
+ system = systemInfo.system
89
+ }
84
90
  // #endif
85
91
  // #ifndef APP || H5 || MP-WEIXIN
86
92
  const systemInfo = uni.getSystemInfoSync()
87
93
  windowWidth = systemInfo.windowWidth
88
- system = systemInfo.system
89
94
  // #endif
90
95
  const blankChar = makeMap(' ,\r,\n,\t,\f')
91
96
  let idIndex = 0
@@ -0,0 +1 @@
1
+ "use strict";function t(t){for(var e=Object.create(null),n=t.attributes.length;n--;)e[t.attributes[n].name]=t.attributes[n].value;return e}function e(){a[1]&&(this.src=a[1],this.onerror=null),this.onclick=null,this.ontouchstart=null,uni.postMessage({data:{action:"onError",source:"img",attrs:t(this)}})}function n(){window.unloadimgs-=1,0===window.unloadimgs&&uni.postMessage({data:{action:"onReady"}})}function o(r,s,c){for(var d=0;d<r.length;d++)!function(){var u,l=r[d];if(l.type&&"node"!==l.type)u=document.createTextNode(l.text.replace(/&amp;/g,"&"));else{var g=l.name;"svg"===g&&(c="http://www.w3.org/2000/svg"),"html"!==g&&"body"!==g||(g="div"),u=c?document.createElementNS(c,g):document.createElement(g);for(var p in l.attrs)u.setAttribute(p,l.attrs[p]);if(l.children&&o(l.children,u,c),"img"===g){if(window.unloadimgs+=1,u.onload=n,u.onerror=n,!u.src&&u.getAttribute("data-src")&&(u.src=u.getAttribute("data-src")),l.attrs.ignore||(u.onclick=function(e){e.stopPropagation(),uni.postMessage({data:{action:"onImgTap",attrs:t(this)}})}),a[2]){var h=new Image;h.src=u.src,u.src=a[2],h.onload=function(){u.src=this.src},h.onerror=function(){u.onerror()}}u.onerror=e}else if("a"===g)u.addEventListener("click",function(e){e.stopPropagation(),e.preventDefault();var n,o=this.getAttribute("href");o&&"#"===o[0]&&(n=(document.getElementById(o.substr(1))||{}).offsetTop),uni.postMessage({data:{action:"onLinkTap",attrs:t(this),offset:n}})},!0);else if("video"===g||"audio"===g)i.push(u),l.attrs.autoplay||l.attrs.controls||u.setAttribute("controls","true"),u.onplay=function(){if(uni.postMessage({data:{action:"onPlay"}}),a[3])for(var t=0;t<i.length;t++)i[t]!==this&&i[t].pause()},u.onerror=function(){uni.postMessage({data:{action:"onError",source:g,attrs:t(this)}})};else if("table"===g&&a[4]&&!u.style.cssText.includes("inline")){var f=document.createElement("div");f.style.overflow="auto",f.appendChild(u),u=f}else"svg"===g&&(c=void 0)}s.appendChild(u)}()}document.addEventListener("UniAppJSBridgeReady",function(){document.body.onclick=function(){return uni.postMessage({data:{action:"onClick"}})},uni.postMessage({data:{action:"onJSBridgeReady"}})});var a,i=[];window.setContent=function(t,e,n){var r=document.getElementById("content");e[0]&&(document.body.style.cssText=e[0]),e[5]||(r.style.userSelect="none"),n||(r.innerHTML="",i=[]),a=e,window.unloadimgs=0;var s=document.createDocumentFragment();o(t,s),r.appendChild(s);var c=r.scrollHeight;uni.postMessage({data:{action:"onLoad",height:c}}),window.unloadimgs||uni.postMessage({data:{action:"onReady",height:c}}),clearInterval(window.timer),window.timer=setInterval(function(){r.scrollHeight!==c&&(c=r.scrollHeight,uni.postMessage({data:{action:"onHeightChange",height:c}}))},350)},window.onunload=function(){clearInterval(window.timer)};
@@ -0,0 +1,29 @@
1
+ <head>
2
+ <meta charset="utf-8" />
3
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
4
+ <style>
5
+ body,
6
+ html {
7
+ width: 100%;
8
+ height: 100%;
9
+ overflow-x: scroll;
10
+ overflow-y: hidden;
11
+ }
12
+ body {
13
+ margin: 0;
14
+ }
15
+ video {
16
+ width: 300px;
17
+ height: 225px;
18
+ }
19
+ img {
20
+ max-width: 100%;
21
+ -webkit-touch-callout: none;
22
+ }
23
+ </style>
24
+ </head>
25
+ <body>
26
+ <div id="content" style="overflow: hidden"></div>
27
+ <script type="text/javascript" src="./js/uni.webview.min.js"></script>
28
+ <script type="text/javascript" src="./js/handler.js"></script>
29
+ </body>
@@ -8,6 +8,8 @@
8
8
  <web-view
9
9
  ref="web"
10
10
  src="/static/app-plus/mp-html/local.html"
11
+ src2="./static/app-plus/u-parse/local.html"
12
+ src-old="/uni_modules/mp-html/static/app-plus/mp-html/local.html"
11
13
  :style="'margin-top:-2px;height:' + height + 'px'"
12
14
  @onPostMessage="_onMessage"
13
15
  />
@@ -16,7 +18,7 @@
16
18
  </template>
17
19
  <script>
18
20
  /**
19
- * mp-html v2.5.1
21
+ * mp-html v2.5.2
20
22
  * @description 富文本组件
21
23
  * @tutorial https://github.com/jin-yufeng/mp-html
22
24
  * @property {String} container-style 容器的样式
@@ -40,6 +42,8 @@
40
42
  * @event {Function} linktap 链接被点击时触发
41
43
  * @event {Function} play 音视频播放时触发
42
44
  * @event {Function} error 媒体加载出错时触发
45
+ * @event {Function} pause 音视频暂停时触发
46
+ * @event {Function} fullscreenchange 视频全屏状态变化时触发
43
47
  */
44
48
  // #ifndef APP-PLUS-NVUE
45
49
  import node from './node/node';
@@ -117,6 +121,7 @@ export default {
117
121
  watch: {
118
122
  content(content) {
119
123
  this.setContent(content);
124
+ // 20260323基于xt-parse this.setContent(this.handelBlank(content));
120
125
  }
121
126
  },
122
127
  created() {
@@ -128,12 +133,35 @@ export default {
128
133
  mounted() {
129
134
  if (this.content && !this.nodes.length) {
130
135
  this.setContent(this.content);
136
+ // 20260323 基于xt-parse this.setContent(this.handelBlank(this.content));
131
137
  }
132
138
  },
133
139
  beforeUnmount() {
134
140
  this._hook('onDetached');
135
141
  },
142
+ beforeDestroy() {
143
+ this._hook('onDetached');
144
+ },
136
145
  methods: {
146
+ /**
147
+ * @description
148
+ * 该函数主要用于处理传入的字符串,首先将连续的空格(两个及以上)替换为 `&nbsp;`,
149
+ * 然后将空的段落标签 `<p></p>` 替换为 `<p><br></p>`。常用于处理 HTML 内容中的空白字符和空段落。
150
+ * @param {string} e - 需要处理的字符串,可能包含空白字符和空段落标签
151
+ * @returns {string} - 处理后的字符串,空格已替换为 `&nbsp;`,空段落标签已替换为 `<p><br></p>`
152
+ */
153
+ handelBlank(e) {
154
+ if (!e) return; // 如果传入的参数为空,则直接返回
155
+ let temp;
156
+ // 替换连续空格(两个及以上)为 &nbsp;
157
+ temp = e.replace(/(\s{2,})(?![^<>]*>)/g, function (match) {
158
+ return match.replace(/ /g, '&nbsp;'); // 将匹配到的空格替换为 &nbsp;
159
+ });
160
+ // 替换空的段落标签 <p></p> 为 <p><br></p>
161
+ temp = temp.replace(/<p><\/p>/g, '<p><br></p>');
162
+ return temp; // 返回处理后的字符串
163
+ },
164
+
137
165
  /**
138
166
  * @description 将锚点跳转的范围限定在一个 scroll-view 内
139
167
  * @param {Object} page scroll-view 所在页面的示例
@@ -0,0 +1,186 @@
1
+ // 重构数据结构为双向映射,便于快速查找
2
+ const MIME_MAPPINGS = (() => {
3
+ const mappings = {
4
+ // 图片格式
5
+ svg: ['image/svg+xml', 'image/svg'],
6
+ jpg: ['image/jpeg', 'image/jpg'],
7
+ jpeg: ['image/jpeg'],
8
+ png: ['image/png'],
9
+ gif: ['image/gif'],
10
+ webp: ['image/webp'],
11
+ bmp: ['image/bmp', 'image/x-bmp', 'image/x-ms-bmp'],
12
+ ico: ['image/x-icon', 'image/vnd.microsoft.icon'],
13
+ tiff: ['image/tiff', 'image/tif', 'image/x-tiff'],
14
+ apng: ['image/apng'],
15
+ avif: ['image/avif'],
16
+ heic: ['image/heic'],
17
+
18
+ // 文档格式
19
+ pdf: ['application/pdf'],
20
+ txt: ['text/plain'],
21
+ csv: ['text/csv'],
22
+ json: ['application/json'],
23
+ xml: ['application/xml'],
24
+
25
+ // Office 文档
26
+ doc: ['application/msword'],
27
+ docx: ['application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
28
+ xls: ['application/vnd.ms-excel'],
29
+ xlsx: ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
30
+ ppt: ['application/vnd.ms-powerpoint'],
31
+ pptx: ['application/vnd.openxmlformats-officedocument.presentationml.presentation'],
32
+
33
+ // 压缩文件
34
+ zip: ['application/zip'],
35
+ rar: ['application/x-rar-compressed'],
36
+ '7z': ['application/x-7z-compressed'],
37
+
38
+ // 音频/视频
39
+ mp3: ['audio/mpeg'],
40
+ mp4: ['video/mp4'],
41
+ mov: ['video/quicktime'],
42
+ avi: ['video/x-msvideo'],
43
+ wav: ['audio/wav']
44
+ };
45
+
46
+ // 创建双向映射
47
+ const extensionToMime = {};
48
+ const mimeToExtension = {};
49
+
50
+ for (const [ext, mimes] of Object.entries(mappings)) {
51
+ extensionToMime[ext] = mimes[0]; // 每个扩展名映射到第一个MIME类型
52
+
53
+ for (const mime of mimes) {
54
+ mimeToExtension[mime] = ext;
55
+ }
56
+ }
57
+ return { extensionToMime, mimeToExtension };
58
+ })();
59
+ /**
60
+ * 根据MIME类型获取文件扩展名
61
+ * @param {string} type - MIME类型(如 'image/jpeg')
62
+ * @returns {string} 对应的文件扩展名(默认返回'jpg')
63
+ */
64
+ export function fileMimeToExtension(type) {
65
+ if (!type) return 'jpg';
66
+
67
+ const normalizedType = type.toLowerCase().trim();
68
+ return MIME_MAPPINGS.mimeToExtension[normalizedType] || 'jpg';
69
+ }
70
+ /**
71
+ * 根据文件扩展名获取MIME类型
72
+ * @param {string} ext - 文件扩展名(如 'jpg')
73
+ * @returns {string} 对应的MIME类型(默认返回空字符串)
74
+ */
75
+ export function fileExtensionToMime(ext) {
76
+ if (!ext) return '';
77
+ // 处理带点的情况(如 '.jpg')
78
+ const normalizedExt = ext.replace(/^\./, '').toLowerCase();
79
+ return MIME_MAPPINGS.extensionToMime[normalizedExt] || '';
80
+ }
81
+
82
+ export function generateUniqidName() {
83
+ // 获取当前日期时间,格式化为 YYYYMMDDHHmmss
84
+ const now = new Date();
85
+ const datePart = [
86
+ now.getFullYear(),
87
+ String(now.getMonth() + 1).padStart(2, '0'),
88
+ String(now.getDate()).padStart(2, '0'),
89
+ String(now.getHours()).padStart(2, '0'),
90
+ String(now.getMinutes()).padStart(2, '0'),
91
+ String(now.getSeconds()).padStart(2, '0')
92
+ ].join('');
93
+
94
+ // 生成唯一ID部分(类似PHP的uniqid)
95
+ const uniquePart = Math.random().toString(36).substring(2, 10);
96
+
97
+ return datePart + uniquePart;
98
+ }
99
+ export function checkIsObject(value) {
100
+ return Object.prototype.toString.call(value) === '[object Object]';
101
+ }
102
+ export function parseJsonSafe(str) {
103
+ if (typeof str !== 'string') return {};
104
+ try {
105
+ const obj = JSON.parse(str);
106
+ return typeof obj === 'object' && obj !== null ? obj : {};
107
+ } catch {
108
+ return {};
109
+ }
110
+ }
111
+
112
+ export function parseFormData(data) {
113
+ let formData = {};
114
+ // let formData = new FormData();
115
+ formData['success_action_status'] = data.success_action_status || '200';
116
+ // formData['OSSAccessKeyId']= data.accessid;
117
+ formData['policy'] = data.policy;
118
+ formData['signature'] = data.signature;
119
+ formData['x-oss-signature'] = data.signature;
120
+ formData['x-oss-signature-version'] = 'OSS4-HMAC-SHA256';
121
+ formData['x-oss-credential'] = data.x_oss_credential;
122
+ formData['x-oss-date'] = data.x_oss_date;
123
+ formData['x-oss-security-token'] = data.security_token;
124
+ let full_key = data.key;
125
+ if (!data.key) {
126
+ full_key = data.dir + '/' + file.name;
127
+ }
128
+ formData['key'] = full_key; // 文件名
129
+ if (data.callback) {
130
+ // 添加回调参数
131
+ formData['callback'] = data.callback;
132
+ }
133
+ if (data.callback_var && checkIsObject(data.callback_var)) {
134
+ // headers['x-oss-callback-var'] = data.callback_var;
135
+ // 在POST请求的Body中使用表单域来携带参数
136
+
137
+ for (const key in data.callback_var) {
138
+ if (data.callback_var.hasOwnProperty(key)) {
139
+ // 确保是对象自身的属性,而非继承的
140
+ formData[key] = data.callback_var[key];
141
+ }
142
+ }
143
+ // formData['callback-var', data.callback_var);
144
+ }
145
+ // formData['file']= file; // file 必须为最后一个表单域
146
+ return formData;
147
+ }
148
+ function getFileInfo(imgStr) {
149
+ let index = imgStr.lastIndexOf('/');
150
+ let strName = imgStr.substring(index + 1, imgStr.length);
151
+ let strType = '';
152
+ if (strName.lastIndexOf('.') > -1) {
153
+ strType = strName.slice(strName.lastIndexOf('.') + 1);
154
+ strType = 'image/' + strType;
155
+ }
156
+ return {
157
+ name: strName,
158
+ url: imgStr,
159
+ type: strType,
160
+ status: 'success'
161
+ };
162
+ }
163
+ export function content_to_array(valDef) {
164
+ let existList = [];
165
+ let value_type1 = Object.prototype.toString.call(valDef);
166
+ if (value_type1 === '[object String]') {
167
+ existList.push(getFileInfo(valDef));
168
+ } else if (value_type1 === '[object Object]') {
169
+ if (valDef.name && valDef.url) {
170
+ existList.push(valDef);
171
+ }
172
+ } else if (value_type1 === '[object Array]') {
173
+ for (let i in valDef) {
174
+ let itemDef = valDef[i];
175
+ let value_type2 = Object.prototype.toString.call(itemDef);
176
+ if (value_type2 === '[object String]') {
177
+ existList.push(getFileInfo(itemDef));
178
+ } else if (value_type2 === '[object Object]') {
179
+ if (itemDef.name && itemDef.url) {
180
+ existList.push(itemDef);
181
+ }
182
+ }
183
+ }
184
+ }
185
+ return existList;
186
+ }
@@ -0,0 +1,176 @@
1
+ import { defineMixin } from '../../libs/vue';
2
+ import defProps from '../../libs/config/props.js';
3
+ export const props = defineMixin({
4
+ props: {
5
+ // 接受的文件类型, 可选值为all media image file video
6
+ accept: {
7
+ type: String,
8
+ default: () => defProps.upload.accept
9
+ },
10
+ extension: {
11
+ type: Array,
12
+ default: () => defProps.upload.extension
13
+ },
14
+ // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
15
+ capture: {
16
+ type: [String, Array],
17
+ default: () => defProps.upload.capture
18
+ },
19
+ // 当accept为video时生效,是否压缩视频,默认为true
20
+ compressed: {
21
+ type: Boolean,
22
+ default: () => defProps.upload.compressed
23
+ },
24
+ // 当accept为video时生效,可选值为back或front
25
+ camera: {
26
+ type: String,
27
+ default: () => defProps.upload.camera
28
+ },
29
+ // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
30
+ maxDuration: {
31
+ type: Number,
32
+ default: () => defProps.upload.maxDuration
33
+ },
34
+ // 上传区域的图标,只能内置图标
35
+ uploadIcon: {
36
+ type: String,
37
+ default: () => defProps.upload.uploadIcon
38
+ },
39
+ // 上传区域的图标的颜色,默认
40
+ uploadIconColor: {
41
+ type: String,
42
+ default: () => defProps.upload.uploadIconColor
43
+ },
44
+ // 是否开启文件读取前事件
45
+ useBeforeRead: {
46
+ type: Boolean,
47
+ default: () => defProps.upload.useBeforeRead
48
+ },
49
+ // 读取后的处理函数
50
+ afterRead: {
51
+ type: Function,
52
+ default: null
53
+ },
54
+ // 读取前的处理函数
55
+ beforeRead: {
56
+ type: Function,
57
+ default: null
58
+ },
59
+ // 是否显示组件自带的图片&视频预览功能
60
+ previewFullImage: {
61
+ type: Boolean,
62
+ default: () => defProps.upload.previewFullImage
63
+ },
64
+ // 最大上传数量
65
+ maxCount: {
66
+ type: [String, Number],
67
+ default: () => defProps.upload.maxCount
68
+ },
69
+ // 是否启用
70
+ disabled: {
71
+ type: Boolean,
72
+ default: () => defProps.upload.disabled
73
+ },
74
+ // 预览上传的图片时的裁剪模式,和image组件mode属性一致
75
+ imageMode: {
76
+ type: String,
77
+ default: () => defProps.upload.imageMode
78
+ },
79
+ // 标识符,可以在回调函数的第二项参数中获取
80
+ name: {
81
+ type: String,
82
+ default: () => defProps.upload.name
83
+ },
84
+ // 所选的图片的尺寸, 可选值为original compressed
85
+ sizeType: {
86
+ type: Array,
87
+ default: () => defProps.upload.sizeType
88
+ },
89
+ // 是否开启图片多选,部分安卓机型不支持
90
+ multiple: {
91
+ type: Boolean,
92
+ default: () => defProps.upload.multiple
93
+ },
94
+ // 是否展示删除按钮
95
+ deletable: {
96
+ type: Boolean,
97
+ default: () => defProps.upload.deletable
98
+ },
99
+ // 文件大小限制,单位为byte
100
+ maxSize: {
101
+ type: [String, Number],
102
+ default: () => defProps.upload.maxSize
103
+ },
104
+ // 显示已上传的文件列表
105
+ fileList: {
106
+ type: Array,
107
+ default: () => defProps.upload.fileList
108
+ },
109
+ // 上传区域的提示文字
110
+ uploadText: {
111
+ type: String,
112
+ default: () => defProps.upload.uploadText
113
+ },
114
+ // 内部预览图片区域和选择图片按钮的区域宽度
115
+ width: {
116
+ type: [String, Number],
117
+ default: () => defProps.upload.width
118
+ },
119
+ // 内部预览图片区域和选择图片按钮的区域高度
120
+ height: {
121
+ type: [String, Number],
122
+ default: () => defProps.upload.height
123
+ },
124
+ // 是否在上传完成后展示预览图
125
+ previewImage: {
126
+ type: Boolean,
127
+ default: () => defProps.upload.previewImage
128
+ },
129
+ // 是否自动删除
130
+ autoDelete: {
131
+ type: Boolean,
132
+ default: () => defProps.upload.autoDelete
133
+ },
134
+ // 是否自动上传需要传递action指定地址
135
+ autoUpload: {
136
+ type: Boolean,
137
+ default: () => defProps.upload.autoUpload
138
+ },
139
+ // 自动上传接口地址
140
+ autoUploadApi: {
141
+ type: String,
142
+ default: () => defProps.upload.autoUploadApi
143
+ },
144
+ // 自动上传驱动,local/oss/cos/kodo
145
+ autoUploadDriver: {
146
+ type: String,
147
+ default: () => defProps.upload.autoUploadDriver
148
+ },
149
+ // 自动上传授权接口,比如oss的签名接口。
150
+ autoUploadAuthUrl: {
151
+ type: String,
152
+ default: () => defProps.upload.autoUploadAuthUrl
153
+ },
154
+ // 自动上传携带的header
155
+ autoUploadHeader: {
156
+ type: Object,
157
+ default: () => {
158
+ return defProps.upload.autoUploadHeader;
159
+ }
160
+ },
161
+ // 本地计算视频封面
162
+ getVideoThumb: {
163
+ type: Boolean,
164
+ default: () => defProps.upload.getVideoThumb
165
+ },
166
+ // 自定义自动上传后处理
167
+ customAfterAutoUpload: {
168
+ type: Boolean,
169
+ default: () => defProps.upload.customAfterAutoUpload
170
+ },
171
+ videoPreviewObjectFit: {
172
+ type: String,
173
+ default: () => defProps.upload.videoPreviewObjectFit
174
+ }
175
+ }
176
+ });