Browse Source

上传

master
前端-胡立永 5 months ago
parent
commit
ebd7d87bd3
1 changed files with 20 additions and 4 deletions
  1. +20
    -4
      components/config/configPopup.vue

+ 20
- 4
components/config/configPopup.vue View File

@ -1,20 +1,26 @@
<template> <template>
<view class="configPopup"> <view class="configPopup">
<uv-popup ref="popup" :round="30" :closeOnClickOverlay="!required"> <uv-popup ref="popup" :round="30" :closeOnClickOverlay="!required">
<view class="content">
<view class="content" v-if="required">
<scroll-view <scroll-view
id="scrollView" id="scrollView"
scroll-y="true" scroll-y="true"
:scroll-top="scrollTop" :scroll-top="scrollTop"
style="height: 100%;"> style="height: 100%;">
<uv-parse :content="configList[keys[index]]"></uv-parse>
<rich-text :nodes="content"></rich-text>
<!-- <view class="uv-parse"
v-html="content">
</view> -->
<view class="uni-color-btn" @click="success"> <view class="uni-color-btn" @click="success">
下一步 下一步
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view class="content" v-else> <view class="content" v-else>
<uv-parse :content="text || content"></uv-parse>
<rich-text :nodes="text || content"></rich-text>
<!-- <uv-parse :content="text || content"></uv-parse> -->
</view> </view>
</uv-popup> </uv-popup>
</view> </view>
@ -44,7 +50,11 @@
scrollTop : 0, scrollTop : 0,
} }
}, },
onShow() {},
created() {
uni.$on('initConfig', data => {
this.content = data[this.keys[this.index]]
})
},
methods: { methods: {
// //
@ -54,15 +64,18 @@
}, },
openkeys() { openkeys() {
this.index = 0 this.index = 0
this.content = this.configList[this.keys[this.index]]
this.$refs.popup.open('bottom'); this.$refs.popup.open('bottom');
}, },
success() { success() {
console.log('click success');
if (this.index == this.keys.length - 1) { if (this.index == this.keys.length - 1) {
this.$emit('success') this.$emit('success')
this.$refs.popup.close(); this.$refs.popup.close();
return return
} }
this.index++ this.index++
this.content = this.configList[this.keys[this.index]]
this.scrollTop = 100 this.scrollTop = 100
@ -86,6 +99,9 @@
overflow: scroll; overflow: scroll;
height: 50vh; height: 50vh;
box-sizing: border-box; box-sizing: border-box;
.uv-parse{
width: 100%;
}
} }
} }
</style> </style>

Loading…
Cancel
Save