How to use the @ams-team/ams.blocks function in @ams-team/ams

To help you get started, we’ve selected a few @ams-team/ams 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 vipshop / ams / docs / zh-CN / .vuepress / components / block / chart-pie / demo.vue View on Github external
mounted(){
        // 如果已经注册过则不再注册
        if (ams && ams.blocks && ams.blocks['chart-pie']) {
            this.init = true;
            return;
        }

        const formFields =
            ['text', 'inputnumber', 'select']
            .reduce((obj, cur) => Object.assign(obj, { [cur]: fields[cur] }), {})

        // ams.resource('list', { fields: formFields })
        ams.block('chart-pie', block)

        this.init = true
    }
}
github vipshop / ams / docs / zh-CN / .vuepress / components / block / chart-line / demo.vue View on Github external
mounted(){
        // 如果已经注册过则不再注册
        if (ams && ams.blocks && ams.blocks['chart-line']) {
            this.init = true;
            return;
        }

        const formFields =
            ['text', 'inputnumber', 'select']
            .reduce((obj, cur) => Object.assign(obj, { [cur]: fields[cur] }), {})

        // ams.resource('list', { fields: formFields })
        ams.block('chart-line', block)

        this.init = true
    }
}
github vipshop / ams / docs / zh-CN / .vuepress / components / utils / convert / convent.vue View on Github external
mounted() {
        // 如果已经注册过则不再注册
        if (ams && ams.blocks && ams.blocks['convent']) {
            this.init = true;
            return;
        }

        ams.block('convent', blockConfig);

        this.init = true
    }
}
github vipshop / ams / docs / zh-CN / .vuepress / components / block / chart-radar / demo.vue View on Github external
mounted(){
        // 如果已经注册过则不再注册
        if (ams && ams.blocks && ams.blocks['chart-radar']) {
            this.init = true;
            return;
        }

        const formFields =
            ['text', 'inputnumber', 'select']
            .reduce((obj, cur) => Object.assign(obj, { [cur]: fields[cur] }), {})

        // ams.resource('list', { fields: formFields })
        ams.block('chart-radar', block)

        this.init = true
    }
}
github vipshop / ams / docs / doc / .vuepress / components / market / template / template.vue View on Github external
mounted() {
        // 如果已经注册过则不再注册
        if (ams && ams.blocks && ams.blocks['market-template']) {
            this.init = true;
            return;
        }

        ams.block('market-template', block)

        this.init = true
    }
}
github vipshop / ams / docs / zh-CN / .vuepress / components / block / chart-bar / demo.vue View on Github external
mounted(){
        // 如果已经注册过则不再注册
        if (ams && ams.blocks && ams.blocks['chart-bar']) {
            this.init = true;
            return;
        }

        const formFields =
            ['text', 'inputnumber', 'select']
            .reduce((obj, cur) => Object.assign(obj, { [cur]: fields[cur] }), {})

        // ams.resource('list', { fields: formFields })
        ams.block('chart-bar', block)

        this.init = true
    }
}
github vipshop / ams / docs / zh-CN / .vuepress / components / block / chart-funnel / demo.vue View on Github external
mounted(){
        // 如果已经注册过则不再注册
        if (ams && ams.blocks && ams.blocks['chart-funnel']) {
            this.init = true;
            return;
        }

        const formFields =
            ['text', 'inputnumber', 'select']
            .reduce((obj, cur) => Object.assign(obj, { [cur]: fields[cur] }), {})

        // ams.resource('list', { fields: formFields })
        ams.block('chart-funnel', block)

        this.init = true
    }
}
github vipshop / ams / docs / zh-CN / .vuepress / components / demo / list.vue View on Github external
mounted() {
        // 如果已经注册过则不再注册
        if (ams && ams.blocks && ams.blocks[`${this.type}`]) {
            this.init = true;
            return;
        }
        const getValues = (configObj, fieldType) => {
            switch (this.type) {
                case 'object': {
                    return {
                        simpleObject: configObj['simpleObject'],
                        multiObject: configObj['multiObject']
                    }
                }
                case 'array': {
                    return {
                        simpleArray: configObj['simpleArray'],
                        ArrayArray: configObj['ArrayArray']
                    }
github vipshop / ams / docs / zh-CN / .vuepress / components / block / chart-scatter / demo.vue View on Github external
mounted(){
        // 如果已经注册过则不再注册
        if (ams && ams.blocks && ams.blocks['chart-scatter']) {
            this.init = true;
            return;
        }

        const formFields =
            ['text', 'inputnumber', 'select']
            .reduce((obj, cur) => Object.assign(obj, { [cur]: fields[cur] }), {})

        // ams.resource('list', { fields: formFields })
        ams.block('chart-scatter', block)

        this.init = true
    }
}