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