湘妃到家前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

52 lines
827 B

<template>
<van-popup
v-model:show="showBottom"
round
position="bottom"
@close="$emit('close')"
:style="{ height: '75%' }"
>
<div
id="config"
v-html="content"></div>
</van-popup>
</template>
<script>
export default {
name:"configPopup",
props : ['keyValue', 'show', 'list'],
data() {
return {
showBottom : false
};
},
computed : {
content(){
for(let i = 0; i < this.list.length; i++){
if(this.list[i].keyValue == this.keyValue){
return this.list[i].content
}
}
return '<h1>内容未找到:404</h1>'
}
},
methods : {
},
watch: {
show: {
handler (newValue, oldValue) {
this.showBottom = newValue
},
immediate: true
}
}
}
</script>
<style scoped lang="scss">
#config{
padding: 20px;
line-height: 50rpx;
}
</style>