style(frontend):优化K线图和市场组件的拖拽体验

- 在 KLineChart 组件中添加 --wails-draggable:no-drag 样式,禁止拖拽
- 在 Market 组件中调整拖拽样式应用位置,提高用户体验
- 优化 Market 组件的模板结构,移除冗余样式
This commit is contained in:
ArvinLovegood 2025-07-11 17:51:06 +08:00
parent 9718d3311d
commit a67559831a
2 changed files with 7 additions and 10 deletions

View File

@ -378,7 +378,7 @@ function calculateMA(dayCount,values) {
</script> </script>
<template> <template>
<div ref="kLineChartRef" style="width: 100%;height: auto;" :style="{height:chartHeight+'px'}"></div> <div ref="kLineChartRef" style="width: 100%;height: auto;--wails-draggable:no-drag" :style="{height:chartHeight+'px'}" ></div>
</template> </template>
<style scoped> <style scoped>

View File

@ -1,5 +1,5 @@
<script setup> <script setup>
import {computed, h, onBeforeMount, onBeforeUnmount, ref} from 'vue' import {computed, h, onBeforeMount, onBeforeUnmount, onMounted, ref} from 'vue'
import { import {
GetAIResponseResult, GetAIResponseResult,
GetConfig, GetConfig,
@ -84,8 +84,6 @@ function getIndex() {
}) })
} }
onBeforeMount(() => { onBeforeMount(() => {
nowTab.value = route.query.name nowTab.value = route.query.name
stockCode.value = route.query.stockCode stockCode.value = route.query.stockCode
@ -311,8 +309,8 @@ function ReFlesh(source) {
</script> </script>
<template> <template>
<n-card style="--wails-draggable:drag"> <n-card>
<n-tabs type="line" animated @update-value="updateTab" :value="nowTab"> <n-tabs type="line" animated @update-value="updateTab" :value="nowTab" style="--wails-draggable:drag">
<n-tab-pane name="市场快讯" tab="市场快讯"> <n-tab-pane name="市场快讯" tab="市场快讯">
<n-grid :cols="2" :y-gap="0"> <n-grid :cols="2" :y-gap="0">
<n-gi> <n-gi>
@ -390,7 +388,7 @@ function ReFlesh(source) {
</n-tab-pane> </n-tab-pane>
</n-tabs> </n-tabs>
</n-tab-pane> </n-tab-pane>
<n-tab-pane name="指标行情" tab="指标行情" style="--wails-dragable:no-drag"> <n-tab-pane name="指标行情" tab="指标行情">
<n-tabs type="segment" animated> <n-tabs type="segment" animated>
<n-tab-pane name="科创50" tab="科创50" > <n-tab-pane name="科创50" tab="科创50" >
<k-line-chart code="sh000688" :chart-height="panelHeight" name="科创50" :k-days="20" <k-line-chart code="sh000688" :chart-height="panelHeight" name="科创50" :k-days="20"
@ -672,5 +670,4 @@ function ReFlesh(source) {
</template> </template>
<style scoped> <style scoped>
</style> </style>