Coder Social home page Coder Social logo

Comments (9)

tzfun avatar tzfun commented on July 20, 2024

对于“一个ls就会弄出好多行”请描述更具体一点,另外提供一下报错信息

from vue-web-terminal.

18030705033 avatar 18030705033 commented on July 20, 2024

比如我一次发送500条数据,200行以内正常展示,另外会发送300条的提示消息 ,内容就是超过200条就会影响浏览器性能,按理来说如果想提示,就应该在200条的时候结束发送,然后给一条提示就可以了,没必要来个300条。还有一个问题,做拖动不好做到header上面啊,因为时动态的,做到全局,滚动条又没办法使用了,这是个问题。还有就是滚动条按理来说时做给主体,header应该是固定的,目前都是自己些css,还是比较麻烦

from vue-web-terminal.

18030705033 avatar 18030705033 commented on July 20, 2024

然后按理说提示的消息完了以后,你让用户使用clear来清空,那也应该能让用户输入啊,现在是提示了光标也消失了。没有重开一行让用户输入。就只能启用新的,历史数据就没有了啊

from vue-web-terminal.

tzfun avatar tzfun commented on July 20, 2024
  1. 警告提示信息目前确实会存在这个问题,下次版本更新会修复,目前你可以先扩大warnLogCountLimit值临时解决;
  2. 目前没有考虑做拖动效果,因此header没有提前设计为拖动区域,目前的解决办法只有先隐藏header自己在terminal外部包装实现一个边框;
  3. header之所以设计为悬浮的是为了实现隐藏效果,后续看一下能不能优化这个痛点。

from vue-web-terminal.

tzfun avatar tzfun commented on July 20, 2024

然后按理说提示的消息完了以后,你让用户使用clear来清空,那也应该能让用户输入啊,现在是提示了光标也消失了。没有重开一行让用户输入。就只能启用新的,历史数据就没有了啊

这个问题我这边测试没有遇到,光标仍然处于激活状态,可以键入

from vue-web-terminal.

18030705033 avatar 18030705033 commented on July 20, 2024

from vue-web-terminal.

tzfun avatar tzfun commented on July 20, 2024

警告提示确实存在Bug,我会尽快修复并发布新的版本。对于表头是否固定问题不同的应用场景有不同的需求,有些开发者在使用时提出想表头因此才将其设计为悬浮式的,针对你这边的场景可以考虑下使用fullscreen接口直接全屏,对于header的设计我再考虑下是否有更好的解决方案,感谢你的建议

from vue-web-terminal.

tzfun avatar tzfun commented on July 20, 2024

还有就是ls这个命令的处理。每一个文件如果单独发送一条信息又太浪费,放在一起又太拥挤,用空格隔开又不能判定单词来换行。关键使用终端ls这个命令还是最常用的

对于提到的这个问题你可以通过api来实现,我在文档中也有提到:

onExecCmd(key, command, success, failed) {
    if (key === 'loop') {
      let loop = parseInt(command.split(" ")[1])
      for (let i = 0; i < loop; i++) {
        Terminal.$api.pushMessage("my-terminal", {
          type: "normal",
          content: "loop => " + i
        })
      }
      success()
    }
}

实现效果
image

from vue-web-terminal.

18030705033 avatar 18030705033 commented on July 20, 2024

现在遇到的场景是,如果一个ls,返回值是200个数据,那么就相当于要发200条数据,其实不方便查看,但是如果发一条数据的话,目前换行并不是以单词为单位来换行](word-wrap: break-word;)就会造成一个单词割裂。所以建议大佬将ls这个命令单独弄一下

from vue-web-terminal.

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.