边框1
边框1
基础用法
查看代码
vue
<template>
<div :style="`width: ${width}rem`" h22rem flex="~ col" p3 justify-center items-center bg-dark>
<dv-border-box1 ref="borderRef">
<div :style="`width: ${width}rem`" h18rem color-white flex justify-center items-center>
dv-border-box1
</div>
</dv-border-box1>
<button btn @click="handelClick">add</button>
</div>
</template>
<script setup lang="ts">
import { BorderBox1 as DvBorderBox1 } from '@kjgl77/datav-vue3'
const borderRef = ref<InstanceType<typeof DvBorderBox1>>()
let width = ref(40)
const handelClick = ()=>{
width.value += 2
borderRef.value?.initWH()
}
</script>属性
| 参数 | 说明 | 类型 | 可选值 | 默认值 | 是否必填 |
|---|---|---|---|---|---|
color | 边框颜色(以下所有组件都有此颜色参数) | Array | - | ['#4fd2dd', '#235fa7'] | 否 |
backgroundColor | 背景颜色 | String | - | transparent | 否 |