@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
@@ -0,0 +1,854 @@
1
+ <template>
2
+ <view class="u-upload" :style="[addStyle(customStyle)]">
3
+ <view class="u-upload__wrap">
4
+ <template v-if="previewImage">
5
+ <view class="u-upload__wrap__preview" v-for="(item, index) in lists" :key="index">
6
+ <image
7
+ v-if="item.isImage || (item.type && item.type === 'image')"
8
+ :src="item.thumb || item.url"
9
+ :mode="imageMode"
10
+ class="u-upload__wrap__preview__image"
11
+ @tap="onClickPreview(item, index)"
12
+ :style="[
13
+ {
14
+ width: addUnit(width),
15
+ height: addUnit(height)
16
+ }
17
+ ]"
18
+ />
19
+ <view
20
+ class="u-upload__wrap__preview__video"
21
+ :style="{
22
+ width: addUnit(width),
23
+ height: addUnit(height)
24
+ }"
25
+ v-else-if="(item.isVideo || (item.type && item.type === 'video')) && getVideoThumb"
26
+ >
27
+ <image
28
+ v-if="item.thumb"
29
+ :src="item.thumb"
30
+ :mode="imageMode"
31
+ class="u-upload__wrap__preview__image"
32
+ @tap="onClickPreview(item, index)"
33
+ :style="[
34
+ {
35
+ width: addUnit(width),
36
+ height: addUnit(height)
37
+ }
38
+ ]"
39
+ />
40
+ <up-icon
41
+ v-else
42
+ color="#80CBF9"
43
+ size="26"
44
+ :name="item.isVideo || (item.type && item.type === 'video') ? 'movie' : 'file-text'"
45
+ ></up-icon>
46
+ <view v-if="item.status === 'success'" class="u-upload__wrap__play" @tap="onClickPreview(item, index)">
47
+ <slot name="playIcon"></slot>
48
+ <up-icon v-if="!$slots['playIcon']" class="u-upload__wrap__play__icon" name="play-right" size="22px"></up-icon>
49
+ </view>
50
+ </view>
51
+ <view
52
+ v-else
53
+ class="u-upload__wrap__preview__other"
54
+ @tap="onClickPreview(item, index)"
55
+ :style="[
56
+ {
57
+ width: addUnit(width),
58
+ height: addUnit(height)
59
+ }
60
+ ]"
61
+ >
62
+ <up-icon
63
+ color="#80CBF9"
64
+ size="26"
65
+ :name="item.isVideo || (item.type && item.type === 'video') ? 'movie' : 'folder'"
66
+ ></up-icon>
67
+ <text class="u-upload__wrap__preview__other__text">
68
+ {{
69
+ item.isVideo || (item.type && item.type === 'video')
70
+ ? item.name || t('up.common.video')
71
+ : item.name || t('up.common.file')
72
+ }}
73
+ </text>
74
+ </view>
75
+ <view class="u-upload__status" v-if="item.status === 'uploading' || item.status === 'failed'">
76
+ <view class="u-upload__status__icon">
77
+ <up-icon v-if="item.status === 'failed'" name="close-circle" color="#ffffff" size="25" />
78
+ <up-loading-icon size="22" mode="circle" v-else />
79
+ </view>
80
+ <text v-if="item.message" class="u-upload__status__message">{{ item.message }}</text>
81
+ <up-gap class="u-upload__progress" height="3px" :style="{ width: item.progress + '%' }"></up-gap>
82
+ </view>
83
+ <view
84
+ class="u-upload__deletable"
85
+ v-if="item.status !== 'uploading' && (deletable || item.deletable)"
86
+ @tap.stop="deleteItem(index)"
87
+ >
88
+ <view class="u-upload__deletable__icon">
89
+ <up-icon name="close" color="#ffffff" size="10"></up-icon>
90
+ </view>
91
+ </view>
92
+ <slot name="success">
93
+ <view class="u-upload__success" v-if="item.status === 'success'">
94
+ <!-- #ifdef APP-NVUE -->
95
+ <image :src="successIcon" class="u-upload__success__icon"></image>
96
+ <!-- #endif -->
97
+ <!-- #ifndef APP-NVUE -->
98
+ <view class="u-upload__success__icon">
99
+ <up-icon name="checkmark" color="#ffffff" size="12"></up-icon>
100
+ </view>
101
+ <!-- #endif -->
102
+ </view>
103
+ </slot>
104
+ </view>
105
+ </template>
106
+ <canvas id="myCanvas" type="2d" style="width: 100px; height: 150px; display: none"></canvas>
107
+ <template v-if="isInCount">
108
+ <view v-if="$slots.trigger" @tap="chooseFile">
109
+ <slot name="trigger" />
110
+ </view>
111
+ <view v-else-if="!$slots.trigger && ($slots.default || $slots.$default)" @tap="chooseFile">
112
+ <slot />
113
+ </view>
114
+ <view
115
+ v-else
116
+ class="u-upload__button"
117
+ :hover-class="!disabled ? 'u-upload__button--hover' : ''"
118
+ hover-stay-time="150"
119
+ @tap="chooseFile"
120
+ :class="[disabled && 'u-upload__button--disabled']"
121
+ :style="[
122
+ {
123
+ width: addUnit(width),
124
+ height: addUnit(height)
125
+ }
126
+ ]"
127
+ >
128
+ <up-icon :name="uploadIcon" size="26" :color="uploadIconColor"></up-icon>
129
+ <text v-if="uploadText" class="u-upload__button__text">{{ uploadText }}</text>
130
+ </view>
131
+ </template>
132
+ </view>
133
+ <up-popup mode="center" v-model:show="popupShow">
134
+ <video
135
+ id="myVideo"
136
+ v-if="popupShow"
137
+ :src="currentItemIndex >= 0 ? lists[currentItemIndex].url : ''"
138
+ @error="videoErrorCallback"
139
+ show-center-play-btn
140
+ :object-fit="videoPreviewObjectFit"
141
+ show-fullscreen-btn="true"
142
+ enable-play-gesture
143
+ controls
144
+ :autoplay="true"
145
+ auto-pause-if-open-native
146
+ @loadedmetadata="loadedVideoMetadata"
147
+ :initial-time="0.1"
148
+ ></video>
149
+ </up-popup>
150
+ </view>
151
+ </template>
152
+ <script>
153
+ import { chooseFile } from './utils';
154
+ import { mixinUpload } from './mixin';
155
+ import { props } from './props';
156
+ import { mpMixin } from '../../libs/mixin/mpMixin';
157
+ import { mixin } from '../../libs/mixin/mixin';
158
+ import { addStyle, addUnit, toast } from '../../libs/function/index';
159
+ import test from '../../libs/function/test';
160
+ import { t } from '../../libs/i18n';
161
+ /**
162
+ * upload 上传
163
+ * @description 该组件用于上传图片场景
164
+ * @tutorial https://uview-plus.jiangruyi.com/components/upload.html
165
+ * @property {String} accept 接受的文件类型, 可选值为all media image file video (默认 'image' )
166
+ * @property {String | Array} capture 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头(默认 ['album', 'camera'] )
167
+ * @property {Array} extension 选择文件的后缀名,暂只支持.zip、.png等,不支持application/msword等值
168
+ * @property {Boolean} compressed 当accept为video时生效,是否压缩视频,默认为true(默认 true )
169
+ * @property {String} camera 当accept为video时生效,可选值为back或front(默认 'back' )
170
+ * @property {Number} maxDuration 当accept为video时生效,拍摄视频最长拍摄时间,单位秒(默认 60 )
171
+ * @property {String} uploadIcon 上传区域的图标,只能内置图标(默认 'camera-fill' )
172
+ * @property {String} uploadIconColor 上传区域的图标的字体颜色,只能内置图标(默认 #D3D4D6 )
173
+ * @property {Boolean} useBeforeRead 是否开启文件读取前事件(默认 false )
174
+ * @property {Boolean} previewFullImage 是否显示组件自带的图片预览功能(默认 true )
175
+ * @property {String | Number} maxCount 最大上传数量(默认 52 )
176
+ * @property {Boolean} disabled 是否启用(默认 false )
177
+ * @property {String} imageMode 预览上传的图片时的裁剪模式,和image组件mode属性一致(默认 'aspectFill' )
178
+ * @property {String} name 标识符,可以在回调函数的第二项参数中获取
179
+ * @property {Array} sizeType 所选的图片的尺寸, 可选值为original compressed(默认 ['original', 'compressed'] )
180
+ * @property {Boolean} multiple 是否开启图片多选,部分安卓机型不支持 (默认 false )
181
+ * @property {Boolean} deletable 是否展示删除按钮(默认 true )
182
+ * @property {String | Number} maxSize 文件大小限制,单位为byte (默认 Number.MAX_VALUE )
183
+ * @property {Array} fileList 显示已上传的文件列表
184
+ * @property {String} uploadText 上传区域的提示文字
185
+ * @property {String | Number} width 内部预览图片区域和选择图片按钮的区域宽度(默认 80 )
186
+ * @property {String | Number} height 内部预览图片区域和选择图片按钮的区域高度(默认 80 )
187
+ * @property {Object} customStyle 组件的样式,对象形式
188
+ * @event {Function} afterRead 读取后的处理函数
189
+ * @event {Function} beforeRead 读取前的处理函数
190
+ * @event {Function} oversize 文件超出大小限制
191
+ * @event {Function} clickPreview 点击预览图片
192
+ * @event {Function} delete 删除图片
193
+ * @example <up-upload :action="action" :fileList="fileList" ></up-upload>
194
+ */
195
+ export default {
196
+ name: 'u-upload',
197
+ mixins: [mpMixin, mixin, mixinUpload, props],
198
+ data() {
199
+ return {
200
+ // #ifdef APP-NVUE
201
+ successIcon:
202
+ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKKADAAQAAAABAAAAKAAAAAB65masAAACP0lEQVRYCc3YXygsURwH8K/dpcWyG3LF5u/6/+dKVylSypuUl6uUPMifKMWL8oKEB1EUT1KeUPdR3uTNUsSLxb2udG/cbvInNuvf2rVnazZ/ZndmZ87snjM1Z+Z3zpzfp9+Z5mEAhlvjRtZgCKs+gnPAOcAkkMOR4jEHfItjDvgRxxSQD8cM0BuOCaAvXNCBQrigAsXgggYUiwsK0B9cwIH+4gIKlIILGFAqLiBAOTjFgXJxigJp4BQD0sIpAqSJow6kjSNAFTnRaHJwLenD6Mud52VQAcrBfTd2oyq+HtGaGGWAcnAVcXWoM3bCZrdi+ncPfaAcXE5UKVpdW/vitGPqqAtn98d0gXJwX7Qp6MmegUYVhvmTIezdmHlxJCjpHRTCFerLkRRu4k0aqdajN3sWOo0BK//msHa+xDuPC/oNFMKRhTtM4xjIX0SCNpXL4+7VIaHuyiWEp2L7ahWLf8fejfPdqPmC3mJicORZUp1CQzm+GiphvljGk+PBvWRbxii+xVTj5M6CiZ/tsDufvaXyxEUDxeLIyvu3m0iOyEFWVAkydcVYdyFrE9tQk9iMq6f/GNlvwt3LjQfh60LUrw9/cFyyMJUW/XkLSNMV4Mi6C5ML+ui4x5ClAX9sB9w0wV6wglJwJCv5fOxcr6EstgbGiEw4XcfUry4cWrcEUW8n+ARKxXEJHhw2WG43UKSvwI/TSZgvl7kh0b3XLZaLEy0QmMgLZAVH7J+ALOE+AVnDvQOyiPMAWcW5gSzjCPAV+78S5WE0GrQAAAAASUVORK5CYII=',
203
+ // #endif
204
+ lists: [],
205
+ isInCount: true,
206
+ popupShow: false,
207
+ currentItemIndex: -1
208
+ };
209
+ },
210
+ watch: {
211
+ // 监听文件列表的变化,重新整理内部数据
212
+ fileList: {
213
+ handler() {
214
+ this.formatFileList();
215
+ },
216
+ immediate: true,
217
+ deep: true
218
+ },
219
+ deletable(newVal) {
220
+ this.formatFileList();
221
+ },
222
+ maxCount(newVal) {
223
+ this.formatFileList();
224
+ },
225
+ accept(newVal) {
226
+ this.formatFileList();
227
+ },
228
+ popupShow(newVal) {
229
+ if (!newVal) {
230
+ this.currentItemIndex = -1;
231
+ }
232
+ }
233
+ },
234
+ // #ifdef VUE3
235
+ emits: ['error', 'beforeRead', 'oversize', 'afterRead', 'delete', 'clickPreview', 'update:fileList', 'afterAutoUpload'],
236
+ // #endif
237
+ methods: {
238
+ t,
239
+ addUnit,
240
+ addStyle,
241
+ videoErrorCallback() {},
242
+ loadedVideoMetadata(e) {
243
+ if (this.currentItemIndex < 0) {
244
+ return;
245
+ }
246
+ if (this.autoUploadDriver != 'local') {
247
+ return;
248
+ }
249
+ if (!this.getVideoThumb) {
250
+ return;
251
+ }
252
+ // 截取第一帧作为封面,oss等云存储场景直接使用拼接参数。
253
+ let w = this.lists[this.currentItemIndex].width;
254
+ let h = this.lists[this.currentItemIndex].height;
255
+ const dpr = uni.getSystemInfoSync().pixelRatio;
256
+ uni
257
+ .createSelectorQuery()
258
+ .select('#myVideo')
259
+ .context((res) => {
260
+ console.log('select video', res);
261
+ const myVideo = res.context;
262
+ uni
263
+ .createSelectorQuery()
264
+ .select('#myCanvas')
265
+ .fields({ node: true, size: true })
266
+ .exec(([res]) => {
267
+ console.log('select canvas', res);
268
+ const ctx1 = res[0].node.getContext('2d');
269
+ res[0].node.width = w * dpr;
270
+ res[0].node.height = h * dpr;
271
+ // Draw the first frame and export it as an image
272
+ // myVideo.onPlay(() => {
273
+ setTimeout(() => {
274
+ captureFirstFrame();
275
+ }, 500);
276
+ // })
277
+ const captureFirstFrame = () => {
278
+ ctx1.drawImage(myVideo, 0, 0, w * dpr, h * dpr);
279
+ wx.canvasToTempFilePath({
280
+ canvas: res[0].node,
281
+ success: (result) => {
282
+ console.log('First frame image path:', result.tempFilePath);
283
+ // Now you can use the image path (result.tempFilePath)
284
+ this.fileList['currentItemIndex'].thumb = result.tempFilePath;
285
+ },
286
+ fail: (err) => {
287
+ console.error('Failed to export image:', err);
288
+ }
289
+ });
290
+ };
291
+ // Capture the first frame
292
+ setInterval(() => {
293
+ ctx1.drawImage(myVideo, 0, 0, w * dpr, h * dpr);
294
+ }, 1000 / 24);
295
+ })
296
+ .exec();
297
+ })
298
+ .exec();
299
+ },
300
+ formatFileList() {
301
+ const { fileList = [], maxCount } = this;
302
+ const lists = fileList.map((item) => {
303
+ const name = item.name || item.url || item.thumb;
304
+ return Object.assign(Object.assign({}, item), {
305
+ // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
306
+ isImage: item.name ? test.image(item.name) : this.accept === 'image' || test.image(name),
307
+ isVideo: item.name ? test.video(item.name) : this.accept === 'video' || test.video(name),
308
+ deletable: typeof item.deletable === 'boolean' ? item.deletable : this.deletable
309
+ });
310
+ });
311
+ this.lists = lists;
312
+ this.isInCount = lists.length < maxCount;
313
+ },
314
+ chooseFile(params) {
315
+ const { maxCount, multiple, lists, disabled } = this;
316
+ if (disabled) return Promise.reject();
317
+ const chooseParams = Object.assign(
318
+ {
319
+ accept: this.accept,
320
+ extension: this.extension,
321
+ multiple: this.multiple,
322
+ capture: this.capture,
323
+ compressed: this.compressed,
324
+ maxDuration: this.maxDuration,
325
+ sizeType: this.sizeType,
326
+ camera: this.camera
327
+ },
328
+ {
329
+ maxCount: maxCount - lists.length,
330
+ ...params
331
+ }
332
+ );
333
+ return chooseFile(chooseParams)
334
+ .then((res) => {
335
+ const result = chooseParams.multiple ? res : res[0];
336
+ this.onBeforeRead(result);
337
+ return result;
338
+ })
339
+ .catch((error) => {
340
+ this.$emit('error', error);
341
+ });
342
+ },
343
+ // 文件读取之前
344
+ onBeforeRead(file) {
345
+ const { beforeRead, useBeforeRead } = this;
346
+ let res = file;
347
+ // beforeRead是否为一个方法
348
+ if (test.func(beforeRead)) {
349
+ // 如果用户定义了此方法,则去执行此方法,并传入读取的文件回调
350
+ res = beforeRead(file, this.getDetail());
351
+ }
352
+ if (useBeforeRead) {
353
+ res = new Promise((resolve, reject) => {
354
+ this.$emit(
355
+ 'beforeRead',
356
+ Object.assign(
357
+ Object.assign(
358
+ {
359
+ file
360
+ },
361
+ this.getDetail()
362
+ ),
363
+ {
364
+ callback: (ok) => {
365
+ ok ? resolve() : reject();
366
+ }
367
+ }
368
+ )
369
+ );
370
+ });
371
+ }
372
+ if (test.promise(res)) {
373
+ res.then((data) => this.onAfterRead(data || file));
374
+ } else {
375
+ this.onAfterRead(res || file);
376
+ }
377
+ },
378
+ getDetail(index) {
379
+ return {
380
+ name: this.name,
381
+ index: index == null ? this.fileList.length : index
382
+ };
383
+ },
384
+ async onAfterRead(file) {
385
+ const { maxSize, afterRead } = this;
386
+ const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize;
387
+ if (oversize) {
388
+ uni.showToast({
389
+ title: t('up.upload.sizeExceed')
390
+ });
391
+ this.$emit(
392
+ 'oversize',
393
+ Object.assign(
394
+ {
395
+ file
396
+ },
397
+ this.getDetail()
398
+ )
399
+ );
400
+ return;
401
+ }
402
+ let len = this.fileList.length;
403
+ if (this.autoUpload) {
404
+ // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
405
+ let lists = [].concat(file);
406
+ let fileListLen = this.fileList.length;
407
+ lists.map((item) => {
408
+ this.fileList.push({
409
+ ...item,
410
+ status: 'uploading',
411
+ message: t('up.upload.uploading'),
412
+ progress: 0
413
+ });
414
+ });
415
+ let that = this;
416
+ this.$emit('update:fileList', this.fileList);
417
+ for (let i = 0; i < lists.length; i++) {
418
+ let j = i;
419
+ let result = '';
420
+ switch (this.autoUploadDriver) {
421
+ case 'cos': // 腾讯云
422
+ break;
423
+ case 'kodo': // 七牛云
424
+ break;
425
+ case 'oss':
426
+ case 'upload_oss':
427
+ // 阿里云前端直传
428
+ // 获取签名
429
+ console.log();
430
+ let formData = {};
431
+ let ret = await uni.request({
432
+ url: this.autoUploadAuthUrl,
433
+ method: 'get',
434
+ header: this.autoUploadHeader,
435
+ data: {
436
+ filename: lists[j].name
437
+ }
438
+ });
439
+ // console.log(ret);
440
+ let res0 = ret.data;
441
+ if (res0.code == 200) {
442
+ // 路径 + 文件名 + 扩展名
443
+ // 不传递filename就要拼接key
444
+ // res0.data.params.key = res0.data.params.dir + res0.data.params.uniqidName + fileExt;
445
+ formData = res0.data.params;
446
+ } else {
447
+ uni.showToast({
448
+ title: res0.msg,
449
+ duration: 1500
450
+ });
451
+ return;
452
+ }
453
+ var uploadTask = uni.uploadFile({
454
+ url: res0.data.params.host,
455
+ filePath: lists[j].url,
456
+ name: 'file',
457
+ // fileType: 'video', // 仅支付宝小程序,且必填。
458
+ // header: header,
459
+ formData: formData,
460
+ success: (uploadFileRes) => {
461
+ let thumb = '';
462
+ let afterPromise = '';
463
+ if (that.customAfterAutoUpload) {
464
+ afterPromise = new Promise((resolve, reject) => {
465
+ that.$emit(
466
+ 'afterAutoUpload',
467
+ Object.assign(res0, {
468
+ callback: (r) => {
469
+ r.url ? resolve(r) : reject();
470
+ }
471
+ })
472
+ );
473
+ });
474
+ }
475
+ if (test.promise(afterPromise)) {
476
+ afterPromise.then((data) => that.succcessUpload(len + j, data.url, data.thumb));
477
+ } else {
478
+ result = res0.data.params.host + '/' + res0.data.params.key;
479
+ if (that.accept === 'video' || test.video(result)) {
480
+ thumb = result + '?x-oss-process=video/snapshot,t_10000,m_fast';
481
+ }
482
+ that.succcessUpload(len + j, result, thumb);
483
+ }
484
+ }
485
+ });
486
+ uploadTask.onProgressUpdate((res) => {
487
+ that.updateUpload(len + j, {
488
+ progress: res.progress
489
+ });
490
+ // console.log('上传进度' + res.progress);
491
+ // console.log('已经上传的数据长度' + res.totalBytesSent);
492
+ // console.log('预期需要上传的数据总长度' + res.totalBytesExpectedToSend);
493
+ });
494
+ break;
495
+ case 'local':
496
+ default:
497
+ // 服务器本机上传
498
+ var uploadTask = uni.uploadFile({
499
+ url: this.autoUploadApi,
500
+ filePath: lists[j].url,
501
+ name: 'file',
502
+ // fileType: 'video', // 仅支付宝小程序,且必填。
503
+ header: this.autoUploadHeader,
504
+ success: (uploadFileRes) => {
505
+ let res0 = uploadFileRes.data;
506
+ let afterPromise = '';
507
+ if (that.customAfterAutoUpload) {
508
+ afterPromise = new Promise((resolve, reject) => {
509
+ that.$emit(
510
+ 'afterAutoUpload',
511
+ Object.assign(res0, {
512
+ callback: (r) => {
513
+ r.url ? resolve(r) : reject();
514
+ }
515
+ })
516
+ );
517
+ });
518
+ }
519
+ if (test.promise(afterPromise)) {
520
+ afterPromise.then((data) => that.succcessUpload(len + j, data.url));
521
+ } else {
522
+ if (res0.code != 200) {
523
+ uni.showToast({
524
+ title: res0.msg
525
+ });
526
+ } else {
527
+ result = res0.data.url;
528
+ that.succcessUpload(len + j, result);
529
+ }
530
+ }
531
+ }
532
+ });
533
+ uploadTask.onProgressUpdate((res) => {
534
+ that.updateUpload(len + j, {
535
+ progress: res.progress
536
+ });
537
+ // console.log('上传进度' + res.progress);
538
+ // console.log('已经上传的数据长度' + res.totalBytesSent);
539
+ // console.log('预期需要上传的数据总长度' + res.totalBytesExpectedToSend);
540
+ });
541
+ break;
542
+ }
543
+ }
544
+ } else {
545
+ if (typeof afterRead === 'function') {
546
+ afterRead(file, this.getDetail());
547
+ }
548
+ this.$emit(
549
+ 'afterRead',
550
+ Object.assign(
551
+ {
552
+ file
553
+ },
554
+ this.getDetail()
555
+ )
556
+ );
557
+ }
558
+ },
559
+ updateUpload(index, param) {
560
+ let item = this.fileList[index];
561
+ this.fileList.splice(index, 1, {
562
+ ...item,
563
+ // 注意这里不判断会出现succcessUpload先执行又被覆盖的问题
564
+ status: param.progress == 100 ? 'success' : 'uploading',
565
+ message: '',
566
+ progress: param.progress
567
+ });
568
+ this.$emit('update:fileList', this.fileList);
569
+ },
570
+ succcessUpload(index, url, thumb = '') {
571
+ let item = this.fileList[index];
572
+ this.fileList.splice(index, 1, {
573
+ ...item,
574
+ status: 'success',
575
+ message: '',
576
+ url: url,
577
+ progress: 100,
578
+ thumb: thumb
579
+ });
580
+ this.$emit('update:fileList', this.fileList);
581
+ },
582
+ deleteItem(index) {
583
+ if (this.autoDelete) {
584
+ this.fileList.splice(index, 1);
585
+ this.$emit('update:fileList', this.fileList);
586
+ } else {
587
+ this.$emit(
588
+ 'delete',
589
+ Object.assign(Object.assign({}, this.getDetail(index)), {
590
+ file: this.fileList[index]
591
+ })
592
+ );
593
+ }
594
+ },
595
+ // 预览图片
596
+ onPreviewImage(previewItem, index) {
597
+ if (!previewItem.isImage || !this.previewFullImage) return;
598
+ let current = 0;
599
+ const urls = [];
600
+ let imageIndex = 0;
601
+ for (var i = 0; i < this.lists.length; i++) {
602
+ const item = this.lists[i];
603
+ if (item.isImage || (item.type && item.type === 'image')) {
604
+ urls.push(item.url || item.thumb);
605
+ if (i === index) {
606
+ current = imageIndex;
607
+ }
608
+ imageIndex += 1;
609
+ }
610
+ }
611
+ if (urls.length < 1) {
612
+ return;
613
+ }
614
+ uni.previewImage({
615
+ urls: urls,
616
+ current: current,
617
+ fail() {
618
+ toast(t('up.upload.previewImageFail'));
619
+ }
620
+ });
621
+ },
622
+ onPreviewVideo(previewItem, index) {
623
+ if (!this.previewFullImage) return;
624
+ let current = 0;
625
+ const sources = [];
626
+ let videoIndex = 0;
627
+ for (var i = 0; i < this.lists.length; i++) {
628
+ const item = this.lists[i];
629
+ if (item.isVideo || (item.type && item.type === 'video')) {
630
+ sources.push(
631
+ Object.assign(Object.assign({}, item), {
632
+ type: 'video'
633
+ })
634
+ );
635
+ if (i === index) {
636
+ current = videoIndex;
637
+ }
638
+ videoIndex += 1;
639
+ }
640
+ }
641
+ if (sources.length < 1) {
642
+ return;
643
+ }
644
+ // #ifndef MP-WEIXIN
645
+ this.popupShow = true;
646
+ this.currentItemIndex = index;
647
+ console.log(this.lists[this.currentItemIndex]);
648
+ // #endif
649
+ // #ifdef MP-WEIXIN
650
+ wx.previewMedia({
651
+ sources: sources,
652
+ current: current,
653
+ fail() {
654
+ toast(t('up.upload.previewVideoFail'));
655
+ }
656
+ });
657
+ // #endif
658
+ },
659
+ onClickPreview(item, index) {
660
+ if (this.previewFullImage) {
661
+ switch (item.type) {
662
+ case 'image':
663
+ this.onPreviewImage(item, index);
664
+ break;
665
+ case 'video':
666
+ this.onPreviewVideo(item, index);
667
+ break;
668
+ default:
669
+ break;
670
+ }
671
+ }
672
+ this.$emit('clickPreview', Object.assign(Object.assign({}, item), this.getDetail(index)));
673
+ }
674
+ }
675
+ };
676
+ </script>
677
+ <style scoped>
678
+ .u-upload {
679
+ /* #ifndef APP-NVUE */
680
+ display: flex;
681
+ /* #endif */
682
+ flex-direction: column;
683
+ flex: 1;
684
+ }
685
+ .u-upload__wrap {
686
+ /* #ifndef APP-NVUE */
687
+ display: flex;
688
+ /* #endif */
689
+ flex-direction: row;
690
+ flex-wrap: wrap;
691
+ flex: 1;
692
+ }
693
+ .u-upload__wrap__preview {
694
+ border-radius: 2px;
695
+ margin: 0 8px 8px 0;
696
+ position: relative;
697
+ overflow: hidden;
698
+ /* #ifndef APP-NVUE */
699
+ display: flex;
700
+ /* #endif */
701
+ flex-direction: row;
702
+ }
703
+ .u-upload__wrap__preview__image {
704
+ width: 80px;
705
+ height: 80px;
706
+ }
707
+ .u-upload__wrap__preview__video,
708
+ .u-upload__wrap__preview__other {
709
+ width: 80px;
710
+ height: 80px;
711
+ background-color: rgb(242, 242, 242);
712
+ flex: 1;
713
+ /* #ifndef APP-NVUE */
714
+ display: flex;
715
+ /* #endif */
716
+ flex-direction: column;
717
+ justify-content: center;
718
+ align-items: center;
719
+ }
720
+ .u-upload__wrap__preview__video__text,
721
+ .u-upload__wrap__preview__other__text {
722
+ font-size: 11px;
723
+ color: var(--u-tips-color);
724
+ margin-top: 2px;
725
+ }
726
+ .u-upload__wrap__play {
727
+ position: absolute;
728
+ top: 0px;
729
+ left: 0px;
730
+ bottom: 0px;
731
+ right: 0px;
732
+ display: flex;
733
+ justify-content: center;
734
+ align-items: center;
735
+ }
736
+ .u-upload__wrap__play__icon {
737
+ background: #fff;
738
+ border-radius: 100px;
739
+ opacity: 0.8;
740
+ }
741
+ .u-upload__deletable {
742
+ position: absolute;
743
+ top: 0;
744
+ right: 0;
745
+ background-color: rgb(55, 55, 55);
746
+ height: 14px;
747
+ width: 14px;
748
+ /* #ifndef APP-NVUE */
749
+ display: flex;
750
+ /* #endif */
751
+ flex-direction: row;
752
+ border-bottom-left-radius: 100px;
753
+ align-items: center;
754
+ justify-content: center;
755
+ z-index: 3;
756
+ }
757
+ .u-upload__deletable__icon {
758
+ position: absolute;
759
+ transform: scale(0.7);
760
+ top: 0px;
761
+ right: 0px;
762
+ /* #ifdef H5 */
763
+ top: 1px;
764
+ right: 0;
765
+ /* #endif */
766
+ }
767
+ .u-upload__success {
768
+ position: absolute;
769
+ bottom: 0;
770
+ right: 0;
771
+ /* #ifndef APP-NVUE */
772
+ display: flex;
773
+ /* #endif */
774
+ flex-direction: row;
775
+ /* #ifndef APP-NVUE */
776
+ border-style: solid;
777
+ border-top-color: transparent;
778
+ border-left-color: transparent;
779
+ border-bottom-color: var(--u-success);
780
+ border-right-color: var(--u-success);
781
+ border-width: 9px;
782
+ align-items: center;
783
+ justify-content: center;
784
+ /* #endif */
785
+ }
786
+ .u-upload__success__icon {
787
+ /* #ifndef APP-NVUE */
788
+ position: absolute;
789
+ transform: scale(0.7);
790
+ bottom: -10px;
791
+ right: -10px;
792
+ /* #endif */
793
+ /* #ifdef APP-NVUE */
794
+ width: 16px;
795
+ height: 16px;
796
+ /* #endif */
797
+ }
798
+ .u-upload__progress {
799
+ background-color: var(--u-primary) !important;
800
+ position: absolute;
801
+ bottom: 0;
802
+ left: 0;
803
+ }
804
+ .u-upload__status {
805
+ position: absolute;
806
+ top: 0;
807
+ bottom: 0;
808
+ left: 0;
809
+ right: 0;
810
+ background-color: rgba(0, 0, 0, 0.5);
811
+ /* #ifndef APP-NVUE */
812
+ display: flex;
813
+ /* #endif */
814
+ flex-direction: column;
815
+ align-items: center;
816
+ justify-content: center;
817
+ }
818
+ .u-upload__status__icon {
819
+ position: relative;
820
+ z-index: 1;
821
+ }
822
+ .u-upload__status__message {
823
+ font-size: 12px;
824
+ color: #ffffff;
825
+ margin-top: 5px;
826
+ }
827
+ .u-upload__button {
828
+ /* #ifndef APP-NVUE */
829
+ display: flex;
830
+ /* #endif */
831
+ flex-direction: column;
832
+ align-items: center;
833
+ justify-content: center;
834
+ width: 80px;
835
+ height: 80px;
836
+ background-color: rgb(244, 245, 247);
837
+ border-radius: 2px;
838
+ margin: 0 8px 8px 0;
839
+ /* #ifndef APP-NVUE */
840
+ box-sizing: border-box;
841
+ /* #endif */
842
+ }
843
+ .u-upload__button__text {
844
+ font-size: 11px;
845
+ color: var(--u-tips-color);
846
+ margin-top: 2px;
847
+ }
848
+ .u-upload__button--hover {
849
+ background-color: rgb(230, 231, 233);
850
+ }
851
+ .u-upload__button--disabled {
852
+ opacity: 0.5;
853
+ }
854
+ </style>