import event from '~/mixins/event' import { createStoreBindings } from 'mobx-miniprogram-bindings' import { store } from '~/store/index' Page({ behaviors: [event], data: { userInfo: {}, }, async onLoad() { // 手工绑定 this.storeBindings = createStoreBindings(this, { store, fields: { userInfo: 'userInfo', } }) }, clipboar({ currentTarget }) { wx.setClipboardData({ data: currentTarget.dataset.value, success: function (res) { //成功回调函数 wx.showToast({ title: '复制成功', icon: "success" }) } }) }, })