Skip to content

Commit

Permalink
fix: 修复通过模板生成页面的相关缺陷 (#519)
Browse files Browse the repository at this point in the history
* fix: generate page style

* chore: home page

* style: fix by prettier
  • Loading branch information
alvinhui authored Sep 10, 2020
1 parent 2a0e1ac commit 82851a6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ import callService from '../../callService';

nextComponents.setup();

const tmpComponents = {};
forIn(nextComponents, (value, key) => {
if (key !== 'setup') {
tmpComponents[key] = value;
}
});

export default ({
templateSchema,
originResetData,
Expand All @@ -26,16 +33,8 @@ export default ({
const [routerConfig, setRouterConfig] = useState([]);
const [isConfigurableRouter, setIsConfigurableRouter] = useState(true);
const [templateData, setTemplateData] = useState({});
const [components, setComponents] = useState({});

useEffect(() => {
const tmpComponents = {};
forIn(nextComponents, (value, key) => {
if (key !== 'setup') {
tmpComponents[key] = value;
}
});
setComponents(tmpComponents);
setLoading(false);
}, []);

Expand Down Expand Up @@ -159,7 +158,7 @@ export default ({
intl.formatMessage({ id: 'web.iceworksUIBuilder.pageCreator.defaultDescription' })}
</p>
<SchemaForm
components={components}
components={tmpComponents}
schema={templateSchema}
onSubmit={(setting) => {
getRouterForm(setting);
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iceworks/material-ui",
"version": "0.1.10",
"version": "0.1.11",
"description": "Material panel for display and select materials.",
"files": [
"demo/",
Expand Down Expand Up @@ -54,6 +54,6 @@
"access": "public"
},
"license": "MIT",
"homepage": "https://unpkg.com/@iceworks/material-ui@0.1.10/build/index.html",
"homepage": "https://unpkg.com/@iceworks/material-ui@0.1.11/build/index.html",
"gitHead": "fc5b35f95ab4cc24898845916acf598c2f34d576"
}
15 changes: 10 additions & 5 deletions packages/material-ui/src/components/page.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cursor: pointer;
overflow: hidden;
position: relative;
height: 120px;
height: 100%;
padding: 5px 20px;
margin-bottom: 24px;
background-color: #252422;
Expand All @@ -20,6 +20,15 @@

&.selected {
border-color: $color-line1-3;

.selectedIcon {
position: absolute;
top: 6px;
right: 6px;
border: 1px solid $color-line1-3;
border-radius: 50%;
padding: 4px;
}
}
}

Expand All @@ -43,10 +52,6 @@
padding: 10px 0;
}

.desc {
color: $color-text1-2;
}

.actions {
position: absolute;
bottom: 0;
Expand Down

0 comments on commit 82851a6

Please sign in to comment.