ColorInput 颜色输入框

# ColorInput 颜色输入框

基础用法

透明颜色


<template>
  <div>
    <p>基础用法</p>
    <dk-color-input v-model="color1"></dk-color-input>
    <p>透明颜色</p>
    <dk-color-input v-model="color2" :show-alpha="true"></dk-color-input>
  </div>
</template>
<script>
export default {
  data() {
    return {
      color1: '#ff0000',
      color2: 'rgba(255, 0, 0, 0.5)'
    }
  }
}
</script>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Expand Copy