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.

51 lines
827 B

8 months ago
  1. <template>
  2. <van-popup
  3. v-model:show="showBottom"
  4. round
  5. position="bottom"
  6. @close="$emit('close')"
  7. :style="{ height: '75%' }"
  8. >
  9. <div
  10. id="config"
  11. v-html="content"></div>
  12. </van-popup>
  13. </template>
  14. <script>
  15. export default {
  16. name:"configPopup",
  17. props : ['keyValue', 'show', 'list'],
  18. data() {
  19. return {
  20. showBottom : false
  21. };
  22. },
  23. computed : {
  24. content(){
  25. for(let i = 0; i < this.list.length; i++){
  26. if(this.list[i].keyValue == this.keyValue){
  27. return this.list[i].content
  28. }
  29. }
  30. return '<h1>内容未找到:404</h1>'
  31. }
  32. },
  33. methods : {
  34. },
  35. watch: {
  36. show: {
  37. handler (newValue, oldValue) {
  38. this.showBottom = newValue
  39. },
  40. immediate: true
  41. }
  42. }
  43. }
  44. </script>
  45. <style scoped lang="scss">
  46. #config{
  47. padding: 20px;
  48. line-height: 50rpx;
  49. }
  50. </style>