提交 e51abd66 编写于 作者: S suzigang

feat: popup增加popClass属性

上级 a00f71f7
......@@ -6,7 +6,10 @@
is-link
@click="state.showBasic = true"
></nut-cell>
<nut-popup :style="{ padding: '30px 50px' }" v-model:show="state.showBasic"
<nut-popup
popClass="popclass"
:style="{ padding: '30px 50px' }"
v-model:show="state.showBasic"
>正文</nut-popup
>
<h2>弹出位置</h2>
......
......@@ -103,6 +103,7 @@ app.use(Popup);
| position | 弹出位置(top,bottom,left,right,center) | String | "center" |
| transition | 动画名 | String | - |
| style | 自定义弹框样式 | CSSProperties | - |
| pop-class | 自定义弹框类名 | String | - |
| closeable | 是否显示关闭按钮 | Boolean | true |
| close-icon-position | 关闭按钮位置(top-left,top-right,bottom-left,bottom-right) | String | "top-right" |
| close-icon | 自定义 Icon | String | "close" |
......
......@@ -68,6 +68,11 @@ const popupProps = {
type: Object as PropType<CSSProperties>
},
popClass: {
type: String,
default: ''
},
closeable: {
type: Boolean,
default: false
......@@ -134,7 +139,8 @@ export default create({
return {
[prefixCls]: true,
['round']: props.round,
[`popup-${props.position}`]: true
[`popup-${props.position}`]: true,
[props.popClass]: true
};
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册