代码显示工具提示图标,但当我悬停在它上面时不显示任何内容。如何在悬停时启用它,就像下面的数字一样。
https://vuetifyjs.com/en/components/tooltips
<v-text-field label="Name" id="name" disabled>
<v-tooltip slot="append" :value="true" bottom>
<v-icon slot="activator" color="primary" dark>live_help</v-icon>
<span>Name of the user</span>
</v-tooltip>
</v-text-field>
<v-text-field label="number" id="number">
<v-tooltip slot="append" bottom>
<v-icon slot="activator" color="primary" dark>live_help</v-icon>
<span> Number of years</span>
</v-tooltip>
</v-text-field>
Run Code Online (Sandbox Code Playgroud)
Vuetify 禁用禁用输入字段的所有指针事件:
.v-input--is-disabled:not(.v-input--is-readonly) {
pointer-events: none;
}
Run Code Online (Sandbox Code Playgroud)
去除这个的两种方法:
pointer-events: auto或readonly道具传递给组件,以便 Vuetify 添加自动v-input--is-readonly删除pointer-events: none条件的类。因此,您的输入定义变为:
<v-text-field label="Name" id="name" disabled readonly>
<v-tooltip slot="append" :value="true" bottom>
<v-icon slot="activator" color="primary" dark>live_help</v-icon>
<span>Name of the user</span>
</v-tooltip>
</v-text-field>
Run Code Online (Sandbox Code Playgroud)