wangrong
2026-08-30 761e5c5fa871959f60e15c971c8d83f2b53d0af5
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
<script lang="tsx" setup>
import { useI18n } from '@/hooks/web/useI18n'
import { PropType } from 'vue'
const { t } = useI18n()
 
const props = defineProps({
  dragList: {
    type: Array,
    required: true
  },
  marginTop: {
    type: String,
    default: '0'
  },
  themes: {
    type: String as PropType<EditorTheme>,
    default: 'dark'
  }
})
</script>
 
<template>
  <div>
    <div
      v-if="!props.dragList || props.dragList.length === 0"
      :style="'margin-top:' + props.marginTop"
      class="drag-placeholder-style"
    >
      <span
        class="drag-placeholder-style-span"
        :class="{ 'drag-placeholder-style-span--dark': themes === 'dark' }"
        >{{ t('chart.placeholder_field') }}</span
      >
    </div>
  </div>
</template>
 
<style lang="less" scoped>
span {
  font-size: 12px;
}
 
.drag-placeholder-style {
  position: absolute;
  top: calc(50% - 4px);
  width: 100%;
  color: #757575;
  text-align: left;
  padding: 0 16px;
 
  .drag-placeholder-style-span {
    color: #8d9199;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
 
    &.drag-placeholder-style-span--dark {
      color: #757575;
    }
  }
}
</style>