Coder Social home page Coder Social logo

Comments (10)

zhaojh329 avatar zhaojh329 commented on July 17, 2024

获取可以,但修改,你需要另外实现。要么写 Lua 绑定 C,要么通过 Lua 执行 shell 脚本

from oui.

yunhai20082008 avatar yunhai20082008 commented on July 17, 2024

获取可以,但修改,你需要另外实现。要么写 Lua 绑定 C,要么通过 Lua 执行 shell 脚本

能给指导下吗,或者给指点下哪个文件里有类似的调用过程,我是个新手,折腾一天了也没搞定

from oui.

yunhai20082008 avatar yunhai20082008 commented on July 17, 2024

我在vscode得oui-rpc-core得system.lua和op系统内得同文件同位置加了下面代码:

function M.set_localtime(params)
    local time = 1000000000
    time.at(0.5, function()
        os.execute('date -s' .. time)
    end)
end

浏览器得按钮触发加了下面代码:

    syncTime() {
      this.$oui.call('date', '-s', '1000000000')
      //this.$oui.call('system', 'set_localtime', '1000000000')
    },

第二段代码中得两个命令无论用哪个都没有执行成功,是哪里做的有问题吗

from oui.

zhaojh329 avatar zhaojh329 commented on July 17, 2024
function M.set_localtime(c)
    local time = params.time
    os.execute('date -s ' .. time)
end
  syncTime() {
    const time = '2019-05-29 10:58:00'
    this.$oui.call('system', 'set_localtime', { time })
  }

from oui.

yunhai20082008 avatar yunhai20082008 commented on July 17, 2024

不行哦

from oui.

zhaojh329 avatar zhaojh329 commented on July 17, 2024
function M.set_localtime(params)
    local time = params.time
    os.execute('date -s ' .. time)
end

from oui.

yunhai20082008 avatar yunhai20082008 commented on July 17, 2024
function M.set_localtime(params)
    local time = params.time
    os.execute('date -s ' .. time)
end

这个也试了,还试了

  syncTime() {
    //const time = '2019-05-29 10:58:00'
    this.$oui.call('system', 'set_localtime', {
       time: '2019-05-29 10:58:00'
    })
  }

都不行

from oui.

zhaojh329 avatar zhaojh329 commented on July 17, 2024

需要配置权限

from oui.

yunhai20082008 avatar yunhai20082008 commented on July 17, 2024

虽然找到了解决办法。也觉得这个项目挺好用,但是想想,vue的版权人是一个人,你这项目版权人也是一个人,我还是不贡献代码了,也不用这个项目了,我还是去用bootstrap了。

from oui.

VergilGao avatar VergilGao commented on July 17, 2024

虽然找到了解决办法。也觉得这个项目挺好用,但是想想,vue的版权人是一个人,你这项目版权人也是一个人,我还是不贡献代码了,也不用这个项目了,我还是去用bootstrap了。

我特意瞅了一眼,这不是MIT吗?https://github.com/zhaojh329/oui/blob/master/LICENSE

from oui.

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.