@tdesign/uniapp 0.7.0 → 0.7.1

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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ toc: false
5
5
  docClass: timeline
6
6
  ---
7
7
 
8
+ ## 🌈 0.7.1 `2026-02-04`
9
+
10
+ ### 🚀 Features
11
+
12
+ - `ActionSheet`: 为 `items` 子项的 `icon` 字段新增 `object` 类型,支持透传到 `TIcon` 组件 @novlan1 ([#4255](https://github.com/Tencent/tdesign-miniprogram/pull/4255))
13
+ - `Button`: 新增 `activity-type`,`entrance-path` 和 `need-show-entrance` 属性 @novlan1 ([#4255](https://github.com/Tencent/tdesign-miniprogram/pull/4255))
14
+ - `Icon`: 新增 217 个与人工智能、文档、徽标和文件相关的图标 @novlan1 ([#4255](https://github.com/Tencent/tdesign-miniprogram/pull/4255))
15
+ - `Search`: 为 `change` 事件新增 `trigger` 参数,表示触发源 @novlan1 ([#4255](https://github.com/Tencent/tdesign-miniprogram/pull/4255))
16
+
8
17
  ## 🌈 0.7.0 `2026-01-30`
9
18
 
10
19
  ### 🚀 Features
@@ -11,7 +11,7 @@ align | String | center | options: center/left | N
11
11
  cancel-text | String | - | \- | N
12
12
  count | Number | 8 | \- | N
13
13
  description | String | - | \- | N
14
- items | Array | [] | Typescript: `Array<string \| ActionSheetItem>` `interface ActionSheetItem { label: string; description?: string; color?: string; disabled?: boolean; icon?: string; suffixIcon?: string }`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
14
+ items | Array | [] | Typescript: `Array<string \| ActionSheetItem>` `interface ActionSheetItem { label: string; description?: string; color?: string; disabled?: boolean; icon?: string \| object; suffixIcon?: string \| object }`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
15
15
  popup-props | Object | {} | Typescript: `PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
16
16
  show-cancel | Boolean | true | \- | N
17
17
  show-overlay | Boolean | true | \- | N
@@ -82,7 +82,7 @@ align | String | center | 水平对齐方式。可选项:center/left | N
82
82
  cancel-text | String | - | 设置取消按钮的文本 | N
83
83
  count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有效 | N
84
84
  description | String | - | 动作面板描述文字 | N
85
- items | Array | [] | 菜单项。TS 类型:`Array<string \| ActionSheetItem>` `interface ActionSheetItem { label: string; description?: string; color?: string; disabled?: boolean; icon?: string; suffixIcon?: string }`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
85
+ items | Array | [] | 菜单项。TS 类型:`Array<string \| ActionSheetItem>` `interface ActionSheetItem { label: string; description?: string; color?: string; disabled?: boolean; icon?: string \| object; suffixIcon?: string \| object }`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
86
86
  popup-props | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
87
87
  show-cancel | Boolean | true | 是否显示取消按钮 | N
88
88
  show-overlay | Boolean | true | 是否显示遮罩层 | N
@@ -25,6 +25,7 @@
25
25
  >
26
26
  {{ dataDescription }}
27
27
  </view>
28
+
28
29
  <block v-if="gridThemeItems.length">
29
30
  <block v-if="gridThemeItems.length === 1">
30
31
  <t-grid
@@ -38,7 +39,7 @@
38
39
  :key="index"
39
40
  :t-class="classPrefix + '__grid-item ' + classPrefix + '__square'"
40
41
  :data-index="index"
41
- :icon="{ name: item.icon, color: item.color }"
42
+ :icon="{ color: item.color, ...getIconData(item.icon) }"
42
43
  :text="item.label || ''"
43
44
  :description="item.description || ''"
44
45
  :image="item.image || ''"
@@ -47,6 +48,7 @@
47
48
  />
48
49
  </t-grid>
49
50
  </block>
51
+
50
52
  <block v-else-if="gridThemeItems.length > 1">
51
53
  <view :class="classPrefix + '__swiper-wrap'">
52
54
  <swiper
@@ -71,7 +73,7 @@
71
73
  :t-class="classPrefix + '__grid-item'"
72
74
  :class="classPrefix + '__square'"
73
75
  :data-index="index"
74
- :icon="{ name: item.icon, color: item.color }"
76
+ :icon="{ color: item.color, ...getIconData(item.icon) }"
75
77
  :text="item.label || ''"
76
78
  :description="item.description || ''"
77
79
  :image="item.image || ''"
@@ -93,6 +95,7 @@
93
95
  </view>
94
96
  </block>
95
97
  </block>
98
+
96
99
  <view
97
100
  v-else-if="dataItems && dataItems.length"
98
101
  :class="classPrefix + '__list'"
@@ -112,8 +115,14 @@
112
115
  >
113
116
  <view :class="classPrefix + '__list-item-content'">
114
117
  <t-icon
115
- v-if="item.icon"
116
- :name="item.icon"
118
+ v-if="getIconData(item.icon)"
119
+ :prefix="getIconData(item.icon).prefix"
120
+ :name="getIconData(item.icon).name"
121
+ :size="getIconData(item.icon).size"
122
+ :color="getIconData(item.icon).color"
123
+ :aria-hidden="getIconData(item.icon).ariaHidden"
124
+ :aria-label="getIconData(item.icon).ariaLabel"
125
+ :aria-role="getIconData(item.icon).ariaRole"
117
126
  :t-class="classPrefix + '__list-item-icon'"
118
127
  :custom-style="iconCustomStyle"
119
128
  />
@@ -121,8 +130,14 @@
121
130
  {{ item.label || item }}
122
131
  </view>
123
132
  <t-icon
124
- v-if="item.suffixIcon"
125
- :name="item.suffixIcon"
133
+ v-if="getIconData(item.suffixIcon)"
134
+ :prefix="getIconData(item.suffixIcon).prefix"
135
+ :name="getIconData(item.suffixIcon).name"
136
+ :size="getIconData(item.suffixIcon).size"
137
+ :color="getIconData(item.suffixIcon).color"
138
+ :aria-hidden="getIconData(item.suffixIcon).ariaHidden"
139
+ :aria-label="getIconData(item.suffixIcon).ariaLabel"
140
+ :aria-role="getIconData(item.suffixIcon).ariaRole"
126
141
  :t-class="classPrefix + '__list-item-icon ' + classPrefix + '__list-item-icon--suffix'"
127
142
  style="margin-left: auto;"
128
143
  :custom-style="suffixIconCustomStyle"
@@ -170,7 +185,7 @@ import props from './props';
170
185
  import useCustomNavbar from '../mixins/using-custom-navbar';
171
186
  import tools from '../common/utils.wxs';
172
187
  import { getFunctionalMixin } from '../common/functional/mixin';
173
-
188
+ import { getIconData } from './computed';
174
189
 
175
190
  const name = `${prefix}-action-sheet`;
176
191
 
@@ -257,6 +272,8 @@ export default uniComponent({
257
272
  this.splitGridThemeActions();
258
273
  },
259
274
 
275
+ getIconData,
276
+
260
277
  memoInitialData() {
261
278
  this.initialData = {
262
279
  };
@@ -1,3 +1,5 @@
1
+ import utils from '../common/utils.wxs';
2
+
1
3
  export const getListThemeItemClass = function (props) {
2
4
  const { classPrefix } = props;
3
5
  const { item } = props;
@@ -9,6 +11,18 @@ export const getListThemeItemClass = function (props) {
9
11
  return classList.join(' ');
10
12
  };
11
13
 
14
+ export const getIconData = function (icon) {
15
+ if (utils.isString(icon)) {
16
+ return { name: icon };
17
+ }
18
+
19
+ if (utils.isNoEmptyObj(icon)) {
20
+ return icon;
21
+ }
22
+
23
+ return null;
24
+ };
25
+
12
26
  export const isImage = function (name) {
13
27
  return name.indexOf('/') !== -1;
14
28
  };
@@ -86,8 +86,8 @@ export interface ActionSheetItem {
86
86
  description?: string;
87
87
  color?: string;
88
88
  disabled?: boolean;
89
- icon?: string;
90
- suffixIcon?: string;
89
+ icon?: string | object;
90
+ suffixIcon?: string | object;
91
91
  }
92
92
 
93
93
  export type ActionSheetTriggerSource = 'overlay' | 'command' | 'select';
@@ -72,11 +72,13 @@ For global import, configure it in `app.json` in the root directory of the minip
72
72
  name | type | default | description | required
73
73
  -- | -- | -- | -- | --
74
74
  custom-style | Object | - | CSS(Cascading Style Sheets) | N
75
+ activity-type | Number | - | \- | N
75
76
  app-parameter | String | - | \- | N
76
77
  block | Boolean | false | make button to be a block-level element | N
77
78
  content | String | - | button's children elements | N
78
- custom-dataset | String / Number / Boolean / Object / Array | {} | Typescript:`string \| number \| boolean \| object \| Array<string \| number \| boolean \| object>` | N
79
+ custom-dataset | String / Number / Boolean / Object / Array | {} | \- | N
79
80
  disabled | Boolean | undefined | disable the button, make it can not be clicked | N
81
+ entrance-path | String | - | \- | N
80
82
  ghost | Boolean | false | make background-color to be transparent | N
81
83
  hover-class | String | - | \- | N
82
84
  hover-start-time | Number | 20 | \- | N
@@ -85,7 +87,8 @@ hover-stop-propagation | Boolean | false | \- | N
85
87
  icon | String / Object | - | icon name | N
86
88
  lang | String | - | message language。options: en/zh_CN/zh_TW | N
87
89
  loading | Boolean | false | set button to be loading state | N
88
- loading-props | Object | {} | Typescript:`LoadingProps`,[Loading API Documents](./loading?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/button/type.ts) | N
90
+ loading-props | Object | {} | Typescript: `LoadingProps`,[Loading API Documents](./loading?tab=api)。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/button/type.ts) | N
91
+ need-show-entrance | Boolean | true | \- | N
89
92
  open-type | String | - | open type of button, [Miniprogram Button](https://developers.weixin.qq.com/miniprogram/dev/component/button.html)。options: contact/share/getPhoneNumber/getUserInfo/launchApp/openSetting/feedback/chooseAvatar/agreePrivacyAuthorization | N
90
93
  phone-number-no-quota-toast | Boolean | true | \- | N
91
94
  send-message-img | String | 截图 | \- | N
@@ -63,11 +63,13 @@ import TButton from '@tdesign/uniapp/button/button.vue';
63
63
  名称 | 类型 | 默认值 | 描述 | 必传
64
64
  -- | -- | -- | -- | --
65
65
  custom-style | Object | - | 自定义样式 | N
66
+ activity-type | Number | - | 卡片id。 `open-type` 的值设置为 `liveActivity` ,设置 `activity-type` 参数为 [notify_type](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/subscribe-message-2.html)。当用户点击 `button` 后,可以通过 `bindcreateliveactivity` 事件回调获取到 `code` | N
66
67
  app-parameter | String | - | 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 | N
67
68
  block | Boolean | false | 是否为块级元素 | N
68
69
  content | String | - | 按钮内容 | N
69
- custom-dataset | String / Number / Boolean / Object / Array | {} | 自定义 dataset,可通过 event.currentTarget.dataset.custom 获取。TS 类型:`string \| number \| boolean \| object \| Array<string \| number \| boolean \| object>` | N
70
+ custom-dataset | String / Number / Boolean / Object / Array | {} | 自定义 dataset,可通过 event.currentTarget.dataset.custom 获取 | N
70
71
  disabled | Boolean | undefined | 禁用状态。优先级:Button.disabled > Form.disabled | N
72
+ entrance-path | String | - | 从消息小程序入口打开小程序的路径,默认为聊天工具启动路径 | N
71
73
  ghost | Boolean | false | 是否为幽灵按钮(镂空按钮) | N
72
74
  hover-class | String | - | 指定按钮按下去的样式类,按钮不为加载或禁用状态时有效。当 `hover-class="none"` 时,没有点击态效果 | N
73
75
  hover-start-time | Number | 20 | 按住后多久出现点击态,单位毫秒 | N
@@ -76,7 +78,8 @@ hover-stop-propagation | Boolean | false | 指定是否阻止本节点的祖先
76
78
  icon | String / Object | - | 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` | N
77
79
  lang | String | - | 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。<br />具体释义:<br />`en` 英文;<br />`zh_CN` 简体中文;<br />`zh_TW` 繁体中文。<br />[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html)。可选项:en/zh_CN/zh_TW | N
78
80
  loading | Boolean | false | 是否显示为加载状态 | N
79
- loading-props | Object | {} | 透传 Loading 组件全部属性。TS 类型:`LoadingProps`,[Loading API Documents](./loading?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/button/type.ts) | N
81
+ loading-props | Object | {} | 透传 Loading 组件全部属性。TS 类型:`LoadingProps`,[Loading API Documents](./loading?tab=api)。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/button/type.ts) | N
82
+ need-show-entrance | Boolean | true | 转发的文本消息是否要带小程序入口 | N
80
83
  open-type | String | - | 微信开放能力。<br />具体释义:<br />`contact` 打开客服会话,如果用户在会话中点击消息卡片后返回小程序,可以从 bindcontact 回调中获得具体信息,<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/customer-message/customer-message.html">具体说明</a> (*鸿蒙 OS 暂不支持*);<br />`liveActivity` 通过前端获取<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/subscribe-message-2.html">新的一次性订阅消息下发机制</a>使用的 code;<br />`share` 触发用户转发,使用前建议先阅读<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html#使用指引">使用指引</a>;<br />`getPhoneNumber` 获取用户手机号,可以从 bindgetphonenumber 回调中获取到用户信息,<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html">具体说明</a> (*小程序插件中不能使用*);<br />`getUserInfo` 获取用户信息,可以从 bindgetuserinfo 回调中获取到用户信息 (*小程序插件中不能使用*);<br />`launchApp` 打开APP,可以通过 app-parameter 属性设定向 APP 传的参数<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/launchApp.html">具体说明</a>;<br />`openSetting` 打开授权设置页;<br />`feedback` 打开“意见反馈”页面,用户可提交反馈内容并上传<a href="https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/wx.getLogManager.html">日志</a>,开发者可以登录<a href="https://mp.weixin.qq.com/">小程序管理后台</a>后进入左侧菜单“客服反馈”页面获取到反馈内容;<br />`chooseAvatar` 获取用户头像,可以从 bindchooseavatar 回调中获取到头像信息;<br />`agreePrivacyAuthorization`用户同意隐私协议按钮。用户点击一次此按钮后,所有隐私接口可以正常调用。可通过`bindagreeprivacyauthorization`监听用户同意隐私协议事件。隐私合规开发指南详情可见《<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/user-privacy/PrivacyAuthorize.html">小程序隐私协议开发指南</a>》。<br />[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html)。可选项:contact/share/getPhoneNumber/getUserInfo/launchApp/openSetting/feedback/chooseAvatar/agreePrivacyAuthorization | N
81
84
  phone-number-no-quota-toast | Boolean | true | 原生按钮属性,当手机号快速验证或手机号实时验证额度用尽时,是否对用户展示“申请获取你的手机号,但该功能使用次数已达当前小程序上限,暂时无法使用”的提示,默认展示,open-type="getPhoneNumber" 或 open-type="getRealtimePhoneNumber" 时有效 | N
82
85
  send-message-img | String | 截图 | 会话内消息卡片图片,open-type="contact"时有效 | N
@@ -4,12 +4,15 @@
4
4
  :style="tools._style([customStyle])"
5
5
  :data-custom="customDataset"
6
6
  :class="className"
7
+ :activity-type="activityType ? activityType : ''"
8
+ :entrance-path="entrancePath"
7
9
  :form-type="disabled || loading ? '' : type"
8
10
  :open-type="disabled || loading ? '' : openType"
9
11
  :hover-stop-propagation="hoverStopPropagation"
10
12
  :hover-start-time="hoverStartTime"
11
13
  :hover-stay-time="hoverStayTime"
12
14
  :lang="lang"
15
+ :need-show-entrance="needShowEntrance"
13
16
  :session-from="sessionFrom"
14
17
  :hover-class="disabled || loading ? '' : hoverClass || classPrefix + '--hover'"
15
18
  :send-message-title="sendMessageTitle"
@@ -6,6 +6,10 @@
6
6
 
7
7
  import type { TdButtonProps } from './type';
8
8
  export default {
9
+ /** 卡片id。 `open-type` 的值设置为 `liveActivity` ,设置 `activity-type` 参数为 [notify_type](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/subscribe-message-2.html)。当用户点击 `button` 后,可以通过 `bindcreateliveactivity` 事件回调获取到 `code` */
10
+ activityType: {
11
+ type: Number,
12
+ },
9
13
  /** 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 */
10
14
  appParameter: {
11
15
  type: String,
@@ -27,6 +31,11 @@ export default {
27
31
  type: Boolean,
28
32
  default: undefined,
29
33
  },
34
+ /** 从消息小程序入口打开小程序的路径,默认为聊天工具启动路径 */
35
+ entrancePath: {
36
+ type: String,
37
+ default: '',
38
+ },
30
39
  /** 是否为幽灵按钮(镂空按钮) */
31
40
  ghost: Boolean,
32
41
  /** 指定按钮按下去的样式类,按钮不为加载或禁用状态时有效。当 `hover-class="none"` 时,没有点击态效果 */
@@ -65,6 +74,11 @@ export default {
65
74
  type: Object,
66
75
  default: () => ({}),
67
76
  },
77
+ /** 转发的文本消息是否要带小程序入口 */
78
+ needShowEntrance: {
79
+ type: Boolean,
80
+ default: true,
81
+ },
68
82
  /** 微信开放能力。<br />具体释义:<br />`contact` 打开客服会话,如果用户在会话中点击消息卡片后返回小程序,可以从 bindcontact 回调中获得具体信息,<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/customer-message/customer-message.html">具体说明</a> (*鸿蒙 OS 暂不支持*);<br />`liveActivity` 通过前端获取<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/subscribe-message-2.html">新的一次性订阅消息下发机制</a>使用的 code;<br />`share` 触发用户转发,使用前建议先阅读<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html#使用指引">使用指引</a>;<br />`getPhoneNumber` 获取用户手机号,可以从 bindgetphonenumber 回调中获取到用户信息,<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html">具体说明</a> (*小程序插件中不能使用*);<br />`getUserInfo` 获取用户信息,可以从 bindgetuserinfo 回调中获取到用户信息 (*小程序插件中不能使用*);<br />`launchApp` 打开APP,可以通过 app-parameter 属性设定向 APP 传的参数<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/launchApp.html">具体说明</a>;<br />`openSetting` 打开授权设置页;<br />`feedback` 打开“意见反馈”页面,用户可提交反馈内容并上传<a href="https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/wx.getLogManager.html">日志</a>,开发者可以登录<a href="https://mp.weixin.qq.com/">小程序管理后台</a>后进入左侧菜单“客服反馈”页面获取到反馈内容;<br />`chooseAvatar` 获取用户头像,可以从 bindchooseavatar 回调中获取到头像信息;<br />`agreePrivacyAuthorization`用户同意隐私协议按钮。用户点击一次此按钮后,所有隐私接口可以正常调用。可通过`bindagreeprivacyauthorization`监听用户同意隐私协议事件。隐私合规开发指南详情可见《<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/user-privacy/PrivacyAuthorize.html">小程序隐私协议开发指南</a>》。<br />[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html) */
69
83
  openType: {
70
84
  type: String,
@@ -7,6 +7,10 @@
7
7
  import type { TdLoadingProps as LoadingProps } from '../loading/type';
8
8
 
9
9
  export interface TdButtonProps {
10
+ /**
11
+ * 卡片id。 `open-type` 的值设置为 `liveActivity` ,设置 `activity-type` 参数为 [notify_type](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/subscribe-message-2.html)。当用户点击 `button` 后,可以通过 `bindcreateliveactivity` 事件回调获取到 `code`
12
+ */
13
+ activityType?: number;
10
14
  /**
11
15
  * 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
12
16
  * @default ''
@@ -30,6 +34,11 @@ export interface TdButtonProps {
30
34
  * 禁用状态。优先级:Button.disabled > Form.disabled
31
35
  */
32
36
  disabled?: boolean;
37
+ /**
38
+ * 从消息小程序入口打开小程序的路径,默认为聊天工具启动路径
39
+ * @default ''
40
+ */
41
+ entrancePath?: string;
33
42
  /**
34
43
  * 是否为幽灵按钮(镂空按钮)
35
44
  * @default false
@@ -73,6 +82,11 @@ export interface TdButtonProps {
73
82
  * @default {}
74
83
  */
75
84
  loadingProps?: LoadingProps;
85
+ /**
86
+ * 转发的文本消息是否要带小程序入口
87
+ * @default true
88
+ */
89
+ needShowEntrance?: boolean;
76
90
  /**
77
91
  * 微信开放能力。<br />具体释义:<br />`contact` 打开客服会话,如果用户在会话中点击消息卡片后返回小程序,可以从 bindcontact 回调中获得具体信息,<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/customer-message/customer-message.html">具体说明</a> (*鸿蒙 OS 暂不支持*);<br />`liveActivity` 通过前端获取<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/subscribe-message-2.html">新的一次性订阅消息下发机制</a>使用的 code;<br />`share` 触发用户转发,使用前建议先阅读<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html#使用指引">使用指引</a>;<br />`getPhoneNumber` 获取用户手机号,可以从 bindgetphonenumber 回调中获取到用户信息,<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html">具体说明</a> (*小程序插件中不能使用*);<br />`getUserInfo` 获取用户信息,可以从 bindgetuserinfo 回调中获取到用户信息 (*小程序插件中不能使用*);<br />`launchApp` 打开APP,可以通过 app-parameter 属性设定向 APP 传的参数<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/launchApp.html">具体说明</a>;<br />`openSetting` 打开授权设置页;<br />`feedback` 打开“意见反馈”页面,用户可提交反馈内容并上传<a href="https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/wx.getLogManager.html">日志</a>,开发者可以登录<a href="https://mp.weixin.qq.com/">小程序管理后台</a>后进入左侧菜单“客服反馈”页面获取到反馈内容;<br />`chooseAvatar` 获取用户头像,可以从 bindchooseavatar 回调中获取到头像信息;<br />`agreePrivacyAuthorization`用户同意隐私协议按钮。用户点击一次此按钮后,所有隐私接口可以正常调用。可通过`bindagreeprivacyauthorization`监听用户同意隐私协议事件。隐私合规开发指南详情可见《<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/user-privacy/PrivacyAuthorize.html">小程序隐私协议开发指南</a>》。<br />[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html)
78
92
  */
@@ -106,7 +106,7 @@
106
106
  scroll-y
107
107
  :scroll-top="scrollTopList[index]"
108
108
  type="list"
109
- :style="'height: ' + _optionsHeight + 'px'"
109
+ :style="'height: ' + optionsHeight + 'px'"
110
110
  >
111
111
  <view :class="'cascader-radio-group-' + index">
112
112
  <TRadioGroup
@@ -199,7 +199,7 @@ export default uniComponent({
199
199
  selectedValue: [],
200
200
  scrollTopList: [],
201
201
  steps: [],
202
- _optionsHeight: 0,
202
+ optionsHeight: 0,
203
203
  tools,
204
204
 
205
205
  dataVisible: this.visible,
@@ -258,6 +258,7 @@ export default uniComponent({
258
258
  this.initWithValue();
259
259
  },
260
260
  immediate: true,
261
+ deep: true,
261
262
  },
262
263
 
263
264
  options: {
@@ -330,7 +331,7 @@ export default uniComponent({
330
331
  },
331
332
  updateOptionsHeight(steps) {
332
333
  const { contentHeight, stepsInitHeight, stepHeight, subTitlesHeight } = this.state;
333
- this._optionsHeight = contentHeight - stepsInitHeight - subTitlesHeight - (steps - 1) * stepHeight;
334
+ this.optionsHeight = contentHeight - stepsInitHeight - subTitlesHeight - (steps - 1) * stepHeight;
334
335
  },
335
336
 
336
337
  async initOptionsHeight(steps) {
@@ -358,7 +359,7 @@ export default uniComponent({
358
359
  }
359
360
 
360
361
  const optionsInitHeight = this.state.contentHeight - this.state.subTitlesHeight;
361
- this._optionsHeight = theme === 'step'
362
+ this.optionsHeight = theme === 'step'
362
363
  ? optionsInitHeight - this.state.stepsInitHeight - (steps - 1) * this.state.stepHeight
363
364
  : optionsInitHeight - this.state.tabsHeight;
364
365
  },
@@ -503,6 +504,9 @@ export default uniComponent({
503
504
 
504
505
  this.hide('finish');
505
506
  }
507
+ // #ifdef VUE2
508
+ this.$set(this, 'selectedIndexes', JSON.parse(JSON.stringify(selectedIndexes)));
509
+ // #endif
506
510
  },
507
511
  triggerChange() {
508
512
  const { items, selectedValue, selectedIndexes } = this;
@@ -171,10 +171,18 @@ function filterProps(props, controlledProps) {
171
171
  || unControlledKeys.indexOf(key) > -1
172
172
  ) {
173
173
  const newType = Array.isArray(curType) ? curType : [curType];
174
+ // #ifdef VUE3
174
175
  newProps[key] = {
175
176
  type: [null, ...newType],
176
177
  default: null,
177
178
  };
179
+ // #endif
180
+ // #ifdef VUE2
181
+ newProps[key] = {
182
+ type: [...newType],
183
+ default: null,
184
+ };
185
+ // #endif
178
186
  } else if (
179
187
  [Boolean, String].indexOf(props[key].type) > -1
180
188
  && props[key].default === undefined