riku
2025-03-07 2592dc279ec82bf3649a4dbe644c6416263a10ef
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<template>
  <!-- <SatelliteMixTool :group-id="3"></SatelliteMixTool> -->
 
  <el-row class="wrap">
    <el-col span="2">
      <BaseCard v-show="show" direction="left" borderless="r">
        <template #content>
          <div class="m-t-8">网格要素</div>
          <el-row class="m-b-8">
            <el-button
              type="primary"
              class="el-button-custom"
              size="small"
              @click="handleRankClick"
            >
              {{ rankVisible ? '隐藏排名' : '显示排名' }}
            </el-button>
            <el-button
              type="primary"
              class="el-button-custom"
              size="small"
              @click="handleDataClick"
            >
              {{ dataVisible ? '隐藏数据' : '显示数据' }}
            </el-button>
          </el-row>
          <div class="m-t-8">网格样式</div>
          <el-row class="m-b-8">
            <el-button
              type="primary"
              class="el-button-custom"
              size="small"
              @click="handleColorClick"
            >
              {{ isStandardColor ? '绘制对比色' : '绘制标准色' }}
            </el-button>
          </el-row>
          <div class="m-t-8">网格透明度</div>
          <el-row class="m-b-8">
            <el-slider
              v-model="opacityValue"
              :marks="marks"
              :min="0"
              :max="1"
              :step="0.1"
              show-stops
              @change="handleOpacityChange"
            />
            <!-- <el-button
              type="primary"
              class="el-button-custom"
              size="small"
              @click="handleOpacityClick"
            >
              {{ !isOpacity ? '透明化' : '取消透明化' }}
            </el-button> -->
          </el-row>
        </template>
      </BaseCard>
    </el-col>
    <el-col span="2">
      <el-row>
        <CardButton
          name="网格样式"
          direction="right"
          @click="() => (show = !show)"
        ></CardButton>
      </el-row>
    </el-col>
  </el-row>
</template>
<script setup>
import { ref } from 'vue';
 
const show = ref(true);
 
const rankVisible = ref(false);
const dataVisible = ref(false);
const isStandardColor = ref(true);
const isOpacity = ref(false);
const opacityValue = ref(0.7);
 
const emits = defineEmits([
  'showRank',
  'showData',
  'changeColor',
  'changeOpacity'
]);
 
function handleRankClick() {
  rankVisible.value = !rankVisible.value;
  emits('showRank', rankVisible.value);
}
 
function handleDataClick() {
  dataVisible.value = !dataVisible.value;
  emits('showData', dataVisible.value);
}
 
function handleColorClick() {
  isStandardColor.value = !isStandardColor.value;
  emits('changeColor', isStandardColor.value);
}
 
function handleOpacityClick() {
  // isOpacity.value = !isOpacity.value;
  // emits('changeOpacity', isOpacity.value);
}
 
function handleOpacityChange(value) {
  emits('changeOpacity', value);
}
</script>