Giter VIP home page Giter VIP logo

Comments (9)

hu2014 avatar hu2014 commented on May 30, 2024

image

from vue-tree.

ChuChencheng avatar ChuChencheng commented on May 30, 2024

从报错信息看,可以尝试给 webpack 配置一下处理 .mjs 文件的 loader

可以试试看给 vue.config.js 加上这个配置

module.exports = {
  configureWebpack: {
    module: {
      rules: [
        {
          test: /\.mjs$/,
          include: /node_modules/,
          type: "javascript/auto"
        }
      ]
    }
  }
}

from vue-tree.

ChuChencheng avatar ChuChencheng commented on May 30, 2024

不知道你用的 vue-cli 或者 webpack 版本是什么呢

from vue-tree.

hu2014 avatar hu2014 commented on May 30, 2024

vue-cli 4.5版本

from vue-tree.

hu2014 avatar hu2014 commented on May 30, 2024

哦。点击父节点,自动展开能关闭吗?只能通过点击小图标展开收起

from vue-tree.

hu2014 avatar hu2014 commented on May 30, 2024

还有个问题是,这个想要自定义图标怎么添加呢

from vue-tree.

ChuChencheng avatar ChuChencheng commented on May 30, 2024

目前没有支持关闭 “点击节点标题展开” 这个特性。但是如果有设置 selectablecheckable ,点击标题就不会展开或收起了

自定义图标可以通过 render 自定义节点添加

from vue-tree.

hu2014 avatar hu2014 commented on May 30, 2024

好的,谢谢。我就是觉得在触发双击事件的时候,那个节点会自动展开下级然后关闭有点奇怪。看能否将这个特性开出来可供关闭。另外双击事件那里,触发双击事件的时候,单击事件会触发两次,然后触发双击事件。

from vue-tree.

hu2014 avatar hu2014 commented on May 30, 2024

1.设置了 selectable 后,点击节点不会自动展开了。
2.将项目拉下来,重写了双击事件,第二次单击事件不会触发,只会触发第一次的单击事件和双击事件

from vue-tree.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.