diff --git a/packages/app/src/components/pages/AdminLoader/Page/index.tsx b/packages/app/src/components/pages/AdminLoader/Page/index.tsx index 9eb0c1542..827b2d22d 100644 --- a/packages/app/src/components/pages/AdminLoader/Page/index.tsx +++ b/packages/app/src/components/pages/AdminLoader/Page/index.tsx @@ -47,10 +47,11 @@ export function Page(props: any) {
- +
{views.map(view => { let viewName: string; let span = 24; + let float = 'left'; if (typeof view === 'string') { viewName = view; } @@ -61,9 +62,12 @@ export function Page(props: any) { } else if (view.width === '100%') { span = 24; } + if (view.float == 'right') { + float = 'right'; + } } return ( - +
- +
); })} - +
); diff --git a/packages/app/src/components/pages/AdminLoader/Page/style.less b/packages/app/src/components/pages/AdminLoader/Page/style.less index 4598d81ba..c8d46a2ee 100644 --- a/packages/app/src/components/pages/AdminLoader/Page/style.less +++ b/packages/app/src/components/pages/AdminLoader/Page/style.less @@ -22,3 +22,45 @@ } } } + +.noco-row { + margin: 0 -12px; + &::after { + content: ' '; + clear: both; + display: block; + } + .noco-col { + margin-left: 12px; + margin-right: 12px; + margin-bottom: 24px; + width: calc(50% - 24px); + float: left; + } + .noco-col-24 { + width: calc(100% - 24px); + } + .float-left { + float: left; + clear: left; + } + .float-right { + float: right; + clear: right; + } +} + +@media only screen and (max-width: 800px) { + .page-content { + margin: 0; + margin-top: 1px; + } + .noco-row { + margin: 0; + .noco-col { + width: 100%; + margin: 0; + margin-bottom: 1px; + } + } +} \ No newline at end of file diff --git a/packages/plugin-pages/src/collections/menus_views_v2.ts b/packages/plugin-pages/src/collections/menus_views_v2.ts index e44b09e09..3f180dbc5 100644 --- a/packages/plugin-pages/src/collections/menus_views_v2.ts +++ b/packages/plugin-pages/src/collections/menus_views_v2.ts @@ -66,6 +66,26 @@ export default { { label: '50%', value: '50%' }, { label: '100%', value: '100%' }, ], + component: { + type: 'radio', + 'x-linkages': [ + { + "type": "value:visible", + "target": "float", + "condition": "{{ $self.value && $self.value === '50%' }}" + }, + ] + }, + }, + { + interface: 'radio', + type: 'string', + name: 'float', + title: '位置', + dataSource: [ + { label: '左边', value: 'left' }, + { label: '右边', value: 'right' }, + ], component: { type: 'radio', }, @@ -227,7 +247,8 @@ export default { fields: [ 'view', 'view.collection.title', - 'width' + 'width', + 'float' ], detailsOpenMode: 'drawer', // window details: ['form'], @@ -241,6 +262,7 @@ export default { fields: [ 'view', 'width', + 'float', 'returnType', 'redirect', 'message', @@ -264,6 +286,7 @@ export default { fields: [ 'view', 'width', + 'float', 'returnType', 'redirect', 'message',