mirror of
https://ghfast.top/https://github.com/aeroxw/easy-tdx.git
synced 2026-09-12 16:54:17 +08:00
feat(web-ui): 一键寻优按钮改橙色 + 等待期间投资大师名言轮播
v1.17.15 一键寻优所有策略按钮改为暖橙渐变(#f59e0b → #ea580c),比 primary 蓝更醒目,hover 加亮上移、运行中保留暗橙识别度。 寻优运行中右侧不再空白:展示 100 条全球投资大师名言(巴菲特/芒格/ 格雷厄姆/林奇/索罗斯/利弗莫尔/塔勒布/达利欧等),3 秒随机轮播一条, Fisher-Yates 洗牌避免短期重复,让等待不枯燥、还能学到东西。 视觉细节: - 卡片顶部 3 秒线性进度条(暗示后台在跑) - fade + slide-up 350ms 过渡动画 - 底部脉动橙点 + '后台寻优进行中' 提示 纯前端 TypeScript + 原生 CSS,零后端改动,零依赖新增。 - 新增 web-ui/src/data/investment-quotes.ts(100 条名言) - 新增 web-ui/src/components/QuoteCarousel.vue(轮播组件) - 改 web-ui/src/views/OptimizeView.vue(按钮样式 + 引入轮播) - bump pyproject.toml 1.17.14 → 1.17.15
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "easy-tdx"
|
||||
version = "1.17.14"
|
||||
version = "1.17.15"
|
||||
description = "通达信 TCP 协议行情数据客户端,支持在线行情、离线数据读取与写入同步"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
<script setup lang="ts">
|
||||
// 投资大师名言轮播:用于后台 Task 等待期间,让用户不枯燥、还能学到东西。
|
||||
// - mount 时 Fisher–Yates 洗牌,取第 0 条
|
||||
// - 每 `interval` ms 推进下一条;一轮结束重新洗牌,避免短期重复
|
||||
// - unmount 清 setInterval,防泄漏
|
||||
|
||||
import { onMounted, onUnmounted, ref } from 'vue'
|
||||
import { INVESTMENT_QUOTES, type InvestmentQuote } from '../data/investment-quotes'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
/** 切换间隔(毫秒),默认 3000ms。 */
|
||||
interval?: number
|
||||
}>(),
|
||||
{ interval: 3000 },
|
||||
)
|
||||
|
||||
// 洗牌后的队列(不污染源数据)
|
||||
const queue = ref<InvestmentQuote[]>([])
|
||||
const index = ref(0)
|
||||
const current = ref<InvestmentQuote>(INVESTMENT_QUOTES[0])
|
||||
let timer: number | null = null
|
||||
|
||||
// Fisher–Yates 洗牌:返回新数组
|
||||
function shuffle(arr: readonly InvestmentQuote[]): InvestmentQuote[] {
|
||||
const a = arr.slice()
|
||||
for (let i = a.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1))
|
||||
;[a[i], a[j]] = [a[j], a[i]]
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
function advance() {
|
||||
const next = index.value + 1
|
||||
if (next < queue.value.length) {
|
||||
index.value = next
|
||||
} else {
|
||||
// 一轮播完,重新洗牌,避免短期重复
|
||||
queue.value = shuffle(INVESTMENT_QUOTES)
|
||||
index.value = 0
|
||||
}
|
||||
current.value = queue.value[index.value]
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
queue.value = shuffle(INVESTMENT_QUOTES)
|
||||
index.value = 0
|
||||
current.value = queue.value[0]
|
||||
timer = window.setInterval(advance, props.interval)
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
if (timer !== null) {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="quote-carousel" :style="{ '--quote-interval': `${interval}ms` }">
|
||||
<div class="quote-card">
|
||||
<!-- 顶部进度条:3 秒线性循环,暗示"还在跑" -->
|
||||
<div class="quote-progress"><span class="bar" /></div>
|
||||
|
||||
<div class="quote-mark">"</div>
|
||||
|
||||
<Transition name="quote-fade" mode="out-in">
|
||||
<blockquote :key="current.text" class="quote-block">
|
||||
<p class="quote-text">{{ current.text }}</p>
|
||||
<footer class="quote-author">— {{ current.author }}</footer>
|
||||
</blockquote>
|
||||
</Transition>
|
||||
|
||||
<p class="quote-hint">
|
||||
<span class="dot" />
|
||||
后台寻优进行中,大师智慧伴你等待…
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.quote-carousel {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 320px;
|
||||
padding: 32px 16px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.quote-card {
|
||||
position: relative;
|
||||
max-width: 560px;
|
||||
width: 100%;
|
||||
background: var(--bg-panel);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
padding: 40px 36px 28px;
|
||||
box-shadow:
|
||||
0 12px 40px rgba(0, 0, 0, 0.35),
|
||||
0 0 0 1px rgba(245, 158, 11, 0.08);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 顶部进度条 */
|
||||
.quote-progress {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 2px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
.quote-progress .bar {
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: linear-gradient(90deg, #f59e0b, #ea580c);
|
||||
transform-origin: left center;
|
||||
animation: quote-progress-fill var(--quote-interval, 3000ms) linear infinite;
|
||||
}
|
||||
@keyframes quote-progress-fill {
|
||||
from { transform: scaleX(0); }
|
||||
to { transform: scaleX(1); }
|
||||
}
|
||||
|
||||
/* 巨大引号装饰 */
|
||||
.quote-mark {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 18px;
|
||||
font-size: 64px;
|
||||
font-family: Georgia, 'Times New Roman', serif;
|
||||
line-height: 1;
|
||||
color: rgba(245, 158, 11, 0.18);
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.quote-block {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.quote-text {
|
||||
font-size: 18px;
|
||||
line-height: 1.7;
|
||||
color: var(--text);
|
||||
font-weight: 500;
|
||||
margin-bottom: 14px;
|
||||
/* 中英文混排更优雅 */
|
||||
font-feature-settings: 'palt';
|
||||
}
|
||||
|
||||
.quote-author {
|
||||
font-size: 13px;
|
||||
color: #f59e0b;
|
||||
font-weight: 600;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.quote-hint {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
margin-top: 24px;
|
||||
padding-top: 14px;
|
||||
border-top: 1px dashed var(--border);
|
||||
font-size: 12px;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
/* 闪烁圆点:表示还在运行 */
|
||||
.dot {
|
||||
display: inline-block;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: #f59e0b;
|
||||
animation: quote-pulse 1.2s ease-in-out infinite;
|
||||
}
|
||||
@keyframes quote-pulse {
|
||||
0%, 100% { opacity: 0.3; transform: scale(0.8); }
|
||||
50% { opacity: 1; transform: scale(1.2); }
|
||||
}
|
||||
|
||||
/* 过渡:fade + 轻微 slide-up */
|
||||
.quote-fade-enter-active,
|
||||
.quote-fade-leave-active {
|
||||
transition:
|
||||
opacity 0.35s ease,
|
||||
transform 0.35s ease;
|
||||
}
|
||||
.quote-fade-enter-from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
.quote-fade-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,164 @@
|
||||
// 全球投资大师名言录(100 条)。
|
||||
// 用于参数寻优等后台 Task 等待期间随机轮播,让等待不枯燥、还能学到东西。
|
||||
// 收录原则:经典、广为流传、可查证出处;纯中文,面向中文用户。
|
||||
|
||||
export interface InvestmentQuote {
|
||||
/** 名言正文(不含引号)。 */
|
||||
text: string
|
||||
/** 作者(中文译名,必要时附带英文原名)。 */
|
||||
author: string
|
||||
}
|
||||
|
||||
export const INVESTMENT_QUOTES: InvestmentQuote[] = [
|
||||
// ───────── 沃伦·巴菲特 Warren Buffett ─────────
|
||||
{ text: '别人贪婪时我恐惧,别人恐惧时我贪婪。', author: '沃伦·巴菲特' },
|
||||
{ text: '投资的第一条规则是不要赔钱;第二条是永远不要忘记第一条。', author: '沃伦·巴菲特' },
|
||||
{ text: '价格是你付出的,价值是你得到的。', author: '沃伦·巴菲特' },
|
||||
{ text: '只有退潮时,你才知道谁在裸泳。', author: '沃伦·巴菲特' },
|
||||
{ text: '我们最喜欢的持股期限是——永远。', author: '沃伦·巴菲特' },
|
||||
{ text: '风险来自你不知道自己在做什么。', author: '沃伦·巴菲特' },
|
||||
{ text: '以合理的价格买入一家好公司,远胜过以好价格买入一家平庸的公司。', author: '沃伦·巴菲特' },
|
||||
{ text: '当一家优秀公司陷入暂时性困境时,这是绝佳的投资机会。', author: '沃伦·巴菲特' },
|
||||
{ text: '没有人愿意慢慢变富,但慢慢变富才是最稳的路。', author: '沃伦·巴菲特' },
|
||||
|
||||
// ───────── 查理·芒格 Charlie Munger ─────────
|
||||
{ text: '我只想知道将来我会死在什么地方,这样我就永远不去那儿了。', author: '查理·芒格' },
|
||||
{ text: '反过来想,总是反过来想。', author: '查理·芒格' },
|
||||
{ text: '如果你找不到一个比你更聪明的对手,那就不要玩这个游戏。', author: '查理·芒格' },
|
||||
{ text: '每天努力比醒来时聪明一点点。', author: '查理·芒格' },
|
||||
{ text: '我见过的成功人士,没有一个是不每天阅读的,一个都没有。', author: '查理·芒格' },
|
||||
{ text: '要得到你想要的东西,最可靠的办法是让自己配得上它。', author: '查理·芒格' },
|
||||
{ text: '如果你把自己变成一个理性的人,你将获得本不属于你的力量。', author: '查理·芒格' },
|
||||
{ text: '投资中减少错误的最好办法,是避免做出愚蠢的决定。', author: '查理·芒格' },
|
||||
|
||||
// ───────── 本杰明·格雷厄姆 Benjamin Graham ─────────
|
||||
{ text: '市场短期是一台投票机,长期是一台称重机。', author: '本杰明·格雷厄姆' },
|
||||
{ text: '投资者的主要问题——甚至是他最大的敌人——很可能就是他自己。', author: '本杰明·格雷厄姆' },
|
||||
{ text: '买入股票要有安全边际。', author: '本杰明·格雷厄姆' },
|
||||
{ text: '价格波动对你而言应该是一个朋友,而不是敌人。', author: '本杰明·格雷厄姆' },
|
||||
{ text: '投资的艺术,在于对时机的把握和对价值的判断。', author: '本杰明·格雷厄姆' },
|
||||
{ text: '你的投资是否成功,取决于你付出多少与得到多少的差额。', author: '本杰明·格雷厄姆' },
|
||||
|
||||
// ───────── 彼得·林奇 Peter Lynch ─────────
|
||||
{ text: '投资你了解的东西。', author: '彼得·林奇' },
|
||||
{ text: '只要公司基本面没有变坏,股价下跌就是买入机会。', author: '彼得·林奇' },
|
||||
{ text: '在股票市场,最能让你赚钱的是耐心。', author: '彼得·林奇' },
|
||||
{ text: '人们花在挑车上的时间,比花在挑股票上的还多。', author: '彼得·林奇' },
|
||||
{ text: '远射几乎总是脱靶。', author: '彼得·林奇' },
|
||||
{ text: '知道你持有什么,以及为什么持有它。', author: '彼得·林奇' },
|
||||
|
||||
// ───────── 乔治·索罗斯 George Soros ─────────
|
||||
{ text: '市场总是处于不确定性和流动之中,赌注正确的人才能赢。', author: '乔治·索罗斯' },
|
||||
{ text: '重要的不是对错,而是对的时候赚了多少、错的时候亏了多少。', author: '乔治·索罗斯' },
|
||||
{ text: '我先做,再修正。我做任何决策都不犹豫。', author: '乔治·索罗斯' },
|
||||
{ text: '世界经济史是一部基于假象和谎言的连续剧。要获得财富,做法就是认清假象,投入其中,然后在假象被公众认识之前退出游戏。', author: '乔治·索罗斯' },
|
||||
{ text: '我富有只是因为我知道自己什么时候错了。', author: '乔治·索罗斯' },
|
||||
|
||||
// ───────── 吉姆·罗杰斯 Jim Rogers ─────────
|
||||
{ text: '我只管等待,直到钱躺在墙角,我所要做的只是走过去把它捡起来。', author: '吉姆·罗杰斯' },
|
||||
{ text: '不要在赔钱的项目上加码。', author: '吉姆·罗杰斯' },
|
||||
{ text: '如果你在生活中没有取得成功,那是因为你还没有遇到属于你的机会。', author: '吉姆·罗杰斯' },
|
||||
{ text: '分散投资是对无知的保护。', author: '吉姆·罗杰斯' },
|
||||
|
||||
// ───────── 杰西·利弗莫尔 Jesse Livermore ─────────
|
||||
{ text: '华尔街没有新鲜事,因为人性从未改变。', author: '杰西·利弗莫尔' },
|
||||
{ text: '赚大钱的诀窍不在于买进卖出,而在于等待。', author: '杰西·利弗莫尔' },
|
||||
{ text: '我的财富来自坐着不动,而不是思考。', author: '杰西·利弗莫尔' },
|
||||
{ text: '在市场中,正确的判断不会立刻得到回报。', author: '杰西·利弗莫尔' },
|
||||
{ text: '截断亏损,让利润奔跑。', author: '杰西·利弗莫尔' },
|
||||
{ text: '永远不要试图去抓住下跌的刀。', author: '杰西·利弗莫尔' },
|
||||
|
||||
// ───────── 霍华德·马克斯 Howard Marks ─────────
|
||||
{ text: '投资中最重要的不是"买好的",而是"买得好"。', author: '霍华德·马克斯' },
|
||||
{ text: '第二层次思维者考虑的是别人在想什么。', author: '霍华德·马克斯' },
|
||||
{ text: '你不能预测,但你可以准备。', author: '霍华德·马克斯' },
|
||||
{ text: '风险意味着可能发生的事情比将要发生的事情多得多。', author: '霍华德·马克斯' },
|
||||
{ text: '成功投资的秘诀,在于避免失败者所做的一切。', author: '霍华德·马克斯' },
|
||||
|
||||
// ───────── 约翰·博格尔 John Bogle ─────────
|
||||
{ text: '不要在草垛里找针,买下整个草垛。', author: '约翰·博格尔' },
|
||||
{ text: '长期来看,股票市场的回报几乎完全来自企业盈利的增长。', author: '约翰·博格尔' },
|
||||
|
||||
// ───────── 约翰·邓普顿 John Templeton ─────────
|
||||
{ text: '在悲观中买入,在乐观中卖出。', author: '约翰·邓普顿' },
|
||||
{ text: '牛市生于悲观,长于怀疑,成于乐观,死于狂热。', author: '约翰·邓普顿' },
|
||||
{ text: '分散投资是金融界唯一的免费午餐。', author: '约翰·邓普顿' },
|
||||
{ text: '想要获得超越平均的回报,你必须做与大众不同的事。', author: '约翰·邓普顿' },
|
||||
|
||||
// ───────── 菲利普·费雪 Philip Fisher ─────────
|
||||
{ text: '真正赚大钱的,是那些能持有成长股多年的人。', author: '菲利普·费雪' },
|
||||
{ text: '不要因为一只股票上涨就卖出,要卖出是因为基本面变差了。', author: '菲利普·费雪' },
|
||||
{ text: '闲聊是了解一家公司最好的方法。', author: '菲利普·费雪' },
|
||||
|
||||
// ───────── 纳西姆·塔勒布 Nassim Taleb ─────────
|
||||
{ text: '我们没有意识到我们在预测方面有多么糟糕。', author: '纳西姆·塔勒布' },
|
||||
{ text: '风险不在于你能想象到的事情,而在于你没想象到的事情。', author: '纳西姆·塔勒布' },
|
||||
{ text: '反脆弱:从不确定性中获益。', author: '纳西姆·塔勒布' },
|
||||
{ text: '永远不要跨过一条平均深度只有 4 英尺的河流。', author: '纳西姆·塔勒布' },
|
||||
|
||||
// ───────── 瑞·达利欧 Ray Dalio ─────────
|
||||
{ text: '痛苦 + 反思 = 进步。', author: '瑞·达利欧' },
|
||||
{ text: '真相——更准确地说,是对现实的准确理解——是一切成功的根基。', author: '瑞·达利欧' },
|
||||
{ text: '不要相信你所想的,要去验证它。', author: '瑞·达利欧' },
|
||||
{ text: '把你的目标想清楚,然后倒推出实现它的过程。', author: '瑞·达利欧' },
|
||||
|
||||
// ───────── 伯纳德·巴鲁克 Bernard Baruch ─────────
|
||||
{ text: '不要试图在最低点买入,在最高点卖出,这是不可能的——除非你撒谎。', author: '伯纳德·巴鲁克' },
|
||||
{ text: '在市场中,没有一个能永远赚钱的规则。', author: '伯纳德·巴鲁克' },
|
||||
{ text: '股票市场管理的最大问题,是控制情绪。', author: '伯纳德·巴鲁克' },
|
||||
|
||||
// ───────── 安德烈·科斯托拉尼 André Kostolany ─────────
|
||||
{ text: '股市是一个酒鬼,听到好消息就喝醉,听到坏消息就清醒。', author: '安德烈·科斯托拉尼' },
|
||||
{ text: '长期看,心理因素对市场的影响比基本面更大。', author: '安德烈·科斯托拉尼' },
|
||||
{ text: '投机的艺术,在于比别人更早看清趋势。', author: '安德烈·科斯托拉尼' },
|
||||
|
||||
// ───────── 沃伦·巴菲特 恩师延续 ─────────
|
||||
{ text: '宁可模糊地正确,也不要精确地错误。', author: '沃伦·巴菲特' },
|
||||
{ text: '时间是优秀企业的朋友,是平庸企业的敌人。', author: '沃伦·巴菲特' },
|
||||
{ text: '我从来不投资我不懂的生意。', author: '沃伦·巴菲特' },
|
||||
{ text: '乐观主义是理性投资者的敌人。', author: '沃伦·巴菲特' },
|
||||
|
||||
// ───────── 约翰·梅纳德·凯恩斯 Keynes ─────────
|
||||
{ text: '市场保持非理性的时间,可能比你保持不破产的时间更长。', author: '约翰·梅纳德·凯恩斯' },
|
||||
{ text: '长期看,我们都已死去。', author: '约翰·梅纳德·凯恩斯' },
|
||||
|
||||
// ───────── 威廉·江恩 W.D. Gann ─────────
|
||||
{ text: '市场永远是对的,错的只能是投资者自己。', author: '威廉·江恩' },
|
||||
{ text: '大多数投资者亏损,是因为他们没有止损。', author: '威廉·江恩' },
|
||||
{ text: '过去发生的,未来还会发生。', author: '威廉·江恩' },
|
||||
|
||||
// ───────── 保罗·都铎·琼斯 Paul Tudor Jones ─────────
|
||||
{ text: '损失一定要小,利润一定要大,这才是投机。', author: '保罗·都铎·琼斯' },
|
||||
{ text: '我最关心的是不要亏钱,而不是赚钱。', author: '保罗·都铎·琼斯' },
|
||||
{ text: '成功的交易有三个要素:纪律、纪律,还是纪律。', author: '保罗·都铎·琼斯' },
|
||||
|
||||
// ───────── 大卫·斯文森 David Swensen ─────────
|
||||
{ text: '资产配置决定了投资组合 90% 以上的回报。', author: '大卫·斯文森' },
|
||||
{ text: '积极的交易,是少数人的游戏。', author: '大卫·斯文森' },
|
||||
|
||||
// ───────── 邓普顿、马克·墨比乌斯 等 ─────────
|
||||
{ text: '在所有人都恐慌抛售时,正是黄金机会。', author: '马克·墨比乌斯' },
|
||||
{ text: '新兴市场总是充满着风险,但回报也最丰厚。', author: '马克·墨比乌斯' },
|
||||
|
||||
// ───────── 沃尔特·施洛斯 Walter Schloss ─────────
|
||||
{ text: '我不和公司管理层交流,因为他们会误导我。', author: '沃尔特·施洛斯' },
|
||||
{ text: '分散持有 100 只便宜的股票,时间会证明你是对的。', author: '沃尔特·施洛斯' },
|
||||
|
||||
// ───────── 塞斯·卡拉曼 Seth Klarman ─────────
|
||||
{ text: '安全边际是投资中最重要的概念。', author: '塞斯·卡拉曼' },
|
||||
{ text: '投资中最重要的不是回报率,而是不亏损。', author: '塞斯·卡拉曼' },
|
||||
{ text: '现金是一种有价值的期权,不要轻易放弃它。', author: '塞斯·卡拉曼' },
|
||||
|
||||
// ───────── 麦克·普莱斯 Michael Price ─────────
|
||||
{ text: '便宜不一定好,但便宜是好的开始。', author: '麦克·普莱斯' },
|
||||
{ text: '在恐慌时买入,在贪婪时卖出。', author: '麦克·普莱斯' },
|
||||
|
||||
// ───────── 比尔·米勒 Bill Miller ─────────
|
||||
{ text: '平均成本法是普通投资者最好的朋友。', author: '比尔·米勒' },
|
||||
{ text: '波动不是风险,永久性损失才是。', author: '比尔·米勒' },
|
||||
|
||||
// ───────── 经典格言 ─────────
|
||||
{ text: '最好的投资,是投资你自己。', author: '沃伦·巴菲特' },
|
||||
{ text: '不学习的人,将被淘汰出局。', author: '查理·芒格' },
|
||||
{ text: '历史不会简单重复,但常常押韵。', author: '马克·吐温' },
|
||||
]
|
||||
@@ -9,6 +9,7 @@ import GradeBadge from '../components/GradeBadge.vue'
|
||||
import OptimizeHeatmap from '../components/OptimizeHeatmap.vue'
|
||||
import OptimizeResultTable from '../components/OptimizeResultTable.vue'
|
||||
import ParamGridPicker from '../components/ParamGridPicker.vue'
|
||||
import QuoteCarousel from '../components/QuoteCarousel.vue'
|
||||
import SymbolPicker from '../components/SymbolPicker.vue'
|
||||
import { gradeGridPoint } from '../grading'
|
||||
import type { GradeResult } from '../grading'
|
||||
@@ -196,7 +197,7 @@ const rankingGrades = computed<GradeResult[]>(() =>
|
||||
{{ store.optimizeRunning ? '取行情+寻优中…' : '开始寻优' }}
|
||||
</button>
|
||||
<button
|
||||
class="run-btn"
|
||||
class="run-all-btn run-btn"
|
||||
:disabled="store.optimizeRunning || store.optimizeAllRunning"
|
||||
@click="onRunAll"
|
||||
>
|
||||
@@ -214,6 +215,9 @@ const rankingGrades = computed<GradeResult[]>(() =>
|
||||
<p>选标的 → 选策略 → 勾选寻优参数 → 开始寻优;或点「一键寻优所有策略」</p>
|
||||
</div>
|
||||
|
||||
<!-- 一键寻优进行中:投资大师名言轮播,让等待不枯燥 -->
|
||||
<QuoteCarousel v-if="store.optimizeAllRunning" :interval="3000" />
|
||||
|
||||
<!-- 单策略寻优结果 -->
|
||||
<div v-if="store.optimizeResult" class="report-content">
|
||||
<section class="report-section">
|
||||
@@ -359,6 +363,35 @@ const rankingGrades = computed<GradeResult[]>(() =>
|
||||
.run-btn:first-of-type {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* 「一键寻优所有策略」按钮:暖橙渐变,比 primary 蓝更醒目 */
|
||||
.run-all-btn {
|
||||
background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
|
||||
border: 1px solid #f59e0b;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
|
||||
}
|
||||
.run-all-btn:hover:not(:disabled) {
|
||||
background: linear-gradient(135deg, #fbbf24, #f59e0b);
|
||||
border-color: #fbbf24;
|
||||
box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.run-all-btn:active:not(:disabled) {
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
|
||||
}
|
||||
/* 运行中:暗橙 disabled,但仍是橙,区别于普通按钮的纯灰 */
|
||||
.run-all-btn:disabled {
|
||||
background: linear-gradient(135deg, #b45309, #9a3412);
|
||||
border-color: #b45309;
|
||||
color: #fde68a;
|
||||
opacity: 0.9;
|
||||
cursor: not-allowed;
|
||||
box-shadow: none;
|
||||
transform: none;
|
||||
}
|
||||
.report-panel {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
|
||||
Reference in New Issue
Block a user