From 8372d022614a1897120802cf1bac90d61651177f Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 14 三月 2025 18:20:56 +0800 Subject: [PATCH] 2025.3.14 --- src/components/grid/GridTool.vue | 92 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 92 insertions(+), 0 deletions(-) diff --git a/src/components/grid/GridTool.vue b/src/components/grid/GridTool.vue index e69de29..fb9254a 100644 --- a/src/components/grid/GridTool.vue +++ b/src/components/grid/GridTool.vue @@ -0,0 +1,92 @@ +<template> + <el-row class="wrap"> + <el-col span="2"> + <el-row> + <CardButton + name="缃戞牸鏍峰紡" + direction="left" + @click="() => (show = !show)" + ></CardButton> + </el-row> + </el-col> + <el-col span="2"> + <BaseCard v-show="show" direction="right" borderless="r"> + <template #content> + <div class="content-wrap"> + <div v-for="(g, i) in gridStore.gridClzList" :key="i"> + <div v-for="(value, key) in g.mapViewsMap" :key="key"> + {{ value[1].extData.name }} + <el-text>g.name</el-text> + </div> + <el-row> + <el-text>缃戞牸</el-text> + <el-switch + v-model="gridVisible" + width="60" + inline-prompt + active-text="鏄剧ず" + inactive-text="闅愯棌" + /> + </el-row> + </div> + </div> + </template> + </BaseCard> + </el-col> + </el-row> +</template> +<script setup> +/** + * 缃戞牸鏍峰紡鎺у埗宸ュ叿 + */ +import { ref } from 'vue'; +import { useGridStore } from '@/stores/grid-info'; + +const gridStore = useGridStore(); + +const show = ref(true); + +const gridVisible = ref(false); +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> +<style scoped> +.content-wrap { + min-width: 300px; + min-height: 600px; +} +</style> -- Gitblit v1.9.3