调查问卷
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user