v-bind
下列代码中,如果用init="9",控制台显示的是字符串,
可以使用v-bind属性,v-bind的值是JavaScript语句,输入9显示的是数字类型,v-bind简写是:。
<template>
<div class="right-container">
<h3>Right 组件</h3>
<hr />
<MyCount :init="6"></MyCount>
</div>
</template>
<script>
export default {}
</script>
<style lang="less">
</style>
浙公网安备 33010602011771号