uview-plus 3.8.55 → 3.8.106

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 (229) hide show
  1. package/changelog.md +2147 -1828
  2. package/components/u-action-sheet/props.js +3 -1
  3. package/components/u-action-sheet/u-action-sheet.vue +22 -2
  4. package/components/u-album/props.js +3 -1
  5. package/components/u-alert/props.js +4 -2
  6. package/components/u-avatar/props.js +4 -1
  7. package/components/u-avatar-group/props.js +4 -1
  8. package/components/u-back-top/props.js +4 -1
  9. package/components/u-badge/props.js +4 -1
  10. package/components/u-barcode/u-barcode.vue +44 -15
  11. package/components/u-box/props.js +5 -2
  12. package/components/u-button/props.js +4 -1
  13. package/components/u-button/u-button.vue +2 -5
  14. package/components/u-button/vue.scss +3 -3
  15. package/components/u-calendar/calendar.js +8 -0
  16. package/components/u-calendar/props.js +43 -1
  17. package/components/u-calendar/u-calendar.vue +16 -0
  18. package/components/u-calendar-strip/props.js +3 -1
  19. package/components/u-canvas/u-canvas.vue +1028 -423
  20. package/components/u-car-keyboard/props.js +3 -1
  21. package/components/u-card/props.js +3 -1
  22. package/components/u-cell/props.js +4 -1
  23. package/components/u-cell/u-cell.vue +9 -1
  24. package/components/u-cell-group/props.js +4 -1
  25. package/components/u-checkbox/props.js +4 -1
  26. package/components/u-checkbox/u-checkbox.vue +7 -3
  27. package/components/u-checkbox-group/props.js +3 -1
  28. package/components/u-circle-progress/props.js +4 -1
  29. package/components/u-code/props.js +4 -1
  30. package/components/u-code-input/props.js +4 -1
  31. package/components/u-col/props.js +4 -1
  32. package/components/u-collapse/props.js +4 -1
  33. package/components/u-collapse-item/props.js +4 -1
  34. package/components/u-color-picker/u-color-picker.vue +1 -0
  35. package/components/u-column-notice/props.js +4 -1
  36. package/components/u-count-down/props.js +4 -1
  37. package/components/u-count-to/props.js +4 -1
  38. package/components/u-cropper/u-cropper.vue +95 -51
  39. package/components/u-datetime-picker/props.js +4 -1
  40. package/components/u-datetime-picker/u-datetime-picker.vue +53 -4
  41. package/components/u-divider/props.js +4 -1
  42. package/components/u-dragsort/u-dragsort.vue +57 -32
  43. package/components/u-dropdown/props.js +3 -1
  44. package/components/u-dropdown-item/props.js +3 -1
  45. package/components/u-empty/props.js +4 -1
  46. package/components/u-form/props.js +4 -1
  47. package/components/u-form-item/props.js +4 -1
  48. package/components/u-gap/props.js +4 -1
  49. package/components/u-grid/props.js +4 -1
  50. package/components/u-grid-item/props.js +4 -1
  51. package/components/u-guide/props.js +3 -1
  52. package/components/u-icon/props.js +4 -1
  53. package/components/u-icon/u-icon.vue +11 -2
  54. package/components/u-icon/upicon.ttf +0 -0
  55. package/components/u-icon/util.js +103 -10
  56. package/components/u-image/props.js +4 -1
  57. package/components/u-image/u-image.vue +280 -267
  58. package/components/u-index-anchor/props.js +4 -1
  59. package/components/u-index-item/props.js +2 -1
  60. package/components/u-index-item/u-index-item.vue +1 -1
  61. package/components/u-index-list/props.js +4 -1
  62. package/components/u-index-list/u-index-list.vue +1 -1
  63. package/components/u-input/props.js +3 -1
  64. package/components/u-keyboard/props.js +4 -1
  65. package/components/u-line/props.js +4 -1
  66. package/components/u-line-progress/props.js +6 -3
  67. package/components/u-link/props.js +4 -1
  68. package/components/u-list/props.js +4 -1
  69. package/components/u-list-item/props.js +4 -1
  70. package/components/u-loading-icon/props.js +4 -1
  71. package/components/u-loading-page/props.js +3 -1
  72. package/components/u-loadmore/props.js +4 -1
  73. package/components/u-markdown/u-markdown.vue +45 -3
  74. package/components/u-modal/props.js +4 -1
  75. package/components/u-navbar/props.js +4 -2
  76. package/components/u-navbar/u-navbar.vue +15 -9
  77. package/components/u-no-network/props.js +4 -1
  78. package/components/u-notice-bar/props.js +4 -1
  79. package/components/u-notify/props.js +4 -1
  80. package/components/u-novel-reader/content-normalizer.js +80 -0
  81. package/components/u-novel-reader/layout-engine.js +225 -0
  82. package/components/u-novel-reader/measure-adapter.js +69 -0
  83. package/components/u-novel-reader/novelReader.js +35 -0
  84. package/components/u-novel-reader/persistence.js +144 -0
  85. package/components/u-novel-reader/props.js +100 -0
  86. package/components/u-novel-reader/reader-catalog.vue +234 -0
  87. package/components/u-novel-reader/reader-content.vue +226 -0
  88. package/components/u-novel-reader/reader-core.js +151 -0
  89. package/components/u-novel-reader/reader-settings.vue +325 -0
  90. package/components/u-novel-reader/reader-toolbar.vue +313 -0
  91. package/components/u-novel-reader/theme-vars.scss +49 -0
  92. package/components/u-novel-reader/u-novel-reader.vue +836 -0
  93. package/components/u-number-box/props.js +4 -1
  94. package/components/u-number-box/u-number-box.vue +2 -2
  95. package/components/u-number-keyboard/props.js +4 -1
  96. package/components/u-overlay/props.js +4 -1
  97. package/components/u-pagination/u-pagination.vue +60 -39
  98. package/components/u-parse/props.js +4 -1
  99. package/components/u-picker/props.js +4 -1
  100. package/components/u-picker-column/props.js +3 -1
  101. package/components/u-popover/props.js +2 -1
  102. package/components/u-popup/props.js +4 -1
  103. package/components/u-poster/u-poster.vue +246 -214
  104. package/components/u-qrcode/qrcode.js +105 -97
  105. package/components/u-qrcode/u-qrcode.vue +242 -289
  106. package/components/u-radio/props.js +4 -1
  107. package/components/u-radio/u-radio.vue +7 -3
  108. package/components/u-radio-group/props.js +4 -1
  109. package/components/u-rate/props.js +4 -1
  110. package/components/u-read-more/props.js +4 -1
  111. package/components/u-row/props.js +4 -1
  112. package/components/u-row-notice/props.js +4 -1
  113. package/components/u-safe-bottom/props.js +2 -1
  114. package/components/u-scroll-list/props.js +4 -1
  115. package/components/u-scroll-list/scrollWxs.wxs +1 -1
  116. package/components/u-search/props.js +3 -1
  117. package/components/u-skeleton/props.js +4 -1
  118. package/components/u-slider/props.js +3 -1
  119. package/components/u-slider/u-slider.vue +71 -29
  120. package/components/u-status-bar/props.js +4 -1
  121. package/components/u-steps/props.js +4 -1
  122. package/components/u-steps-item/props.js +4 -1
  123. package/components/u-sticky/props.js +4 -1
  124. package/components/u-sticky/u-sticky.vue +11 -0
  125. package/components/u-subsection/props.js +3 -1
  126. package/components/u-swipe-action/props.js +4 -1
  127. package/components/u-swipe-action-item/index.wxs +43 -25
  128. package/components/u-swipe-action-item/nvue.js +9 -0
  129. package/components/u-swipe-action-item/other.js +32 -21
  130. package/components/u-swipe-action-item/props.js +9 -1
  131. package/components/u-swipe-action-item/swipeActionItem.js +1 -0
  132. package/components/u-swipe-action-item/u-swipe-action-item.vue +42 -4
  133. package/components/u-swiper/props.js +9 -1
  134. package/components/u-swiper/swiper.js +1 -0
  135. package/components/u-swiper/u-swiper.vue +2 -0
  136. package/components/u-swiper-indicator/props.js +4 -1
  137. package/components/u-switch/props.js +4 -1
  138. package/components/u-switch/u-switch.vue +1 -1
  139. package/components/u-tabbar/props.js +3 -1
  140. package/components/u-tabbar/u-tabbar.vue +2 -1
  141. package/components/u-tabbar-item/props.js +4 -1
  142. package/components/u-tabbar-item/u-tabbar-item.vue +64 -21
  143. package/components/u-table/props.js +3 -1
  144. package/components/u-table2/tableRow.vue +155 -69
  145. package/components/u-table2/u-table2.vue +327 -137
  146. package/components/u-tabs/props.js +4 -1
  147. package/components/u-tabs/u-tabs.vue +11 -8
  148. package/components/u-tabs-item/props.js +3 -1
  149. package/components/u-tabs-pro/u-tabs-pro.vue +212 -0
  150. package/components/u-tag/props.js +4 -1
  151. package/components/u-td/props.js +3 -1
  152. package/components/u-text/props.js +4 -1
  153. package/components/u-text/text.js +1 -1
  154. package/components/u-text/u-text.vue +18 -6
  155. package/components/u-textarea/props.js +3 -1
  156. package/components/u-textarea/u-textarea.vue +16 -5
  157. package/components/u-th/props.js +3 -1
  158. package/components/u-toolbar/props.js +4 -1
  159. package/components/u-tooltip/props.js +10 -2
  160. package/components/u-tooltip/tooltip.js +2 -1
  161. package/components/u-tooltip/u-tooltip.vue +31 -3
  162. package/components/u-tr/props.js +3 -1
  163. package/components/u-transition/nvue-ani-map.js +75 -68
  164. package/components/u-transition/props.js +4 -1
  165. package/components/u-transition/transitionMixin.js +164 -163
  166. package/components/u-upload/props.js +4 -1
  167. package/components/u-upload/u-upload.vue +48 -41
  168. package/components/u-waterfall/u-waterfall.vue +162 -110
  169. package/index.js +65 -8
  170. package/libs/config/config.js +1 -1
  171. package/libs/config/props.js +180 -204
  172. package/libs/css/components.scss +3 -0
  173. package/libs/function/index.js +66 -0
  174. package/libs/function/uni-api-shims.js +29 -0
  175. package/libs/i18n/index.js +71 -36
  176. package/libs/i18n/locale-packs.js +11 -0
  177. package/libs/i18n/locales/all.js +23 -0
  178. package/libs/i18n/locales/{de.json → de.js} +1 -1
  179. package/libs/i18n/locales/{en.json → en.js} +2 -2
  180. package/libs/i18n/locales/{es.json → es.js} +1 -1
  181. package/libs/i18n/locales/{fr.json → fr.js} +2 -2
  182. package/libs/i18n/locales/{ja.json → ja.js} +1 -1
  183. package/libs/i18n/locales/{ko.json → ko.js} +1 -1
  184. package/libs/i18n/locales/{ru.json → ru.js} +1 -1
  185. package/libs/i18n/locales/{th.json → th.js} +1 -1
  186. package/libs/i18n/locales/{zh-Hans.json → zh-Hans.js} +1 -1
  187. package/libs/i18n/locales/{zh-Hant.json → zh-Hant.js} +1 -1
  188. package/libs/mixin/mixin.js +18 -54
  189. package/libs/root/index.js +78 -5
  190. package/libs/root/page.js +7 -7
  191. package/libs/root/root.js +73 -3
  192. package/libs/util/app-nvue-webview-canvas.js +486 -0
  193. package/libs/util/gcanvas/bridge/bridge-weex.js +10 -7
  194. package/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js +0 -0
  195. package/libs/util/gcanvas/context-2d/FillStylePattern.js +0 -0
  196. package/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js +0 -0
  197. package/libs/util/gcanvas/context-2d/RenderingContext.js +0 -0
  198. package/libs/util/gcanvas/context-webgl/ActiveInfo.js +0 -0
  199. package/libs/util/gcanvas/context-webgl/Buffer.js +0 -0
  200. package/libs/util/gcanvas/context-webgl/Framebuffer.js +0 -0
  201. package/libs/util/gcanvas/context-webgl/GLenum.js +0 -0
  202. package/libs/util/gcanvas/context-webgl/GLmethod.js +0 -0
  203. package/libs/util/gcanvas/context-webgl/GLtype.js +0 -0
  204. package/libs/util/gcanvas/context-webgl/Program.js +0 -0
  205. package/libs/util/gcanvas/context-webgl/Renderbuffer.js +0 -0
  206. package/libs/util/gcanvas/context-webgl/RenderingContext.js +0 -0
  207. package/libs/util/gcanvas/context-webgl/Shader.js +0 -0
  208. package/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js +0 -0
  209. package/libs/util/gcanvas/context-webgl/Texture.js +0 -0
  210. package/libs/util/gcanvas/context-webgl/UniformLocation.js +0 -0
  211. package/libs/util/gcanvas/context-webgl/classUtils.js +0 -0
  212. package/libs/util/gcanvas/env/canvas.js +0 -0
  213. package/libs/util/gcanvas/env/image.js +0 -0
  214. package/libs/util/gcanvas/env/tool.js +0 -0
  215. package/libs/util/gcanvas/index.js +3 -3
  216. package/package.json +4 -5
  217. package/tsconfig.json +18 -0
  218. package/types/comps/calendar.d.ts +38 -0
  219. package/types/comps/checkbox.d.ts +12 -0
  220. package/types/comps/lineProgress.d.ts +5 -0
  221. package/types/comps/navbar.d.ts +3 -3
  222. package/types/comps/swipeActionItem.d.ts +13 -0
  223. package/types/comps/swiper.d.ts +5 -0
  224. package/types/comps/tabs.d.ts +2 -1
  225. package/types/comps/text.d.ts +1 -1
  226. package/types/comps/tooltip.d.ts +36 -1
  227. package/types/func.d.ts +23 -0
  228. package/types/index.d.ts +1 -0
  229. /package/components/u-markdown/{marked.esm.js → marked.esm.mjs} +0 -0
@@ -7,8 +7,10 @@
7
7
  * @FilePath : /uview-plus/libs/config/props/props.js
8
8
  */
9
9
  import { defineMixin } from '../../libs/vue'
10
- import defProps from '../../libs/config/props.js'
10
+ import ActionSheetDefaultProps from './actionSheet'
11
+ import { registerComponentProps } from '../../libs/config/props.js'
11
12
 
13
+ const defProps = registerComponentProps(ActionSheetDefaultProps)
12
14
  export const props = defineMixin({
13
15
  props: {
14
16
  // 操作菜单是否展示 (默认false)
@@ -36,7 +36,14 @@
36
36
  }, descriptionDynamicStyle]"
37
37
  v-if="description"
38
38
  >{{description}}</text>
39
- <slot>
39
+ <view
40
+ class="u-action-sheet__slot"
41
+ v-if="$slots.default"
42
+ @tap="slotClickHandler"
43
+ >
44
+ <slot></slot>
45
+ </view>
46
+ <template v-else>
40
47
  <!-- 分割线 -->
41
48
  <u-line v-if="description" :color="dividerColor"></u-line>
42
49
  <!-- 操作项列表 -->
@@ -96,7 +103,7 @@
96
103
  <u-line v-if="index !== actions.length - 1" :color="dividerColor"></u-line>
97
104
  </view>
98
105
  </scroll-view>
99
- </slot>
106
+ </template>
100
107
  <!-- 取消按钮前的分割区域 -->
101
108
  <u-gap
102
109
  :bgColor="cancelGapColor"
@@ -161,6 +168,11 @@
161
168
  name: "u-action-sheet",
162
169
  // 一些props参数和methods方法,通过mixin混入,因为其他文件也会用到
163
170
  mixins: [openType, buttonMixin, mixin, props],
171
+ provide() {
172
+ return {
173
+ uActionSheet: this,
174
+ }
175
+ },
164
176
  data() {
165
177
  return {
166
178
 
@@ -227,6 +239,13 @@
227
239
  this.$emit('update:show', false)
228
240
  this.$emit('close')
229
241
  },
242
+ // 点击自定义内容时,按菜单项点击配置关闭弹窗
243
+ slotClickHandler() {
244
+ if (this.closeOnClickAction) {
245
+ this.$emit('update:show', false)
246
+ this.$emit('close')
247
+ }
248
+ },
230
249
  // 选择操作项处理
231
250
  selectHandler(index) {
232
251
  const item = this.actions[index]
@@ -296,6 +315,7 @@
296
315
  }
297
316
 
298
317
  &__description {
318
+ display: block;
299
319
  font-size: $u-action-sheet-description-font-size;
300
320
  color: $u-action-sheet-description-color;
301
321
  margin: $u-action-sheet-description-margin;
@@ -7,8 +7,10 @@
7
7
  * @FilePath : /uview-plus/components/u-album/props.js
8
8
  */
9
9
  import { defineMixin } from '../../libs/vue'
10
- import defProps from '../../libs/config/props.js'
10
+ import AlbumDefaultProps from './album'
11
+ import { registerComponentProps } from '../../libs/config/props.js'
11
12
 
13
+ const defProps = registerComponentProps(AlbumDefaultProps)
12
14
  export const props = defineMixin({
13
15
  props: {
14
16
  // 图片地址,Array<String>|Array<Object>形式
@@ -7,8 +7,10 @@
7
7
  * @FilePath : /uview-plus/libs/config/props/props.js
8
8
  */
9
9
  import { defineMixin } from '../../libs/vue'
10
- import defProps from '../../libs/config/props.js'
11
-
10
+ import AlertDefaultProps from './alert'
11
+ import { registerComponentProps } from '../../libs/config/props.js'
12
+
13
+ const defProps = registerComponentProps(AlertDefaultProps)
12
14
  export const props = defineMixin({
13
15
  props: {
14
16
  // 显示文字
@@ -1,5 +1,8 @@
1
1
  import { defineMixin } from '../../libs/vue'
2
- import defProps from '../../libs/config/props.js'
2
+ import AvatarDefaultProps from './avatar'
3
+ import { registerComponentProps } from '../../libs/config/props.js'
4
+
5
+ const defProps = registerComponentProps(AvatarDefaultProps)
3
6
  import test from '../../libs/function/test';
4
7
  export const props = defineMixin({
5
8
  props: {
@@ -1,5 +1,8 @@
1
1
  import { defineMixin } from '../../libs/vue'
2
- import defProps from '../../libs/config/props.js'
2
+ import AvatarGroupDefaultProps from './avatarGroup'
3
+ import { registerComponentProps } from '../../libs/config/props.js'
4
+
5
+ const defProps = registerComponentProps(AvatarGroupDefaultProps)
3
6
  export const props = defineMixin({
4
7
  props: {
5
8
  // 头像图片组
@@ -1,5 +1,8 @@
1
1
  import { defineMixin } from '../../libs/vue'
2
- import defProps from '../../libs/config/props.js'
2
+ import BackTopDefaultProps from './backtop'
3
+ import { registerComponentProps } from '../../libs/config/props.js'
4
+
5
+ const defProps = registerComponentProps(BackTopDefaultProps)
3
6
  export const props = defineMixin({
4
7
  props: {
5
8
  // 返回顶部的形状,circle-圆形,square-方形
@@ -1,5 +1,8 @@
1
1
  import { defineMixin } from '../../libs/vue'
2
- import defProps from '../../libs/config/props.js'
2
+ import BadgeDefaultProps from './badge'
3
+ import { registerComponentProps } from '../../libs/config/props.js'
4
+
5
+ const defProps = registerComponentProps(BadgeDefaultProps)
3
6
  export const props = defineMixin({
4
7
  props: {
5
8
  // 是否显示圆点
@@ -1,11 +1,14 @@
1
1
  <template>
2
2
  <view class="u-barcode" v-if="calcSizeDone">
3
- <canvas
4
- v-if="showCanvas && !error"
5
- :id="canvasId"
3
+ <up-canvas
4
+ v-if="showCanvas && !error"
5
+ ref="barcodeCanvas"
6
6
  :canvas-id="canvasId"
7
+ :width="canvasWidth"
8
+ :height="canvasHeight"
9
+ bg-color="transparent"
7
10
  :style="{ width: canvasWidth + 'px', height: canvasHeight + 'px' }"
8
- ></canvas>
11
+ ></up-canvas>
9
12
  <image
10
13
  v-else-if="!showCanvas && !error"
11
14
  :src="barcodeImage"
@@ -19,6 +22,15 @@
19
22
  >
20
23
  <text class="error-text">{{ error }}</text>
21
24
  </view>
25
+ <up-canvas
26
+ v-if="!useCanvas && calcSizeDone"
27
+ ref="barcodeImageCanvas"
28
+ class="u-barcode__hidden-canvas"
29
+ :canvas-id="tempCanvasId"
30
+ :width="canvasWidth"
31
+ :height="canvasHeight"
32
+ bg-color="transparent"
33
+ ></up-canvas>
22
34
  </view>
23
35
  </template>
24
36
 
@@ -146,6 +158,7 @@ export default {
146
158
  data() {
147
159
  return {
148
160
  canvasId: 'barcode-' + Math.random().toString(36).substr(2, 9),
161
+ tempCanvasId: 'barcode-temp-' + Math.random().toString(36).substr(2, 9),
149
162
  barcodeImage: '',
150
163
  showCanvas: false,
151
164
  canvasWidth: 0,
@@ -269,8 +282,7 @@ export default {
269
282
 
270
283
  await nextTick()
271
284
 
272
- // 获取canvas上下文
273
- const ctx = uni.createCanvasContext(this.canvasId, this)
285
+ const ctx = await this.getCanvasRef('barcodeCanvas')
274
286
 
275
287
  // 清空画布
276
288
  ctx.setFillStyle(options.background)
@@ -301,14 +313,14 @@ export default {
301
313
  * @author jry <ijry@qq.com>
302
314
  * @param {Object} options - 条码配置选项
303
315
  */
304
- renderToImage(options) {
316
+ async renderToImage(options) {
305
317
  try {
306
318
  // 计算canvas尺寸
307
319
  this.calculateCanvasSize(options)
308
-
309
- // 创建临时canvas用于生成图片
310
- const tempCanvasId = 'temp-' + this.canvasId
311
- const ctx = uni.createCanvasContext(tempCanvasId, this)
320
+
321
+ await nextTick()
322
+ const canvas = await this.getCanvasRef('barcodeImageCanvas')
323
+ const ctx = canvas
312
324
 
313
325
  // 清空画布
314
326
  ctx.setFillStyle(options.background)
@@ -326,9 +338,9 @@ export default {
326
338
  ctx.draw(false, () => {
327
339
  // 延迟一小段时间确保canvas绘制完成
328
340
  setTimeout(() => {
329
- // 将canvas转换为图片
330
- uni.canvasToTempFilePath({
331
- canvasId: tempCanvasId,
341
+ canvas.toTempFilePath({
342
+ width: this.canvasWidth,
343
+ height: this.canvasHeight,
332
344
  success: (res) => {
333
345
  this.barcodeImage = res.tempFilePath
334
346
  this.$emit('rendered', { type: 'image', value: this.value, path: res.tempFilePath })
@@ -337,7 +349,7 @@ export default {
337
349
  console.error('生成条码图片失败:', error)
338
350
  this.$emit('error', error)
339
351
  }
340
- }, this)
352
+ })
341
353
  }, 100)
342
354
  })
343
355
  } catch (error) {
@@ -345,6 +357,16 @@ export default {
345
357
  this.$emit('error', error)
346
358
  }
347
359
  },
360
+
361
+ async getCanvasRef(refName) {
362
+ await nextTick()
363
+ const canvas = this.$refs[refName]
364
+ if (!canvas) {
365
+ throw new Error(`Canvas ref not found: ${refName}`)
366
+ }
367
+ await canvas.initCanvas(true)
368
+ return canvas
369
+ },
348
370
 
349
371
  /**
350
372
  * 计算canvas尺寸
@@ -986,6 +1008,13 @@ export default {
986
1008
  align-items: center;
987
1009
  }
988
1010
 
1011
+ .u-barcode__hidden-canvas {
1012
+ position: fixed;
1013
+ top: -10000px;
1014
+ left: -10000px;
1015
+ z-index: -1;
1016
+ }
1017
+
989
1018
  .error-container {
990
1019
  display: flex;
991
1020
  justify-content: center;
@@ -1,5 +1,8 @@
1
1
  import { defineMixin } from '../../libs/vue.js'
2
- import defProps from './box.js'
2
+ import BoxDefaultProps from './box.js'
3
+ import { registerComponentProps } from '../../libs/config/props.js'
4
+
5
+ const defProps = registerComponentProps(BoxDefaultProps)
3
6
 
4
7
  export const propsBox = defineMixin({
5
8
  props: {
@@ -54,4 +57,4 @@ export const propsBox = defineMixin({
54
57
  default: () => defProps.box.rightBottomTitle
55
58
  },
56
59
  }
57
- })
60
+ })
@@ -1,5 +1,8 @@
1
1
  import { defineMixin } from '../../libs/vue'
2
- import defProps from '../../libs/config/props.js'
2
+ import ButtonDefaultProps from './button'
3
+ import { registerComponentProps } from '../../libs/config/props.js'
4
+
5
+ const defProps = registerComponentProps(ButtonDefaultProps)
3
6
  export const props = defineMixin({
4
7
  props: {
5
8
  // 是否细边框
@@ -227,10 +227,7 @@ export default {
227
227
  nvuePlainBackgroundColor() {
228
228
  return this.upThemeVar(
229
229
  '--up-button-plain-background-color',
230
- this.upThemeVar(
231
- '--up-card-bg-color',
232
- this.isDarkTheme ? '#1c1c1e' : '#ffffff'
233
- )
230
+ 'transparent'
234
231
  );
235
232
  },
236
233
  loadingColor() {
@@ -441,7 +438,7 @@ $u-button-square-border-top-left-radius: 3px !default;
441
438
  $u-button-square-border-bottom-left-radius: 3px !default;
442
439
  $u-button-square-border-bottom-right-radius: 3px !default;
443
440
  $u-button-icon-min-width: 1em !default;
444
- $u-button-plain-background-color: var(--up-button-plain-background-color, var(--up-card-bg-color, #fff)) !default;
441
+ $u-button-plain-background-color: var(--up-button-plain-background-color, transparent) !default;
445
442
  $u-button-hairline-border-width: 0.5px !default;
446
443
 
447
444
  .u-button {
@@ -14,9 +14,9 @@ $u-button-plain-u-button-success-color:$u-success;
14
14
  $u-button-plain-u-button-error-color:$u-error;
15
15
  $u-button-plain-u-button-warning-color:$u-warning;
16
16
 
17
- .u-button {
18
- width: 100%;
19
- white-space: nowrap;
17
+ .u-button {
18
+ width: auto;
19
+ white-space: nowrap;
20
20
 
21
21
  &__text {
22
22
  white-space: nowrap;
@@ -42,6 +42,14 @@ export default {
42
42
  timePrecision: 'minute',
43
43
  defaultTime: '',
44
44
  round: 0,
45
+ overlay: true,
46
+ duration: 300,
47
+ overlayStyle: {},
48
+ overlayOpacity: 0.5,
49
+ zIndex: 10075,
50
+ safeAreaInsetBottom: true,
51
+ safeAreaInsetTop: false,
52
+ bgColor: '',
45
53
  monthNum: 3,
46
54
  monthSwitch: false,
47
55
  showToday: true,
@@ -1,6 +1,8 @@
1
1
  import { defineMixin } from '../../libs/vue'
2
- import defProps from '../../libs/config/props.js'
2
+ import CalendarDefaultProps from './calendar'
3
+ import { registerComponentProps } from '../../libs/config/props.js'
3
4
 
5
+ const defProps = registerComponentProps(CalendarDefaultProps)
4
6
  export const props = defineMixin({
5
7
  props: {
6
8
  // 日历顶部标题
@@ -98,6 +100,46 @@ export const props = defineMixin({
98
100
  type: Boolean,
99
101
  default: () => defProps.calendar.show
100
102
  },
103
+ // 是否显示遮罩
104
+ overlay: {
105
+ type: Boolean,
106
+ default: () => defProps.calendar.overlay
107
+ },
108
+ // 动画时长,单位ms
109
+ duration: {
110
+ type: [String, Number],
111
+ default: () => defProps.calendar.duration
112
+ },
113
+ // 自定义遮罩的样式
114
+ overlayStyle: {
115
+ type: [Object, String],
116
+ default: () => defProps.calendar.overlayStyle
117
+ },
118
+ // 遮罩的透明度,0-1之间
119
+ overlayOpacity: {
120
+ type: [Number, String],
121
+ default: () => defProps.calendar.overlayOpacity
122
+ },
123
+ // 层级
124
+ zIndex: {
125
+ type: [String, Number],
126
+ default: () => defProps.calendar.zIndex
127
+ },
128
+ // 是否为iPhoneX留出底部安全距离
129
+ safeAreaInsetBottom: {
130
+ type: Boolean,
131
+ default: () => defProps.calendar.safeAreaInsetBottom
132
+ },
133
+ // 是否留出顶部安全距离(状态栏高度)
134
+ safeAreaInsetTop: {
135
+ type: Boolean,
136
+ default: () => defProps.calendar.safeAreaInsetTop
137
+ },
138
+ // 弹窗背景色,设置为transparent可去除白色背景
139
+ bgColor: {
140
+ type: String,
141
+ default: () => defProps.calendar.bgColor
142
+ },
101
143
  // 是否允许点击遮罩关闭日历
102
144
  closeOnClickOverlay: {
103
145
  type: Boolean,
@@ -2,6 +2,14 @@
2
2
  <u-popup
3
3
  :show="show"
4
4
  mode="bottom"
5
+ :overlay="overlay"
6
+ :duration="duration"
7
+ :overlayStyle="overlayStyle"
8
+ :overlayOpacity="overlayOpacity"
9
+ :zIndex="zIndex"
10
+ :safeAreaInsetBottom="safeAreaInsetBottom"
11
+ :safeAreaInsetTop="safeAreaInsetTop"
12
+ :bgColor="bgColor"
5
13
  :closeable="!pageInline"
6
14
  @close="close"
7
15
  :round="round"
@@ -202,6 +210,14 @@ import { t } from '../../libs/i18n'
202
210
  * @property {String} confirmText 确定按钮的文字 (默认 '确定' )
203
211
  * @property {String} confirmDisabledText 确认按钮处于禁用状态时的文字 (默认 '确定' )
204
212
  * @property {Boolean} show 是否显示日历弹窗 (默认 false )
213
+ * @property {Boolean} overlay 是否显示遮罩 (默认 true )
214
+ * @property {String | Number} duration 动画时长,单位ms (默认 300 )
215
+ * @property {Object | String} overlayStyle 自定义遮罩的样式
216
+ * @property {Number | String} overlayOpacity 遮罩透明度,0-1之间 (默认 0.5 )
217
+ * @property {String | Number} zIndex 弹出层的z-index值 (默认 10075 )
218
+ * @property {Boolean} safeAreaInsetBottom 是否留出底部安全距离 (默认 true )
219
+ * @property {Boolean} safeAreaInsetTop 是否留出顶部安全距离(状态栏高度) (默认 false )
220
+ * @property {String} bgColor 弹窗背景色,设置为transparent可去除白色背景
205
221
  * @property {Boolean} closeOnClickOverlay 是否允许点击遮罩关闭日历 (默认 false )
206
222
  * @property {Boolean} readonly 是否为只读状态,只读状态下禁止选择日期 (默认 false )
207
223
  * @property {String | Number} maxRange 日期区间最多可选天数,默认无限制,mode = range时有效
@@ -1,6 +1,8 @@
1
1
  import { defineMixin } from '../../libs/vue'
2
- import defProps from '../../libs/config/props.js'
2
+ import CalendarStripDefaultProps from './calendarStrip'
3
+ import { registerComponentProps } from '../../libs/config/props.js'
3
4
 
5
+ const defProps = registerComponentProps(CalendarStripDefaultProps)
4
6
  export const props = defineMixin({
5
7
  props: {
6
8
  modelValue: {