feat(amis-editor): 增加layout:wrapper-contanier,用于实现子配置项包裹效果 (#6647)

* chore: 子模块中的工具类依赖改放上层

* feat(amis-editor): 增加layout:wrapper-contanier,用于实现子配置项包裹效果

* chore: 调整lint-staged匹配规则
This commit is contained in:
刘丹 2023-04-19 16:21:19 +08:00 committed by GitHub
parent a174424b52
commit 1bd375cc2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 48 additions and 11 deletions

View File

@ -26,6 +26,16 @@
"publish-to-internal": "sh ./publish-to-internal.sh",
"stylelint": "npx stylelint 'packages/**/*.scss'"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"{packages,examples}/**/{src,examples}/**/**/*.{tsx,jsx,ts}": [
"prettier --write"
]
},
"dependencies": {
"postcss": "^8.4.14",
"qs": "6.9.7"
@ -58,6 +68,7 @@
"fis3-preprocessor-js-require-css": "^0.1.3",
"fis3-preprocessor-js-require-file": "^0.1.3",
"husky": "^8.0.0",
"lint-staged": "^12.1.2",
"jest": "^29.0.3",
"jest-environment-jsdom": "^29.0.3",
"js-yaml": "^4.1.0",

View File

@ -83,8 +83,6 @@
"concurrently": "^6.2.0",
"css-loader": "^6.2.0",
"faker": "^5.5.3",
"husky": "^7.0.0",
"lint-staged": "^12.1.2",
"mini-css-extract-plugin": "^2.3.0",
"postcss-import": "^14.1.0",
"postcss-minify": "^1.1.0",

View File

@ -438,3 +438,24 @@ $tooltip-bottom: '[data-tooltip][data-position=' bottom ']:hover:after';
.right-panel-pop {
@include panel-sm-content();
}
// 包裹样式
.config-wrapper-contanier {
position: relative;
margin: -8px auto 12px auto;
padding: 12px 8px;
background-color: #f7f7f9;
border-radius: 2px;
&::after {
display: block;
content: "";
height: 12px;
width: 12px;
position: absolute;
top: -6px;
left: 12px;
transform: rotate(45deg);
background-color: #f7f7f9;
}
}

View File

@ -74,8 +74,6 @@
"concurrently": "^6.2.0",
"css-loader": "^6.2.0",
"faker": "^5.5.3",
"husky": "^7.0.0",
"lint-staged": "^12.1.2",
"mini-css-extract-plugin": "^2.3.0",
"prettier": "^2.2.1",
"react": "^18.2.0",

View File

@ -1494,3 +1494,19 @@ setSchemaTpl(
};
}
);
// 子配置项包裹容器
setSchemaTpl(
'layout:wrapper-contanier',
(config: {
visibleOn?: string;
body: Array<any>
}) => {
return {
type: 'container',
className: 'config-wrapper-contanier',
body: config.body,
visibleOn: config?.visibleOn,
};
}
);

View File

@ -35,11 +35,6 @@
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}
],
"lint-staged": {
"{src,examples}/**/**/*.{tsx,jsx,ts}": [
"prettier --write"
]
},
"dependencies": {
"amis-core": "^2.9.0",
"amis-ui": "^2.9.0",
@ -118,13 +113,11 @@
"fs-walk": "0.0.2",
"glob": "^7.2.0",
"history": "^4.7.2",
"husky": "^7.0.4",
"jest": "^29.0.3",
"jest-canvas-mock": "^2.3.0",
"jest-environment-jsdom": "^29.0.3",
"js-yaml": "^4.1.0",
"json5": "^2.2.1",
"lint-staged": "^12.3.3",
"marked": ">=4.0.12",
"mkdirp": "^1.0.4",
"moment-timezone": "^0.5.34",