V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
learningman
V2EX  ›  Vue.js

Vuetify 的 activator 属性应该怎么写?

  •  
  •   learningman ·
    Zxilly · 2020-08-08 21:27:22 +08:00 · 1806 次点击
    这是一个创建于 1327 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    当未使用 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 条回复    2020-08-10 13:17:29 +08:00
    learningman
        1
    learningman  
    OP
       2020-08-08 21:28:53 +08:00
    查了 StackOverflow 和官方仓库的 issue,好像没什么人用过这个属性
    learningman
        3
    learningman  
    OP
       2020-08-10 13:17:29 +08:00
    @agdhole 这个描述的是作为 slot 的 activator,我问的是作为 property 的 activator
    不过还是谢谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3158 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 12:36 · PVG 20:36 · LAX 05:36 · JFK 08:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.