210新增自动报警弹框提示,历史记录页面功能

This commit is contained in:
fengerli
2025-08-07 11:48:58 +08:00
parent 77d1fdbe64
commit ae608e04c0
8 changed files with 140 additions and 83 deletions

View File

@ -22,9 +22,17 @@
<text v-if="rightText" :style="{ color: rightColor }" @click="handleRightClick">
{{ rightText }}
</text>
<!-- 显示多个图标 -->
<template v-if="rightIcons && rightIcons.length > 0">
<image v-for="(icon, index) in rightIcons" :key="index" :src="icon.src"
@click="handleIconClick(index)" class="pathIMG" :style="{
width: icon.size || '40rpx',
height: icon.size || '40rpx',
marginLeft: index > 0 ? '20rpx' : '0'
}" />
</template>
<!-- 或显示图标 -->
<image v-if="rightIcon" :src="rightIcon" @click="handleRightClick" mode=""
class="pathIMG">
<image v-if="rightIcon" :src="rightIcon" @click="handleRightClick" class="pathIMG">
</image>
</slot>
</view>
@ -60,6 +68,11 @@
rightIconSize: { // 图标大小
type: Number,
default: 24
},
rightIcons: {
type: Array,
default: () => []
// 格式: [{src: '/path/icon1.png'}, {src: '/path/icon2.png'}]
}
},
data() {
@ -76,6 +89,10 @@
},
handleRightClick() {
this.$emit('right-click'); // 触发右侧点击事件
},
// 新增图标点击方法
handleIconClick(index) {
this.$emit('icon-click', index)
}
}
}