|
|
@ -1,6 +1,7 @@ |
|
|
|
<template> |
|
|
|
<div class='BG-02' :style="{ '--width': width, '--lang-width': langWidth }"> |
|
|
|
<BackgroundClip ref="BackgroundClipRef" class="bg" :clipPath="getClipPath" :borderPath="getBorderPath" |
|
|
|
<!-- :borderPath="getBorderPath" --> |
|
|
|
<BackgroundClip ref="BackgroundClipRef" class="bg" :clipPath="getClipPath" |
|
|
|
bgColor="linear-gradient(180deg, #152E3C 0%, #163A45 100%)" |
|
|
|
borderColor="linear-gradient(180deg, rgba(40, 144, 167, 1), rgba(40, 144, 167, 0.38), rgba(40, 144, 167, 1))"> |
|
|
|
<slot /> |
|
|
@ -40,7 +41,8 @@ export default { |
|
|
|
return `polygon(calc(100% - ${this.langWidth} - ${this.width} * 2) 0, calc(100% - ${this.langWidth}) calc(${this.width} * 1.5), calc(100% - ${this.width} * 1.4) calc(${this.width} * 1.5), 100% calc(${this.width} * 3), 100% calc(100% - ${this.width}), calc(100% - ${this.width}) 100%, ${this.width} 100%, 0 calc(100% - ${this.width}), 0 ${this.width}, ${this.width} 0)` |
|
|
|
}, |
|
|
|
getBorderPath() { |
|
|
|
return `polygon(calc(100% - ${this.langWidth} - ${this.width} * 2) 0, calc(100% - ${this.langWidth}) calc(${this.width} * 1.5), calc(100% - ${this.width} * 1.4) calc(${this.width} * 1.5), 100% calc(${this.width} * 3), 100% calc(100% - ${this.width}), calc(100% - ${this.width}) 100%, ${this.width} 100%, 0 calc(100% - ${this.width}), 0 ${this.width}, ${this.width} 0)` |
|
|
|
// return `polygon(calc(100% - ${this.langWidth} - ${this.width} * 2) 0, calc(100% - ${this.langWidth}) calc(${this.width} * 1.5), calc(100% - ${this.width} * 1.4) calc(${this.width} * 1.5), 100% calc(${this.width} * 3), 100% calc(100% - ${this.width}), calc(100% - ${this.width}) 100%, ${this.width} 100%, 0 calc(100% - ${this.width}), 0 ${this.width}, ${this.width} 0)` |
|
|
|
return `polygon(20% 0%, 0% 100%, 25% 100%, 25% 25%, 75% 25%, 74% 69%, 19% 83%, 15% 100%, 100% 100%, 100% 0%)` |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|