We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3e07e5 commit 0251b66Copy full SHA for 0251b66
src/components/card/CardContainer.vue
@@ -1,8 +1,5 @@
1
<template>
2
- <div
3
- :class="containerClasses"
4
- :style="maxWidth && maxWidth ? containerStyle : ''"
5
- >
+ <div :class="containerClasses" :style="containerStyle">
6
<slot name="top"></slot>
7
<slot name="bottom"></slot>
8
</div>
@@ -34,8 +31,12 @@ const containerClasses = computed(() => {
34
31
return `${baseClasses} ${ratioClasses[ratio]}`
35
32
})
36
33
37
-const containerStyle = computed(() => ({
38
- maxWidth: `${maxWidth}px`,
39
- minWidth: `${minWidth}px`
40
-}))
+const containerStyle = computed(() =>
+ maxWidth || minWidth
+ ? {
+ maxWidth: `${maxWidth}px`,
+ minWidth: `${minWidth}px`
+ }
+ : {}
41
+)
42
</script>
0 commit comments