feat(components): add pattern-container slot to Background
# What's changed? * `pattern-container` allows for complete overwrite of the pattern of Background
This commit is contained in:
@@ -60,6 +60,7 @@ export default {
|
|||||||
width: `${width > 100 ? 100 : width}%`,
|
width: `${width > 100 ? 100 : width}%`,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
<slot :id="patternId" name="pattern-container">
|
||||||
<pattern
|
<pattern
|
||||||
:id="patternId"
|
:id="patternId"
|
||||||
:x="background.xOffset"
|
:x="background.xOffset"
|
||||||
@@ -80,7 +81,8 @@ export default {
|
|||||||
</svg>
|
</svg>
|
||||||
</slot>
|
</slot>
|
||||||
</pattern>
|
</pattern>
|
||||||
|
</slot>
|
||||||
<rect :x="x" :y="y" width="100%" height="100%" :fill="`url(#${patternId})`" />
|
<rect :x="x" :y="y" width="100%" height="100%" :fill="`url(#${patternId})`" />
|
||||||
<slot></slot>
|
<slot :id="patternId" />
|
||||||
</svg>
|
</svg>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user