Vuepress: Property or method "slotKey" is not defined on the instance at

Created on 2 Nov 2018  ·  4Comments  ·  Source: vuejs/vuepress




  • [ ] I confirm that this is a issue rather than a question.




Bug report

Version

vuepress 1.0.0-alpha.18

Steps to reproduce

I used a "ui-input" component binded v-model in ui-input.md as below:

<div class="demo-section">
<ui-input placeholder="请输入内容" v-model="formData.ipt1"></ui-input><span class="tip-error"><i class="ui-icon-warning"></i>不能为空</span>
</div>

<script type="text/javascript">
export default {
data () {
return {
formData: {
ipt1: ''
}
}
},
mounted() {
},
methods: {
postData() {
console.log(this.formData)
},
cancel() {}
},
created() {

}
}
</script>

However, it tells me "Property or method "slotKey" is not defined", until I removed all the scripts.

What is actually happening?

Other relevant information

  • Your OS: windows 10
  • Node.js version: v11.0.0
  • Browser version: chrome 71.0.3559.6
  • Is this a global or local install? local
  • Which package manager did you use for the install? yarn
has workaround bug enhancement

Most helpful comment

You can work around this for now by adding a slot-key prop to your component (see https://github.com/vuejs/vuepress/commit/2a8712a6d09cb902c00910f2613517f0249de877)

All 4 comments

You can work around this for now by adding a slot-key prop to your component (see https://github.com/vuejs/vuepress/commit/2a8712a6d09cb902c00910f2613517f0249de877)

Suggest to use ``` to wrap your code.

I also have this problem, this may require default values.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

higuoxing picture higuoxing  ·  3Comments

lesliecdubs picture lesliecdubs  ·  3Comments

ederchrono picture ederchrono  ·  3Comments

shaodahong picture shaodahong  ·  3Comments

AMontagu picture AMontagu  ·  3Comments