From 111252f8bd323d10a1efa44eda66519d8080f635 Mon Sep 17 00:00:00 2001 From: ArvinLovegood Date: Tue, 1 Jul 2025 11:52:42 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=E4=BC=98=E5=8C=96=E9=80=89?= =?UTF-8?q?=E8=82=A1=E7=BB=84=E4=BB=B6=E5=8A=9F=E8=83=BD=E5=92=8C=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加输入校验,提醒用户输入选股指标或要求 - 增加选股条件展示区域 - 优化按钮样式和布局 - 调整表格高度以适应新内容 --- frontend/src/components/SelectStock.vue | 34 ++++++++++++------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/frontend/src/components/SelectStock.vue b/frontend/src/components/SelectStock.vue index af17d2d..f52a0fa 100644 --- a/frontend/src/components/SelectStock.vue +++ b/frontend/src/components/SelectStock.vue @@ -3,16 +3,22 @@ import {h, onBeforeMount, onMounted, onUnmounted, ref} from 'vue' import {SearchStock} from "../../wailsjs/go/main/App"; import {useMessage, NText, NTag} from 'naive-ui' const message = useMessage() -const search = ref('科技股;换手率连续3日大于2') +const search = ref('') const columns = ref([]) const dataList = ref([]) - +const traceInfo = ref('') function Search() { + if(!search.value){ + message.warning('请输入选股指标或者要求') + return + } + const loading = message.loading("正在获取选股数据...", {duration: 0}); SearchStock(search.value).then(res => { loading.destroy() - //console.log(res) + console.log(res) if(res.code==100){ + traceInfo.value=res.data.traceInfo.showText message.success(res.msg) columns.value=res.data.result.columns.filter(item=>!item.hiddenNeed&&(item.title!="市场码"&&item.title!="市场简称")).map(item=>{ @@ -70,24 +76,16 @@ onBeforeMount(() => {