60 lines
1.3 KiB
Vue
60 lines
1.3 KiB
Vue
|
<template>
|
||
|
<div class="dv-border-box-3" :ref="ref">
|
||
|
<svg class="dv-border-svg-container">
|
||
|
<polyline class="dv-bb3-line1"
|
||
|
:points="`4, 4 ${width - 22} ,4 ${width - 22}, ${height - 22} 4, ${height - 22} 4, 4`" />
|
||
|
<polyline class="dv-bb3-line2"
|
||
|
:points="`10, 10 ${width - 16}, 10 ${width - 16}, ${height - 16} 10, ${height - 16} 10, 10`" />
|
||
|
<polyline class="dv-bb3-line2"
|
||
|
:points="`16, 16 ${width - 10}, 16 ${width - 10}, ${height - 10} 16, ${height - 10} 16, 16`" />
|
||
|
<polyline class="dv-bb3-line2"
|
||
|
:points="`22, 22 ${width - 4}, 22 ${width - 4}, ${height - 4} 22, ${height - 4} 22, 22`" />
|
||
|
</svg>
|
||
|
|
||
|
<slot></slot>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import borderBoxMixin from '../../mixins/borderBoxMixin.js'
|
||
|
|
||
|
export default {
|
||
|
name: 'BorderBox3',
|
||
|
mixins: [borderBoxMixin],
|
||
|
data () {
|
||
|
return {
|
||
|
ref: `border-box-3-${(new Date()).getTime()}`
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="less">
|
||
|
.dv-border-box-3 {
|
||
|
position: relative;
|
||
|
box-sizing: border-box;
|
||
|
padding: 30px;
|
||
|
|
||
|
.dv-border-svg-container {
|
||
|
position: absolute;
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
top: 0px;
|
||
|
left: 0px;
|
||
|
|
||
|
polyline {
|
||
|
fill: none;
|
||
|
stroke: #2862b7;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.dv-bb3-line1 {
|
||
|
stroke-width: 3;
|
||
|
}
|
||
|
|
||
|
.dv-bb3-line2 {
|
||
|
stroke-width: 1;
|
||
|
}
|
||
|
}
|
||
|
</style>
|