update dist and lib
This commit is contained in:
@ -16,22 +16,17 @@
|
||||
.dv-border-box-5 .dv-svg-container polyline {
|
||||
fill: none;
|
||||
}
|
||||
.dv-border-box-5 .dv-bb5-line-1 {
|
||||
stroke-width: 1;
|
||||
stroke: rgba(255, 255, 255, 0.35);
|
||||
}
|
||||
.dv-border-box-5 .dv-bb5-line-1,
|
||||
.dv-border-box-5 .dv-bb5-line-2 {
|
||||
stroke: rgba(255, 255, 255, 0.2);
|
||||
stroke-width: 1;
|
||||
}
|
||||
.dv-border-box-5 .dv-bb5-line-3,
|
||||
.dv-border-box-5 .dv-bb5-line-6 {
|
||||
stroke-width: 5;
|
||||
stroke: rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
.dv-border-box-5 .dv-bb5-line-4,
|
||||
.dv-border-box-5 .dv-bb5-line-5 {
|
||||
stroke-width: 2;
|
||||
stroke: rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
.dv-border-box-5 .border-box-content {
|
||||
position: relative;
|
||||
|
@ -1,14 +1,22 @@
|
||||
<template>
|
||||
<div class="dv-border-box-5" :ref="ref">
|
||||
<svg :class="`dv-svg-container ${reverse && 'dv-reverse'}`" :width="width" :height="height">
|
||||
<polyline class="dv-bb5-line-1" :points="`8, 5 ${width - 5}, 5 ${width - 5}, ${height - 100}
|
||||
${width - 100}, ${height - 5} 8, ${height - 5} 8, 5`" />
|
||||
<polyline class="dv-bb5-line-2" :points="`3, 5 ${width - 20}, 5 ${width - 20}, ${height - 60}
|
||||
${width - 74}, ${height - 5} 3, ${height - 5} 3, 5`" />
|
||||
<polyline class="dv-bb5-line-3" :points="`50, 13 ${width - 35}, 13`" />
|
||||
<polyline class="dv-bb5-line-4" :points="`15, 20 ${width - 35}, 20`" />
|
||||
<polyline class="dv-bb5-line-5" :points="`15, ${height - 20} ${width - 110}, ${height - 20}`" />
|
||||
<polyline class="dv-bb5-line-6" :points="`15, ${height - 13} ${width - 110}, ${height - 13}`" />
|
||||
<polyline
|
||||
class="dv-bb5-line-1"
|
||||
:stroke="mergedColor[0]"
|
||||
:points="`8, 5 ${width - 5}, 5 ${width - 5}, ${height - 100}
|
||||
${width - 100}, ${height - 5} 8, ${height - 5} 8, 5`"
|
||||
/>
|
||||
<polyline
|
||||
class="dv-bb5-line-2"
|
||||
:stroke="mergedColor[1]"
|
||||
:points="`3, 5 ${width - 20}, 5 ${width - 20}, ${height - 60}
|
||||
${width - 74}, ${height - 5} 3, ${height - 5} 3, 5`"
|
||||
/>
|
||||
<polyline class="dv-bb5-line-3" :stroke="mergedColor[1]" :points="`50, 13 ${width - 35}, 13`" />
|
||||
<polyline class="dv-bb5-line-4" :stroke="mergedColor[1]" :points="`15, 20 ${width - 35}, 20`" />
|
||||
<polyline class="dv-bb5-line-5" :stroke="mergedColor[1]" :points="`15, ${height - 20} ${width - 110}, ${height - 20}`" />
|
||||
<polyline class="dv-bb5-line-6" :stroke="mergedColor[1]" :points="`15, ${height - 13} ${width - 110}, ${height - 13}`" />
|
||||
</svg>
|
||||
|
||||
<div class="border-box-content">
|
||||
@ -20,19 +28,50 @@
|
||||
<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: 'DvBorderBox5',
|
||||
mixins: [autoResize],
|
||||
data () {
|
||||
return {
|
||||
ref: 'border-box-5'
|
||||
}
|
||||
},
|
||||
props: {
|
||||
color: {
|
||||
type: Array,
|
||||
default: () => ([])
|
||||
},
|
||||
reverse: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
ref: 'border-box-5',
|
||||
|
||||
defaultColor: ['rgba(255, 255, 255, 0.35)', 'rgba(255, 255, 255, 0.20)'],
|
||||
|
||||
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