vuepress 1.0.0-alpha.18
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.
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.
Fixed at https://github.com/vuejs/vuepress/commit/ece2e1e09ad5e48c48861330bb79f98880f90028 and out at vuepress/1.0.0-alpha.28
Most helpful comment
You can work around this for now by adding a
slot-keyprop to your component (see https://github.com/vuejs/vuepress/commit/2a8712a6d09cb902c00910f2613517f0249de877)