update dist and lib
This commit is contained in:
@ -2,8 +2,6 @@
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-shadow: inset 0 0 40px rgba(128, 128, 128, 0.3);
|
||||
border: 1px solid rgba(128, 128, 128, 0.3);
|
||||
}
|
||||
.dv-border-box-7 .dv-svg-container {
|
||||
position: absolute;
|
||||
@ -17,11 +15,9 @@
|
||||
stroke-linecap: round;
|
||||
}
|
||||
.dv-border-box-7 .dv-bb7-line-width-2 {
|
||||
stroke: rgba(128, 128, 128, 0.3);
|
||||
stroke-width: 2;
|
||||
}
|
||||
.dv-border-box-7 .dv-bb7-line-width-5 {
|
||||
stroke: rgba(128, 128, 128, 0.5);
|
||||
stroke-width: 5;
|
||||
}
|
||||
.dv-border-box-7 .border-box-content {
|
||||
|
@ -1,15 +1,20 @@
|
||||
<template>
|
||||
<div class="dv-border-box-7" :ref="ref">
|
||||
<svg class="dv-svg-container" :width="width" :height="height">
|
||||
<polyline class="dv-bb7-line-width-2" :points="`0, 25 0, 0 25, 0`" />
|
||||
<polyline class="dv-bb7-line-width-2" :points="`${width - 25}, 0 ${width}, 0 ${width}, 25`" />
|
||||
<polyline class="dv-bb7-line-width-2" :points="`${width - 25}, ${height} ${width}, ${height} ${width}, ${height - 25}`" />
|
||||
<polyline class="dv-bb7-line-width-2" :points="`0, ${height - 25} 0, ${height} 25, ${height}`" />
|
||||
|
||||
<polyline class="dv-bb7-line-width-5" :points="`0, 10 0, 0 10, 0`" />
|
||||
<polyline class="dv-bb7-line-width-5" :points="`${width - 10}, 0 ${width}, 0 ${width}, 10`" />
|
||||
<polyline class="dv-bb7-line-width-5" :points="`${width - 10}, ${height} ${width}, ${height} ${width}, ${height - 10}`" />
|
||||
<polyline class="dv-bb7-line-width-5" :points="`0, ${height - 10} 0, ${height} 10, ${height}`" />
|
||||
<template>
|
||||
<div
|
||||
class="dv-border-box-7"
|
||||
:style="`box-shadow: inset 0 0 40px ${mergedColor[0]}; border: 1px solid ${mergedColor[0]}`"
|
||||
:ref="ref"
|
||||
>
|
||||
<svg class="dv-svg-container" :width="width" :height="height">
|
||||
<polyline class="dv-bb7-line-width-2" :stroke="mergedColor[0]" :points="`0, 25 0, 0 25, 0`" />
|
||||
<polyline class="dv-bb7-line-width-2" :stroke="mergedColor[0]" :points="`${width - 25}, 0 ${width}, 0 ${width}, 25`" />
|
||||
<polyline class="dv-bb7-line-width-2" :stroke="mergedColor[0]" :points="`${width - 25}, ${height} ${width}, ${height} ${width}, ${height - 25}`" />
|
||||
<polyline class="dv-bb7-line-width-2" :stroke="mergedColor[0]" :points="`0, ${height - 25} 0, ${height} 25, ${height}`" />
|
||||
|
||||
<polyline class="dv-bb7-line-width-5" :stroke="mergedColor[1]" :points="`0, 10 0, 0 10, 0`" />
|
||||
<polyline class="dv-bb7-line-width-5" :stroke="mergedColor[1]" :points="`${width - 10}, 0 ${width}, 0 ${width}, 10`" />
|
||||
<polyline class="dv-bb7-line-width-5" :stroke="mergedColor[1]" :points="`${width - 10}, ${height} ${width}, ${height} ${width}, ${height - 10}`" />
|
||||
<polyline class="dv-bb7-line-width-5" :stroke="mergedColor[1]" :points="`0, ${height - 10} 0, ${height} 10, ${height}`" />
|
||||
</svg>
|
||||
|
||||
<div class="border-box-content">
|
||||
@ -21,13 +26,46 @@
|
||||
<script>
|
||||
import autoResize from '../../../mixin/autoResize'
|
||||
|
||||
import { deepMerge } from '@jiaminghi/charts/lib/util/index'
|
||||
|
||||
import { deepClone } from '@jiaminghi/c-render/lib/plugin/util'
|
||||
|
||||
export default {
|
||||
name: 'DvBorderBox7',
|
||||
mixins: [autoResize],
|
||||
props: {
|
||||
color: {
|
||||
type: Array,
|
||||
default: () => ([])
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
ref: 'border-box-7'
|
||||
ref: 'border-box-7',
|
||||
|
||||
defaultColor: ['rgba(128,128,128,0.3)', 'rgba(128,128,128,0.5)'],
|
||||
|
||||
mergedColor: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
color () {
|
||||
const { mergeColor } = this
|
||||
|
||||
mergeColor()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
mergeColor () {
|
||||
const { color, defaultColor } = this
|
||||
|
||||
this.mergedColor = deepMerge(deepClone(defaultColor, true), color || [])
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
const { mergeColor } = this
|
||||
|
||||
mergeColor()
|
||||
}
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user