diff --git a/example/project.config.json b/example/project.config.json index cd039eb6f..187e5f0f1 100644 --- a/example/project.config.json +++ b/example/project.config.json @@ -21,24 +21,27 @@ "checkSiteMap": true, "uploadWithSourceMap": true, "compileHotReLoad": false, - "useMultiFrameRuntime": false, + "useMultiFrameRuntime": true, "useApiHook": true, + "useApiHostProcess": false, "babelSetting": { "ignore": [], "disablePlugins": [], "outputPath": "" }, + "enableEngineNative": false, "bundle": false, "useIsolateContext": true, "useCompilerModule": true, "userConfirmedUseCompilerModuleSwitch": false, + "userConfirmedBundleSwitch": false, "packNpmManually": false, "packNpmRelationList": [], "minifyWXSS": true }, "compileType": "miniprogram", "cloudfunctionRoot": "functions/", - "libVersion": "2.3.0", + "libVersion": "2.3.2", "appid": "wx1c01b35002d3ba14", "projectname": "vant-weapp", "debugOptions": { diff --git a/packages/action-sheet/index.ts b/packages/action-sheet/index.ts index a539e9809..4fa3583ea 100644 --- a/packages/action-sheet/index.ts +++ b/packages/action-sheet/index.ts @@ -1,9 +1,8 @@ import { VantComponent } from '../common/component'; import { button } from '../mixins/button'; -import { openType } from '../mixins/open-type'; VantComponent({ - mixins: [button, openType], + mixins: [button], props: { show: Boolean, title: String, @@ -42,13 +41,23 @@ VantComponent({ methods: { onSelect(event: WechatMiniprogram.TouchEvent) { const { index } = event.currentTarget.dataset; - const item = this.data.actions[index]; - if (item && !item.disabled && !item.loading) { + const { actions, closeOnClickAction, canIUseGetUserProfile } = this.data; + const item = actions[index]; + if (item) { this.$emit('select', item); - if (this.data.closeOnClickAction) { + if (closeOnClickAction) { this.onClose(); } + + if (item.openType === 'getUserInfo' && canIUseGetUserProfile) { + wx.getUserProfile({ + desc: item.getUserProfileDesc || ' ', + complete: (userProfile) => { + this.$emit('getuserinfo', userProfile); + }, + }); + } } }, diff --git a/packages/action-sheet/index.wxml b/packages/action-sheet/index.wxml index c2bebcacf..24d24ac67 100644 --- a/packages/action-sheet/index.wxml +++ b/packages/action-sheet/index.wxml @@ -27,18 +27,18 @@