const SaUserProfile = { template: `
`, props: { user: Object, id: [Number, String], type: { type: String, default: 'user', }, mode: { type: String, default: 'row', }, isavatar: { type: Boolean, default: true, }, ishover: { type: Boolean, default: true, }, }, setup(props) { const { ref, computed } = Vue const userData = computed(() => { let obj = props.user; if (props.type == 'user' && !props.user) { obj = { avatar: '', nickname: '未找到用户', username: '', }; } if (props.type == 'admin' && !props.user) { obj = { avatar: '', nickname: '未找到用户', account: '', }; } return obj; }); function onOpenUserDetail(id) { Fast.api.open(`shopro/user/user/detail?id=${id}`, "会员详情") } return { Fast, userData, onOpenUserDetail, } } }