开始尝试进行业务化模板

This commit is contained in:
2025-03-27 23:42:53 +08:00
parent 7c6c387a07
commit dd9f966597
11 changed files with 166 additions and 34 deletions

View File

@@ -1,19 +1,21 @@
const information = {
debug: true,
baseUrl: 'http://localhost'
debug: true,
baseUrl: 'http://localhost:8080',
}
export function amisRender(target, amisJson) {
let amisJsonObject = amisJson(information)
if (information.debug) {
console.log(amisJsonObject)
}
amisRequire('amis/embed').embed(
target,
amisJsonObject,
information,
{
theme: 'antd'
}
)
let amisJsonObject = amisJson(information)
if (information.debug) {
console.log(amisJsonObject)
}
amisRequire('amis/embed').embed(
target,
amisJsonObject,
information,
{
theme: 'antd',
enableAMISDebug:
information.debug,
},
)
}