邓洁 : 大屏信息接口对接

This commit is contained in:
邓洁
2023-12-17 01:47:13 +08:00
parent 13e232d6f6
commit 2d413876d4
4 changed files with 45 additions and 32 deletions

View File

@@ -11,24 +11,43 @@
const props = defineProps({
modelValue: {
type: Number,
default: 0,
default: 0
},
list: {
type: Array,
default: []
},
})
watch(() => props.list, (now) => {
let newArr=[]
btnList.value.forEach((btnList) => {
now.forEach((item) => {
if (btnList.route==item) {
newArr.push(btnList)
}
})
})
btnList.value=newArr
}, {deep: true});
const emit = defineEmits(["update:modelValue", "select"]);
const btnList = ref([
{
route: '/site',
icon: 'sp_icon_zdgl.png',
name: '站点管理'
},
{
route: '/tunnel',
icon: 'sp_icon_sdgl.png',
name: '隧道管理'
},
{
route: '/user',
icon: 'sp_icon_yhgl.png',
name: '用户管理'
},
{
route: '/system',
icon: 'sp_icon_xtgl.png',
name: '系统管理'
},