@kengic/uni 0.3.2-beta.4 → 0.3.2-beta.6

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 (255) hide show
  1. package/dist/kengic-uni.js +2 -1527
  2. package/dist/src/index.d.ts +0 -1
  3. package/dist/uni-ui/index.ts +5 -0
  4. package/dist/uni-ui/uni-badge/uni-badge.vue +253 -0
  5. package/dist/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +41 -0
  6. package/dist/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +121 -0
  7. package/dist/uni-ui/uni-calendar/calendar.js +546 -0
  8. package/dist/uni-ui/uni-calendar/i18n/en.json +12 -0
  9. package/dist/uni-ui/uni-calendar/i18n/index.js +8 -0
  10. package/dist/uni-ui/uni-calendar/i18n/zh-Hans.json +12 -0
  11. package/dist/uni-ui/uni-calendar/i18n/zh-Hant.json +12 -0
  12. package/dist/uni-ui/uni-calendar/uni-calendar-item.vue +187 -0
  13. package/dist/uni-ui/uni-calendar/uni-calendar.vue +566 -0
  14. package/dist/uni-ui/uni-calendar/util.js +360 -0
  15. package/dist/uni-ui/uni-card/uni-card.vue +281 -0
  16. package/dist/uni-ui/uni-col/uni-col.vue +317 -0
  17. package/dist/uni-ui/uni-collapse/uni-collapse.vue +147 -0
  18. package/dist/uni-ui/uni-collapse-item/uni-collapse-item.vue +402 -0
  19. package/dist/uni-ui/uni-combox/uni-combox.vue +294 -0
  20. package/dist/uni-ui/uni-countdown/i18n/en.json +6 -0
  21. package/dist/uni-ui/uni-countdown/i18n/index.js +8 -0
  22. package/dist/uni-ui/uni-countdown/i18n/zh-Hans.json +6 -0
  23. package/dist/uni-ui/uni-countdown/i18n/zh-Hant.json +6 -0
  24. package/dist/uni-ui/uni-countdown/uni-countdown.vue +267 -0
  25. package/dist/uni-ui/uni-data-checkbox/uni-data-checkbox.vue +821 -0
  26. package/dist/uni-ui/uni-data-picker/keypress.js +45 -0
  27. package/dist/uni-ui/uni-data-picker/uni-data-picker.vue +551 -0
  28. package/dist/uni-ui/uni-data-pickerview/uni-data-picker.js +622 -0
  29. package/dist/uni-ui/uni-data-pickerview/uni-data-pickerview.vue +323 -0
  30. package/dist/uni-ui/uni-data-select/uni-data-select.vue +517 -0
  31. package/dist/uni-ui/uni-dateformat/date-format.js +200 -0
  32. package/dist/uni-ui/uni-dateformat/uni-dateformat.vue +88 -0
  33. package/dist/uni-ui/uni-datetime-picker/calendar-item.vue +177 -0
  34. package/dist/uni-ui/uni-datetime-picker/calendar.vue +928 -0
  35. package/dist/uni-ui/uni-datetime-picker/i18n/en.json +22 -0
  36. package/dist/uni-ui/uni-datetime-picker/i18n/index.js +8 -0
  37. package/dist/uni-ui/uni-datetime-picker/i18n/zh-Hans.json +22 -0
  38. package/dist/uni-ui/uni-datetime-picker/i18n/zh-Hant.json +22 -0
  39. package/dist/uni-ui/uni-datetime-picker/time-picker.vue +934 -0
  40. package/dist/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +1026 -0
  41. package/dist/uni-ui/uni-datetime-picker/util.js +403 -0
  42. package/dist/uni-ui/uni-drawer/keypress.js +45 -0
  43. package/dist/uni-ui/uni-drawer/uni-drawer.vue +181 -0
  44. package/dist/uni-ui/uni-easyinput/common.js +56 -0
  45. package/dist/uni-ui/uni-easyinput/uni-easyinput.vue +660 -0
  46. package/dist/uni-ui/uni-fab/uni-fab.vue +491 -0
  47. package/dist/uni-ui/uni-fav/i18n/en.json +4 -0
  48. package/dist/uni-ui/uni-fav/i18n/index.js +8 -0
  49. package/dist/uni-ui/uni-fav/i18n/zh-Hans.json +4 -0
  50. package/dist/uni-ui/uni-fav/i18n/zh-Hant.json +4 -0
  51. package/dist/uni-ui/uni-fav/uni-fav.vue +161 -0
  52. package/dist/uni-ui/uni-file-picker/choose-and-upload-file.js +224 -0
  53. package/dist/uni-ui/uni-file-picker/uni-file-picker.vue +667 -0
  54. package/dist/uni-ui/uni-file-picker/upload-file.vue +325 -0
  55. package/dist/uni-ui/uni-file-picker/upload-image.vue +292 -0
  56. package/dist/uni-ui/uni-file-picker/utils.js +109 -0
  57. package/dist/uni-ui/uni-forms/uni-forms.vue +398 -0
  58. package/dist/uni-ui/uni-forms/utils.js +293 -0
  59. package/dist/uni-ui/uni-forms/validate.js +486 -0
  60. package/dist/uni-ui/uni-forms-item/uni-forms-item.vue +601 -0
  61. package/dist/uni-ui/uni-goods-nav/i18n/en.json +6 -0
  62. package/dist/uni-ui/uni-goods-nav/i18n/index.js +8 -0
  63. package/dist/uni-ui/uni-goods-nav/i18n/zh-Hans.json +6 -0
  64. package/dist/uni-ui/uni-goods-nav/i18n/zh-Hant.json +6 -0
  65. package/dist/uni-ui/uni-goods-nav/uni-goods-nav.vue +229 -0
  66. package/dist/uni-ui/uni-grid/uni-grid.vue +143 -0
  67. package/dist/uni-ui/uni-grid-item/uni-grid-item.vue +129 -0
  68. package/dist/uni-ui/uni-group/uni-group.vue +134 -0
  69. package/dist/uni-ui/uni-icons/icons.js +1169 -0
  70. package/dist/uni-ui/uni-icons/uni-icons.vue +96 -0
  71. package/dist/uni-ui/uni-icons/uniicons.css +663 -0
  72. package/dist/uni-ui/uni-icons/uniicons.ttf +0 -0
  73. package/dist/uni-ui/uni-indexed-list/uni-indexed-list-item.vue +144 -0
  74. package/dist/uni-ui/uni-indexed-list/uni-indexed-list.vue +367 -0
  75. package/dist/uni-ui/uni-link/uni-link.vue +128 -0
  76. package/dist/uni-ui/uni-list/uni-list.vue +123 -0
  77. package/dist/uni-ui/uni-list/uni-refresh.vue +65 -0
  78. package/dist/uni-ui/uni-list/uni-refresh.wxs +87 -0
  79. package/dist/uni-ui/uni-list-ad/uni-list-ad.vue +107 -0
  80. package/dist/uni-ui/uni-list-chat/uni-list-chat.scss +58 -0
  81. package/dist/uni-ui/uni-list-chat/uni-list-chat.vue +593 -0
  82. package/dist/uni-ui/uni-list-item/uni-list-item.vue +534 -0
  83. package/dist/uni-ui/uni-load-more/i18n/en.json +5 -0
  84. package/dist/uni-ui/uni-load-more/i18n/index.js +8 -0
  85. package/dist/uni-ui/uni-load-more/i18n/zh-Hans.json +5 -0
  86. package/dist/uni-ui/uni-load-more/i18n/zh-Hant.json +5 -0
  87. package/dist/uni-ui/uni-load-more/uni-load-more.vue +399 -0
  88. package/dist/uni-ui/uni-nav-bar/uni-nav-bar.vue +357 -0
  89. package/dist/uni-ui/uni-nav-bar/uni-status-bar.vue +24 -0
  90. package/dist/uni-ui/uni-notice-bar/uni-notice-bar.vue +426 -0
  91. package/dist/uni-ui/uni-number-box/uni-number-box.vue +221 -0
  92. package/dist/uni-ui/uni-pagination/i18n/en.json +5 -0
  93. package/dist/uni-ui/uni-pagination/i18n/es.json +5 -0
  94. package/dist/uni-ui/uni-pagination/i18n/fr.json +5 -0
  95. package/dist/uni-ui/uni-pagination/i18n/index.js +12 -0
  96. package/dist/uni-ui/uni-pagination/i18n/zh-Hans.json +5 -0
  97. package/dist/uni-ui/uni-pagination/i18n/zh-Hant.json +5 -0
  98. package/dist/uni-ui/uni-pagination/uni-pagination.vue +465 -0
  99. package/dist/uni-ui/uni-popup/i18n/en.json +7 -0
  100. package/dist/uni-ui/uni-popup/i18n/index.js +8 -0
  101. package/dist/uni-ui/uni-popup/i18n/zh-Hans.json +7 -0
  102. package/dist/uni-ui/uni-popup/i18n/zh-Hant.json +7 -0
  103. package/dist/uni-ui/uni-popup/keypress.js +45 -0
  104. package/dist/uni-ui/uni-popup/popup.js +26 -0
  105. package/dist/uni-ui/uni-popup/uni-popup.vue +473 -0
  106. package/dist/uni-ui/uni-popup-dialog/keypress.js +45 -0
  107. package/dist/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +275 -0
  108. package/dist/uni-ui/uni-popup-message/uni-popup-message.vue +143 -0
  109. package/dist/uni-ui/uni-popup-share/uni-popup-share.vue +187 -0
  110. package/dist/uni-ui/uni-rate/uni-rate.vue +365 -0
  111. package/dist/uni-ui/uni-row/uni-row.vue +190 -0
  112. package/dist/uni-ui/uni-scss/changelog.md +8 -0
  113. package/dist/uni-ui/uni-scss/index.scss +1 -0
  114. package/dist/uni-ui/uni-scss/package.json +82 -0
  115. package/dist/uni-ui/uni-scss/readme.md +4 -0
  116. package/dist/uni-ui/uni-scss/styles/index.scss +7 -0
  117. package/dist/uni-ui/uni-scss/styles/setting/_border.scss +3 -0
  118. package/dist/uni-ui/uni-scss/styles/setting/_color.scss +66 -0
  119. package/dist/uni-ui/uni-scss/styles/setting/_radius.scss +55 -0
  120. package/dist/uni-ui/uni-scss/styles/setting/_space.scss +56 -0
  121. package/dist/uni-ui/uni-scss/styles/setting/_styles.scss +167 -0
  122. package/dist/uni-ui/uni-scss/styles/setting/_text.scss +24 -0
  123. package/dist/uni-ui/uni-scss/styles/setting/_variables.scss +146 -0
  124. package/dist/uni-ui/uni-scss/styles/tools/functions.scss +19 -0
  125. package/dist/uni-ui/uni-scss/theme.scss +31 -0
  126. package/dist/uni-ui/uni-scss/variables.scss +62 -0
  127. package/dist/uni-ui/uni-search-bar/i18n/en.json +4 -0
  128. package/dist/uni-ui/uni-search-bar/i18n/index.js +8 -0
  129. package/dist/uni-ui/uni-search-bar/i18n/zh-Hans.json +4 -0
  130. package/dist/uni-ui/uni-search-bar/i18n/zh-Hant.json +4 -0
  131. package/dist/uni-ui/uni-search-bar/uni-search-bar.vue +298 -0
  132. package/dist/uni-ui/uni-section/uni-section.vue +167 -0
  133. package/dist/uni-ui/uni-segmented-control/uni-segmented-control.vue +145 -0
  134. package/dist/uni-ui/uni-steps/uni-steps.vue +269 -0
  135. package/dist/uni-ui/uni-swipe-action/uni-swipe-action.vue +60 -0
  136. package/dist/uni-ui/uni-swipe-action-item/bindingx.js +302 -0
  137. package/dist/uni-ui/uni-swipe-action-item/isPC.js +12 -0
  138. package/dist/uni-ui/uni-swipe-action-item/mpalipay.js +195 -0
  139. package/dist/uni-ui/uni-swipe-action-item/mpother.js +260 -0
  140. package/dist/uni-ui/uni-swipe-action-item/mpwxs.js +84 -0
  141. package/dist/uni-ui/uni-swipe-action-item/render.js +270 -0
  142. package/dist/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +347 -0
  143. package/dist/uni-ui/uni-swipe-action-item/wx.wxs +341 -0
  144. package/dist/uni-ui/uni-swiper-dot/uni-swiper-dot.vue +218 -0
  145. package/dist/uni-ui/uni-table/uni-table.vue +455 -0
  146. package/dist/uni-ui/uni-tag/uni-tag.vue +252 -0
  147. package/dist/uni-ui/uni-tbody/uni-tbody.vue +29 -0
  148. package/dist/uni-ui/uni-td/uni-td.vue +90 -0
  149. package/dist/uni-ui/uni-th/filter-dropdown.vue +511 -0
  150. package/dist/uni-ui/uni-th/uni-th.vue +285 -0
  151. package/dist/uni-ui/uni-thead/uni-thead.vue +129 -0
  152. package/dist/uni-ui/uni-title/uni-title.vue +171 -0
  153. package/dist/uni-ui/uni-tooltip/uni-tooltip.vue +68 -0
  154. package/dist/uni-ui/uni-tr/table-checkbox.vue +179 -0
  155. package/dist/uni-ui/uni-tr/uni-tr.vue +171 -0
  156. package/dist/uni-ui/uni-transition/createAnimation.js +131 -0
  157. package/dist/uni-ui/uni-transition/uni-transition.vue +281 -0
  158. package/package.json +3 -2
  159. package/dist/index.css +0 -1
  160. package/dist/src/components/index.d.ts +0 -5
  161. package/dist/src/components/uni-ui/uni-badge/uni-badge.vue.d.ts +0 -108
  162. package/dist/src/components/uni-ui/uni-breadcrumb/uni-breadcrumb.vue.d.ts +0 -23
  163. package/dist/src/components/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue.d.ts +0 -30
  164. package/dist/src/components/uni-ui/uni-calendar/calendar.d.ts +0 -67
  165. package/dist/src/components/uni-ui/uni-calendar/i18n/index.d.ts +0 -39
  166. package/dist/src/components/uni-ui/uni-calendar/uni-calendar-item.vue.d.ts +0 -47
  167. package/dist/src/components/uni-ui/uni-calendar/uni-calendar.vue.d.ts +0 -166
  168. package/dist/src/components/uni-ui/uni-calendar/util.d.ts +0 -211
  169. package/dist/src/components/uni-ui/uni-card/uni-card.vue.d.ts +0 -117
  170. package/dist/src/components/uni-ui/uni-col/uni-col.vue.d.ts +0 -70
  171. package/dist/src/components/uni-ui/uni-collapse/uni-collapse.vue.d.ts +0 -45
  172. package/dist/src/components/uni-ui/uni-collapse-item/uni-collapse-item.vue.d.ts +0 -102
  173. package/dist/src/components/uni-ui/uni-combox/uni-combox.vue.d.ts +0 -95
  174. package/dist/src/components/uni-ui/uni-countdown/i18n/index.d.ts +0 -21
  175. package/dist/src/components/uni-ui/uni-countdown/uni-countdown.vue.d.ts +0 -158
  176. package/dist/src/components/uni-ui/uni-data-checkbox/uni-data-checkbox.vue.d.ts +0 -192
  177. package/dist/src/components/uni-ui/uni-data-picker/uni-data-picker.vue.d.ts +0 -244
  178. package/dist/src/components/uni-ui/uni-data-pickerview/uni-data-picker.d.ts +0 -178
  179. package/dist/src/components/uni-ui/uni-data-pickerview/uni-data-pickerview.vue.d.ts +0 -169
  180. package/dist/src/components/uni-ui/uni-data-select/uni-data-select.vue.d.ts +0 -125
  181. package/dist/src/components/uni-ui/uni-dateformat/date-format.d.ts +0 -6
  182. package/dist/src/components/uni-ui/uni-dateformat/uni-dateformat.vue.d.ts +0 -57
  183. package/dist/src/components/uni-ui/uni-datetime-picker/calendar-item.vue.d.ts +0 -44
  184. package/dist/src/components/uni-ui/uni-datetime-picker/calendar.vue.d.ts +0 -253
  185. package/dist/src/components/uni-ui/uni-datetime-picker/i18n/index.d.ts +0 -69
  186. package/dist/src/components/uni-ui/uni-datetime-picker/time-picker.vue.d.ts +0 -225
  187. package/dist/src/components/uni-ui/uni-datetime-picker/uni-datetime-picker.vue.d.ts +0 -236
  188. package/dist/src/components/uni-ui/uni-datetime-picker/util.d.ts +0 -171
  189. package/dist/src/components/uni-ui/uni-drawer/keypress.d.ts +0 -13
  190. package/dist/src/components/uni-ui/uni-drawer/uni-drawer.vue.d.ts +0 -78
  191. package/dist/src/components/uni-ui/uni-easyinput/uni-easyinput.vue.d.ts +0 -269
  192. package/dist/src/components/uni-ui/uni-fab/uni-fab.vue.d.ts +0 -109
  193. package/dist/src/components/uni-ui/uni-fav/i18n/index.d.ts +0 -15
  194. package/dist/src/components/uni-ui/uni-fav/uni-fav.vue.d.ts +0 -99
  195. package/dist/src/components/uni-ui/uni-file-picker/choose-and-upload-file.d.ts +0 -4
  196. package/dist/src/components/uni-ui/uni-file-picker/uni-file-picker.vue.d.ts +0 -254
  197. package/dist/src/components/uni-ui/uni-file-picker/upload-file.vue.d.ts +0 -81
  198. package/dist/src/components/uni-ui/uni-file-picker/upload-image.vue.d.ts +0 -90
  199. package/dist/src/components/uni-ui/uni-file-picker/utils.d.ts +0 -22
  200. package/dist/src/components/uni-ui/uni-forms/uni-forms.vue.d.ts +0 -160
  201. package/dist/src/components/uni-ui/uni-forms/utils.d.ts +0 -20
  202. package/dist/src/components/uni-ui/uni-forms/validate.d.ts +0 -42
  203. package/dist/src/components/uni-ui/uni-forms-item/uni-forms-item.vue.d.ts +0 -127
  204. package/dist/src/components/uni-ui/uni-goods-nav/i18n/index.d.ts +0 -21
  205. package/dist/src/components/uni-ui/uni-goods-nav/uni-goods-nav.vue.d.ts +0 -61
  206. package/dist/src/components/uni-ui/uni-grid/uni-grid.vue.d.ts +0 -59
  207. package/dist/src/components/uni-ui/uni-grid-item/uni-grid-item.vue.d.ts +0 -26
  208. package/dist/src/components/uni-ui/uni-group/uni-group.vue.d.ts +0 -52
  209. package/dist/src/components/uni-ui/uni-icons/icons.d.ts +0 -15
  210. package/dist/src/components/uni-ui/uni-icons/uni-icons.vue.d.ts +0 -56
  211. package/dist/src/components/uni-ui/uni-indexed-list/uni-indexed-list-item.vue.d.ts +0 -45
  212. package/dist/src/components/uni-ui/uni-indexed-list/uni-indexed-list.vue.d.ts +0 -49
  213. package/dist/src/components/uni-ui/uni-link/uni-link.vue.d.ts +0 -75
  214. package/dist/src/components/uni-ui/uni-list/uni-list.vue.d.ts +0 -53
  215. package/dist/src/components/uni-ui/uni-list/uni-refresh.vue.d.ts +0 -22
  216. package/dist/src/components/uni-ui/uni-list-ad/uni-list-ad.vue.d.ts +0 -25
  217. package/dist/src/components/uni-ui/uni-list-chat/uni-list-chat.vue.d.ts +0 -123
  218. package/dist/src/components/uni-ui/uni-list-item/uni-list-item.vue.d.ts +0 -248
  219. package/dist/src/components/uni-ui/uni-load-more/i18n/index.d.ts +0 -18
  220. package/dist/src/components/uni-ui/uni-load-more/uni-load-more.vue.d.ts +0 -89
  221. package/dist/src/components/uni-ui/uni-nav-bar/uni-nav-bar.vue.d.ts +0 -163
  222. package/dist/src/components/uni-ui/uni-nav-bar/uni-status-bar.vue.d.ts +0 -4
  223. package/dist/src/components/uni-ui/uni-notice-bar/uni-notice-bar.vue.d.ts +0 -138
  224. package/dist/src/components/uni-ui/uni-number-box/uni-number-box.vue.d.ts +0 -90
  225. package/dist/src/components/uni-ui/uni-pagination/i18n/index.d.ts +0 -28
  226. package/dist/src/components/uni-ui/uni-pagination/uni-pagination.vue.d.ts +0 -127
  227. package/dist/src/components/uni-ui/uni-popup/i18n/index.d.ts +0 -24
  228. package/dist/src/components/uni-ui/uni-popup/keypress.d.ts +0 -13
  229. package/dist/src/components/uni-ui/uni-popup/popup.d.ts +0 -11
  230. package/dist/src/components/uni-ui/uni-popup/uni-popup.vue.d.ts +0 -136
  231. package/dist/src/components/uni-ui/uni-popup-dialog/uni-popup-dialog.vue.d.ts +0 -123
  232. package/dist/src/components/uni-ui/uni-popup-message/uni-popup-message.vue.d.ts +0 -67
  233. package/dist/src/components/uni-ui/uni-popup-share/uni-popup-share.vue.d.ts +0 -49
  234. package/dist/src/components/uni-ui/uni-rate/uni-rate.vue.d.ts +0 -154
  235. package/dist/src/components/uni-ui/uni-row/uni-row.vue.d.ts +0 -41
  236. package/dist/src/components/uni-ui/uni-search-bar/i18n/index.d.ts +0 -15
  237. package/dist/src/components/uni-ui/uni-search-bar/uni-search-bar.vue.d.ts +0 -126
  238. package/dist/src/components/uni-ui/uni-section/uni-section.vue.d.ts +0 -85
  239. package/dist/src/components/uni-ui/uni-segmented-control/uni-segmented-control.vue.d.ts +0 -47
  240. package/dist/src/components/uni-ui/uni-steps/uni-steps.vue.d.ts +0 -59
  241. package/dist/src/components/uni-ui/uni-swipe-action/uni-swipe-action.vue.d.ts +0 -6
  242. package/dist/src/components/uni-ui/uni-swiper-dot/uni-swiper-dot.vue.d.ts +0 -65
  243. package/dist/src/components/uni-ui/uni-table/uni-table.vue.d.ts +0 -99
  244. package/dist/src/components/uni-ui/uni-tag/uni-tag.vue.d.ts +0 -84
  245. package/dist/src/components/uni-ui/uni-tbody/uni-tbody.vue.d.ts +0 -2
  246. package/dist/src/components/uni-ui/uni-td/uni-td.vue.d.ts +0 -48
  247. package/dist/src/components/uni-ui/uni-th/filter-dropdown.vue.d.ts +0 -99
  248. package/dist/src/components/uni-ui/uni-th/uni-th.vue.d.ts +0 -97
  249. package/dist/src/components/uni-ui/uni-thead/uni-thead.vue.d.ts +0 -15
  250. package/dist/src/components/uni-ui/uni-title/uni-title.vue.d.ts +0 -54
  251. package/dist/src/components/uni-ui/uni-tooltip/uni-tooltip.vue.d.ts +0 -23
  252. package/dist/src/components/uni-ui/uni-tr/table-checkbox.vue.d.ts +0 -58
  253. package/dist/src/components/uni-ui/uni-tr/uni-tr.vue.d.ts +0 -39
  254. package/dist/src/components/uni-ui/uni-transition/createAnimation.d.ts +0 -16
  255. package/dist/src/components/uni-ui/uni-transition/uni-transition.vue.d.ts +0 -240
@@ -0,0 +1,426 @@
1
+ <template>
2
+ <view v-if="show" class="uni-noticebar" :style="{ backgroundColor }" @click="onClick">
3
+ <uni-icons v-if="showIcon === true || showIcon === 'true'" class="uni-noticebar-icon" type="sound"
4
+ :color="color" :size="fontSize * 1.5" />
5
+ <view ref="textBox" class="uni-noticebar__content-wrapper"
6
+ :class="{
7
+ 'uni-noticebar__content-wrapper--scrollable': scrollable,
8
+ 'uni-noticebar__content-wrapper--single': !scrollable && (single || moreText)
9
+ }"
10
+ :style="{ height: scrollable ? fontSize * 1.5 + 'px' : 'auto' }"
11
+ >
12
+ <view :id="elIdBox" class="uni-noticebar__content"
13
+ :class="{
14
+ 'uni-noticebar__content--scrollable': scrollable,
15
+ 'uni-noticebar__content--single': !scrollable && (single || moreText)
16
+ }"
17
+ >
18
+ <text :id="elId" ref="animationEle" class="uni-noticebar__content-text"
19
+ :class="{
20
+ 'uni-noticebar__content-text--scrollable': scrollable,
21
+ 'uni-noticebar__content-text--single': !scrollable && (single || showGetMore)
22
+ }"
23
+ :style="{
24
+ color: color,
25
+ fontSize: fontSize + 'px',
26
+ lineHeight: fontSize * 1.5 + 'px',
27
+ width: wrapWidth + 'px',
28
+ 'animationDuration': animationDuration,
29
+ '-webkit-animationDuration': animationDuration,
30
+ animationPlayState: webviewHide ? 'paused' : animationPlayState,
31
+ '-webkit-animationPlayState': webviewHide ? 'paused' : animationPlayState,
32
+ animationDelay: animationDelay,
33
+ '-webkit-animationDelay': animationDelay
34
+ }"
35
+ >{{text}}</text>
36
+ </view>
37
+ </view>
38
+ <view v-if="isShowGetMore" class="uni-noticebar__more uni-cursor-point"
39
+ @click="clickMore">
40
+ <text v-if="moreText.length > 0" :style="{ color: moreColor, fontSize: fontSize + 'px' }">{{ moreText }}</text>
41
+ <uni-icons v-else type="right" :color="moreColor" :size="fontSize * 1.1" />
42
+ </view>
43
+ <view class="uni-noticebar-close uni-cursor-point" v-if="isShowClose">
44
+ <uni-icons type="closeempty" :color="color" :size="fontSize * 1.1" @click="close" />
45
+ </view>
46
+ </view>
47
+ </template>
48
+
49
+ <script>
50
+ // #ifdef APP-NVUE
51
+ const dom = weex.requireModule('dom');
52
+ const animation = weex.requireModule('animation');
53
+ // #endif
54
+
55
+ /**
56
+ * NoticeBar 自定义导航栏
57
+ * @description 通告栏组件
58
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=30
59
+ * @property {Number} speed 文字滚动的速度,默认100px/秒
60
+ * @property {String} text 显示文字
61
+ * @property {String} backgroundColor 背景颜色
62
+ * @property {String} color 文字颜色
63
+ * @property {String} moreColor 查看更多文字的颜色
64
+ * @property {String} moreText 设置“查看更多”的文本
65
+ * @property {Boolean} single = [true|false] 是否单行
66
+ * @property {Boolean} scrollable = [true|false] 是否滚动,为true时,NoticeBar为单行
67
+ * @property {Boolean} showIcon = [true|false] 是否显示左侧喇叭图标
68
+ * @property {Boolean} showClose = [true|false] 是否显示左侧关闭按钮
69
+ * @property {Boolean} showGetMore = [true|false] 是否显示右侧查看更多图标,为true时,NoticeBar为单行
70
+ * @event {Function} click 点击 NoticeBar 触发事件
71
+ * @event {Function} close 关闭 NoticeBar 触发事件
72
+ * @event {Function} getmore 点击”查看更多“时触发事件
73
+ */
74
+
75
+ export default {
76
+ name: 'UniNoticeBar',
77
+ emits: ['click', 'getmore', 'close'],
78
+ props: {
79
+ text: {
80
+ type: String,
81
+ default: ''
82
+ },
83
+ moreText: {
84
+ type: String,
85
+ default: ''
86
+ },
87
+ backgroundColor: {
88
+ type: String,
89
+ default: '#FFF9EA'
90
+ },
91
+ speed: {
92
+ // 默认1s滚动100px
93
+ type: Number,
94
+ default: 100
95
+ },
96
+ color: {
97
+ type: String,
98
+ default: '#FF9A43'
99
+ },
100
+ fontSize: {
101
+ type: Number,
102
+ default: 14
103
+ },
104
+ moreColor: {
105
+ type: String,
106
+ default: '#FF9A43'
107
+ },
108
+ single: {
109
+ // 是否单行
110
+ type: [Boolean, String],
111
+ default: false
112
+ },
113
+ scrollable: {
114
+ // 是否滚动,添加后控制单行效果取消
115
+ type: [Boolean, String],
116
+ default: false
117
+ },
118
+ showIcon: {
119
+ // 是否显示左侧icon
120
+ type: [Boolean, String],
121
+ default: false
122
+ },
123
+ showGetMore: {
124
+ // 是否显示右侧查看更多
125
+ type: [Boolean, String],
126
+ default: false
127
+ },
128
+ showClose: {
129
+ // 是否显示左侧关闭按钮
130
+ type: [Boolean, String],
131
+ default: false
132
+ }
133
+ },
134
+ data() {
135
+ const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
136
+ const elIdBox = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
137
+ return {
138
+ textWidth: 0,
139
+ boxWidth: 0,
140
+ wrapWidth: '',
141
+ webviewHide: false,
142
+ // #ifdef APP-NVUE
143
+ stopAnimation: false,
144
+ // #endif
145
+ elId: elId,
146
+ elIdBox: elIdBox,
147
+ show: true,
148
+ animationDuration: 'none',
149
+ animationPlayState: 'paused',
150
+ animationDelay: '0s'
151
+ }
152
+ },
153
+ computed: {
154
+ isShowGetMore() {
155
+ return this.showGetMore === true || this.showGetMore === 'true'
156
+ },
157
+ isShowClose() {
158
+ return (this.showClose === true || this.showClose === 'true')
159
+ && (this.showGetMore === false || this.showGetMore === 'false')
160
+ }
161
+ },
162
+ mounted() {
163
+ // #ifdef APP-PLUS
164
+ var pages = getCurrentPages();
165
+ var page = pages[pages.length - 1];
166
+ var currentWebview = page.$getAppWebview();
167
+ currentWebview.addEventListener('hide', () => {
168
+ this.webviewHide = true
169
+ })
170
+ currentWebview.addEventListener('show', () => {
171
+ this.webviewHide = false
172
+ })
173
+ // #endif
174
+ this.$nextTick(() => {
175
+ this.initSize()
176
+ })
177
+ },
178
+ // #ifdef APP-NVUE
179
+ beforeDestroy() {
180
+ this.stopAnimation = true
181
+ },
182
+ // #endif
183
+ methods: {
184
+ initSize() {
185
+ if (this.scrollable) {
186
+ // #ifndef APP-NVUE
187
+ let query = [],
188
+ boxWidth = 0,
189
+ textWidth = 0;
190
+ let textQuery = new Promise((resolve, reject) => {
191
+ uni.createSelectorQuery()
192
+ // #ifndef MP-ALIPAY
193
+ .in(this)
194
+ // #endif
195
+ .select(`#${this.elId}`)
196
+ .boundingClientRect()
197
+ .exec(ret => {
198
+ this.textWidth = ret[0].width
199
+ resolve()
200
+ })
201
+ })
202
+ let boxQuery = new Promise((resolve, reject) => {
203
+ uni.createSelectorQuery()
204
+ // #ifndef MP-ALIPAY
205
+ .in(this)
206
+ // #endif
207
+ .select(`#${this.elIdBox}`)
208
+ .boundingClientRect()
209
+ .exec(ret => {
210
+ this.boxWidth = ret[0].width
211
+ resolve()
212
+ })
213
+ })
214
+ query.push(textQuery)
215
+ query.push(boxQuery)
216
+ Promise.all(query).then(() => {
217
+ this.animationDuration = `${this.textWidth / this.speed}s`
218
+ this.animationDelay = `-${this.boxWidth / this.speed}s`
219
+ setTimeout(() => {
220
+ this.animationPlayState = 'running'
221
+ }, 1000)
222
+ })
223
+ // #endif
224
+ // #ifdef APP-NVUE
225
+ dom.getComponentRect(this.$refs['animationEle'], (res) => {
226
+ let winWidth = uni.getSystemInfoSync().windowWidth
227
+ this.textWidth = res.size.width
228
+ animation.transition(this.$refs['animationEle'], {
229
+ styles: {
230
+ transform: `translateX(-${winWidth}px)`
231
+ },
232
+ duration: 0,
233
+ timingFunction: 'linear',
234
+ delay: 0
235
+ }, () => {
236
+ if (!this.stopAnimation) {
237
+ animation.transition(this.$refs['animationEle'], {
238
+ styles: {
239
+ transform: `translateX(-${this.textWidth}px)`
240
+ },
241
+ timingFunction: 'linear',
242
+ duration: (this.textWidth - winWidth) / this.speed * 1000,
243
+ delay: 1000
244
+ }, () => {
245
+ if (!this.stopAnimation) {
246
+ this.loopAnimation()
247
+ }
248
+ });
249
+ }
250
+ });
251
+ })
252
+ // #endif
253
+ }
254
+ // #ifdef APP-NVUE
255
+ if (!this.scrollable && (this.single || this.moreText)) {
256
+ dom.getComponentRect(this.$refs['textBox'], (res) => {
257
+ this.wrapWidth = res.size.width
258
+ })
259
+ }
260
+ // #endif
261
+ },
262
+ loopAnimation() {
263
+ // #ifdef APP-NVUE
264
+ animation.transition(this.$refs['animationEle'], {
265
+ styles: {
266
+ transform: `translateX(0px)`
267
+ },
268
+ duration: 0
269
+ }, () => {
270
+ if (!this.stopAnimation) {
271
+ animation.transition(this.$refs['animationEle'], {
272
+ styles: {
273
+ transform: `translateX(-${this.textWidth}px)`
274
+ },
275
+ duration: this.textWidth / this.speed * 1000,
276
+ timingFunction: 'linear',
277
+ delay: 0
278
+ }, () => {
279
+ if (!this.stopAnimation) {
280
+ this.loopAnimation()
281
+ }
282
+ });
283
+ }
284
+ });
285
+ // #endif
286
+ },
287
+ clickMore() {
288
+ this.$emit('getmore')
289
+ },
290
+ close() {
291
+ this.show = false;
292
+ this.$emit('close')
293
+ },
294
+ onClick() {
295
+ this.$emit('click')
296
+ }
297
+ }
298
+ }
299
+ </script>
300
+
301
+ <style lang="scss" scoped>
302
+ .uni-noticebar {
303
+ /* #ifndef APP-NVUE */
304
+ display: flex;
305
+ width: 100%;
306
+ box-sizing: border-box;
307
+ /* #endif */
308
+ flex-direction: row;
309
+ align-items: center;
310
+ padding: 10px 12px;
311
+ margin-bottom: 10px;
312
+ }
313
+
314
+ .uni-cursor-point {
315
+ /* #ifdef H5 */
316
+ cursor: pointer;
317
+ /* #endif */
318
+ }
319
+
320
+ .uni-noticebar-close {
321
+ margin-left: 8px;
322
+ margin-right: 5px;
323
+ }
324
+
325
+ .uni-noticebar-icon {
326
+ margin-right: 5px;
327
+ }
328
+
329
+ .uni-noticebar__content-wrapper {
330
+ flex: 1;
331
+ flex-direction: column;
332
+ overflow: hidden;
333
+ }
334
+
335
+ .uni-noticebar__content-wrapper--single {
336
+ /* #ifndef APP-NVUE */
337
+ line-height: 18px;
338
+ /* #endif */
339
+ }
340
+
341
+ .uni-noticebar__content-wrapper--single,
342
+ .uni-noticebar__content-wrapper--scrollable {
343
+ flex-direction: row;
344
+ }
345
+
346
+ /* #ifndef APP-NVUE */
347
+ .uni-noticebar__content-wrapper--scrollable {
348
+ position: relative;
349
+ }
350
+
351
+ /* #endif */
352
+
353
+ .uni-noticebar__content--scrollable {
354
+ /* #ifdef APP-NVUE */
355
+ flex: 0;
356
+ /* #endif */
357
+ /* #ifndef APP-NVUE */
358
+ flex: 1;
359
+ display: block;
360
+ overflow: hidden;
361
+ /* #endif */
362
+ }
363
+
364
+ .uni-noticebar__content--single {
365
+ /* #ifndef APP-NVUE */
366
+ display: flex;
367
+ flex: none;
368
+ width: 100%;
369
+ justify-content: center;
370
+ /* #endif */
371
+ }
372
+
373
+ .uni-noticebar__content-text {
374
+ font-size: 14px;
375
+ line-height: 18px;
376
+ /* #ifndef APP-NVUE */
377
+ word-break: break-all;
378
+ /* #endif */
379
+ }
380
+
381
+ .uni-noticebar__content-text--single {
382
+ /* #ifdef APP-NVUE */
383
+ lines: 1;
384
+ /* #endif */
385
+ /* #ifndef APP-NVUE */
386
+ display: block;
387
+ width: 100%;
388
+ white-space: nowrap;
389
+ /* #endif */
390
+ overflow: hidden;
391
+ text-overflow: ellipsis;
392
+ }
393
+
394
+ .uni-noticebar__content-text--scrollable {
395
+ /* #ifdef APP-NVUE */
396
+ lines: 1;
397
+ padding-left: 750rpx;
398
+ /* #endif */
399
+ /* #ifndef APP-NVUE */
400
+ position: absolute;
401
+ display: block;
402
+ height: 18px;
403
+ line-height: 18px;
404
+ white-space: nowrap;
405
+ padding-left: 100%;
406
+ animation: notice 10s 0s linear infinite both;
407
+ animation-play-state: paused;
408
+ /* #endif */
409
+ }
410
+
411
+ .uni-noticebar__more {
412
+ /* #ifndef APP-NVUE */
413
+ display: inline-flex;
414
+ /* #endif */
415
+ flex-direction: row;
416
+ flex-wrap: nowrap;
417
+ align-items: center;
418
+ padding-left: 5px;
419
+ }
420
+
421
+ @keyframes notice {
422
+ 100% {
423
+ transform: translate3d(-100%, 0, 0);
424
+ }
425
+ }
426
+ </style>
@@ -0,0 +1,221 @@
1
+ <template>
2
+ <view class="uni-numbox">
3
+ <view @click="_calcValue('minus')" class="uni-numbox__minus uni-numbox-btns" :style="{background}">
4
+ <text class="uni-numbox--text" :class="{ 'uni-numbox--disabled': inputValue <= min || disabled }" :style="{color}">-</text>
5
+ </view>
6
+ <input :disabled="disabled" @focus="_onFocus" @blur="_onBlur" class="uni-numbox__value" type="number"
7
+ v-model="inputValue" :style="{background, color}" />
8
+ <view @click="_calcValue('plus')" class="uni-numbox__plus uni-numbox-btns" :style="{background}">
9
+ <text class="uni-numbox--text" :class="{ 'uni-numbox--disabled': inputValue >= max || disabled }" :style="{color}">+</text>
10
+ </view>
11
+ </view>
12
+ </template>
13
+ <script>
14
+ /**
15
+ * NumberBox 数字输入框
16
+ * @description 带加减按钮的数字输入框
17
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=31
18
+ * @property {Number} value 输入框当前值
19
+ * @property {Number} min 最小值
20
+ * @property {Number} max 最大值
21
+ * @property {Number} step 每次点击改变的间隔大小
22
+ * @property {String} background 背景色
23
+ * @property {String} color 字体颜色(前景色)
24
+ * @property {Boolean} disabled = [true|false] 是否为禁用状态
25
+ * @event {Function} change 输入框值改变时触发的事件,参数为输入框当前的 value
26
+ * @event {Function} focus 输入框聚焦时触发的事件,参数为 event 对象
27
+ * @event {Function} blur 输入框失焦时触发的事件,参数为 event 对象
28
+ */
29
+
30
+ export default {
31
+ name: "UniNumberBox",
32
+ emits: ['change', 'input', 'update:modelValue', 'blur', 'focus'],
33
+ props: {
34
+ value: {
35
+ type: [Number, String],
36
+ default: 1
37
+ },
38
+ modelValue: {
39
+ type: [Number, String],
40
+ default: 1
41
+ },
42
+ min: {
43
+ type: Number,
44
+ default: 0
45
+ },
46
+ max: {
47
+ type: Number,
48
+ default: 100
49
+ },
50
+ step: {
51
+ type: Number,
52
+ default: 1
53
+ },
54
+ background: {
55
+ type: String,
56
+ default: '#f5f5f5'
57
+ },
58
+ color: {
59
+ type: String,
60
+ default: '#333'
61
+ },
62
+ disabled: {
63
+ type: Boolean,
64
+ default: false
65
+ }
66
+ },
67
+ data() {
68
+ return {
69
+ inputValue: 0
70
+ };
71
+ },
72
+ watch: {
73
+ value(val) {
74
+ this.inputValue = +val;
75
+ },
76
+ modelValue(val) {
77
+ this.inputValue = +val;
78
+ }
79
+ },
80
+ created() {
81
+ if (this.value === 1) {
82
+ this.inputValue = +this.modelValue;
83
+ }
84
+ if (this.modelValue === 1) {
85
+ this.inputValue = +this.value;
86
+ }
87
+ },
88
+ methods: {
89
+ _calcValue(type) {
90
+ if (this.disabled) {
91
+ return;
92
+ }
93
+ const scale = this._getDecimalScale();
94
+ let value = this.inputValue * scale;
95
+ let step = this.step * scale;
96
+ if (type === "minus") {
97
+ value -= step;
98
+ if (value < (this.min * scale)) {
99
+ return;
100
+ }
101
+ if (value > (this.max * scale)) {
102
+ value = this.max * scale
103
+ }
104
+ }
105
+
106
+ if (type === "plus") {
107
+ value += step;
108
+ if (value > (this.max * scale)) {
109
+ return;
110
+ }
111
+ if (value < (this.min * scale)) {
112
+ value = this.min * scale
113
+ }
114
+ }
115
+
116
+ this.inputValue = (value / scale).toFixed(String(scale).length - 1);
117
+ this.$emit("change", +this.inputValue);
118
+ // TODO vue2 兼容
119
+ this.$emit("input", +this.inputValue);
120
+ // TODO vue3 兼容
121
+ this.$emit("update:modelValue", +this.inputValue);
122
+ },
123
+ _getDecimalScale() {
124
+
125
+ let scale = 1;
126
+ // 浮点型
127
+ if (~~this.step !== this.step) {
128
+ scale = Math.pow(10, String(this.step).split(".")[1].length);
129
+ }
130
+ return scale;
131
+ },
132
+ _onBlur(event) {
133
+ this.$emit('blur', event)
134
+ let value = event.detail.value;
135
+ if (isNaN(value)) {
136
+ this.inputValue = this.min;
137
+ return;
138
+ }
139
+ value = +value;
140
+ if (value > this.max) {
141
+ value = this.max;
142
+ } else if (value < this.min) {
143
+ value = this.min;
144
+ }
145
+ const scale = this._getDecimalScale();
146
+ this.inputValue = value.toFixed(String(scale).length - 1);
147
+ this.$emit("change", +this.inputValue);
148
+ this.$emit("input", +this.inputValue);
149
+ this.$emit("update:modelValue", +this.inputValue);
150
+ },
151
+ _onFocus(event) {
152
+ this.$emit('focus', event)
153
+ }
154
+ }
155
+ };
156
+ </script>
157
+ <style lang="scss" >
158
+ $box-height: 26px;
159
+ $bg: #f5f5f5;
160
+ $br: 2px;
161
+ $color: #333;
162
+
163
+ .uni-numbox {
164
+ /* #ifndef APP-NVUE */
165
+ display: flex;
166
+ /* #endif */
167
+ flex-direction: row;
168
+ }
169
+
170
+ .uni-numbox-btns {
171
+ /* #ifndef APP-NVUE */
172
+ display: flex;
173
+ /* #endif */
174
+ flex-direction: row;
175
+ align-items: center;
176
+ justify-content: center;
177
+ padding: 0 8px;
178
+ background-color: $bg;
179
+ /* #ifdef H5 */
180
+ cursor: pointer;
181
+ /* #endif */
182
+ }
183
+
184
+ .uni-numbox__value {
185
+ margin: 0 2px;
186
+ background-color: $bg;
187
+ width: 40px;
188
+ height: $box-height;
189
+ text-align: center;
190
+ font-size: 14px;
191
+ border-left-width: 0;
192
+ border-right-width: 0;
193
+ color: $color;
194
+ }
195
+
196
+ .uni-numbox__minus {
197
+ border-top-left-radius: $br;
198
+ border-bottom-left-radius: $br;
199
+ }
200
+
201
+ .uni-numbox__plus {
202
+ border-top-right-radius: $br;
203
+ border-bottom-right-radius: $br;
204
+ }
205
+
206
+ .uni-numbox--text {
207
+ // fix nvue
208
+ line-height: 20px;
209
+
210
+ font-size: 20px;
211
+ font-weight: 300;
212
+ color: $color;
213
+ }
214
+
215
+ .uni-numbox .uni-numbox--disabled {
216
+ color: #c0c0c0 !important;
217
+ /* #ifdef H5 */
218
+ cursor: not-allowed;
219
+ /* #endif */
220
+ }
221
+ </style>
@@ -0,0 +1,5 @@
1
+ {
2
+ "uni-pagination.prevText": "prev",
3
+ "uni-pagination.nextText": "next",
4
+ "uni-pagination.piecePerPage": "piece/page"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "uni-pagination.prevText": "anterior",
3
+ "uni-pagination.nextText": "prxima",
4
+ "uni-pagination.piecePerPage": "Art��culo/P��gina"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "uni-pagination.prevText": "précédente",
3
+ "uni-pagination.nextText": "suivante",
4
+ "uni-pagination.piecePerPage": "Articles/Pages"
5
+ }
@@ -0,0 +1,12 @@
1
+ import en from './en.json'
2
+ import es from './es.json'
3
+ import fr from './fr.json'
4
+ import zhHans from './zh-Hans.json'
5
+ import zhHant from './zh-Hant.json'
6
+ export default {
7
+ en,
8
+ es,
9
+ fr,
10
+ 'zh-Hans': zhHans,
11
+ 'zh-Hant': zhHant
12
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "uni-pagination.prevText": "上一页",
3
+ "uni-pagination.nextText": "下一页",
4
+ "uni-pagination.piecePerPage": "条/页"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "uni-pagination.prevText": "上一頁",
3
+ "uni-pagination.nextText": "下一頁",
4
+ "uni-pagination.piecePerPage": "條/頁"
5
+ }