YZProjectCloud/yanzhu-ui-app/miniprogram/pages/components/jyq-result/index.js

46 lines
909 B
JavaScript
Raw Normal View History

2024-12-18 22:34:51 +08:00
// components/my-result/my-result.js
Component({
/**
* 组件的属性列表
*/
properties: {
iconPath: {
type: String,
value: '', // 默认图标路径,可以按需修改
},
title: {
type: String,
value: '默认标题',
},
description: {
type: String,
},
actionText: {
type: String,
},
descActionText: {
type: String,
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
handleAction() {
// 这里可以触发对应的业务逻辑,比如跳转到某个页面等
this.triggerEvent('action', {}); // 可以向外触发一个自定义事件,方便父组件监听
},
handleDescAction() {
// 这里可以触发对应的业务逻辑,比如跳转到某个页面等
this.triggerEvent('descAction', {}); // 可以向外触发一个自定义事件,方便父组件监听
}
}
})