add lib folder
This commit is contained in:
6
lib/components/borderBox3/index.js
Normal file
6
lib/components/borderBox3/index.js
Normal file
@ -0,0 +1,6 @@
|
||||
import './src/main.css'
|
||||
import BorderBox3 from './src/main.vue'
|
||||
|
||||
export default function (Vue) {
|
||||
Vue.component(BorderBox3.name, BorderBox3)
|
||||
}
|
27
lib/components/borderBox3/src/main.css
Normal file
27
lib/components/borderBox3/src/main.css
Normal file
@ -0,0 +1,27 @@
|
||||
.dv-border-box-3 {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.dv-border-box-3 .dv-border-svg-container {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
.dv-border-box-3 .dv-border-svg-container polyline {
|
||||
fill: none;
|
||||
stroke: #2862b7;
|
||||
}
|
||||
.dv-border-box-3 .dv-bb3-line1 {
|
||||
stroke-width: 3;
|
||||
}
|
||||
.dv-border-box-3 .dv-bb3-line2 {
|
||||
stroke-width: 1;
|
||||
}
|
||||
.dv-border-box-3 .border-box-content {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
32
lib/components/borderBox3/src/main.vue
Normal file
32
lib/components/borderBox3/src/main.vue
Normal file
@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<div class="dv-border-box-3" :ref="ref">
|
||||
<svg class="dv-border-svg-container" :width="width" :height="height">
|
||||
<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>
|
||||
|
||||
<div class="border-box-content">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import autoResize from '../../../mixin/autoResize'
|
||||
|
||||
export default {
|
||||
name: 'DvBorderBox3',
|
||||
mixins: [autoResize],
|
||||
data () {
|
||||
return {
|
||||
ref: 'border-box-3'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user