111
jihongshun
8 天以前 0c741cdda7ef9935a20d3090dfea97e1ce8ae754
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!--
Administrator 创建于:2024/11/30 10:56
 
 props:
 
 events:
 -->
<style scoped>
#el-color-picker-plus {
  width: 100%;
  height: 100%;
}
</style>
 
<template>
  <span id="el-color-picker-plus">color:{{ color }}
  <color-picker
      v-model="color"
      :showAlpha="showAlpha"
  >
123
  </el-color-picker>
    </span>
</template>
<script>
 
export default {
  components: {},
  name: 'el-color-picker-plus',
  props: {
    value: {
      type: String | Number, default: null
    },
 
  },
  data() {
    return {
      color: '',
      showAlpha: true,
 
    }
  },
  computed: {
    nowTime() {
      return '现在是 : ' + new Date().getTime()
    },
 
  },
  watch: {
    value(value, oldValue) {
      this.color = value;
    },
 
  },
  mounted() {
    this.init()
  },
  methods: {
    init() {
      this.color = this.value;
    },
 
  }
}
</script>