Mic*_*ael -2 vue.js vuetify.js
根据此处的文档为 vuetify v-text-field 添加插槽时:https:
//vuetifyjs.com/en/components/text-fields#text-field
标签仍然存在undefined,并且似乎没有注册插槽。
最初,我只是尝试:label在上述组件上添加动态标签。然后继续使用自定义插槽,但也不起作用。
<v-text-field
v-model.lazy="row.value"
@blur="rowSearch(index)"
>
<template slot="label" slot-scope="label">
<div>
{{myLabel}}
</div>
</template>
</v-text-field>
</v-flex>```
Expected results is that the label will change based on some event in my component. Actual results are no label since it is `undefined`
Run Code Online (Sandbox Code Playgroud)
尝试v-slot:label
<template v-slot:label>
<div>
{{myLabel}}
</div>
</template>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8462 次 |
| 最近记录: |