chore: establish V1.1 recovery baseline
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Empty 空状态(规范 §22 推荐为空时引导去 Discover / 申请红娘)
|
||||
*
|
||||
* 用法:
|
||||
* <ui-empty title="暂时没有符合条件的人"
|
||||
* description="可以去「找对象」看看更多符合条件的人"
|
||||
* actions="{{[{text:'去「找对象', event:'discover'}, {text:'申请公益红娘', event:'matchmaker'}]}}"
|
||||
* bind:action="onEmptyAction" />
|
||||
*/
|
||||
Component({
|
||||
options: { addGlobalClass: true, multipleSlots: true },
|
||||
properties: {
|
||||
title: { type: String, value: '暂无内容' },
|
||||
description: { type: String, value: '' },
|
||||
// [{text, event, variant?: 'primary'|'secondary'}]
|
||||
actions: { type: Array, value: [] },
|
||||
// 图标变体(不依赖外部图片资源,纯 CSS 绘制)
|
||||
illustration: { type: String, value: 'default' }, // default|search|heart|activity|message
|
||||
},
|
||||
methods: {
|
||||
onAction(e) {
|
||||
const { event } = e.currentTarget.dataset;
|
||||
this.triggerEvent('action', { event });
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user