26 lines
794 B
JavaScript
26 lines
794 B
JavaScript
export default OakComponent({
|
|
isList: false,
|
|
formData({ props }) {
|
|
const data = this.consumeNotification();
|
|
if (data) {
|
|
if (process.env.OAK_PLATFORM === 'wechatMp') {
|
|
// lin-ui的message: https://doc.mini.talelin.com/component/response/message.html
|
|
const type = !data.type || data.type === 'info' ? 'primary' : data.type;
|
|
wx.lin.showMessage({
|
|
type: type,
|
|
content: data.message,
|
|
icon: data.icon,
|
|
duration: data.duration,
|
|
});
|
|
return {};
|
|
}
|
|
return {
|
|
data,
|
|
};
|
|
}
|
|
return {};
|
|
},
|
|
features: ['notification'],
|
|
properties: {}
|
|
});
|