update lib

This commit is contained in:
jiaming743
2019-08-29 16:50:19 +08:00
parent 6adcd9c6cb
commit 8d1e0064a7
7 changed files with 249 additions and 0 deletions

View File

@ -0,0 +1,6 @@
import './src/main.css'
import BorderBox10 from './src/main.vue'
export default function (Vue) {
Vue.component(BorderBox10.name, BorderBox10)
}

View File

@ -0,0 +1,29 @@
.dv-border-box-10 {
position: relative;
width: 100%;
height: 100%;
box-shadow: inset 0 0 25px 3px #1d48c4;
border-radius: 6px;
}
.dv-border-box-10 .border {
position: absolute;
display: block;
}
.dv-border-box-10 .right-top {
right: 0px;
transform: rotateY(180deg);
}
.dv-border-box-10 .left-bottom {
bottom: 0px;
transform: rotateX(180deg);
}
.dv-border-box-10 .right-bottom {
right: 0px;
bottom: 0px;
transform: rotateX(180deg) rotateY(180deg);
}
.dv-border-box-10 .border-box-content {
position: relative;
width: 100%;
height: 100%;
}

View File

@ -0,0 +1,31 @@
<template>
<div class="dv-border-box-10">
<svg
width="150px"
height="150px"
:key="item"
v-for="item in border"
:class="`${item} border`"
>
<polygon
fill="#d3e1f8"
points="40, 0 5, 0 0, 5 0, 16 3, 19 3, 7 7, 3 35, 3"
/>
</svg>
<div class="border-box-content">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
name: 'DvBorderBox10',
data () {
return {
border: ['left-top', 'right-top', 'left-bottom', 'right-bottom']
}
}
}
</script>