miao-plugin/components/Common.js

27 lines
545 B
JavaScript
Raw Normal View History

2022-08-18 10:13:42 +00:00
import Cfg from './Cfg.js'
import Render from './common/Render.js'
const Common = {
render: async function (arg1, arg2, arg3, arg4) {
if (arguments.length === 4 && typeof (arguments[1]) === 'string') {
return Render.render(arg2, arg3, {
...arg4,
plugin: arg1
})
} else {
return Render.render(arg1, arg2, arg3)
}
},
cfg: Cfg.get,
sleep (ms) {
return new Promise((resolve) => setTimeout(resolve, ms))
},
async downFile () {
console.log('down file')
}
2023-06-03 12:31:13 +00:00
2022-07-23 20:32:10 +00:00
}
export default Common