【发布时间】:2020-07-08 12:51:15
【问题描述】:
是否可以使用像 Textfield 这样的单个元素创建 component_1.vue 并像这样导出它:
<template>
<TextField
:text="textFieldValue"
hint="Hint here.."
class="textfield"
/>
</template>
<script>
export default {
name: 'Custom_TextField',
data: function () {
return {
class: class,
text: text
}
}
}
</script>
然后在另一个component_2.vue 中使用它?
<template>
<Label text="Component_1 below" />
<Custom_TextField />
</template>
<script>
import component_1.vue from "@/components/component_1.vue"
export default {
}
</script>
【问题讨论】:
标签: android ios nativescript-vue