hejianhao
2025-04-16 dab2d210ca06c1faa514c6388fbd5de1ab355360
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<template>
<!--  <textarea :id="tinymceId" style="visibility: hidden" />-->
  <div class="tinymce-box">
    <div v-for="(
      item,index) in options" :key="index" class="options">
      <div v-if="item.url" class="cheImg">
        <img :src="item.url" alt="">
      </div>
      <div v-else class="Empty">
        <i  class="el-icon-picture-outline"></i>
      </div>
      <div class="tinymce-text">{{item.label}}</div>
    </div>
 
  </div>
</template>
 
<script>
import loadTinymce from '@/utils/loadTinymce'
import { plugins, toolbar } from './config'
import { debounce } from 'throttle-debounce'
 
 
export default {
  props: {
    value: {
      default: ''
    }
  },
  data() {
    return {
      tinymceId: this.id,
      options:[],
      defaultUrl:'https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png'
    }
  },
  mounted() {
    this.options = this._vnode.parent.context.conf.__slot__.options
    // console.log(this._vnode)
 
 
  },
  destroyed() {
 
  },
  methods: {
 
  }
}
</script>
<style scoped>
.tinymce-box{
  width: 100%;
  display: flex;
  box-sizing: border-box;
  flex-wrap: wrap;
}
  .options{
    margin: 6px;
    width: 100px;
    height: 120px;
    background: white;
    border-radius: 10px;
    box-sizing: border-box;
  }
  .Empty{
    font-size: 40px;
    width: 100%;
    height: 80px;
    color: #909399;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .cheImg{
    width: 100%;
    height: 80px;
    object-fit: cover;
  }
  .cheImg>img{
    width: 100%;
    height: 100%;
  }
.tinymce-text{
  text-align: center;
}
</style>