vendor: amis 6.13.0 base (fork root)
This commit is contained in:
42
packages/amis-editor/examples/layout/plugin/Layout1_1.tsx
Normal file
42
packages/amis-editor/examples/layout/plugin/Layout1_1.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @file Flex 常见布局 1:1 左右均分
|
||||
*/
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout1_1 extends FlexPluginBase {
|
||||
name = '左右均分';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-2cols-plugin';
|
||||
description = '常见布局:左右均分布局(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 200;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
}
|
||||
],
|
||||
alignItems: 'stretch'
|
||||
};
|
||||
}
|
||||
53
packages/amis-editor/examples/layout/plugin/Layout1_1_1.tsx
Normal file
53
packages/amis-editor/examples/layout/plugin/Layout1_1_1.tsx
Normal file
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @file Flex 常见布局 1:1:1 三栏均分
|
||||
*/
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout1_1_1 extends FlexPluginBase {
|
||||
name = '三栏均分';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-3cols-plugin';
|
||||
description = '常见布局:三栏均分布局(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 300;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
display: 'block',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1
|
||||
}
|
||||
}
|
||||
],
|
||||
alignItems: 'stretch'
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* @file Flex 常见布局 上中下布局
|
||||
*/
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout1_1_1_v2 extends FlexPluginBase {
|
||||
name = '上中下';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-3row-plugin';
|
||||
description = '常见布局:上中下布局(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 303;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
}
|
||||
],
|
||||
direction: 'column',
|
||||
justify: 'center',
|
||||
alignItems: 'stretch'
|
||||
};
|
||||
}
|
||||
50
packages/amis-editor/examples/layout/plugin/Layout1_1_v2.tsx
Normal file
50
packages/amis-editor/examples/layout/plugin/Layout1_1_v2.tsx
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @file Flex 常见布局 上下布局
|
||||
*/
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout1_1_v2 extends FlexPluginBase {
|
||||
name = '上下布局';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-2row-plugin';
|
||||
description = '常见布局:上下布局(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 203;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
}
|
||||
],
|
||||
direction: 'column',
|
||||
justify: 'center',
|
||||
alignItems: 'stretch'
|
||||
};
|
||||
}
|
||||
42
packages/amis-editor/examples/layout/plugin/Layout1_2.tsx
Normal file
42
packages/amis-editor/examples/layout/plugin/Layout1_2.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @file Flex 常见布局 1:2
|
||||
*/
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout1_2 extends FlexPluginBase {
|
||||
name = '1:2 布局';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-2cols-plugin';
|
||||
description = '常见布局:1:2 布局(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 201;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 2,
|
||||
display: 'block'
|
||||
}
|
||||
}
|
||||
],
|
||||
alignItems: 'stretch'
|
||||
};
|
||||
}
|
||||
53
packages/amis-editor/examples/layout/plugin/Layout1_2_3.tsx
Normal file
53
packages/amis-editor/examples/layout/plugin/Layout1_2_3.tsx
Normal file
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @file Flex 常见布局 1:2:3
|
||||
*/
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout1_2_3 extends FlexPluginBase {
|
||||
name = '1:2:3 三栏';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-3cols-plugin';
|
||||
description = '常见布局:1:2:3 三栏布局(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 301;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 2,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
display: 'block',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 3
|
||||
}
|
||||
}
|
||||
],
|
||||
alignItems: 'stretch'
|
||||
};
|
||||
}
|
||||
72
packages/amis-editor/examples/layout/plugin/Layout1_2_v2.tsx
Normal file
72
packages/amis-editor/examples/layout/plugin/Layout1_2_v2.tsx
Normal file
@@ -0,0 +1,72 @@
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout1_2_v2 extends FlexPluginBase {
|
||||
name = '一拖二';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-1with2-plugin';
|
||||
description = '常见布局:一拖二布局(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 303;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '100px',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'flex',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
}
|
||||
],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
padding: 0
|
||||
},
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
],
|
||||
style: {
|
||||
overflowX: 'auto',
|
||||
margin: '0',
|
||||
maxWidth: 'auto',
|
||||
height: '350px',
|
||||
overflowY: 'auto'
|
||||
},
|
||||
direction: 'column',
|
||||
justify: 'center',
|
||||
alignItems: 'stretch',
|
||||
isFixedHeight: true
|
||||
};
|
||||
}
|
||||
74
packages/amis-editor/examples/layout/plugin/Layout1_2_v3.tsx
Normal file
74
packages/amis-editor/examples/layout/plugin/Layout1_2_v3.tsx
Normal file
@@ -0,0 +1,74 @@
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout1_2_v3 extends FlexPluginBase {
|
||||
name = '左一右二';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-1-2-plugin';
|
||||
description = '常见布局:左一右二布局(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 304;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '250px',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'flex',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
}
|
||||
],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
margin: '0'
|
||||
},
|
||||
alignItems: 'stretch',
|
||||
direction: 'column',
|
||||
justify: 'center'
|
||||
}
|
||||
],
|
||||
style: {
|
||||
overflowX: 'auto',
|
||||
margin: '0',
|
||||
maxWidth: 'auto',
|
||||
height: '350px',
|
||||
overflowY: 'auto'
|
||||
},
|
||||
direction: 'row',
|
||||
justify: 'center',
|
||||
alignItems: 'stretch',
|
||||
isFixedHeight: true
|
||||
};
|
||||
}
|
||||
107
packages/amis-editor/examples/layout/plugin/Layout1_2_v4.tsx
Normal file
107
packages/amis-editor/examples/layout/plugin/Layout1_2_v4.tsx
Normal file
@@ -0,0 +1,107 @@
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout1_2_v4 extends FlexPluginBase {
|
||||
name = '经典布局';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-3-1-plugin';
|
||||
description = '常见布局:经典布局(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 307;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'flex',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '250px',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'flex',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
}
|
||||
],
|
||||
style: {
|
||||
position: 'static',
|
||||
overflowX: 'auto',
|
||||
overflowY: 'auto',
|
||||
margin: '0',
|
||||
flex: '1 1 auto',
|
||||
flexGrow: 1,
|
||||
flexBasis: 'auto'
|
||||
},
|
||||
alignItems: 'stretch',
|
||||
direction: 'column',
|
||||
justify: 'center',
|
||||
isFixedHeight: false,
|
||||
isFixedWidth: false
|
||||
}
|
||||
],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
overflowX: 'auto',
|
||||
margin: '0',
|
||||
maxWidth: 'auto',
|
||||
overflowY: 'auto',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
width: 'auto',
|
||||
maxHeight: 'auto',
|
||||
minHeight: '300px'
|
||||
},
|
||||
direction: 'row',
|
||||
justify: 'flex-start',
|
||||
alignItems: 'stretch',
|
||||
isFixedHeight: false,
|
||||
isFixedWidth: false
|
||||
}
|
||||
],
|
||||
direction: 'column',
|
||||
justify: 'center',
|
||||
alignItems: 'stretch'
|
||||
};
|
||||
}
|
||||
42
packages/amis-editor/examples/layout/plugin/Layout1_3.tsx
Normal file
42
packages/amis-editor/examples/layout/plugin/Layout1_3.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @file Flex 常见布局 1:3
|
||||
*/
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout1_3 extends FlexPluginBase {
|
||||
name = '1:3 布局';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-2cols-plugin';
|
||||
description = '常见布局:1:3 布局(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 202;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 3,
|
||||
display: 'block'
|
||||
}
|
||||
}
|
||||
],
|
||||
alignItems: 'stretch'
|
||||
};
|
||||
}
|
||||
75
packages/amis-editor/examples/layout/plugin/Layout2_1_v2.tsx
Normal file
75
packages/amis-editor/examples/layout/plugin/Layout2_1_v2.tsx
Normal file
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* @file Flex 常见布局 二拖一布局
|
||||
*/
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout2_1_v2 extends FlexPluginBase {
|
||||
name = '二拖一';
|
||||
isBaseComponent = false; // 在自定义组件面板中展示
|
||||
pluginIcon = 'layout-2with1-plugin';
|
||||
description = '常见布局:二拖一布局(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 305;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'flex',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
}
|
||||
],
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '100px'
|
||||
},
|
||||
alignItems: 'stretch'
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: '200px',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
}
|
||||
],
|
||||
style: {
|
||||
overflowX: 'auto',
|
||||
margin: '0',
|
||||
maxWidth: 'auto',
|
||||
height: '350px',
|
||||
overflowY: 'auto'
|
||||
},
|
||||
direction: 'column',
|
||||
justify: 'center',
|
||||
alignItems: 'stretch',
|
||||
isFixedHeight: true
|
||||
};
|
||||
}
|
||||
73
packages/amis-editor/examples/layout/plugin/Layout2_1_v3.tsx
Normal file
73
packages/amis-editor/examples/layout/plugin/Layout2_1_v3.tsx
Normal file
@@ -0,0 +1,73 @@
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout2_1_v3 extends FlexPluginBase {
|
||||
name = '左二右一';
|
||||
isBaseComponent = false; // 在自定义组件面板中展示
|
||||
pluginIcon = 'layout-2-1-plugin';
|
||||
description = '常见布局:左二右一布局(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 306;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'flex',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
}
|
||||
],
|
||||
style: {
|
||||
flex: '1 1 auto'
|
||||
},
|
||||
alignItems: 'stretch',
|
||||
direction: 'column',
|
||||
justify: 'center'
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '250px',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
}
|
||||
],
|
||||
style: {
|
||||
overflowX: 'auto',
|
||||
margin: '0',
|
||||
maxWidth: 'auto',
|
||||
height: '350px',
|
||||
overflowY: 'auto'
|
||||
},
|
||||
direction: 'row',
|
||||
justify: 'center',
|
||||
alignItems: 'stretch',
|
||||
isFixedHeight: true
|
||||
};
|
||||
}
|
||||
23
packages/amis-editor/examples/layout/plugin/Layout_fixed.tsx
Normal file
23
packages/amis-editor/examples/layout/plugin/Layout_fixed.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout_fixed extends FlexPluginBase {
|
||||
name = '悬浮容器';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-fixed-plugin';
|
||||
description = '常见布局:悬浮容器(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = -1;
|
||||
scaffold: any = {
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
position: 'fixed',
|
||||
inset: 'auto 50px 50px auto',
|
||||
zIndex: 10,
|
||||
minWidth: '80px',
|
||||
minHeight: '80px'
|
||||
},
|
||||
originPosition: 'right-bottom'
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout_fixed_bottom extends FlexPluginBase {
|
||||
name = '吸底容器';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'flex-container-plugin';
|
||||
description = '常见布局:吸底容器(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 501;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'stretch'
|
||||
}
|
||||
}
|
||||
],
|
||||
style: {
|
||||
position: 'fixed',
|
||||
inset: 'auto auto 0 0',
|
||||
zIndex: 2,
|
||||
width: '100%',
|
||||
overflowX: 'auto',
|
||||
margin: '0',
|
||||
overflowY: 'auto',
|
||||
height: 'auto'
|
||||
},
|
||||
isFixedWidth: true,
|
||||
direction: 'row',
|
||||
justify: 'center',
|
||||
alignItems: 'stretch',
|
||||
isFixedHeight: false,
|
||||
originPosition: 'right-bottom'
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout_fixed_top extends FlexPluginBase {
|
||||
name = '吸顶容器';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'flex-container-plugin';
|
||||
description = '常见布局:吸顶容器(基于 CSS Flex 实现的布局容器)。';
|
||||
tags = ['常见布局'];
|
||||
order = 502;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1,
|
||||
display: 'block'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'wrapper',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '1 1 auto',
|
||||
display: 'block',
|
||||
flexBasis: 'auto',
|
||||
flexGrow: 1
|
||||
}
|
||||
}
|
||||
],
|
||||
style: {
|
||||
position: 'fixed',
|
||||
inset: '0 auto auto 0',
|
||||
zIndex: 10,
|
||||
width: '100%',
|
||||
overflowX: 'auto',
|
||||
margin: '0',
|
||||
overflowY: 'auto'
|
||||
},
|
||||
isFixedWidth: true,
|
||||
direction: 'row',
|
||||
justify: 'center',
|
||||
alignItems: 'stretch',
|
||||
isFixedHeight: false,
|
||||
originPosition: 'right-bottom'
|
||||
};
|
||||
}
|
||||
132
packages/amis-editor/examples/layout/plugin/Layout_scroll_x.tsx
Normal file
132
packages/amis-editor/examples/layout/plugin/Layout_scroll_x.tsx
Normal file
@@ -0,0 +1,132 @@
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout_scroll_x extends FlexPluginBase {
|
||||
name = 'x轴滚动容器';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-3cols-plugin';
|
||||
description = 'x轴滚动容器: 基于 CSS Flex 实现的布局容器。';
|
||||
order = 505;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
wrapperBody: false,
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '200px',
|
||||
display: 'block',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
wrapperBody: false,
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '200px',
|
||||
display: 'block',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
wrapperBody: false,
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
display: 'block',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto',
|
||||
flexBasis: '200px'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'container',
|
||||
wrapperBody: false,
|
||||
size: 'xs',
|
||||
body: [],
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '200px',
|
||||
display: 'block',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
wrapperBody: false,
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '200px',
|
||||
display: 'block',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
wrapperBody: false,
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '200px',
|
||||
display: 'block',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
wrapperBody: false,
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '200px',
|
||||
display: 'block',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto'
|
||||
}
|
||||
}
|
||||
],
|
||||
direction: 'row',
|
||||
justify: 'flex-start',
|
||||
alignItems: 'stretch',
|
||||
style: {
|
||||
position: 'static',
|
||||
minHeight: 'auto',
|
||||
maxWidth: '1080px',
|
||||
minWidth: 'auto',
|
||||
height: '200px',
|
||||
overflowX: 'scroll',
|
||||
overflowY: 'scroll',
|
||||
margin: '0 auto'
|
||||
},
|
||||
isFixedHeight: true,
|
||||
isFixedWidth: false
|
||||
};
|
||||
|
||||
onPreview2editor(event: any) {
|
||||
console.log('onPreview2editor-event:', event);
|
||||
}
|
||||
}
|
||||
114
packages/amis-editor/examples/layout/plugin/Layout_scroll_y.tsx
Normal file
114
packages/amis-editor/examples/layout/plugin/Layout_scroll_y.tsx
Normal file
@@ -0,0 +1,114 @@
|
||||
import {FlexPluginBase} from '../../../src/plugin/Layout/FlexPluginBase';
|
||||
|
||||
export default class Layout_scroll_y extends FlexPluginBase {
|
||||
name = 'y轴滚动容器';
|
||||
isBaseComponent = false;
|
||||
pluginIcon = 'layout-3row-plugin';
|
||||
description = 'y轴滚动容器: 基于 CSS Flex 实现的布局容器。';
|
||||
order = 504;
|
||||
scaffold: any = {
|
||||
type: 'flex',
|
||||
className: 'p-1',
|
||||
items: [
|
||||
{
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
wrapperBody: false,
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '60px',
|
||||
display: 'block',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
wrapperBody: false,
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '60px',
|
||||
display: 'block',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
wrapperBody: false,
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '60px',
|
||||
display: 'block',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
wrapperBody: false,
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '60px',
|
||||
display: 'block',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
wrapperBody: false,
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '60px',
|
||||
display: 'block',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'container',
|
||||
size: 'xs',
|
||||
body: [],
|
||||
wrapperBody: false,
|
||||
style: {
|
||||
flex: '0 0 auto',
|
||||
flexBasis: '60px',
|
||||
display: 'block',
|
||||
position: 'static',
|
||||
minWidth: 'auto',
|
||||
minHeight: 'auto'
|
||||
}
|
||||
}
|
||||
],
|
||||
direction: 'column',
|
||||
justify: 'flex-start',
|
||||
alignItems: 'stretch',
|
||||
style: {
|
||||
position: 'static',
|
||||
minHeight: 'auto',
|
||||
maxWidth: 'auto',
|
||||
minWidth: 'auto',
|
||||
height: '200px',
|
||||
width: 'auto',
|
||||
overflowX: 'auto',
|
||||
overflowY: 'scroll',
|
||||
margin: '0'
|
||||
},
|
||||
isFixedHeight: true,
|
||||
isFixedWidth: false
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user