add lib folder
This commit is contained in:
30
lib/components/borderBox2/src/main.css
Normal file
30
lib/components/borderBox2/src/main.css
Normal file
@ -0,0 +1,30 @@
|
||||
.dv-border-box-2 {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.dv-border-box-2 .dv-border-svg-container {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
.dv-border-box-2 .dv-border-svg-container polyline {
|
||||
fill: none;
|
||||
stroke-width: 1;
|
||||
}
|
||||
.dv-border-box-2 .dv-border-svg-container circle {
|
||||
fill: #fff;
|
||||
}
|
||||
.dv-border-box-2 .dv-bb2-line1 {
|
||||
stroke: #fff;
|
||||
}
|
||||
.dv-border-box-2 .dv-bb2-line2 {
|
||||
stroke: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
.dv-border-box-2 .border-box-content {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
32
lib/components/borderBox2/src/main.vue
Normal file
32
lib/components/borderBox2/src/main.vue
Normal file
@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<div class="dv-border-box-2" :ref="ref">
|
||||
<svg class="dv-border-svg-container" :width="width" :height="height">
|
||||
<polyline class="dv-bb2-line1"
|
||||
:points="`2, 2 ${width - 2} ,2 ${width - 2}, ${height - 2} 2, ${height - 2} 2, 2`" />
|
||||
<polyline class="dv-bb2-line2"
|
||||
:points="`6, 6 ${width - 6}, 6 ${width - 6}, ${height - 6} 6, ${height - 6} 6, 6`" />
|
||||
<circle cx="11" cy="11" r="1" />
|
||||
<circle :cx="width - 11" cy="11" r="1" />
|
||||
<circle :cx="width - 11" :cy="height - 11" r="1" />
|
||||
<circle cx="11" :cy="height - 11" r="1" />
|
||||
</svg>
|
||||
|
||||
<div class="border-box-content">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import autoResize from '../../../mixin/autoResize'
|
||||
|
||||
export default {
|
||||
name: 'DvBorderBox2',
|
||||
mixins: [autoResize],
|
||||
data () {
|
||||
return {
|
||||
ref: 'border-box-2'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user