1
This commit is contained in:
parent
697e50c51e
commit
f9cc3b73e8
93
liebao.svg
Normal file
93
liebao.svg
Normal file
@ -0,0 +1,93 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 450" width="100%" height="100%">
|
||||
<!-- 背景 (可选,原图为纯白背景) -->
|
||||
<rect width="100%" height="100%" fill="#ffffff" />
|
||||
|
||||
<!-- 左侧最底部的深蓝色拖尾 -->
|
||||
<path d="M 150 380
|
||||
C 220 330, 260 310, 300 300
|
||||
C 250 285, 200 290, 150 300
|
||||
C 100 310, 80 330, 50 350
|
||||
C 80 340, 120 350, 150 380 Z"
|
||||
fill="#093a75" />
|
||||
|
||||
<!-- 左侧中部的深蓝色拖尾与部分身体阴影 -->
|
||||
<path d="M 55 245
|
||||
C 150 220, 300 200, 400 220
|
||||
C 500 240, 600 280, 700 270
|
||||
C 750 265, 750 285, 720 295
|
||||
C 650 320, 550 310, 450 280
|
||||
C 350 250, 250 280, 180 310
|
||||
C 130 330, 100 310, 75 285
|
||||
C 65 275, 55 260, 55 245 Z"
|
||||
fill="#0d4d8c" />
|
||||
|
||||
<!-- 主体躯干与左侧中部的蓝色拖尾 -->
|
||||
<path d="M 250 320
|
||||
C 350 270, 450 240, 550 230
|
||||
C 600 220, 650 200, 700 190
|
||||
C 750 180, 800 160, 840 160
|
||||
C 840 180, 820 220, 780 240
|
||||
C 750 260, 710 270, 680 290
|
||||
C 640 320, 580 330, 520 320
|
||||
C 480 310, 430 310, 380 330
|
||||
C 330 350, 280 360, 230 350
|
||||
C 200 340, 220 330, 250 320 Z"
|
||||
fill="#196bbd" />
|
||||
|
||||
<!-- 头部、背部及最上方的浅蓝色拖尾 -->
|
||||
<path d="M 830 100
|
||||
C 840 95, 850 100, 870 110
|
||||
C 900 125, 920 150, 950 170
|
||||
C 960 180, 965 190, 950 205
|
||||
C 940 215, 920 220, 900 230
|
||||
C 880 240, 850 230, 830 210
|
||||
C 800 180, 750 180, 700 190
|
||||
C 650 200, 600 210, 550 220
|
||||
C 450 240, 350 260, 250 300
|
||||
C 200 320, 150 320, 100 300
|
||||
C 150 285, 200 280, 300 250
|
||||
C 450 200, 600 160, 700 140
|
||||
C 760 130, 800 115, 830 100 Z"
|
||||
fill="#2388d9" />
|
||||
|
||||
<!-- 前腿和胸部 -->
|
||||
<path d="M 830 210
|
||||
C 800 230, 780 250, 760 280
|
||||
C 750 295, 730 310, 700 320
|
||||
C 680 330, 690 350, 720 350
|
||||
C 750 350, 780 330, 810 310
|
||||
C 850 280, 880 280, 920 295
|
||||
C 940 305, 960 315, 970 320
|
||||
C 950 300, 920 270, 880 240
|
||||
C 860 225, 840 215, 830 210 Z"
|
||||
fill="#0d4d8c" />
|
||||
|
||||
<!-- 前腿内侧的深色阴影 -->
|
||||
<path d="M 760 280
|
||||
C 740 300, 720 315, 700 320
|
||||
C 710 300, 730 280, 750 260
|
||||
C 755 265, 760 270, 760 280 Z"
|
||||
fill="#093a75" />
|
||||
|
||||
<!-- 嘴巴和下巴的白色镂空区域 -->
|
||||
<path d="M 925 185
|
||||
C 920 195, 915 205, 920 215
|
||||
C 930 220, 945 220, 955 210
|
||||
C 950 200, 940 190, 925 185 Z"
|
||||
fill="#ffffff" />
|
||||
|
||||
<!-- 下巴下方的白色缝隙 -->
|
||||
<path d="M 890 225
|
||||
C 895 235, 905 240, 915 235
|
||||
C 905 245, 890 245, 880 235
|
||||
C 885 230, 888 228, 890 225 Z"
|
||||
fill="#ffffff" />
|
||||
|
||||
<!-- 眼睛部位的高光/凹陷细节 (深蓝色小色块) -->
|
||||
<path d="M 880 180
|
||||
C 890 175, 900 180, 900 190
|
||||
C 890 195, 880 195, 870 190
|
||||
C 875 185, 878 182, 880 180 Z"
|
||||
fill="#093a75" />
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
@ -30,7 +30,7 @@ function formatRoutesForLog(routes: readonly RouteRecordRaw[]): RouteLogNode[] {
|
||||
|
||||
NProgress.configure({ showSpinner: false })
|
||||
|
||||
const whiteList = ['/login','/redirect','/admin/land'] // no redirect whitelist
|
||||
const whiteList = ['/login','/redirect','/admin/land','/test'] // no redirect whitelist
|
||||
|
||||
/** 登录后“一次连接”:先加载用户偏好(含打印组件分用户+仓库配置),再自动连接一次 */
|
||||
function ensurePrinterConnectionsAfterLogin() {
|
||||
|
||||
@ -88,6 +88,13 @@ export const constantRoutes: RouteRecordRaw[] = [
|
||||
component: () => import('@/views/login/index.vue'),
|
||||
meta: { title: '登录', hidden: true }
|
||||
},
|
||||
{
|
||||
// 空白测试页面(免登录,白名单见 permission.ts)
|
||||
path: '/test',
|
||||
name: 'Test',
|
||||
component: () => import('@/views/test/index.vue'),
|
||||
meta: { title: '测试页面', hidden: true }
|
||||
},
|
||||
{
|
||||
path: '/admin/land',
|
||||
name: 'AdminLand',
|
||||
|
||||
407
src/views/test/components/CheetahRunner.vue
Normal file
407
src/views/test/components/CheetahRunner.vue
Normal file
@ -0,0 +1,407 @@
|
||||
<template>
|
||||
<span
|
||||
class="cheetah-runner"
|
||||
:class="[`cheetah-runner--${mode}`, { 'is-running': running }]"
|
||||
:style="rootStyle"
|
||||
>
|
||||
<svg class="cheetah-runner__svg" viewBox="0 0 200 112" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<!-- 速度线 -->
|
||||
<g class="cheetah-speed">
|
||||
<path class="cheetah-speed__line cheetah-speed__line--1" d="M2 50H26" />
|
||||
<path class="cheetah-speed__line cheetah-speed__line--2" d="M-4 63H18" />
|
||||
<path class="cheetah-speed__line cheetah-speed__line--3" d="M2 76H22" />
|
||||
</g>
|
||||
|
||||
<!-- 地面投影 -->
|
||||
<ellipse class="cheetah-shadow" cx="104" cy="105" rx="62" ry="3.4" />
|
||||
|
||||
<g class="cheetah-body">
|
||||
<!-- 尾巴:从臀后水平拖出,尾尖上翘并逐渐变细 -->
|
||||
<g class="cheetah-tail">
|
||||
<path class="cheetah-tail-base" d="M56 50C42 50 28 47 17 42" />
|
||||
<path class="cheetah-tail-tip" d="M17 42C10 38 5 32 3 26" />
|
||||
</g>
|
||||
|
||||
<!-- 远侧后腿 -->
|
||||
<g class="cheetah-leg cheetah-leg--hind-far" style="transform-origin: 72px 58px">
|
||||
<path class="cheetah-thigh" d="M72 58L88 70" />
|
||||
<path class="cheetah-shin" d="M88 70L78 84" />
|
||||
<path class="cheetah-paw" d="M78 84L72 95" />
|
||||
</g>
|
||||
|
||||
<!-- 远侧前腿 -->
|
||||
<g class="cheetah-leg cheetah-leg--front-far" style="transform-origin: 134px 56px">
|
||||
<path class="cheetah-thigh" d="M134 56L144 70" />
|
||||
<path class="cheetah-shin" d="M144 70L138 84" />
|
||||
<path class="cheetah-paw" d="M138 84L134 95" />
|
||||
</g>
|
||||
|
||||
<!-- 躯干:隆背、深胸、收腰、厚臀 -->
|
||||
<path
|
||||
class="cheetah-torso"
|
||||
d="M56 54C62 42 78 36 96 35C112 34 130 38 140 44C146 48 147 55 143 60C137 65 126 65 116 62C106 59 96 57 86 57C74 57 62 60 57 58C53 56 54 56 56 54Z"
|
||||
/>
|
||||
|
||||
<!-- 颈部 -->
|
||||
<path class="cheetah-neck" d="M136 40C144 37 150 36 157 36L158 44C151 44 145 47 141 52Z" />
|
||||
|
||||
<!-- 头部:短而深的猫科头骨、钝鼻、双尖小耳 -->
|
||||
<path
|
||||
class="cheetah-skull"
|
||||
d="M156 40C155 33 160 28 167 28C172 28 176 31 178 35C180 36 181 38 181 40C181 43 179 45 176 45C173 46 169 46 166 45C161 45 157 44 156 40Z"
|
||||
/>
|
||||
<path class="cheetah-ear" d="M163 30L161 23L167 27Z" />
|
||||
<path class="cheetah-ear cheetah-ear--far" d="M168 25L168 19L173 24Z" />
|
||||
<circle class="cheetah-eye" cx="171" cy="35" r="1.4" />
|
||||
|
||||
<!-- 近侧后腿(Z 形蹬地) -->
|
||||
<g class="cheetah-leg cheetah-leg--hind-near" style="transform-origin: 66px 58px">
|
||||
<path class="cheetah-thigh" d="M66 58L48 72" />
|
||||
<path class="cheetah-shin" d="M48 72L34 86" />
|
||||
<path class="cheetah-paw" d="M34 86L28 97" />
|
||||
</g>
|
||||
|
||||
<!-- 近侧前腿 -->
|
||||
<g class="cheetah-leg cheetah-leg--front-near" style="transform-origin: 140px 58px">
|
||||
<path class="cheetah-thigh" d="M140 58L150 72" />
|
||||
<path class="cheetah-shin" d="M150 72L146 86" />
|
||||
<path class="cheetah-paw" d="M146 86L144 97" />
|
||||
</g>
|
||||
|
||||
<!-- 斑点 -->
|
||||
<g class="cheetah-spots">
|
||||
<circle cx="76" cy="42" r="1.8" />
|
||||
<circle cx="85" cy="39" r="1.7" />
|
||||
<circle cx="94" cy="38" r="1.8" />
|
||||
<circle cx="103" cy="38" r="1.7" />
|
||||
<circle cx="112" cy="39" r="1.8" />
|
||||
<circle cx="121" cy="41" r="1.7" />
|
||||
<circle cx="129" cy="44" r="1.8" />
|
||||
<circle cx="88" cy="46" r="1.7" />
|
||||
<circle cx="97" cy="46" r="1.8" />
|
||||
<circle cx="106" cy="47" r="1.7" />
|
||||
<circle cx="115" cy="48" r="1.8" />
|
||||
</g>
|
||||
</g>
|
||||
|
||||
<!-- 扬尘 -->
|
||||
<g class="cheetah-dust">
|
||||
<circle cx="28" cy="100" r="2.6" />
|
||||
<circle cx="18" cy="96" r="1.9" />
|
||||
<circle cx="9" cy="92" r="1.4" />
|
||||
</g>
|
||||
</svg>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
/** 剪影风格:line 标准 / bold 带投影 / ghost 半透明 */
|
||||
mode?: 'line' | 'bold' | 'ghost'
|
||||
running?: boolean
|
||||
/** 渲染宽度(px),高度按 200:112 等比 */
|
||||
width?: number
|
||||
/** 动画速度倍率 */
|
||||
speed?: number
|
||||
/** 剪影颜色,默认继承 */
|
||||
color?: string
|
||||
}>(),
|
||||
{
|
||||
mode: 'line',
|
||||
running: true,
|
||||
width: 110,
|
||||
speed: 1,
|
||||
color: ''
|
||||
}
|
||||
)
|
||||
|
||||
const rootStyle = computed(() => ({
|
||||
width: `${props.width}px`,
|
||||
color: props.color || 'inherit',
|
||||
'--dur': `${(0.46 / Math.max(0.2, props.speed)).toFixed(3)}s`
|
||||
}))
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.cheetah-runner {
|
||||
--dur: 0.46s;
|
||||
display: inline-block;
|
||||
line-height: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.cheetah-runner--bold {
|
||||
filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.22));
|
||||
}
|
||||
|
||||
.cheetah-runner--ghost {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.cheetah-runner__svg {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/* ---------- 剪影 ---------- */
|
||||
.cheetah-torso,
|
||||
.cheetah-neck,
|
||||
.cheetah-skull,
|
||||
.cheetah-ear {
|
||||
fill: currentColor;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
.cheetah-tail {
|
||||
transform-origin: 56px 50px;
|
||||
transform-box: view-box;
|
||||
}
|
||||
|
||||
.cheetah-tail path {
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-linecap: round;
|
||||
}
|
||||
|
||||
.cheetah-tail-base {
|
||||
stroke-width: 6.5;
|
||||
}
|
||||
|
||||
.cheetah-tail-tip {
|
||||
stroke-width: 2.8;
|
||||
}
|
||||
|
||||
.cheetah-leg path {
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-near .cheetah-thigh {
|
||||
stroke-width: 14;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-near .cheetah-shin {
|
||||
stroke-width: 6;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-near .cheetah-paw {
|
||||
stroke-width: 4;
|
||||
}
|
||||
|
||||
.cheetah-leg--front-near .cheetah-thigh {
|
||||
stroke-width: 9;
|
||||
}
|
||||
|
||||
.cheetah-leg--front-near .cheetah-shin {
|
||||
stroke-width: 5.4;
|
||||
}
|
||||
|
||||
.cheetah-leg--front-near .cheetah-paw {
|
||||
stroke-width: 4;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-far .cheetah-thigh {
|
||||
stroke-width: 11;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-far .cheetah-shin {
|
||||
stroke-width: 5.2;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-far .cheetah-paw {
|
||||
stroke-width: 3.4;
|
||||
}
|
||||
|
||||
.cheetah-leg--front-far .cheetah-thigh {
|
||||
stroke-width: 7.6;
|
||||
}
|
||||
|
||||
.cheetah-leg--front-far .cheetah-shin {
|
||||
stroke-width: 4.6;
|
||||
}
|
||||
|
||||
.cheetah-leg--front-far .cheetah-paw {
|
||||
stroke-width: 3.4;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-far,
|
||||
.cheetah-leg--front-far {
|
||||
opacity: 0.45;
|
||||
}
|
||||
|
||||
.cheetah-eye {
|
||||
fill: #fff;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
.cheetah-ear--far {
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
.cheetah-spots circle {
|
||||
fill: #bfdbfe;
|
||||
opacity: 0.9;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
.cheetah-shadow {
|
||||
fill: currentColor;
|
||||
opacity: 0.09;
|
||||
transform-origin: 104px 105px;
|
||||
transform-box: view-box;
|
||||
}
|
||||
|
||||
.cheetah-speed__line {
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-width: 2.4;
|
||||
stroke-linecap: round;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.cheetah-dust circle {
|
||||
fill: currentColor;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* ---------- 奔跑动画 ---------- */
|
||||
.is-running .cheetah-body {
|
||||
animation: cheetah-bob var(--dur) ease-in-out infinite;
|
||||
transform-box: view-box;
|
||||
transform-origin: 100px 62px;
|
||||
}
|
||||
|
||||
.is-running .cheetah-leg--front-near {
|
||||
animation: cheetah-front var(--dur) ease-in-out infinite;
|
||||
}
|
||||
|
||||
.is-running .cheetah-leg--front-far {
|
||||
animation: cheetah-front var(--dur) ease-in-out infinite;
|
||||
animation-delay: calc(var(--dur) / -2);
|
||||
}
|
||||
|
||||
.is-running .cheetah-leg--hind-near {
|
||||
animation: cheetah-hind var(--dur) ease-in-out infinite;
|
||||
}
|
||||
|
||||
.is-running .cheetah-leg--hind-far {
|
||||
animation: cheetah-hind var(--dur) ease-in-out infinite;
|
||||
animation-delay: calc(var(--dur) / -2);
|
||||
}
|
||||
|
||||
.is-running .cheetah-tail {
|
||||
animation: cheetah-tail calc(var(--dur) * 1.6) ease-in-out infinite;
|
||||
}
|
||||
|
||||
.is-running .cheetah-shadow {
|
||||
animation: cheetah-shadow var(--dur) ease-in-out infinite;
|
||||
}
|
||||
|
||||
.is-running .cheetah-speed__line {
|
||||
animation: cheetah-streak calc(var(--dur) * 0.9) linear infinite;
|
||||
}
|
||||
|
||||
.is-running .cheetah-speed__line--2 {
|
||||
animation-delay: calc(var(--dur) * -0.3);
|
||||
}
|
||||
|
||||
.is-running .cheetah-speed__line--3 {
|
||||
animation-delay: calc(var(--dur) * -0.6);
|
||||
}
|
||||
|
||||
.is-running .cheetah-dust circle {
|
||||
animation: cheetah-dust calc(var(--dur) * 1.5) ease-out infinite;
|
||||
}
|
||||
|
||||
.is-running .cheetah-dust circle:nth-child(2) {
|
||||
animation-delay: calc(var(--dur) * -0.4);
|
||||
}
|
||||
|
||||
.is-running .cheetah-dust circle:nth-child(3) {
|
||||
animation-delay: calc(var(--dur) * -0.8);
|
||||
}
|
||||
|
||||
@keyframes cheetah-bob {
|
||||
0%,
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-2.5px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cheetah-front {
|
||||
0%,
|
||||
100% {
|
||||
transform: rotate(15deg);
|
||||
}
|
||||
50% {
|
||||
transform: rotate(-17deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cheetah-hind {
|
||||
0%,
|
||||
100% {
|
||||
transform: rotate(-17deg);
|
||||
}
|
||||
50% {
|
||||
transform: rotate(15deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cheetah-tail {
|
||||
0%,
|
||||
100% {
|
||||
transform: rotate(-6deg);
|
||||
}
|
||||
50% {
|
||||
transform: rotate(7deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cheetah-streak {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateX(6px);
|
||||
}
|
||||
30% {
|
||||
opacity: 0.42;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: translateX(-12px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cheetah-shadow {
|
||||
0%,
|
||||
100% {
|
||||
transform: scaleX(1);
|
||||
opacity: 0.09;
|
||||
}
|
||||
50% {
|
||||
transform: scaleX(0.88);
|
||||
opacity: 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cheetah-dust {
|
||||
0% {
|
||||
opacity: 0.32;
|
||||
transform: translate(0, 0) scale(0.6);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: translate(-12px, 4px) scale(1.5);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
336
src/views/test/components/VariantA.vue
Normal file
336
src/views/test/components/VariantA.vue
Normal file
@ -0,0 +1,336 @@
|
||||
<template>
|
||||
<div class="dialog-a">
|
||||
<header class="dialog-a__head">
|
||||
<div class="dialog-a__ident">
|
||||
<span class="dialog-a__mark"></span>
|
||||
<div class="dialog-a__titles">
|
||||
<h3>波次策略快速扫描</h3>
|
||||
<p>Wave strategy quick scan</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="dialog-a__task">W202610180931</span>
|
||||
</header>
|
||||
|
||||
<div class="dialog-a__form">
|
||||
<div class="field">
|
||||
<span class="field__label">仓库</span>
|
||||
<span class="field__box">
|
||||
深圳保税仓
|
||||
<svg class="field__caret" viewBox="0 0 10 6" fill="none">
|
||||
<path d="M1 1L5 5L9 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<span class="field__label">波次策略</span>
|
||||
<span class="field__box">
|
||||
三单波次 · 自动
|
||||
<svg class="field__caret" viewBox="0 0 10 6" fill="none">
|
||||
<path d="M1 1L5 5L9 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
<div class="field field--full">
|
||||
<span class="field__label">订单范围</span>
|
||||
<div class="chips">
|
||||
<span class="chip chip--active">全部待处理</span>
|
||||
<span class="chip">仅异常单</span>
|
||||
<span class="chip">未分配快递</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="a-progress">
|
||||
<div class="a-progress__top">
|
||||
<div class="a-percent">{{ percent }}<small>%</small></div>
|
||||
<div class="a-status">
|
||||
<span class="a-status__dot"></span>
|
||||
{{ statusText }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="a-rail">
|
||||
<div class="a-rail__track">
|
||||
<div class="a-rail__fill" :style="{ width: `${progress}%` }"></div>
|
||||
</div>
|
||||
<div class="a-rail__runner" :style="{ left: `${runnerLeft}%` }">
|
||||
<CheetahRunner
|
||||
mode="line"
|
||||
:running="running && progress < 100"
|
||||
:width="118"
|
||||
:speed="1.15"
|
||||
color="#2563eb"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="a-meta">
|
||||
<span>已处理 <b>{{ processed.toLocaleString() }}</b> / {{ total.toLocaleString() }}</span>
|
||||
<span>匹配 <b>{{ matched.toLocaleString() }}</b></span>
|
||||
<span>未匹配 <b>{{ unmatched.toLocaleString() }}</b></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import CheetahRunner from './CheetahRunner.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
progress: number
|
||||
running: boolean
|
||||
}>()
|
||||
|
||||
const percent = computed(() => Math.round(props.progress))
|
||||
const runnerLeft = computed(() => Math.min(92, Math.max(8, props.progress)))
|
||||
|
||||
const total = 2040
|
||||
const processed = computed(() => Math.round((props.progress / 100) * total))
|
||||
const matched = computed(() => Math.round(processed.value * 0.86))
|
||||
const unmatched = computed(() => processed.value - matched.value)
|
||||
|
||||
const statusText = computed(() => {
|
||||
if (props.progress >= 100) return '扫描完成,正在汇总结果'
|
||||
const stages = ['正在拉取待扫描订单', '正在匹配波次策略', '正在校验波次约束', '正在汇总扫描结果']
|
||||
return stages[Math.min(stages.length - 1, Math.floor(props.progress / 25))]
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-a {
|
||||
background: #fff;
|
||||
border: 1px solid #e8eef7;
|
||||
border-radius: 16px;
|
||||
padding: 24px 26px 22px;
|
||||
box-shadow: 0 24px 48px -32px rgba(15, 23, 42, 0.35);
|
||||
color: #0f172a;
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
&__ident {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
&__mark {
|
||||
position: relative;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 10px;
|
||||
background: linear-gradient(135deg, #3b82f6, #1d4ed8);
|
||||
flex: none;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 11px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
}
|
||||
|
||||
&__titles {
|
||||
h3 {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 2px 0 0;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.14em;
|
||||
text-transform: uppercase;
|
||||
color: #94a3b8;
|
||||
}
|
||||
}
|
||||
|
||||
&__task {
|
||||
font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
|
||||
font-size: 11px;
|
||||
color: #3b82f6;
|
||||
background: #eff6ff;
|
||||
border-radius: 999px;
|
||||
padding: 5px 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__form {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 14px;
|
||||
margin-top: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 7px;
|
||||
|
||||
&--full {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
}
|
||||
|
||||
&__box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
height: 38px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid #e6ecf5;
|
||||
border-radius: 10px;
|
||||
background: #fbfdff;
|
||||
font-size: 13px;
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
&__caret {
|
||||
width: 10px;
|
||||
height: 6px;
|
||||
color: #94a3b8;
|
||||
flex: none;
|
||||
}
|
||||
}
|
||||
|
||||
.chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.chip {
|
||||
height: 30px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 0 13px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
|
||||
&--active {
|
||||
background: #eff6ff;
|
||||
border-color: #bfdbfe;
|
||||
color: #2563eb;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.a-progress {
|
||||
margin-top: 24px;
|
||||
padding-top: 20px;
|
||||
border-top: 1px dashed #e8eef7;
|
||||
|
||||
&__top {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.a-percent {
|
||||
font-size: 40px;
|
||||
line-height: 1;
|
||||
font-weight: 650;
|
||||
letter-spacing: -0.03em;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
small {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #64748b;
|
||||
margin-left: 3px;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.a-status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
font-size: 12px;
|
||||
color: #475569;
|
||||
padding-bottom: 4px;
|
||||
|
||||
&__dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: #3b82f6;
|
||||
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
|
||||
animation: a-pulse 1.6s ease-out infinite;
|
||||
}
|
||||
}
|
||||
|
||||
.a-rail {
|
||||
position: relative;
|
||||
height: 10px;
|
||||
margin: 62px 0 0;
|
||||
|
||||
&__track {
|
||||
height: 10px;
|
||||
border-radius: 999px;
|
||||
background: #edf2f9;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&__fill {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(90deg, #93c5fd, #3b82f6 70%, #2563eb);
|
||||
transition: width 0.25s linear;
|
||||
}
|
||||
|
||||
&__runner {
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
transform: translateX(-58%);
|
||||
transition: left 0.25s linear;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.a-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px 22px;
|
||||
margin-top: 20px;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
b {
|
||||
color: #1e293b;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes a-pulse {
|
||||
0% {
|
||||
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45);
|
||||
}
|
||||
70% {
|
||||
box-shadow: 0 0 0 7px rgba(59, 130, 246, 0);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
329
src/views/test/components/VariantB.vue
Normal file
329
src/views/test/components/VariantB.vue
Normal file
@ -0,0 +1,329 @@
|
||||
<template>
|
||||
<div class="dialog-b">
|
||||
<header class="dialog-b__head">
|
||||
<div class="dialog-b__title">
|
||||
<span class="live"><i></i>{{ percent >= 100 ? '已完成' : '运行中' }}</span>
|
||||
<h3>波次策略快速扫描</h3>
|
||||
</div>
|
||||
<span class="dialog-b__task">#W202610180931</span>
|
||||
</header>
|
||||
|
||||
<div class="dialog-b__body">
|
||||
<div class="params">
|
||||
<div class="param">
|
||||
<span>仓库</span>
|
||||
<strong>深圳保税仓</strong>
|
||||
</div>
|
||||
<div class="param">
|
||||
<span>波次策略</span>
|
||||
<strong>三单波次 · 自动</strong>
|
||||
</div>
|
||||
<div class="param">
|
||||
<span>订单范围</span>
|
||||
<strong>全部待处理</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="meter">
|
||||
<div class="meter__head">
|
||||
<span class="meter__label">扫描进度</span>
|
||||
<span class="meter__value">{{ percent }}<i>%</i></span>
|
||||
</div>
|
||||
|
||||
<div class="meter__rail">
|
||||
<div class="meter__fill" :style="{ width: `${progress}%` }">
|
||||
<span class="meter__stripes"></span>
|
||||
</div>
|
||||
<div class="meter__runner" :style="{ left: `${runnerLeft}%` }">
|
||||
<CheetahRunner
|
||||
mode="bold"
|
||||
:running="running && progress < 100"
|
||||
:width="112"
|
||||
:speed="1.05"
|
||||
color="#2563eb"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="meter__foot">
|
||||
<span>已处理 {{ processed.toLocaleString() }} / {{ total.toLocaleString() }}</span>
|
||||
<span>{{ throughput }} 单/秒</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid">
|
||||
<div class="cell">
|
||||
<span>匹配订单</span>
|
||||
<strong>{{ matched.toLocaleString() }}</strong>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<span>未匹配</span>
|
||||
<strong>{{ unmatched.toLocaleString() }}</strong>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<span>预计剩余</span>
|
||||
<strong>{{ eta }}<em>s</em></strong>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<span>已耗时</span>
|
||||
<strong>{{ elapsed }}<em>s</em></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import CheetahRunner from './CheetahRunner.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
progress: number
|
||||
running: boolean
|
||||
}>()
|
||||
|
||||
const percent = computed(() => Math.round(props.progress))
|
||||
const runnerLeft = computed(() => Math.min(92, Math.max(8, props.progress)))
|
||||
|
||||
const total = 2040
|
||||
const processed = computed(() => Math.round((props.progress / 100) * total))
|
||||
const matched = computed(() => Math.round(processed.value * 0.86))
|
||||
const unmatched = computed(() => processed.value - matched.value)
|
||||
const throughput = computed(() => (props.running ? 168 : 0))
|
||||
const eta = computed(() => Math.max(0, Math.round(((100 - props.progress) / 100) * 14)))
|
||||
const elapsed = computed(() => ((props.progress / 100) * 14).toFixed(1))
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-b {
|
||||
background: #fff;
|
||||
border: 1px solid #e3ebf8;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 24px 48px -32px rgba(15, 23, 42, 0.4);
|
||||
color: #0f172a;
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 18px 22px;
|
||||
background: linear-gradient(120deg, #1d4ed8 0%, #3b82f6 58%, #60a5fa 100%);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
}
|
||||
|
||||
&__task {
|
||||
font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
|
||||
font-size: 11px;
|
||||
color: #fff;
|
||||
background: rgba(255, 255, 255, 0.16);
|
||||
border: 1px solid rgba(255, 255, 255, 0.22);
|
||||
padding: 5px 10px;
|
||||
border-radius: 999px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__body {
|
||||
padding: 20px 22px 22px;
|
||||
}
|
||||
}
|
||||
|
||||
.live {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
height: 24px;
|
||||
padding: 0 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
background: rgba(255, 255, 255, 0.18);
|
||||
border: 1px solid rgba(255, 255, 255, 0.26);
|
||||
|
||||
i {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: #bbf7d0;
|
||||
animation: b-blink 1.4s ease-in-out infinite;
|
||||
}
|
||||
}
|
||||
|
||||
.params {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.param {
|
||||
background: #f7faff;
|
||||
border: 1px solid #eaf0fa;
|
||||
border-radius: 10px;
|
||||
padding: 10px 12px;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
}
|
||||
}
|
||||
|
||||
.meter {
|
||||
margin-top: 20px;
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
&__value {
|
||||
font-size: 28px;
|
||||
font-weight: 650;
|
||||
letter-spacing: -0.02em;
|
||||
color: #2563eb;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
i {
|
||||
font-style: normal;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #64748b;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
&__rail {
|
||||
position: relative;
|
||||
height: 16px;
|
||||
margin: 52px 0 0;
|
||||
border-radius: 999px;
|
||||
background: #e8eefb;
|
||||
box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
|
||||
}
|
||||
|
||||
&__fill {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(90deg, #60a5fa, #2563eb);
|
||||
overflow: hidden;
|
||||
transition: width 0.25s linear;
|
||||
}
|
||||
|
||||
&__stripes {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-image: repeating-linear-gradient(
|
||||
45deg,
|
||||
rgba(255, 255, 255, 0.32) 0 6px,
|
||||
rgba(255, 255, 255, 0) 6px 14px
|
||||
);
|
||||
background-size: 20px 20px;
|
||||
animation: b-stripes 0.8s linear infinite;
|
||||
}
|
||||
|
||||
&__runner {
|
||||
position: absolute;
|
||||
bottom: -2px;
|
||||
transform: translateX(-58%);
|
||||
transition: left 0.25s linear;
|
||||
pointer-events: none;
|
||||
filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.34));
|
||||
}
|
||||
|
||||
&__foot {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 14px;
|
||||
font-size: 11.5px;
|
||||
color: #64748b;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 1px;
|
||||
margin-top: 18px;
|
||||
background: #e8eef7;
|
||||
border: 1px solid #e8eef7;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cell {
|
||||
background: #fff;
|
||||
padding: 12px 14px;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-size: 17px;
|
||||
font-weight: 650;
|
||||
color: #0f172a;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: #94a3b8;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes b-blink {
|
||||
0%,
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes b-stripes {
|
||||
from {
|
||||
background-position: 0 0;
|
||||
}
|
||||
to {
|
||||
background-position: 20px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
261
src/views/test/components/VariantC.vue
Normal file
261
src/views/test/components/VariantC.vue
Normal file
@ -0,0 +1,261 @@
|
||||
<template>
|
||||
<div class="dialog-c">
|
||||
<header class="dialog-c__head">
|
||||
<div>
|
||||
<h3>波次策略快速扫描</h3>
|
||||
<p>任务 #W202610180931 · 深圳保税仓</p>
|
||||
</div>
|
||||
<div class="dialog-c__count">
|
||||
{{ percent }}<span>%</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="dialog-c__form">
|
||||
<div class="c-field">
|
||||
<span>波次策略</span>
|
||||
<strong>三单波次 · 自动</strong>
|
||||
</div>
|
||||
<div class="c-field">
|
||||
<span>订单范围</span>
|
||||
<strong>全部待处理</strong>
|
||||
</div>
|
||||
<div class="c-field c-field--muted">
|
||||
<span>并发</span>
|
||||
<strong>8 线程</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="track">
|
||||
<div class="track__rail">
|
||||
<div class="track__fill" :style="{ width: `${progress}%` }"></div>
|
||||
<span
|
||||
v-for="node in nodes"
|
||||
:key="node.label"
|
||||
class="track__node"
|
||||
:class="{ 'is-done': progress >= node.at }"
|
||||
:style="{ left: `${node.at}%` }"
|
||||
></span>
|
||||
<div class="track__runner" :style="{ left: `${runnerLeft}%` }">
|
||||
<CheetahRunner
|
||||
mode="line"
|
||||
:running="running && progress < 100"
|
||||
:width="104"
|
||||
:speed="1.25"
|
||||
color="#2563eb"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="track__stages">
|
||||
<span
|
||||
v-for="(node, index) in nodes"
|
||||
:key="node.label"
|
||||
:class="{ 'is-done': progress >= node.at, 'is-active': stageIndex === index }"
|
||||
>
|
||||
{{ node.label }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="dialog-c__foot">
|
||||
<span>已处理 {{ processed.toLocaleString() }} / {{ total.toLocaleString() }}</span>
|
||||
<span v-if="percent < 100">剩余约 {{ eta }} 秒</span>
|
||||
<span v-else class="is-done">正在生成扫描报告</span>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import CheetahRunner from './CheetahRunner.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
progress: number
|
||||
running: boolean
|
||||
}>()
|
||||
|
||||
const nodes = [
|
||||
{ label: '提交任务', at: 0 },
|
||||
{ label: '拉取订单', at: 20 },
|
||||
{ label: '策略匹配', at: 50 },
|
||||
{ label: '结果汇总', at: 80 },
|
||||
{ label: '完成', at: 100 }
|
||||
]
|
||||
|
||||
const percent = computed(() => Math.round(props.progress))
|
||||
const runnerLeft = computed(() => Math.min(94, Math.max(6, props.progress)))
|
||||
const stageIndex = computed(() => {
|
||||
let index = 0
|
||||
nodes.forEach((node, i) => {
|
||||
if (props.progress >= node.at) index = i
|
||||
})
|
||||
return index
|
||||
})
|
||||
|
||||
const total = 2040
|
||||
const processed = computed(() => Math.round((props.progress / 100) * total))
|
||||
const eta = computed(() => Math.max(0, Math.round(((100 - props.progress) / 100) * 12)))
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-c {
|
||||
background: #fff;
|
||||
border: 1px solid #e8eef7;
|
||||
border-radius: 16px;
|
||||
padding: 22px 24px 20px;
|
||||
box-shadow: 0 24px 48px -32px rgba(15, 23, 42, 0.32);
|
||||
color: #0f172a;
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 5px 0 0;
|
||||
font-size: 11.5px;
|
||||
color: #94a3b8;
|
||||
font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
|
||||
}
|
||||
}
|
||||
|
||||
&__count {
|
||||
font-size: 26px;
|
||||
line-height: 1;
|
||||
font-weight: 650;
|
||||
color: #1d4ed8;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
span {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #94a3b8;
|
||||
margin-left: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
&__form {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
&__foot {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 22px;
|
||||
font-size: 11.5px;
|
||||
color: #64748b;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
.is-done {
|
||||
color: #2563eb;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.c-field {
|
||||
padding: 10px 12px;
|
||||
border-radius: 10px;
|
||||
background: #f7faff;
|
||||
border: 1px solid #eaf0fa;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
font-size: 10.5px;
|
||||
color: #94a3b8;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
&--muted {
|
||||
background: transparent;
|
||||
border-style: dashed;
|
||||
|
||||
strong {
|
||||
color: #475569;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.track {
|
||||
margin-top: 24px;
|
||||
|
||||
&__rail {
|
||||
position: relative;
|
||||
height: 4px;
|
||||
margin: 46px 6px 0;
|
||||
border-radius: 999px;
|
||||
background: #e9eef7;
|
||||
}
|
||||
|
||||
&__fill {
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(90deg, #93c5fd, #2563eb);
|
||||
transition: width 0.25s linear;
|
||||
}
|
||||
|
||||
&__node {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
border: 2px solid #cbd5e1;
|
||||
transform: translate(-50%, -50%);
|
||||
transition: all 0.25s ease;
|
||||
|
||||
&.is-done {
|
||||
border-color: #2563eb;
|
||||
background: #2563eb;
|
||||
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
|
||||
}
|
||||
}
|
||||
|
||||
&__runner {
|
||||
position: absolute;
|
||||
bottom: -6px;
|
||||
transform: translateX(-58%);
|
||||
transition: left 0.25s linear;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&__stages {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 16px -6px 0;
|
||||
|
||||
span {
|
||||
font-size: 10.5px;
|
||||
color: #94a3b8;
|
||||
letter-spacing: 0.02em;
|
||||
transition: color 0.2s ease;
|
||||
|
||||
&.is-done {
|
||||
color: #3b82f6;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
color: #1d4ed8;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
400
src/views/test/components/VariantD.vue
Normal file
400
src/views/test/components/VariantD.vue
Normal file
@ -0,0 +1,400 @@
|
||||
<template>
|
||||
<div class="dialog-d">
|
||||
<header class="dialog-d__head">
|
||||
<span class="dialog-d__icon">
|
||||
<svg viewBox="0 0 24 24" fill="none">
|
||||
<path d="M12 3v4M12 17v4M3 12h4M17 12h4" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
|
||||
<circle cx="12" cy="12" r="4.2" stroke="currentColor" stroke-width="2" />
|
||||
</svg>
|
||||
</span>
|
||||
<div class="dialog-d__titles">
|
||||
<h3>波次策略快速扫描</h3>
|
||||
<p>系统正在后台处理,可最小化窗口</p>
|
||||
</div>
|
||||
<button class="dialog-d__close" type="button" aria-label="关闭">
|
||||
<svg viewBox="0 0 12 12" fill="none">
|
||||
<path d="M1 1L11 11M11 1L1 11" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<div class="dialog-d__body">
|
||||
<div class="form">
|
||||
<div class="form__field">
|
||||
<span>仓库</span>
|
||||
<div class="form__input">深圳保税仓</div>
|
||||
</div>
|
||||
<div class="form__field">
|
||||
<span>波次策略</span>
|
||||
<div class="form__input">三单波次 · 自动</div>
|
||||
</div>
|
||||
<div class="form__field">
|
||||
<span>订单范围</span>
|
||||
<div class="form__input">全部待处理(2,040 单)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel__top">
|
||||
<div class="panel__percent">{{ percent }}<span>%</span></div>
|
||||
<div class="panel__status">
|
||||
<strong>{{ statusText }}</strong>
|
||||
<span>已处理 {{ processed.toLocaleString() }} / {{ total.toLocaleString() }} 单</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-rail">
|
||||
<div class="d-rail__track">
|
||||
<div class="d-rail__fill" :style="{ width: `${progress}%` }"></div>
|
||||
</div>
|
||||
<div class="d-rail__runner" :style="{ left: `${runnerLeft}%` }">
|
||||
<CheetahRunner
|
||||
mode="ghost"
|
||||
:running="running && progress < 100"
|
||||
:width="110"
|
||||
:speed="1"
|
||||
color="#1d4ed8"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel__stats">
|
||||
<div>
|
||||
<span>匹配</span>
|
||||
<b>{{ matched.toLocaleString() }}</b>
|
||||
</div>
|
||||
<div>
|
||||
<span>未匹配</span>
|
||||
<b>{{ unmatched.toLocaleString() }}</b>
|
||||
</div>
|
||||
<div>
|
||||
<span>预计剩余</span>
|
||||
<b>{{ eta }}<em>s</em></b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="dialog-d__foot">
|
||||
<span class="hint">
|
||||
<svg viewBox="0 0 14 14" fill="none">
|
||||
<rect x="2.2" y="6" width="9.6" height="6" rx="1.6" stroke="currentColor" stroke-width="1.2" />
|
||||
<path d="M4.6 6V4.4a2.4 2.4 0 014.8 0V6" stroke="currentColor" stroke-width="1.2" />
|
||||
</svg>
|
||||
扫描期间请勿关闭窗口
|
||||
</span>
|
||||
<div class="actions">
|
||||
<button class="btn btn--ghost" type="button">后台运行</button>
|
||||
<button class="btn btn--primary" type="button">{{ percent >= 100 ? '完成' : '暂停扫描' }}</button>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import CheetahRunner from './CheetahRunner.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
progress: number
|
||||
running: boolean
|
||||
}>()
|
||||
|
||||
const percent = computed(() => Math.round(props.progress))
|
||||
const runnerLeft = computed(() => Math.min(92, Math.max(8, props.progress)))
|
||||
|
||||
const total = 2040
|
||||
const processed = computed(() => Math.round((props.progress / 100) * total))
|
||||
const matched = computed(() => Math.round(processed.value * 0.86))
|
||||
const unmatched = computed(() => processed.value - matched.value)
|
||||
const eta = computed(() => Math.max(0, Math.round(((100 - props.progress) / 100) * 13)))
|
||||
|
||||
const statusText = computed(() => {
|
||||
if (props.progress >= 100) return '扫描完成'
|
||||
if (props.running) return '正在匹配波次策略…'
|
||||
return '任务已暂停'
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-d {
|
||||
background: #fff;
|
||||
border: 1px solid #e8eef7;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 24px 48px -32px rgba(15, 23, 42, 0.4);
|
||||
color: #0f172a;
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 18px 22px;
|
||||
border-bottom: 1px solid #eef3fa;
|
||||
}
|
||||
|
||||
&__icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
flex: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 10px;
|
||||
background: #eff6ff;
|
||||
color: #2563eb;
|
||||
|
||||
svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
&__titles {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 3px 0 0;
|
||||
font-size: 11.5px;
|
||||
color: #94a3b8;
|
||||
}
|
||||
}
|
||||
|
||||
&__close {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
flex: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
color: #94a3b8;
|
||||
cursor: pointer;
|
||||
transition: all 0.16s ease;
|
||||
|
||||
svg {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: #f1f5f9;
|
||||
color: #475569;
|
||||
}
|
||||
}
|
||||
|
||||
&__body {
|
||||
padding: 20px 22px 4px;
|
||||
}
|
||||
|
||||
&__foot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 16px 22px 18px;
|
||||
border-top: 1px solid #eef3fa;
|
||||
background: #fbfdff;
|
||||
}
|
||||
}
|
||||
|
||||
.form {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 12px;
|
||||
|
||||
&__field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
|
||||
> span {
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
}
|
||||
}
|
||||
|
||||
&__input {
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 11px;
|
||||
border: 1px solid #e6ecf5;
|
||||
border-radius: 9px;
|
||||
background: #fff;
|
||||
font-size: 12.5px;
|
||||
color: #1e293b;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.panel {
|
||||
margin-top: 18px;
|
||||
padding: 16px 18px 14px;
|
||||
border: 1px solid #dce8fb;
|
||||
border-radius: 14px;
|
||||
background: linear-gradient(160deg, #f6faff 0%, #eef4ff 100%);
|
||||
|
||||
&__top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
&__percent {
|
||||
font-size: 34px;
|
||||
line-height: 1;
|
||||
font-weight: 650;
|
||||
letter-spacing: -0.03em;
|
||||
color: #1d4ed8;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
span {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #64748b;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
&__status {
|
||||
text-align: right;
|
||||
|
||||
strong {
|
||||
display: block;
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
font-size: 11px;
|
||||
color: #64748b;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
}
|
||||
|
||||
&__stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
margin-top: 16px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px dashed #d8e4f7;
|
||||
|
||||
> div {
|
||||
span {
|
||||
display: block;
|
||||
font-size: 10.5px;
|
||||
color: #94a3b8;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
b {
|
||||
font-size: 15px;
|
||||
font-weight: 650;
|
||||
color: #1e293b;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
font-size: 10.5px;
|
||||
font-weight: 500;
|
||||
color: #94a3b8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.d-rail {
|
||||
position: relative;
|
||||
height: 6px;
|
||||
margin: 52px 0 0;
|
||||
|
||||
&__track {
|
||||
height: 6px;
|
||||
border-radius: 999px;
|
||||
background: #dbe6f8;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&__fill {
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(90deg, #93c5fd, #2563eb);
|
||||
transition: width 0.25s linear;
|
||||
}
|
||||
|
||||
&__runner {
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
transform: translateX(-58%);
|
||||
transition: left 0.25s linear;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.hint {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
|
||||
svg {
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
height: 34px;
|
||||
padding: 0 16px;
|
||||
border-radius: 9px;
|
||||
font-size: 12.5px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.16s ease;
|
||||
border: 1px solid transparent;
|
||||
|
||||
&--ghost {
|
||||
background: #fff;
|
||||
border-color: #dbe4f0;
|
||||
color: #475569;
|
||||
|
||||
&:hover {
|
||||
border-color: #bfd4ef;
|
||||
color: #1e293b;
|
||||
}
|
||||
}
|
||||
|
||||
&--primary {
|
||||
background: linear-gradient(135deg, #3b82f6, #2563eb);
|
||||
color: #fff;
|
||||
box-shadow: 0 8px 16px -10px rgba(37, 99, 235, 0.9);
|
||||
|
||||
&:hover {
|
||||
filter: brightness(1.05);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
432
src/views/test/index.vue
Normal file
432
src/views/test/index.vue
Normal file
@ -0,0 +1,432 @@
|
||||
<template>
|
||||
<div class="test-page">
|
||||
<header class="page-head">
|
||||
<div class="page-head__eyebrow">UI Refresh · Loading Dialog</div>
|
||||
<h1>加载弹窗 · 表单与进度条重构</h1>
|
||||
<p>
|
||||
以「波次策略快速扫描」的进度弹窗为样本:表单做减法、信息分层,进度条改为豹子奔跑动画。
|
||||
简约蓝调,流畅线条 + 干练的运动感。
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<div class="toolbar">
|
||||
<div class="toolbar__state">
|
||||
<span class="pulse" :class="{ 'is-paused': !running }"></span>
|
||||
{{ running ? '演示播放中' : '已暂停' }}
|
||||
</div>
|
||||
<div class="toolbar__actions">
|
||||
<div class="speed">
|
||||
<button
|
||||
v-for="item in speedOptions"
|
||||
:key="item"
|
||||
type="button"
|
||||
:class="{ 'is-active': speed === item }"
|
||||
@click="speed = item"
|
||||
>
|
||||
{{ item }}x
|
||||
</button>
|
||||
</div>
|
||||
<button class="tool-btn" type="button" @click="running = !running">
|
||||
{{ running ? '暂停' : '继续' }}
|
||||
</button>
|
||||
<button class="tool-btn tool-btn--primary" type="button" @click="resetAll">重新播放</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="variants">
|
||||
<article v-for="item in variantList" :key="item.key" class="variant-card">
|
||||
<header class="variant-card__bar">
|
||||
<div class="variant-card__ident">
|
||||
<span class="variant-card__no">{{ item.no }}</span>
|
||||
<div>
|
||||
<strong>{{ item.name }}</strong>
|
||||
<small>{{ item.desc }}</small>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ghost-btn" type="button" @click="openPreview(item.key)">弹窗预览</button>
|
||||
</header>
|
||||
<div class="variant-card__body">
|
||||
<component :is="item.component" :progress="progress[item.key]" :running="running" />
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<p class="footnote">
|
||||
豹子为纯 SVG 剪影 + CSS 关键帧(四腿交替摆动、躯干起伏、尾巴摆动、速度线与扬尘),无图片与第三方依赖;
|
||||
进度数值为演示模拟。
|
||||
</p>
|
||||
|
||||
<el-dialog
|
||||
v-model="previewVisible"
|
||||
:title="previewTitle"
|
||||
width="min(660px, 94vw)"
|
||||
align-center
|
||||
append-to-body
|
||||
>
|
||||
<div v-if="previewComponent" class="preview-body">
|
||||
<component :is="previewComponent" :progress="previewProgress" :running="running" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, markRaw, onBeforeUnmount, onMounted, reactive, ref } from 'vue'
|
||||
import type { Component } from 'vue'
|
||||
import VariantA from './components/VariantA.vue'
|
||||
import VariantB from './components/VariantB.vue'
|
||||
import VariantC from './components/VariantC.vue'
|
||||
import VariantD from './components/VariantD.vue'
|
||||
|
||||
const KEYS = ['a', 'b', 'c', 'd'] as const
|
||||
type VariantKey = (typeof KEYS)[number]
|
||||
|
||||
const variantList: Array<{
|
||||
key: VariantKey
|
||||
no: string
|
||||
name: string
|
||||
desc: string
|
||||
component: Component
|
||||
}> = [
|
||||
{
|
||||
key: 'a',
|
||||
no: 'A',
|
||||
name: '极简流线',
|
||||
desc: '细轨 · 豹子剪影 · 大号百分比',
|
||||
component: markRaw(VariantA)
|
||||
},
|
||||
{
|
||||
key: 'b',
|
||||
no: 'B',
|
||||
name: '数据仪表',
|
||||
desc: '蓝调头部 · 粗轨斜纹 · 高对比剪影',
|
||||
component: markRaw(VariantB)
|
||||
},
|
||||
{
|
||||
key: 'c',
|
||||
no: 'C',
|
||||
name: '分段节点',
|
||||
desc: '五段流程 · 节点点亮 · 轻量剪影',
|
||||
component: markRaw(VariantC)
|
||||
},
|
||||
{
|
||||
key: 'd',
|
||||
no: 'D',
|
||||
name: '完整弹窗',
|
||||
desc: '表单 + 蓝色进度面板 + 操作区',
|
||||
component: markRaw(VariantD)
|
||||
}
|
||||
]
|
||||
|
||||
const variantMap: Record<VariantKey, Component> = {
|
||||
a: markRaw(VariantA),
|
||||
b: markRaw(VariantB),
|
||||
c: markRaw(VariantC),
|
||||
d: markRaw(VariantD)
|
||||
}
|
||||
|
||||
const progress = reactive<Record<VariantKey, number>>({ a: 0, b: 0, c: 0, d: 0 })
|
||||
const completedAt = reactive<Record<VariantKey, number>>({ a: 0, b: 0, c: 0, d: 0 })
|
||||
|
||||
const running = ref(true)
|
||||
const speed = ref(1)
|
||||
const speedOptions = [0.6, 1, 1.6]
|
||||
|
||||
let timer: ReturnType<typeof globalThis.setInterval> | null = null
|
||||
|
||||
function tick() {
|
||||
if (!running.value) return
|
||||
const now = Date.now()
|
||||
KEYS.forEach((key, index) => {
|
||||
const current = progress[key]
|
||||
if (current >= 100) {
|
||||
if (!completedAt[key]) completedAt[key] = now
|
||||
if (now - completedAt[key] >= 1600) {
|
||||
progress[key] = 0
|
||||
completedAt[key] = 0
|
||||
}
|
||||
return
|
||||
}
|
||||
const rate = (0.8 + index * 0.16) * speed.value
|
||||
progress[key] = Math.min(100, current + rate * (0.65 + Math.random() * 0.7))
|
||||
})
|
||||
}
|
||||
|
||||
function resetAll() {
|
||||
KEYS.forEach((key) => {
|
||||
progress[key] = 0
|
||||
completedAt[key] = 0
|
||||
})
|
||||
running.value = true
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
timer = globalThis.setInterval(tick, 120)
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (timer) globalThis.clearInterval(timer)
|
||||
})
|
||||
|
||||
const previewVisible = ref(false)
|
||||
const previewKey = ref<VariantKey | null>(null)
|
||||
|
||||
const previewComponent = computed(() => (previewKey.value ? variantMap[previewKey.value] : null))
|
||||
const previewProgress = computed(() => (previewKey.value ? progress[previewKey.value] : 0))
|
||||
const previewTitle = computed(() => {
|
||||
const item = variantList.find((v) => v.key === previewKey.value)
|
||||
return item ? `${item.no} · ${item.name} — ${item.desc}` : ''
|
||||
})
|
||||
|
||||
function openPreview(key: VariantKey) {
|
||||
previewKey.value = key
|
||||
previewVisible.value = true
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.test-page {
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding: 44px clamp(20px, 4vw, 56px) 60px;
|
||||
background:
|
||||
radial-gradient(900px 420px at 12% -8%, #e8f1ff 0%, rgba(232, 241, 255, 0) 60%),
|
||||
radial-gradient(760px 380px at 92% 0%, #eef4ff 0%, rgba(238, 244, 255, 0) 55%),
|
||||
#f6f9fe;
|
||||
color: #0f172a;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||
}
|
||||
|
||||
.page-head {
|
||||
max-width: 900px;
|
||||
|
||||
&__eyebrow {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.22em;
|
||||
text-transform: uppercase;
|
||||
color: #3b82f6;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 12px 0 0;
|
||||
font-size: clamp(24px, 2.6vw, 34px);
|
||||
font-weight: 650;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 14px 0 0;
|
||||
font-size: 13.5px;
|
||||
line-height: 1.85;
|
||||
color: #64748b;
|
||||
}
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin-top: 26px;
|
||||
padding: 10px 14px;
|
||||
border: 1px solid #e5edf8;
|
||||
border-radius: 14px;
|
||||
background: rgba(255, 255, 255, 0.72);
|
||||
backdrop-filter: blur(8px);
|
||||
|
||||
&__state {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 12px;
|
||||
color: #475569;
|
||||
}
|
||||
|
||||
&__actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.pulse {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: #2563eb;
|
||||
animation: page-pulse 1.6s ease-out infinite;
|
||||
|
||||
&.is-paused {
|
||||
background: #94a3b8;
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
.speed {
|
||||
display: inline-flex;
|
||||
padding: 2px;
|
||||
border-radius: 999px;
|
||||
background: #eef3fb;
|
||||
|
||||
button {
|
||||
height: 26px;
|
||||
padding: 0 11px;
|
||||
border: none;
|
||||
border-radius: 999px;
|
||||
background: transparent;
|
||||
color: #64748b;
|
||||
font-size: 11.5px;
|
||||
cursor: pointer;
|
||||
transition: all 0.16s ease;
|
||||
|
||||
&.is-active {
|
||||
background: #fff;
|
||||
color: #1d4ed8;
|
||||
font-weight: 600;
|
||||
box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.18);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tool-btn {
|
||||
height: 30px;
|
||||
padding: 0 14px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid #dbe4f0;
|
||||
background: #fff;
|
||||
color: #475569;
|
||||
font-size: 11.5px;
|
||||
cursor: pointer;
|
||||
transition: all 0.16s ease;
|
||||
|
||||
&:hover {
|
||||
border-color: #bfd4ef;
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
&--primary {
|
||||
border-color: transparent;
|
||||
background: linear-gradient(135deg, #3b82f6, #2563eb);
|
||||
color: #fff;
|
||||
box-shadow: 0 8px 16px -10px rgba(37, 99, 235, 0.85);
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
filter: brightness(1.05);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.variants {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 22px;
|
||||
margin-top: 22px;
|
||||
}
|
||||
|
||||
.variant-card {
|
||||
border: 1px solid #e7eef8;
|
||||
border-radius: 18px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
box-shadow: 0 20px 40px -34px rgba(15, 23, 42, 0.5);
|
||||
|
||||
&__bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 13px 16px;
|
||||
border-bottom: 1px dashed #e8eef7;
|
||||
}
|
||||
|
||||
&__ident {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
|
||||
strong {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
small {
|
||||
display: block;
|
||||
margin-top: 2px;
|
||||
font-size: 11.5px;
|
||||
color: #94a3b8;
|
||||
}
|
||||
}
|
||||
|
||||
&__no {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
flex: none;
|
||||
border-radius: 7px;
|
||||
background: #eff6ff;
|
||||
color: #2563eb;
|
||||
font-size: 12px;
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
&__body {
|
||||
padding: 22px;
|
||||
background: linear-gradient(180deg, #fbfdff, #f5f9ff);
|
||||
}
|
||||
}
|
||||
|
||||
.ghost-btn {
|
||||
height: 28px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid #dbe4f0;
|
||||
border-radius: 999px;
|
||||
background: #fff;
|
||||
color: #2563eb;
|
||||
font-size: 11.5px;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: all 0.16s ease;
|
||||
|
||||
&:hover {
|
||||
border-color: #bfd4ef;
|
||||
background: #eff6ff;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-body {
|
||||
padding: 2px 0 4px;
|
||||
}
|
||||
|
||||
.footnote {
|
||||
max-width: 900px;
|
||||
margin: 26px auto 0;
|
||||
font-size: 12px;
|
||||
line-height: 1.8;
|
||||
color: #94a3b8;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 1120px) {
|
||||
.variants {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes page-pulse {
|
||||
0% {
|
||||
box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
|
||||
}
|
||||
70% {
|
||||
box-shadow: 0 0 0 7px rgba(37, 99, 235, 0);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
x
Reference in New Issue
Block a user