mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 19:38:16 +08:00
feat(amis-editor): 增加layout:wrapper-contanier,用于实现子配置项包裹效果 (#6647)
* chore: 子模块中的工具类依赖改放上层 * feat(amis-editor): 增加layout:wrapper-contanier,用于实现子配置项包裹效果 * chore: 调整lint-staged匹配规则
This commit is contained in:
parent
a174424b52
commit
1bd375cc2f
11
package.json
11
package.json
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -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,
|
||||
};
|
||||
}
|
||||
);
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user