diff --git a/src/components/borderBox8/src/main.vue b/src/components/borderBox8/src/main.vue index 479278f..968ae0d 100644 --- a/src/components/borderBox8/src/main.vue +++ b/src/components/borderBox8/src/main.vue @@ -4,7 +4,7 @@ @@ -85,6 +85,10 @@ export default { backgroundColor: { type: String, default: 'transparent' + }, + reverse: { + type: Boolean, + default: false } }, data () { @@ -105,6 +109,13 @@ export default { const { width, height } = this return (width + height - 5) * 2 + }, + pathD () { + const { reverse, width, height } = this + + if (reverse) return `M 2.5, 2.5 L 2.5, ${height - 2.5} L ${width - 2.5}, ${height - 2.5} L ${width - 2.5}, 2.5 L 2.5, 2.5` + + return `M2.5, 2.5 L${width - 2.5}, 2.5 L${width - 2.5}, ${height - 2.5} L2.5, ${height - 2.5} L2.5, 2.5` } }, watch: {