Skip to content

Commit af7eda4

Browse files
move to computed
1 parent 4278807 commit af7eda4

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/components/VueContentLoading.vue

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<svg :viewBox="viewbox" preserveAspectRatio="xMidYMid meet">
33
<rect
4-
:style="{ fill: 'url(#' + gradientId + ')' }"
5-
:clip-path="'url(#' + clipPathId + ')'"
4+
:style="rect.style"
5+
:clip-path="rect.clipPath"
66
x="0"
77
y="0"
88
:width="width"
@@ -43,7 +43,9 @@
4343
4444
export default {
4545
name: 'VueContentLoading',
46+
4647
props: {
48+
4749
speed: {
4850
default: 2,
4951
type: Number,
@@ -88,6 +90,15 @@
8890
clipPathId () {
8991
return `clipPath-${this._uid}`;
9092
},
93+
94+
rect () {
95+
return {
96+
style: {
97+
fill: 'url(#' + this.gradientId + ')',
98+
},
99+
clipPath: 'url(#' + this.clipPathId + ')',
100+
};
101+
},
91102
},
92103
};
93104
</script>

0 commit comments

Comments
 (0)