add backgroudColor config
This commit is contained in:
		@@ -1,5 +1,12 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="dv-border-box-10" :style="`box-shadow: inset 0 0 25px 3px ${mergedColor[0]}`">
 | 
			
		||||
  <div class="dv-border-box-10" :ref="ref" :style="`box-shadow: inset 0 0 25px 3px ${mergedColor[0]}`">
 | 
			
		||||
    <svg class="border" :width="width" :height="height">
 | 
			
		||||
      <polygon :fill="backgroundColor" :points="`
 | 
			
		||||
        4, 0 ${width - 4}, 0 ${width}, 4 ${width}, ${height - 4} ${width - 4}, ${height}
 | 
			
		||||
        4, ${height} 0, ${height - 4} 0, 4
 | 
			
		||||
      `" />
 | 
			
		||||
    </svg>
 | 
			
		||||
 | 
			
		||||
    <svg
 | 
			
		||||
      width="150px"
 | 
			
		||||
      height="150px"
 | 
			
		||||
@@ -20,20 +27,29 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<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: 'DvBorderBox10',
 | 
			
		||||
  mixins: [autoResize],
 | 
			
		||||
  props: {
 | 
			
		||||
    color: {
 | 
			
		||||
      type: Array,
 | 
			
		||||
      default: () => ([])
 | 
			
		||||
    },
 | 
			
		||||
    backgroundColor: {
 | 
			
		||||
      type: String,
 | 
			
		||||
      default: 'transparent'
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  data () {
 | 
			
		||||
    return {
 | 
			
		||||
      ref: 'border-box-10',
 | 
			
		||||
 | 
			
		||||
      border: ['left-top', 'right-top', 'left-bottom', 'right-bottom'],
 | 
			
		||||
 | 
			
		||||
      defaultColor: ['#1d48c4', '#d3e1f8'],
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user