|
|
- <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>
|