uview-plus 3.8.49 → 3.8.86

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 (170) hide show
  1. package/changelog.md +2043 -1827
  2. package/components/u-action-sheet/props.js +3 -1
  3. package/components/u-action-sheet/u-action-sheet.vue +1 -0
  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 +46 -15
  11. package/components/u-box/props.js +5 -2
  12. package/components/u-button/props.js +4 -1
  13. package/components/u-button/vue.scss +3 -3
  14. package/components/u-calendar/calendar.js +14 -2
  15. package/components/u-calendar/month.vue +41 -6
  16. package/components/u-calendar/props.js +63 -1
  17. package/components/u-calendar/u-calendar.vue +311 -2
  18. package/components/u-calendar-strip/props.js +3 -1
  19. package/components/u-canvas/u-canvas.vue +734 -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 +1 -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-divider/props.js +4 -1
  41. package/components/u-dragsort/u-dragsort.vue +2 -1
  42. package/components/u-dropdown/props.js +3 -1
  43. package/components/u-dropdown-item/props.js +3 -1
  44. package/components/u-empty/props.js +4 -1
  45. package/components/u-form/props.js +4 -1
  46. package/components/u-form-item/props.js +4 -1
  47. package/components/u-gap/props.js +4 -1
  48. package/components/u-grid/props.js +4 -1
  49. package/components/u-grid-item/props.js +4 -1
  50. package/components/u-guide/props.js +3 -1
  51. package/components/u-icon/props.js +4 -1
  52. package/components/u-icon/u-icon.vue +2 -2
  53. package/components/u-icon/upicon.ttf +0 -0
  54. package/components/u-icon/util.js +29 -7
  55. package/components/u-image/props.js +4 -1
  56. package/components/u-image/u-image.vue +280 -267
  57. package/components/u-index-anchor/props.js +4 -1
  58. package/components/u-index-item/props.js +2 -1
  59. package/components/u-index-list/props.js +4 -1
  60. package/components/u-input/props.js +3 -1
  61. package/components/u-input/u-input.vue +10 -1
  62. package/components/u-keyboard/props.js +4 -1
  63. package/components/u-line/props.js +4 -1
  64. package/components/u-line-progress/props.js +6 -3
  65. package/components/u-link/props.js +4 -1
  66. package/components/u-list/props.js +4 -1
  67. package/components/u-list-item/props.js +4 -1
  68. package/components/u-loading-icon/props.js +4 -1
  69. package/components/u-loading-page/props.js +3 -1
  70. package/components/u-loadmore/props.js +4 -1
  71. package/components/u-markdown/u-markdown.vue +45 -3
  72. package/components/u-modal/props.js +4 -1
  73. package/components/u-navbar/props.js +4 -2
  74. package/components/u-navbar/u-navbar.vue +15 -9
  75. package/components/u-no-network/props.js +4 -1
  76. package/components/u-notice-bar/props.js +4 -1
  77. package/components/u-notify/props.js +4 -1
  78. package/components/u-number-box/props.js +4 -1
  79. package/components/u-number-box/u-number-box.vue +2 -2
  80. package/components/u-number-keyboard/props.js +4 -1
  81. package/components/u-overlay/props.js +4 -1
  82. package/components/u-pagination/u-pagination.vue +60 -39
  83. package/components/u-parse/props.js +4 -1
  84. package/components/u-picker/props.js +4 -1
  85. package/components/u-picker/u-picker.vue +15 -0
  86. package/components/u-picker-column/props.js +3 -1
  87. package/components/u-popover/props.js +2 -1
  88. package/components/u-popup/props.js +4 -1
  89. package/components/u-poster/u-poster.vue +29 -14
  90. package/components/u-qrcode/qrcode.js +88 -87
  91. package/components/u-qrcode/u-qrcode.vue +138 -256
  92. package/components/u-radio/props.js +4 -1
  93. package/components/u-radio/u-radio.vue +7 -3
  94. package/components/u-radio-group/props.js +4 -1
  95. package/components/u-rate/props.js +4 -1
  96. package/components/u-read-more/props.js +4 -1
  97. package/components/u-row/props.js +4 -1
  98. package/components/u-row-notice/props.js +4 -1
  99. package/components/u-safe-bottom/props.js +2 -1
  100. package/components/u-scroll-list/props.js +4 -1
  101. package/components/u-search/props.js +3 -1
  102. package/components/u-skeleton/props.js +4 -1
  103. package/components/u-slider/props.js +3 -1
  104. package/components/u-slider/u-slider.vue +70 -28
  105. package/components/u-status-bar/props.js +4 -1
  106. package/components/u-steps/props.js +4 -1
  107. package/components/u-steps-item/props.js +4 -1
  108. package/components/u-sticky/props.js +4 -1
  109. package/components/u-sticky/u-sticky.vue +11 -0
  110. package/components/u-subsection/props.js +3 -1
  111. package/components/u-swipe-action/props.js +4 -1
  112. package/components/u-swipe-action-item/props.js +4 -1
  113. package/components/u-swipe-action-item/u-swipe-action-item.vue +14 -0
  114. package/components/u-swiper/props.js +9 -1
  115. package/components/u-swiper/swiper.js +1 -0
  116. package/components/u-swiper/u-swiper.vue +2 -0
  117. package/components/u-swiper-indicator/props.js +4 -1
  118. package/components/u-switch/props.js +4 -1
  119. package/components/u-tabbar/props.js +3 -1
  120. package/components/u-tabbar-item/props.js +4 -1
  121. package/components/u-table/props.js +3 -1
  122. package/components/u-table2/tableRow.vue +155 -69
  123. package/components/u-table2/u-table2.vue +328 -140
  124. package/components/u-tabs/props.js +4 -1
  125. package/components/u-tabs-item/props.js +3 -1
  126. package/components/u-tag/props.js +4 -1
  127. package/components/u-td/props.js +3 -1
  128. package/components/u-text/props.js +4 -1
  129. package/components/u-textarea/props.js +3 -1
  130. package/components/u-textarea/u-textarea.vue +16 -5
  131. package/components/u-th/props.js +3 -1
  132. package/components/u-toolbar/props.js +4 -1
  133. package/components/u-tooltip/props.js +10 -2
  134. package/components/u-tooltip/tooltip.js +2 -1
  135. package/components/u-tooltip/u-tooltip.vue +31 -3
  136. package/components/u-tr/props.js +3 -1
  137. package/components/u-transition/nvue-ani-map.js +75 -68
  138. package/components/u-transition/props.js +4 -1
  139. package/components/u-transition/transitionMixin.js +164 -163
  140. package/components/u-upload/props.js +4 -1
  141. package/components/u-upload/u-upload.vue +47 -40
  142. package/components/u-waterfall/u-waterfall.vue +50 -51
  143. package/index.js +65 -8
  144. package/libs/config/props.js +179 -204
  145. package/libs/css/components.scss +3 -0
  146. package/libs/function/uni-api-shims.js +29 -0
  147. package/libs/i18n/index.js +71 -36
  148. package/libs/i18n/locale-packs.js +11 -0
  149. package/libs/i18n/locales/all.js +23 -0
  150. package/libs/i18n/locales/{de.json → de.js} +1 -1
  151. package/libs/i18n/locales/{en.json → en.js} +2 -2
  152. package/libs/i18n/locales/{es.json → es.js} +1 -1
  153. package/libs/i18n/locales/{fr.json → fr.js} +2 -2
  154. package/libs/i18n/locales/{ja.json → ja.js} +1 -1
  155. package/libs/i18n/locales/{ko.json → ko.js} +1 -1
  156. package/libs/i18n/locales/{ru.json → ru.js} +1 -1
  157. package/libs/i18n/locales/{th.json → th.js} +1 -1
  158. package/libs/i18n/locales/{zh-Hans.json → zh-Hans.js} +1 -1
  159. package/libs/i18n/locales/{zh-Hant.json → zh-Hant.js} +1 -1
  160. package/libs/mixin/mixin.js +14 -4
  161. package/libs/util/gcanvas/bridge/bridge-weex.js +10 -5
  162. package/package.json +4 -5
  163. package/tsconfig.json +18 -0
  164. package/types/comps/calendar.d.ts +57 -0
  165. package/types/comps/checkbox.d.ts +12 -0
  166. package/types/comps/lineProgress.d.ts +5 -0
  167. package/types/comps/navbar.d.ts +3 -3
  168. package/types/comps/swiper.d.ts +5 -0
  169. package/types/comps/tooltip.d.ts +36 -1
  170. /package/components/u-markdown/{marked.esm.js → marked.esm.mjs} +0 -0
@@ -0,0 +1,11 @@
1
+ export { default as zhHans } from './locales/zh-Hans.js'
2
+ export { default as zhHant } from './locales/zh-Hant.js'
3
+ export { default as en } from './locales/en.js'
4
+ export { default as es } from './locales/es.js'
5
+ export { default as fr } from './locales/fr.js'
6
+ export { default as de } from './locales/de.js'
7
+ export { default as ko } from './locales/ko.js'
8
+ export { default as ja } from './locales/ja.js'
9
+ export { default as ru } from './locales/ru.js'
10
+ export { default as th } from './locales/th.js'
11
+ export { default as all } from './locales/all.js'
@@ -0,0 +1,23 @@
1
+ import zhHans from './zh-Hans.js'
2
+ import zhHant from './zh-Hant.js'
3
+ import en from './en.js'
4
+ import es from './es.js'
5
+ import fr from './fr.js'
6
+ import de from './de.js'
7
+ import ko from './ko.js'
8
+ import ja from './ja.js'
9
+ import ru from './ru.js'
10
+ import th from './th.js'
11
+
12
+ export default {
13
+ 'zh-Hans': zhHans,
14
+ 'zh-Hant': zhHant,
15
+ en,
16
+ es,
17
+ fr,
18
+ de,
19
+ ko,
20
+ ja,
21
+ ru,
22
+ th
23
+ }
@@ -1,4 +1,4 @@
1
- {
1
+ export default {
2
2
  "up.common.cancel": "Abbrechen",
3
3
  "up.common.confirm": "Bestätigen",
4
4
  "up.common.start": "Start",
@@ -1,4 +1,4 @@
1
- {
1
+ export default {
2
2
  "up.common.cancel": "Cancel",
3
3
  "up.common.confirm": "Confirm",
4
4
  "up.common.start": "Start",
@@ -83,4 +83,4 @@
83
83
  "up.goodsSku.amount": "Items",
84
84
  "up.goodsSku.choosed": "Selected",
85
85
  "up.goodsSku.buyAmount": "Quantity"
86
- }
86
+ }
@@ -1,4 +1,4 @@
1
- {
1
+ export default {
2
2
  "up.common.cancel": "Cancelar",
3
3
  "up.common.confirm": "Confirmar",
4
4
  "up.common.start": "Iniciar",
@@ -1,4 +1,4 @@
1
- {
1
+ export default {
2
2
  "up.common.cancel": "Annuler",
3
3
  "up.common.confirm": "Confirmer",
4
4
  "up.common.start": "Démarrer",
@@ -83,4 +83,4 @@
83
83
  "up.goodsSku.amount": "Pièces",
84
84
  "up.goodsSku.choosed": "Sélectionné",
85
85
  "up.goodsSku.buyAmount": "Quantité"
86
- }
86
+ }
@@ -1,4 +1,4 @@
1
- {
1
+ export default {
2
2
  "up.common.cancel": "キャンセル",
3
3
  "up.common.confirm": "確認",
4
4
  "up.common.start": "開始",
@@ -1,4 +1,4 @@
1
- {
1
+ export default {
2
2
  "up.common.cancel": "취소",
3
3
  "up.common.confirm": "확인",
4
4
  "up.common.start": "시작",
@@ -1,4 +1,4 @@
1
- {
1
+ export default {
2
2
  "up.common.cancel": "Отмена",
3
3
  "up.common.confirm": "Подтвердить",
4
4
  "up.common.start": "Начало",
@@ -1,4 +1,4 @@
1
- {
1
+ export default {
2
2
  "up.common.cancel": "ยกเลิก",
3
3
  "up.common.confirm": "ยืนยัน",
4
4
  "up.common.start": "เริ่มต้น",
@@ -1,4 +1,4 @@
1
- {
1
+ export default {
2
2
  "up.common.cancel": "取消",
3
3
  "up.common.confirm": "确定",
4
4
  "up.common.start": "开始",
@@ -1,4 +1,4 @@
1
- {
1
+ export default {
2
2
  "up.common.cancel": "取消",
3
3
  "up.common.confirm": "確定",
4
4
  "up.common.start": "開始",
@@ -74,7 +74,7 @@ export const mixin = defineMixin({
74
74
  if (typeof uni !== 'undefined' && typeof uni.$on === 'function') {
75
75
  this.__uThemeChangeHandler = (payload = {}) => {
76
76
  this.upSyncThemeVersion(payload)
77
- this.chacheU = null
77
+ this.upClearUCache()
78
78
  if (typeof this.$forceUpdate === 'function') {
79
79
  this.$forceUpdate()
80
80
  }
@@ -89,6 +89,10 @@ export const mixin = defineMixin({
89
89
  $u() {
90
90
  this.upThemeVersion
91
91
  // #ifndef APP-NVUE
92
+ const instance = this.$
93
+ if (instance?.__upUCache) {
94
+ return instance.__upUCache
95
+ }
92
96
  // 在非nvue端,移除props,http,mixin等对象,避免在小程序setData时数据过大影响性能
93
97
  let mergeU = deepMerge(uni.$u, {
94
98
  props: undefined,
@@ -96,10 +100,11 @@ export const mixin = defineMixin({
96
100
  mixin: undefined
97
101
  })
98
102
  // 缓存结果避免每次计算
99
- if (!this.chacheU) {
100
- this.chacheU = mergeU
103
+ if (instance) {
104
+ instance.__upUCache = mergeU
105
+ return instance.__upUCache
101
106
  }
102
- return this.chacheU
107
+ return mergeU
103
108
  // #endif
104
109
  // #ifdef APP-NVUE
105
110
  return uni.$u
@@ -156,6 +161,11 @@ export const mixin = defineMixin({
156
161
  }
157
162
  },
158
163
  methods: {
164
+ upClearUCache() {
165
+ if (this.$) {
166
+ this.$.__upUCache = null
167
+ }
168
+ },
159
169
  upBindGetRect() {
160
170
  const upU = this.$u || (typeof uni !== 'undefined' ? uni.$u : null)
161
171
  if (upU) {
@@ -1,6 +1,11 @@
1
1
  const isWeex = typeof WXEnvironment !== 'undefined';
2
- const isWeexIOS = isWeex && /ios/i.test(WXEnvironment.platform);
3
- const isWeexAndroid = isWeex && !isWeexIOS;
2
+ const weexPlatform = isWeex ? String(WXEnvironment.platform || '').toLowerCase() : '';
3
+ const isWeexIOS = isWeex && weexPlatform.indexOf('ios') !== -1;
4
+ // 显式识别鸿蒙,避免被静态检查判定为未适配,且防止仅按 !ios 归入 Android
5
+ const isWeexHarmony = isWeex && (weexPlatform.indexOf('harmony') !== -1 || weexPlatform.indexOf('ohos') !== -1);
6
+ const isWeexAndroid = isWeex && !isWeexIOS && !isWeexHarmony;
7
+ // 鸿蒙 weex 与 Android 共用非 iOS native bridge 路径
8
+ const isWeexAndroidLike = isWeexAndroid || isWeexHarmony;
4
9
 
5
10
  import GLmethod from '../context-webgl/GLmethod';
6
11
 
@@ -184,7 +189,7 @@ const GBridge = {
184
189
  + format + ',' + type + ',' + (image ? image.src : 0)
185
190
  )
186
191
  }
187
- } else if (isWeexAndroid) {
192
+ } else if (isWeexAndroidLike) {
188
193
  if (args.length === 6) {
189
194
  const [target, level, internalformat, format, type, image] = args;
190
195
  GCanvasModule.texImage2D(componentId, target, level, internalformat, format, type, image.src);
@@ -203,7 +208,7 @@ const GBridge = {
203
208
  GLmethod.texSubImage2D + ',' + 6 + ',' + target + ',' + level + ',' + xoffset + ',' + yoffset, + ',' + format + ',' + type + ',' + image.src
204
209
  )
205
210
  }
206
- } else if (isWeexAndroid) {
211
+ } else if (isWeexAndroidLike) {
207
212
  GCanvasModule.texSubImage2D(componentId, target, level, xoffset, yoffset, format, type, image.src);
208
213
  }
209
214
  },
@@ -239,4 +244,4 @@ const GBridge = {
239
244
  }
240
245
  }
241
246
 
242
- export default GBridge;
247
+ export default GBridge;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-plus",
3
3
  "name": "uview-plus",
4
4
  "displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙跨端移动组件库,组件丰富维护更新稳定。",
5
- "version": "3.8.49",
5
+ "version": "3.8.86",
6
6
  "description": "零云®uview-plus已兼容vue3支持多语言,120+全面的组件和便捷的工具会让您信手拈来。近期新增拖动排序、条码、图片裁剪、下拉刷新、虚拟列表、签名、Markdown等。",
7
7
  "keywords": [
8
8
  "uview",
@@ -11,7 +11,7 @@
11
11
  "echarts",
12
12
  "ui",
13
13
  "可视化"
14
- ],
14
+ ],
15
15
  "main": "index.js",
16
16
  "repository": "https://github.com/ijry/uview-plus",
17
17
  "engines": {
@@ -102,9 +102,8 @@
102
102
  }
103
103
  }
104
104
  },
105
- "dependencies": {
106
- },
105
+ "dependencies": {},
107
106
  "publishConfig": {
108
107
  "registry": "https://registry.npmjs.org/"
109
108
  }
110
- }
109
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "sourceMap": true,
4
+ "jsx": "preserve",
5
+ "target": "ESNext",
6
+ "module": "ESNext",
7
+ "moduleResolution": "Node",
8
+ "strict": true,
9
+ "skipLibCheck": true,
10
+ "isolatedModules": true,
11
+ "esModuleInterop": true,
12
+ "resolveJsonModule": true,
13
+ "useDefineForClassFields": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "lib": ["esnext", "dom"]
16
+ },
17
+ "include": ["./**/*.ts", "./**/*.d.ts", "./**/*.tsx", "./**/*.vue", "./**/*.nvue"]
18
+ }
@@ -94,6 +94,44 @@ declare interface CalendarProps {
94
94
  * @default false
95
95
  */
96
96
  show?: boolean
97
+ /**
98
+ * 是否显示遮罩
99
+ * @default true
100
+ */
101
+ overlay?: boolean
102
+ /**
103
+ * 动画时长,单位ms
104
+ * @default 300
105
+ */
106
+ duration?: number | string
107
+ /**
108
+ * 自定义遮罩的样式
109
+ */
110
+ overlayStyle?: unknown
111
+ /**
112
+ * 遮罩透明度,0-1之间,勿与overlayStyle共用
113
+ * @default 0.5
114
+ */
115
+ overlayOpacity?: number | string
116
+ /**
117
+ * 弹出层的z-index值
118
+ * @default 10075
119
+ */
120
+ zIndex?: number | string
121
+ /**
122
+ * 是否留出底部安全距离
123
+ * @default true
124
+ */
125
+ safeAreaInsetBottom?: boolean
126
+ /**
127
+ * 是否留出顶部安全距离(状态栏高度)
128
+ * @default false
129
+ */
130
+ safeAreaInsetTop?: boolean
131
+ /**
132
+ * 背景色,一般用于特殊弹窗内容场景,设置为transparent可去除默认的白色背景
133
+ */
134
+ bgColor?: string
97
135
  /**
98
136
  * 是否允许点击遮罩关闭日历 (注意:关闭事件需要自行处理,只会在开启closeOnClickOverlay后点击遮罩层执行close回调)
99
137
  * @default false
@@ -129,6 +167,21 @@ declare interface CalendarProps {
129
167
  * @default "all"
130
168
  */
131
169
  rangeResultMode?: 'all' | 'boundary'
170
+ /**
171
+ * 是否开启时分秒选择
172
+ * @default false
173
+ */
174
+ enableTime?: boolean
175
+ /**
176
+ * 时间精度:`hour`仅时、`minute`时分、`second`时分秒
177
+ * @default "minute"
178
+ */
179
+ timePrecision?: 'hour' | 'minute' | 'second'
180
+ /**
181
+ * 默认时间,支持 `HH` / `HH:mm` / `HH:mm:ss`
182
+ * @default ""
183
+ */
184
+ defaultTime?: string
132
185
  /**
133
186
  * 圆角值,默认无圆角
134
187
  * @default 0
@@ -144,6 +197,10 @@ declare interface CalendarProps {
144
197
  * @default true
145
198
  */
146
199
  showToday?: boolean
200
+ /**
201
+ * 今天日期的独立高亮颜色,默认跟随主题色
202
+ */
203
+ todayColor?: string
147
204
  /**
148
205
  * 日期选择完成后触发,若`show-confirm`为`true`,则点击确认按钮后触发
149
206
  */
@@ -58,11 +58,23 @@ declare interface CheckboxProps {
58
58
  labelDisabled?: string | boolean
59
59
  }
60
60
 
61
+ declare interface CheckboxSlots {
62
+ /**
63
+ * 自定义icon内容
64
+ */
65
+ ['icon']?: () => any
66
+ /**
67
+ * 自定义label内容
68
+ */
69
+ ['label']?: () => any
70
+ }
71
+
61
72
  declare interface _Checkbox {
62
73
  new (): {
63
74
  $props: AllowedComponentProps &
64
75
  VNodeProps &
65
76
  CheckboxProps
77
+ $slots: CheckboxSlots
66
78
  }
67
79
  }
68
80
 
@@ -26,6 +26,11 @@ declare interface LineProgressProps {
26
26
  * @default 12
27
27
  */
28
28
  height?: string | number
29
+ /**
30
+ * 是否从右往左加载
31
+ * @default false
32
+ */
33
+ fromRight?: boolean
29
34
  /**
30
35
  * 点击触发事件
31
36
  */
@@ -43,12 +43,12 @@ declare interface NavbarProps {
43
43
  */
44
44
  title?: string
45
45
  /**
46
- * 导航栏背景设置
47
- * @default"#fff
46
+ * 导航栏背景设置,支持颜色、渐变或背景图
47
+ * @default "#fff"
48
48
  */
49
49
  bgColor?: string
50
50
  /**
51
- * 状态栏背景颜色 不写同导航栏背景设置
51
+ * 状态栏背景颜色,保留兼容;导航栏内部统一使用 bgColor 作为整体背景
52
52
  * @default bgColor
53
53
  */
54
54
  statusBarBgColor?: string
@@ -59,6 +59,11 @@ declare interface SwiperProps {
59
59
  * @default false
60
60
  */
61
61
  circular?: boolean
62
+ /**
63
+ * 滑动方向是否为纵向
64
+ * @default false
65
+ */
66
+ vertical?: boolean
62
67
  /**
63
68
  * 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
64
69
  * @default 0
@@ -24,11 +24,15 @@ declare interface TooltipProps {
24
24
  * @default "transparent"
25
25
  */
26
26
  bgColor?: string
27
+ /**
28
+ * 弹出提示框的背景色
29
+ */
30
+ popupBgColor?: string
27
31
  /**
28
32
  * 弹出提示的方向
29
33
  * @default "top"
30
34
  */
31
- direction?: 'top' | 'bottom'
35
+ direction?: 'top' | 'bottom' | 'left' | 'right'
32
36
  /**
33
37
  * 弹出提示的z-index,nvue无效
34
38
  * @default 10071
@@ -53,11 +57,42 @@ declare interface TooltipProps {
53
57
  * @default true
54
58
  */
55
59
  showToast?: boolean
60
+ /**
61
+ * 触发方式
62
+ * @default "longpress"
63
+ */
64
+ triggerMode?: 'longpress' | 'click' | 'manual'
65
+ /**
66
+ * 强制定位
67
+ */
68
+ forcePosition?: Record<string, string | number>
69
+ /**
70
+ * 是否显示,triggerMode为manual时使用
71
+ * @default false
72
+ */
73
+ show?: boolean
74
+ /**
75
+ * 是否开启单例模式,开启该属性的tooltip同一页面同时只显示一个
76
+ * @default false
77
+ */
78
+ singleton?: boolean
56
79
  /**
57
80
  * 点击触发事件
58
81
  * @param index 被点击按钮的索引
59
82
  */
60
83
  onClick?: (index: number) => any
84
+ /**
85
+ * 显示状态变化时触发
86
+ */
87
+ ['onUpdate:show']?: (value: boolean) => any
88
+ /**
89
+ * 打开时触发
90
+ */
91
+ onOpen?: () => any
92
+ /**
93
+ * 关闭时触发
94
+ */
95
+ onClose?: () => any
61
96
  }
62
97
 
63
98
  declare interface _Tooltip {