How to use the maka.load function in maka

To help you get started, we’ve selected a few maka examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github makajs / maka / packages / example / maka-app-store / apps / base / common / index.js View on Github external
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')
    })

}
github makajs / maka / packages / example / maka-app-store / apps / sys / portal / index.js View on Github external
async function beforeRegister(){
    await load('common')
    await load('webapi')
}
github makajs / maka / packages / example / maka-app-store / apps / sys / portal / index.js View on Github external
async function beforeRegister(){
    await load('common')
    await load('webapi')
}
github makajs / maka / packages / example / maka-antd-pro / apps / base / component / custom-component / src / index.js View on Github external
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)
}
github makajs / maka / packages / example / maka-app-store / apps / sys / option / src / index.js View on Github external
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('修改主题色成功')
    }
}

maka

maka

ISC
Latest version published 3 years ago

Package Health Score

36 / 100
Full package analysis

Popular maka functions