优化 Render 修改返回类型

This commit is contained in:
🌌 2023-12-23 00:03:58 +08:00
parent b81ea80939
commit 1ad798a8b1

View File

@ -7,7 +7,7 @@ const Render = {
console.log('未找到e.runtime请升级至最新版Yunzai') console.log('未找到e.runtime请升级至最新版Yunzai')
} }
return e.runtime.render(cfg.plugin || 'miao-plugin', path, params, { return e.runtime.render(cfg.plugin || 'miao-plugin', path, params, {
retType: cfg.retMsgId ? 'msgId' : 'default', retType: cfg.retType || (cfg.retMsgId ? 'msgId' : 'default'),
beforeRender ({ data }) { beforeRender ({ data }) {
let pluginName = '' let pluginName = ''
if (data.pluginName !== false) { if (data.pluginName !== false) {
@ -39,4 +39,4 @@ const Render = {
} }
} }
export default Render export default Render