Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
@error="onError"
@launchapp="onLaunchApp"
@opensetting="onOpenSetting"
@chooseavatar="onChooseAvatar"
:lang="lang"
:session-from="sessionFrom"
:send-message-title="sendMessageTitle"
Expand Down Expand Up @@ -141,6 +142,7 @@
* @event {Function} error 当使用开放能力时,发生错误的回调,openType="error"时有效
* @event {Function} launchapp 打开 APP 成功的回调,openType="launchApp"时有效
* @event {Function} opensetting 在打开授权设置页后回调,openType="openSetting"时有效
* @event {Function} chooseavatar 微信小程序 2.21.2 自定义头像选择事件
* @example <u-action-sheet :actions="list" :title="title" :show="show"></u-action-sheet>
*/
export default {
Expand Down
5 changes: 5 additions & 0 deletions uni_modules/uview-ui/components/u-button/u-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@opensetting="opensetting"
@launchapp="launchapp"
@agreeprivacyauthorization="agreeprivacyauthorization"
@chooseavatar="chooseavatar"
:hover-class="!disabled && !loading ? 'u-button--active' : ''"
class="u-button u-reset-button"
:style="[baseColor, $u.addStyle(customStyle)]"
Expand Down Expand Up @@ -155,6 +156,7 @@ import props from "./props.js";
* @event {Function} opensetting 在打开授权设置页并关闭后回调
* @event {Function} launchapp 打开 APP 成功的回调
* @event {Function} agreeprivacyauthorization 用户同意隐私协议事件回调
* @event {Function} chooseavatar 微信小程序 2.21.2 自定义头像选择事件
* @example <u-button>月落</u-button>
*/
export default {
Expand Down Expand Up @@ -291,6 +293,9 @@ export default {
agreeprivacyauthorization(res) {
this.$emit("agreeprivacyauthorization", res);
},
chooseavatar(res) {
this.$emit("chooseavatar", res);
}
},
};
</script>
Expand Down
3 changes: 3 additions & 0 deletions uni_modules/uview-ui/libs/mixin/openType.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export default {
},
onOpenSetting(event) {
this.$emit('opensetting', event.detail)
},
onChooseAvatar(event) {
this.$emit('chooseavatar', event.detail)
}
}
}