调查问卷

This commit is contained in:
yanran200730
2021-11-23 14:18:55 +08:00
parent 02db67eb00
commit b3c12d7204
6 changed files with 68 additions and 43 deletions

View File

@@ -133,9 +133,10 @@
<script>
import { components } from './config'
export default {
props: ['filed', 'index', 'filedType'],
data () {
return {
index: '',
isShowType: false,
isShowAnswer: false,
config: {
@@ -143,13 +144,17 @@ export default {
}
},
onLoad (query) {
if (query.type) {
this.config = JSON.parse(JSON.stringify(components.filter(v => v.type === query.type)[0]))
} else {
this.config = JSON.parse(query.config)
this.index = query.index
mounted () {
console.log('11' + this.index)
if (this.index != undefined) {
this.config = this.filed
this.index = this.index
return false
}
console.log(components)
this.config = JSON.parse(JSON.stringify(components.filter(v => v.type === this.filedType)[0]))
},
computed: {
@@ -253,9 +258,7 @@ export default {
},
back () {
uni.navigateBack({
delta: 1
})
this.$emit('back')
},
confirm () {
@@ -263,9 +266,8 @@ export default {
config: this.config,
index: this.index === '' ? '-1' : this.index
})
uni.navigateBack({
delta: 1
})
this.back()
},
addOptions () {