完成vue+amis的前端版本
This commit is contained in:
19
client/src/utils.js
Normal file
19
client/src/utils.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const information = {
|
||||
debug: true,
|
||||
baseUrl: 'http://localhost'
|
||||
}
|
||||
|
||||
export function amisRender(target, amisJson) {
|
||||
let amisJsonObject = amisJson(information)
|
||||
if (information.debug) {
|
||||
console.log(amisJsonObject)
|
||||
}
|
||||
amisRequire('amis/embed').embed(
|
||||
target,
|
||||
amisJsonObject,
|
||||
information,
|
||||
{
|
||||
theme: 'antd'
|
||||
}
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user