• 请不要在回答技术问题时复制粘贴 AI 生成的内容
yantianqi
V2EX  ›  程序员

vue 实现点击 document 隐藏 div

  •  
  •   yantianqi · Aug 23, 2017 · 5296 views
    This topic created in 3366 days ago, the information mentioned may be changed or developed.

    Markdown

    iview 链接

    类似图片的功能,自己动手写一个怎么实现?

    4 replies  •  2017-08-23 21:46:55 +08:00
    ijse
    ijse
    Aug 23, 2017
    1
    搜索 vue click outside,看源码
    airyland
    airyland
    Aug 23, 2017
    3
    写个 click-outside directive 或者引入已有的插件即可

    https://github.com/airyland/vux/blob/v2/src/directives/click-outside/index.js
    leekafai
    leekafai
    Aug 23, 2017 via Android
    4
    :active
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4694 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 01:43 · PVG 09:43 · LAX 17:43 · JFK 20:43
    ♥ Do have faith in what you're doing.