miniprogram/node_modules/@vant/weapp/dist/action-sheet/index.js

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

import { VantComponent } from '../common/component';
import { button } from '../mixins/button';
VantComponent({
    mixins: [button],
    props: {
        show: Boolean,
        title: String,
        cancelText: String,
        description: String,
        round: {
            type: Boolean,
            value: true,
        },
        zIndex: {
            type: Number,
            value: 100,
        },
        actions: {
            type: Array,
            value: [],
        },
        overlay: {
            type: Boolean,
            value: true,
        },
        closeOnClickOverlay: {
            type: Boolean,
            value: true,
        },
        closeOnClickAction: {
            type: Boolean,
            value: true,
        },
        safeAreaInsetBottom: {
            type: Boolean,
            value: true,
        },
    },
    methods: {
        onSelect(event) {
            const { index } = event.currentTarget.dataset;
            const { actions, closeOnClickAction, canIUseGetUserProfile } = this.data;
            const item = actions[index];
            if (item) {
                this.$emit('select', item);
                if (closeOnClickAction) {
                    this.onClose();
                }
                if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {
                    wx.getUserProfile({
                        desc: item.getUserProfileDesc || '  ',
                        complete: (userProfile) => {
                            this.$emit('getuserinfo', userProfile);
                        },
                    });
                }
            }
        },
        onCancel() {
            this.$emit('cancel');
后面还有 10 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。