|
@ -1,36 +1,79 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="configPopup"> |
|
|
<view class="configPopup"> |
|
|
<uv-popup ref="popup" :round="30" :customStyle="{height: '50vh'}"> |
|
|
|
|
|
|
|
|
<uv-popup ref="popup" :round="30" :closeOnClickOverlay="!required"> |
|
|
<view class="content"> |
|
|
<view class="content"> |
|
|
<uv-parse :content="content"></uv-parse> |
|
|
|
|
|
|
|
|
<scroll-view |
|
|
|
|
|
id="scrollView" |
|
|
|
|
|
scroll-y="true" |
|
|
|
|
|
:scroll-top="scrollTop" |
|
|
|
|
|
style="height: 100%;"> |
|
|
|
|
|
<uv-parse :content="configList[keys[index]]"></uv-parse> |
|
|
|
|
|
<view class="uni-color-btn" @click="success"> |
|
|
|
|
|
下一步 |
|
|
|
|
|
</view> |
|
|
|
|
|
</scroll-view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="content" v-else> |
|
|
|
|
|
<uv-parse :content="text || content"></uv-parse> |
|
|
</view> |
|
|
</view> |
|
|
</uv-popup> |
|
|
</uv-popup> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { mapState } from 'vuex' |
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
mapState |
|
|
|
|
|
} from 'vuex' |
|
|
export default { |
|
|
export default { |
|
|
name: 'configPoup', |
|
|
name: 'configPoup', |
|
|
|
|
|
props: { |
|
|
|
|
|
text: { |
|
|
|
|
|
default: '' |
|
|
|
|
|
}, |
|
|
|
|
|
keys: { |
|
|
|
|
|
default: [], |
|
|
|
|
|
}, |
|
|
|
|
|
required: { |
|
|
|
|
|
default: false, |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
content : '' |
|
|
|
|
|
|
|
|
content: '', |
|
|
|
|
|
index: 0, |
|
|
|
|
|
scrollTop : 0, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onShow(){ |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
onShow() {}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//打开配置信息菜单 |
|
|
//打开配置信息菜单 |
|
|
open(key){ |
|
|
|
|
|
|
|
|
open(key) { |
|
|
this.content = this.configList[key] |
|
|
this.content = this.configList[key] |
|
|
this.$refs.popup.open('bottom'); |
|
|
this.$refs.popup.open('bottom'); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
openkeys() { |
|
|
|
|
|
this.index = 0 |
|
|
|
|
|
this.$refs.popup.open('bottom'); |
|
|
|
|
|
}, |
|
|
|
|
|
success() { |
|
|
|
|
|
if (this.index == this.keys.length - 1) { |
|
|
|
|
|
this.$emit('success') |
|
|
|
|
|
this.$refs.popup.close(); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.index++ |
|
|
|
|
|
|
|
|
|
|
|
this.scrollTop = 100 |
|
|
|
|
|
|
|
|
|
|
|
this.$nextTick(res => { |
|
|
|
|
|
this.scrollTop = 0 |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
computed : { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
computed: { |
|
|
...mapState(['configList']) |
|
|
...mapState(['configList']) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -38,8 +81,11 @@ |
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
.configPopup { |
|
|
.configPopup { |
|
|
.content{ |
|
|
|
|
|
|
|
|
.content { |
|
|
padding: 30rpx 20rpx; |
|
|
padding: 30rpx 20rpx; |
|
|
|
|
|
overflow: scroll; |
|
|
|
|
|
height: 50vh; |
|
|
|
|
|
box-sizing: border-box; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |