~Reporting a bug~ Asking a question
~Crashing when including the Vue library into a fresh Vue project~
~To not generate runtime errors~
package.json
{
"name": "TypeError",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"bootstrap": "^4.3.1",
"bootstrap-vue": "^2.0.4",
"core-js": "^3.3.2",
"survey-vue": "^1.1.17",
"vue": "^2.6.10",
"vue-i18n": "^8.15.0",
"vue-router": "^3.1.3",
"vuex": "^3.1.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.0.0",
"@vue/cli-plugin-eslint": "^4.0.0",
"@vue/cli-service": "^4.0.0",
"babel-eslint": "^10.0.3",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"sass": "^1.19.0",
"sass-loader": "^8.0.0",
"vue-template-compiler": "^2.6.10"
}
}
Tested page URL: N/A
AComponent.vue
<template>
<div class="wrapper">
<survey v-if="surveyConfig" :survey="surveyConfig"></survey>
</div>
</template>
<script>
import * as SurveyJS from 'survey-vue'
export default {
name: 'a-component',
props: {
config: {
type: Object,
default: undefined
}
},
computed: {
surveyConfig() {
return this.config ? SurveyJS.Model(this.config) : undefined
}
},
components: {
survey: SurveyJS.Survey
}
}
</script>
package.jsonTried reducing my relatively large survey config to the below, no success
{
"title": "foo",
"pages": [{
"name": "page",
"elements": [{
"type": "rating",
"name": "name",
"title": "title",
"isRequired": true,
"minRateDescription": "minimum",
"maxRateDescription": "maximum"
}]
}]
}
I'll take a look
@tsv2013 I've found my problem. I wasn't using new
computed: {
surveyConfig() {
return this.config ? **new** SurveyJS.Model(this.config) : undefined
}
},
Sorry to bother you 馃槄