GithubHelp home page GithubHelp logo

Comments (4)

flightsnow avatar flightsnow commented on July 3, 2024

template中代码为:

<template> <div class="scrollable-container"> <div ref="jsmind_container" class="jsmind-container"></div> </div> </template>

(github显示代码样式好像有问题, 已经加了代码块, 但是会把换行吃掉... )

from jsmind.

hizzgdev avatar hizzgdev commented on July 3, 2024

我不是很确定问题在哪里。不过你要不要看一下最终它 render 出来的 html 结构是什么样的。以及跟 jsmind.online 里的样式对比一下。主要是 jsmind_container 的样式,看看是不是有啥不一样的地方。
我直观的感觉应该是没有设置 width 造成的,但也不知道在这个页面里有多少样式对 jsmind_container 有影响。

from jsmind.

flightsnow avatar flightsnow commented on July 3, 2024

好的, 感谢您的建议. 之前是有加width的, 但是加了width且, 思维导图的线也是分开的, 只不过一个在左边, 一个在右边. 后面我就将宽度去掉试了下, 然后它就变成一个在上面一个在下面了. 这个页面中只有上面列出来两个样式, 且尝试了只保留jsmind_container一个样式的情况下 , 线和结点也是分开展示的.
另外我想请教一下, jsmind.online上面的样式可以给出来参考一下嘛? more samples中没有给出app下的sample. 我通过jsmind.online上面的检查样式查看, 看的不太明白.
所以我是基于more sample中的给出的样例进行修改的. 而sample中给出的样例, jsmind_container所用的div都是给了固定宽度, (宽高改用wrapcontent也没有效果) 无法做到jsmind.online中的那种宽高会根据导图变化而自适应的效果~

from jsmind.

hizzgdev avatar hizzgdev commented on July 3, 2024

jsmind.online 上的代码你可以在浏览器里直接看到,在检查样式里看不出来,也可以把样式表下载到电脑上再看。
jsmind.online 上宽高自适应是监听了 window 的 resize 事件后,重新设置 width/height 实现的。

uniapp 这个如果你这个调试好的话,非常欢迎分享到 jsmind-samples 这个项目里来。现在前端各种框架确实太多了。

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.