如何在Vuetify组件中将光标默认更改为指针

时间:2020-07-22 02:47:02

标签: vue.js vuetify.js nuxt.js

我想在Vuetify中激活自动完成功能时将光标默认设置更改为指针。 我试图使CSS代码来更改光标。 但是将鼠标拖动到自动完成功能底部,光标会更改“文字”样式,例如“我会”。我想显示“指针”样式。 我找不到Vuetify网站的任何想法。 有人知道吗?

<template>
  <v-card>
    <v-container fluid>
      <v-row
        align="center"
      >
        <v-col cols="12">
          <v-autocomplete
            v-model="value"
            :items="items"
            dense
            filled
            label="Filled"
            class="test_cursor"
          ></v-autocomplete>
        </v-col>
      </v-row>
    </v-container>
  </v-card>
</template>

<script>
  export default {
    data: () => ({
      items: ['foo', 'bar', 'fizz', 'buzz'],
      values: ['foo', 'bar'],
      value: null,
    }),
  }
</script>
<style lang="scss" scoped>
.test_cursor{
    cursor: pointer;
}
</style>

1 个答案:

答案 0 :(得分:2)

默认情况下,.checkbox { display: block; pointer-events: none; } 设置为cursor(显示为您提到的“工字梁”),但是您可以通过定位{{ 1}}在您的CSS中:

text

v-autocomplete
input
.test_cursor input {
  cursor: pointer;
}