V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
learningman
V2EX  ›  Vue.js

Vuetify 的 activator 属性应该怎么写?

  •  
  •   learningman ·
    Zxilly · Aug 8, 2020 · 2349 views
    This topic created in 2088 days ago, the information mentioned may be changed or developed.

    阅读官方文档,给的说明是

    当未使用 activator 插槽时,指定自定义激活器。String 可以是任何有效的 querySelector,对象可以是任何有效的 Node 。

    英文版

    Designate a custom activator when the activator slot is not used. String can be any valid querySelector and Object can be any valid Node.

    但是实际上应该怎么写呢?不是指这个字段,而是说被选中的对象。

                  <v-list-item
                      id="agga"
                  >
                    <v-list-item-icon>
                      <v-icon>mdi-pencil</v-icon>
                    </v-list-item-icon>
                    <v-list-item-content>
                      <v-list-item-title>修改信息</v-list-item-title>
                    </v-list-item-content>
                  </v-list-item>
    
    

    id 选择器和 this.$refs 都试过,应该是被选中的对象不对?

    3 replies    2020-08-10 13:17:29 +08:00
    learningman
        1
    learningman  
    OP
       Aug 8, 2020
    查了 StackOverflow 和官方仓库的 issue,好像没什么人用过这个属性
    learningman
        3
    learningman  
    OP
       Aug 10, 2020
    @agdhole 这个描述的是作为 slot 的 activator,我问的是作为 property 的 activator
    不过还是谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1139 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 23:07 · PVG 07:07 · LAX 16:07 · JFK 19:07
    ♥ Do have faith in what you're doing.