父传子,之前的组件都是这样写的没报错,现在这个组件报错,我已经指定了type哈报错,然后写成这样props:['titleStr']也不行
`<template>
<view class="back_header">
<icon @click="toBack"></icon>
<text>{{titleStr}}</text>
</view>
</template>
<script>
export default {
name: "backHeader",
props: {
titleStr: String
},
data () {
return {
}
},
methods: {
toBack() {
this.$mRouter.back();
}
}
}
</script>`
父:
<back-header :titleStr="titleStr" :backHeadShow="backHeadShow" v-if="backHeadShow"></back-header>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…