Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function beforeRegister() {
await load(['antd', 'fixed-data-table'])
registerComponent('ctrl', components)
registerTemplate('tpl', templates)
registerAction('moment', moment, true)
registerAction('lodash', lodash, true)
registerAction('modal', components.Modal, true)
registerAction('message', getComponent('antd.message'), true)
registerAction('notification', getComponent('antd.notification'), true)
Object.keys(actions).forEach(key => {
registerAction(key, actions[key], key == 'numberHelper')
})
}
async function beforeRegister() {
await load(['antd'])
}
async function beforeRegister() {
await load(['antd', 'action', 'i18n'])
}
async function beforeRegister(){
await load(['common', 'echarts'])
}
async function beforeRegister() {
await load(['echarts', 'template', 'webapi'])
}
async function beforeRegister(){
await load('common')
await load('webapi')
}
async function beforeRegister(){
await load('common')
await load('webapi')
}
async function beforeRegister(){
await load('antd')
registerComponent('ctrl', components)
registerAction('modal', components.Modal, true)
registerAction('drawer', components.Drawer, true)
registerAction('message', getComponent('antd.message'), true)
registerAction('notification', getComponent('antd.notification'), true)
}
primaryColorChange = (item) => async () => {
var data = this.base.getState()
var old = data.primaryColors.find(o => o.key == data.activePrimaryColor)
removeApp(old.appName)
var resp = await this.webapi.option.update({
activePrimaryColor: item.key
})
await load(item.appName)
this.base.setState('data', resp)
this.message.success('修改主题色成功')
}
}
async function beforeRegister(){
await load('common')
}