[amis-saas-7476]:几个build warging

Change-Id: I4bce64b31260d9f1d53e0f8e9969e5eb8488b5e4
This commit is contained in:
hsm-lv 2022-10-18 20:39:38 +08:00
parent 7df75b140c
commit 0023e419e5
3 changed files with 12 additions and 12 deletions

View File

@ -610,7 +610,7 @@ export class CRUDPlugin extends BasePlugin {
});
// 只有表格才能找到操作列放这个内容,卡片和列表不知道位置
if (context.schema.mode === 'table-v2') {
if (context.schema.mode === 'table2') {
DataOperators.forEach(op => {
if (!builder.features.includes(op.value)) {
return;
@ -681,7 +681,7 @@ export class CRUDPlugin extends BasePlugin {
}
const existCols =
node!.children.find(child => child.type === 'table-v2')?.children[0]
node!.children.find(child => child.type === 'table2')?.children[0]
?.children || [];
const hasOperatorCol = node!.schema.columns?.some(
(col: any) => col.type === 'operation'
@ -741,7 +741,7 @@ export class CRUDPlugin extends BasePlugin {
// context.node.
// // 只有表格才能找到操作列放这个内容,卡片和列表不知道位置
// if (context.schema.mode === 'table-v2') {
// if (context.schema.mode === 'table2') {
// DataOperators.forEach(op => {
// if (!builder.features.includes(op.value)) {
// return;
@ -1422,7 +1422,7 @@ export class CRUDPlugin extends BasePlugin {
async buildDataSchemas(node: EditorNodeType, region?: EditorNodeType) {
const child: EditorNodeType = node.children.find(
item => !!~['table-v2', 'cards', 'list'].indexOf(item.type)
item => !!~['table2', 'cards', 'list'].indexOf(item.type)
);
let items;
@ -1531,7 +1531,7 @@ export class TableCRUDPlugin extends CRUDPlugin {
scaffold: any = {
type: 'crud2',
mode: 'table-v2',
mode: 'table2',
columns: [
{
key: 'id',

View File

@ -27,7 +27,7 @@ import {getArgsWrapper} from '../renderer/event-control/helper';
export class TableV2Plugin extends BasePlugin {
// 关联渲染器名字
rendererName = 'table-v2';
rendererName = 'table2';
$schema = '/schemas/TableSchema.json';
// 组件名称
@ -41,12 +41,12 @@ export class TableV2Plugin extends BasePlugin {
icon = 'fa fa-table';
scaffold: SchemaObject = {
type: 'table-v2',
type: 'table2',
columns: [
{
title: '列信息',
key: 'a'
name: 'a'
}
],
@ -64,7 +64,7 @@ export class TableV2Plugin extends BasePlugin {
];
previewSchema: any = {
type: 'table-v2',
type: 'table2',
className: 'text-left m-b-none',
items: [
{a: 1, b: 2, c: 9},
@ -342,7 +342,7 @@ export class TableV2Plugin extends BasePlugin {
}
const result: any = {
$id: 'table-v2',
$id: 'table2',
type: 'object',
properties: {
items: {
@ -870,7 +870,7 @@ export class TableV2Plugin extends BasePlugin {
if (
!schema.$$id &&
['crud', 'crud2'].includes(schema.$$editor?.renderer.name) &&
renderer.name === 'table-v2'
renderer.name === 'table2'
) {
return {
...({id: schema.$$editor.id} as any),

View File

@ -28,7 +28,7 @@ export class TableCellV2Plugin extends BasePlugin {
const {context, data} = event.context;
if (
!context.node.parent?.parent?.type ||
context.node.parent.parent.type !== 'table-v2'
context.node.parent.parent.type !== 'table2'
) {
return;
}