Giter VIP home page Giter VIP logo

Comments (4)

HefeiWangDan avatar HefeiWangDan commented on June 12, 2024 1

已经解决了, 修改hmargin和vmargin, 就正常了

from jsmind.

hizzgdev avatar hizzgdev commented on June 12, 2024

看上去最右边的节点样式好像跟其它节点样式不太一样,你有修改它的样式吗?
另外,你提到其它节点编辑后能正常更新,那这个节点是否有哪里不同呢?
你先排查一下,不行的话我们再一起看看代码。

from jsmind.

HefeiWangDan avatar HefeiWangDan commented on June 12, 2024

我是自定义了节点的样式,新增的子节点是一样的,没有不同,只有在编辑后会出现UI问题,add_node也是正常的。
这是新增节点代码
const addNode = () => {
if (!selectedId.value) return
const newid = jsMind.util.uuid.newid()
_jm.add_node(_jm.get_node(selectedId.value), newid, '子主题', { data: { level: 'other' } }, 'right')
isChange.value = true
clearSelected()
_jm.select_clear()
nextTick(() => {
_jm.select_node(newid)
selectedId.value = newid
showSetting.value = true
_jm.scroll_node_to_center(newid)
})
}
这是编辑后失去焦点的代码
const handlerBlur = () => {
clearSelected()
const { id } = topicElement!.dataset
showEdit.value = false
nextTick(() => {
_jm.update_node(id, editValue.value)
editValue.value = ''
})
}
这是我的dom

from jsmind.

hizzgdev avatar hizzgdev commented on June 12, 2024

上面代码倒看不出有什么问题,你能弄一个小的项目,并把必要的代码放上去,然后我们一起调试一下吗?我还是怀疑页面上有其它样式干扰。

from jsmind.

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.