Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
}
}
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
}
}
mounted() {
// 如果已经注册过则不再注册
if (ams && ams.blocks && ams.blocks['convent']) {
this.init = true;
return;
}
ams.block('convent', blockConfig);
this.init = true
}
}
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
}
}
mounted() {
// 如果已经注册过则不再注册
if (ams && ams.blocks && ams.blocks['market-template']) {
this.init = true;
return;
}
ams.block('market-template', block)
this.init = true
}
}
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
}
}
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
}
}
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']
}
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
}
}