Skip to content

Commit

Permalink
feat: add minWidth prop
Browse files Browse the repository at this point in the history
  • Loading branch information
chensuifengran committed Nov 23, 2024
1 parent 3186bab commit 727403c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/dialog/GeneralDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ const props = defineProps({
type: String,
default: "70%",
},
minWidth:{
type: String,
default: "700px"
},
top: {
type: String,
default: "10vh",
Expand All @@ -81,11 +85,21 @@ const closeHandle = (e: MouseEvent) => {
props.cancel(e);
}
};
const width = computed(()=>{
if(IS_PLAYGROUND_ENV){
return '45vw'
}
return props.width
})
const minWidth = computed(()=>props.minWidth)
</script>

<style lang="scss" scoped></style>
<style lang="scss">
.general-dialog {
min-width: v-bind(minWidth);
.el-dialog__body {
padding-top: 0;
}
Expand Down

0 comments on commit 727403c

Please sign in to comment.