CrossingDetailPanel.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  1. <template>
  2. <div class="crossing-detail-panel">
  3. <div class="detail-panel-left">
  4. <div class="intersection-video-wrap">
  5. <IntersectionMapVideos :mapData="intersectionData" :videoUrls="currentRoute.cornerVideos" />
  6. </div>
  7. <div class="signal-timing-wrap">
  8. <div class="header">
  9. <div class="title-area">
  10. <span class="main-title">方案状态</span>
  11. <span class="sub-info">(周期: {{ cycleLength }} 相位差: {{ phaseDiff }} 协调时间: {{ coordTime }})</span>
  12. </div>
  13. <div class="checkbox-area">
  14. <div class="checkbox-mock" :class="{ 'is-checked': followPhase }"
  15. @click="followPhase = !followPhase">
  16. <span v-if="followPhase" style="color: #fff; font-size: 12px; margin-left: 1px;">✓</span>
  17. </div>
  18. <span>跟随相位</span>
  19. </div>
  20. </div>
  21. <SignalTimingChart :cycleLength="cycleLength" :currentTime="currentSec" :phaseData="mockPhaseData" />
  22. </div>
  23. </div>
  24. <div class="detail-panel-right">
  25. <form class="detail-right-form" @submit.prevent>
  26. <div class="form-group">
  27. <div class="control-method">
  28. <div class="control-label-wrap">
  29. <span class="control-label">控制方式</span>
  30. <div class="control-operation">
  31. <div class="operation-btn"
  32. :class="{ 'is-active': isManualMode }"
  33. @click="toggleManualMode">
  34. {{ isManualMode ? '退出手动控制' : '手动控制' }}
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="form-interactive-area" :class="{ 'is-disabled': !isManualMode }">
  40. <div class="control-method-content">
  41. <SegmentedRadio v-model="currentMethod" :options="controlMethodOptions" size="auto" />
  42. </div>
  43. <div class="control-scheme">
  44. <div class="control-label-wrap">
  45. <span class="control-label">控制方案</span>
  46. <DropdownSelect v-model="currentScheme" :options="schemeOptions" size="auto" />
  47. </div>
  48. <div class="current-stage">
  49. <div class="current-stage-warp">
  50. <div class="current-stage-label">当前阶段:</div>
  51. <div v-for="(item, index) in currentStageList" :key="index" class="stage-item-wrapper">
  52. <div
  53. class="phase-box"
  54. :class="{ 'is-active': item.value === currentStage }"
  55. @click="currentStage = item.value"
  56. >
  57. <img :src="item.img" alt="stage" class="phase-image" />
  58. </div>
  59. <input
  60. type="number"
  61. v-model.number="item.time"
  62. class="stage-input"
  63. :disabled="currentMethod !== 'temp'"
  64. :title="currentMethod !== 'temp' ? '仅临时方案可修改' : '修改阶段时间'"
  65. />
  66. <span class="unit">s</span>
  67. </div>
  68. </div>
  69. </div>
  70. <transition name="fade">
  71. <div class="lock-time" v-if="showLockTime">
  72. <div class="lock-time-label-wrap glow-header">
  73. <div class="lock-time-label">锁定时间</div>
  74. <div class="lock-time-close" @click="showLockTime = false">✕</div>
  75. </div>
  76. <div class="lock-time-options">
  77. <div class="lock-time-option">
  78. <label>
  79. <input type="radio" v-model="lockTimeType" value="continuous" /> 持续放行
  80. </label>
  81. </div>
  82. <div class="lock-time-option">
  83. <label>
  84. <input type="radio" v-model="lockTimeType" value="timer" /> 放行
  85. <DropdownSelect placeholder="锁定时间" v-model="currentLocktime" :options="locktimeOptions" size="auto"
  86. @click.native.prevent />
  87. 秒解锁
  88. </label>
  89. </div>
  90. </div>
  91. </div>
  92. </transition>
  93. </div>
  94. </div>
  95. <div class="button-group" v-show="isManualMode">
  96. <div>
  97. <button type="button" class="btn btn-cancel" @click="onCancel()">取消</button>
  98. <button type="button" class="btn btn-confirm" @click="onConfirm()">确认</button>
  99. </div>
  100. </div>
  101. </div>
  102. </form>
  103. </div>
  104. </div>
  105. </template>
  106. <script>
  107. import SignalTimingChart from '@/components/ui/SignalTimingChart.vue';
  108. import IntersectionMapVideos from '@/components/ui/IntersectionMapVideos.vue';
  109. import SegmentedRadio from '@/components/ui/SegmentedRadio.vue';
  110. import DropdownSelect from '@/components/ui/DropdownSelect.vue';
  111. import { apiGetCrossingDetailData } from '@/api';
  112. export default {
  113. name: 'CrossingPanel',
  114. components: {
  115. SignalTimingChart,
  116. IntersectionMapVideos,
  117. SegmentedRadio,
  118. DropdownSelect
  119. },
  120. data() {
  121. return {
  122. // 核心状态控制
  123. isManualMode: false, // 是否处于手动控制模式
  124. showLockTime: false, // 是否显示锁定时间弹窗
  125. lockTimeType: 'continuous', // 锁定时间类型
  126. followPhase: false,
  127. intersectionData: {},
  128. currentRoute: {},
  129. cycleLength: 140,
  130. currentSec: 15,
  131. phaseDiff: 0,
  132. coordTime: 0,
  133. mockPhaseData: [],
  134. // 控制方式数据
  135. controlMethodOptions: [],
  136. currentMethod: 'temp',
  137. currentScheme: 'early_peak',
  138. schemeOptions: [],
  139. currentLocktime: 50,
  140. locktimeOptions: [],
  141. currentStage: '1',
  142. // 补充了 time 属性,用于双向绑定输入框的时间
  143. currentStageList: []
  144. }
  145. },
  146. watch: {
  147. // 监听控制方式切换
  148. currentMethod(newVal) {
  149. // 需求4:切换步进方案策略时,出现锁定时间弹窗
  150. if (newVal === 'step') {
  151. this.showLockTime = true;
  152. } else {
  153. this.showLockTime = false;
  154. }
  155. // 模拟需求1:根据不同模式,切换对应的控制方案数据 (Mock 逻辑)
  156. this.updateSchemeDataByMethod(newVal);
  157. }
  158. },
  159. mounted() {
  160. this.initScaleObserver();
  161. this.loadData();
  162. },
  163. beforeDestroy() {
  164. if (this._ro) this._ro.disconnect();
  165. },
  166. methods: {
  167. initScaleObserver() {
  168. const ro = new ResizeObserver(entries => {
  169. const { width } = entries[0].contentRect;
  170. const s = Math.min(width / 1315, 1);
  171. this.$el.style.setProperty('--s', s);
  172. });
  173. ro.observe(this.$el);
  174. this._ro = ro;
  175. },
  176. async loadData() {
  177. const nodeId = this.$attrs.id || this.id;
  178. const data = await apiGetCrossingDetailData(nodeId);
  179. if (data) {
  180. this.currentRoute = data.currentRoute || {};
  181. this.intersectionData = data.intersectionData || {};
  182. this.mockPhaseData = data.phaseData || [];
  183. this.cycleLength = data.cycleLength || 140;
  184. this.currentSec = data.currentTime || 0;
  185. this.phaseDiff = data.phaseDiff || 0;
  186. this.coordTime = data.coordTime || 0;
  187. this.currentStageList = data.stageList || [];
  188. this.schemeOptions = data.schemeOptions || [];
  189. if (data.currentScheme) this.currentScheme = data.currentScheme;
  190. if (data.controlMethodOptions) this.controlMethodOptions = data.controlMethodOptions;
  191. if (data.currentMethod) this.currentMethod = data.currentMethod;
  192. if (data.locktimeOptions) this.locktimeOptions = data.locktimeOptions;
  193. }
  194. },
  195. // 切换手动控制模式
  196. toggleManualMode() {
  197. this.isManualMode = !this.isManualMode;
  198. if (!this.isManualMode) {
  199. // 如果退出手动模式,可选择重置表单状态
  200. this.showLockTime = false;
  201. }
  202. },
  203. // 模拟:根据控制方式改变下拉方案的数据
  204. updateSchemeDataByMethod(method) {
  205. if (method === 'system') {
  206. this.schemeOptions = [
  207. { label: '系统优化方案A', value: 'sys_a' },
  208. { label: '系统优化方案B', value: 'sys_b' }
  209. ];
  210. this.currentScheme = 'sys_a';
  211. } else {
  212. this.schemeOptions = [
  213. { label: '早高峰', value: 'early_peak' },
  214. { label: '晚高峰', value: 'evening_peak' },
  215. { label: '平峰', value: 'normal' }
  216. ];
  217. this.currentScheme = 'early_peak';
  218. }
  219. },
  220. // 取消按钮
  221. onCancel() {
  222. this.isManualMode = false;
  223. this.showLockTime = false;
  224. // 可以在此添加回滚初始数据的逻辑
  225. },
  226. // 需求5:点击确认按钮提交 + 表单验证
  227. onConfirm() {
  228. // 验证1:临时方案必须检查时间是否有效
  229. if (this.currentMethod === 'temp') {
  230. const isInvalid = this.currentStageList.some(item => !item.time || item.time <= 0);
  231. if (isInvalid) {
  232. alert('请输入有效的阶段时间 (必须大于0)!');
  233. return;
  234. }
  235. }
  236. // 验证2:步进方案必须选择锁定类型
  237. if (this.currentMethod === 'step') {
  238. if (this.lockTimeType === 'timer' && !this.currentLocktime) {
  239. alert('请选择解锁时间!');
  240. return;
  241. }
  242. }
  243. // 构造提交参数
  244. const submitData = {
  245. method: this.currentMethod,
  246. scheme: this.currentScheme,
  247. stages: this.currentMethod === 'temp' ? this.currentStageList : null,
  248. lockConfig: this.currentMethod === 'step' ? {
  249. type: this.lockTimeType,
  250. time: this.lockTimeType === 'timer' ? this.currentLocktime : null
  251. } : null
  252. };
  253. console.log('提交的数据:', submitData);
  254. // 提交完成后可根据业务决定是否退出手动模式
  255. // this.isManualMode = false;
  256. }
  257. }
  258. }
  259. </script>
  260. <style scoped>
  261. .crossing-detail-panel {
  262. --s: 1;
  263. display: flex;
  264. flex-direction: row;
  265. gap: clamp(4px, calc(var(--s) * 12px), 12px);
  266. height: 100%;
  267. min-height: 0;
  268. overflow: hidden;
  269. }
  270. /* ===== 左侧:还原原始固定 55% 占比 ===== */
  271. .detail-panel-left {
  272. display: flex;
  273. flex-direction: column;
  274. flex: 0 0 55%;
  275. min-height: 0;
  276. min-width: 0;
  277. }
  278. /* ===== 右侧:flex 列容器 + 滚动兜底 ===== */
  279. .detail-panel-right {
  280. flex: 1;
  281. min-width: 0;
  282. min-height: 0;
  283. overflow-y: auto;
  284. overflow-x: hidden;
  285. display: flex;
  286. flex-direction: column;
  287. }
  288. .intersection-video-wrap {
  289. width: 100%;
  290. min-height: 0;
  291. flex: 2;
  292. }
  293. .signal-timing-wrap {
  294. flex: 1;
  295. min-height: 0;
  296. height: 120px;
  297. flex-shrink: 0;
  298. width: 100%;
  299. min-width: 0;
  300. background-color: transparent;
  301. box-sizing: border-box;
  302. position: relative;
  303. display: flex;
  304. flex-direction: column;
  305. overflow: hidden;
  306. padding: clamp(3px, calc(var(--s) * 10px), 10px);
  307. }
  308. .header {
  309. display: flex;
  310. justify-content: space-between;
  311. align-items: center;
  312. margin-bottom: clamp(2px, calc(var(--s) * 6px), 15px);
  313. color: #e0e6f1;
  314. flex-shrink: 0;
  315. }
  316. .title-area {
  317. font-size: clamp(9px, calc(var(--s) * 16px), 16px);
  318. }
  319. .main-title {
  320. font-size: clamp(10px, calc(var(--s) * 18px), 18px);
  321. font-weight: bold;
  322. margin-right: clamp(4px, calc(var(--s) * 10px), 10px);
  323. }
  324. .sub-info {
  325. font-size: clamp(8px, calc(var(--s) * 12px), 12px);
  326. opacity: 0.8;
  327. }
  328. .checkbox-area {
  329. font-size: clamp(8px, calc(var(--s) * 12px), 12px);
  330. display: flex;
  331. align-items: center;
  332. cursor: pointer;
  333. opacity: 0.7;
  334. user-select: none;
  335. }
  336. .checkbox-area:hover {
  337. opacity: 1;
  338. }
  339. .checkbox-mock {
  340. width: clamp(10px, calc(var(--s) * 14px), 14px);
  341. height: clamp(10px, calc(var(--s) * 14px), 14px);
  342. border: 1px solid rgba(255, 255, 255, 0.5);
  343. margin-right: clamp(3px, calc(var(--s) * 6px), 6px);
  344. border-radius: 2px;
  345. display: flex;
  346. align-items: center;
  347. justify-content: center;
  348. }
  349. .checkbox-mock.is-checked {
  350. background-color: #4da8ff;
  351. border-color: #4da8ff;
  352. }
  353. .chart-container {
  354. width: 100%;
  355. min-width: 0;
  356. flex: 1;
  357. min-height: 50px;
  358. overflow: hidden;
  359. }
  360. .loading-overlay {
  361. flex: 1;
  362. display: flex;
  363. align-items: center;
  364. justify-content: center;
  365. color: #758599;
  366. font-size: 14px;
  367. }
  368. /* ===== 右侧表单内层容器 ===== */
  369. .detail-right-form {
  370. flex: 1;
  371. min-height: 0;
  372. display: flex;
  373. flex-direction: column;
  374. }
  375. .form-group {
  376. flex: 1;
  377. min-height: 0;
  378. display: flex;
  379. flex-direction: column;
  380. }
  381. /** 控制方法 */
  382. .control-method {
  383. color: #ffffff;
  384. flex-shrink: 0;
  385. }
  386. .control-label-wrap {
  387. display: flex;
  388. align-items: center;
  389. margin-bottom: clamp(4px, calc(var(--s) * 10px), 20px);
  390. column-gap: clamp(4px, calc(var(--s) * 10px), 20px);
  391. }
  392. .control-label {
  393. font-size: clamp(12px, calc(var(--s) * 22px), 28px);
  394. color: #ffffff;
  395. white-space: nowrap;
  396. }
  397. .control-label-wrap span {
  398. display: inline-block;
  399. }
  400. .operation-btn {
  401. font-size: clamp(9px, calc(var(--s) * 14px), 14px);
  402. cursor: pointer;
  403. user-select: none;
  404. }
  405. .operation-btn:hover {
  406. text-decoration: underline;
  407. }
  408. .operation-btn.is-active {
  409. text-decoration: underline;
  410. }
  411. .control-method .control-label-wrap {
  412. justify-content: space-between;
  413. }
  414. /* 控制方式按钮组:设置 font-size 供 SegmentedRadio size="auto" 继承 */
  415. .control-method-content {
  416. font-size: clamp(9px, calc(var(--s) * 14px), 14px);
  417. }
  418. .control-scheme {
  419. margin-top: clamp(4px, calc(var(--s) * 10px), 20px);
  420. /* 设置 font-size 供 DropdownSelect size="auto" 继承 */
  421. font-size: clamp(9px, calc(var(--s) * 14px), 14px);
  422. }
  423. .lock-time {
  424. width: 80%;
  425. border-radius: 8px;
  426. box-shadow:
  427. inset 0px 0px 10px 0px rgba(88, 146, 255, 0.4),
  428. inset 20px 0px 30px -10px rgba(88, 146, 255, 0.15);
  429. }
  430. .lock-time-label-wrap {
  431. display: flex;
  432. align-items: center;
  433. justify-content: space-between;
  434. padding: clamp(4px, calc(var(--s) * 8px), 10px);
  435. border-radius: 8px 8px 0 0;
  436. color: #ffffff;
  437. }
  438. .lock-time-label {
  439. font-size: clamp(10px, calc(var(--s) * 16px), 16px);
  440. color: #ffffff;
  441. }
  442. .lock-time-options {
  443. display: flex;
  444. flex-direction: column;
  445. row-gap: clamp(4px, calc(var(--s) * 10px), 10px);
  446. font-size: clamp(9px, calc(var(--s) * 14px), 14px);
  447. padding: clamp(4px, calc(var(--s) * 10px), 10px);
  448. color: #ffffff;
  449. }
  450. .lock-time-option {
  451. font-size: clamp(9px, calc(var(--s) * 14px), 14px);
  452. }
  453. .lock-time-close {
  454. cursor: pointer;
  455. }
  456. .glow-header {
  457. background: linear-gradient(180deg,
  458. rgba(65, 115, 205, 0.6) 0%,
  459. rgba(40, 70, 130, 0.1) 100%);
  460. backdrop-filter: blur(10px);
  461. }
  462. .current-stage {
  463. background-color: rgba(65, 115, 205, 0.2);
  464. border: 1px solid #3660a5;
  465. margin-bottom: clamp(4px, calc(var(--s) * 10px), 20px);
  466. display: flex;
  467. justify-content: center;
  468. }
  469. .current-stage-warp {
  470. display: flex;
  471. align-items: center;
  472. justify-content: center;
  473. flex-wrap: wrap;
  474. gap: clamp(4px, calc(var(--s) * 8px), 10px);
  475. padding: clamp(6px, calc(var(--s) * 12px), 32px);
  476. color: #ffffff;
  477. }
  478. .current-stage-label {
  479. font-size: clamp(9px, calc(var(--s) * 14px), 14px);
  480. width: auto;
  481. white-space: nowrap;
  482. }
  483. .stage-input {
  484. width: clamp(32px, calc(var(--s) * 65px), 65px);
  485. border: 1px solid rgba(161,190,255,0.7);
  486. background-color: transparent;
  487. padding: clamp(2px, calc(var(--s) * 5px), 5px);
  488. color: #ffffff;
  489. text-align: center;
  490. }
  491. .phase-box {
  492. position: relative;
  493. width: clamp(30px, calc(var(--s) * 65px), 65px);
  494. height: clamp(30px, calc(var(--s) * 65px), 65px);
  495. background: #E6F0FF;
  496. border-radius: 4px;
  497. display: flex;
  498. align-items: center;
  499. justify-content: center;
  500. cursor: pointer;
  501. transition: all 0.3s ease;
  502. box-sizing: border-box;
  503. overflow: hidden;
  504. }
  505. .phase-image {
  506. width: 100%;
  507. height: 100%;
  508. object-fit: contain;
  509. display: block;
  510. }
  511. .phase-box::after {
  512. content: '';
  513. position: absolute;
  514. top: 0;
  515. left: 0;
  516. width: 100%;
  517. height: 100%;
  518. background: rgba(30, 106, 255, 0.5);
  519. opacity: 0;
  520. transition: opacity 0.3s ease;
  521. pointer-events: none;
  522. }
  523. .phase-box.is-active::after {
  524. opacity: 1;
  525. }
  526. /** 按钮 */
  527. .btn {
  528. display: inline-flex;
  529. justify-content: center;
  530. align-items: center;
  531. height: clamp(22px, calc(var(--s) * 36px), 36px);
  532. padding: 0 clamp(10px, calc(var(--s) * 32px), 32px);
  533. font-size: clamp(9px, calc(var(--s) * 14px), 14px);
  534. border-radius: 4px;
  535. cursor: pointer;
  536. user-select: none;
  537. transition: all 0.2s ease-in-out;
  538. box-sizing: border-box;
  539. }
  540. .btn-cancel {
  541. background-color: transparent;
  542. color: #d1d5db;
  543. border: 1px solid rgba(130, 150, 190, 0.4);
  544. }
  545. .btn-cancel:hover {
  546. color: #ffffff;
  547. border-color: rgba(130, 150, 190, 0.8);
  548. background-color: rgba(255, 255, 255, 0.05);
  549. }
  550. .btn-cancel:active {
  551. background-color: rgba(255, 255, 255, 0.1);
  552. }
  553. .btn-confirm {
  554. background-color: #3b74ff;
  555. color: #ffffff;
  556. border: 1px solid #3b74ff;
  557. }
  558. .btn-confirm:hover {
  559. background-color: #5a8bff;
  560. border-color: #5a8bff;
  561. box-shadow: 0 2px 8px rgba(59, 116, 255, 0.3);
  562. }
  563. .btn-confirm:active {
  564. background-color: #265bed;
  565. border-color: #265bed;
  566. box-shadow: none;
  567. }
  568. .button-group {
  569. display: flex;
  570. justify-content: flex-end;
  571. margin-top: clamp(4px, calc(var(--s) * 10px), 20px);
  572. flex-shrink: 0;
  573. }
  574. .button-group>div {
  575. display: flex;
  576. gap: clamp(4px, calc(var(--s) * 8px), 12px);
  577. }
  578. /* 禁用状态 */
  579. .form-interactive-area {
  580. transition: opacity 0.3s;
  581. flex: 1;
  582. min-height: 0;
  583. overflow-y: auto;
  584. overflow-x: hidden;
  585. }
  586. .form-interactive-area.is-disabled {
  587. opacity: 0.6;
  588. pointer-events: none;
  589. }
  590. /* 当前阶段输入框微调 */
  591. .stage-item-wrapper {
  592. display: flex;
  593. flex-direction: column;
  594. align-items: center;
  595. gap: clamp(2px, calc(var(--s) * 4px), 6px);
  596. position: relative;
  597. }
  598. .stage-input {
  599. width: clamp(32px, calc(var(--s) * 65px), 65px);
  600. border: 1px solid rgba(161,190,255,0.7);
  601. background-color: transparent;
  602. padding: clamp(2px, calc(var(--s) * 5px), 5px);
  603. color: #ffffff;
  604. text-align: center;
  605. border-radius: 4px;
  606. }
  607. .stage-input:disabled {
  608. border-color: rgba(255, 255, 255, 0.2);
  609. color: rgba(255, 255, 255, 0.5);
  610. background-color: rgba(0, 0, 0, 0.2);
  611. }
  612. .stage-item-wrapper .unit {
  613. position: absolute;
  614. bottom: clamp(2px, calc(var(--s) * 6px), 6px);
  615. right: clamp(3px, calc(var(--s) * 6px), 8px);
  616. color: #77A1FF;
  617. font-size: clamp(8px, calc(var(--s) * 12px), 12px);
  618. pointer-events: none;
  619. }
  620. /* 弹窗过渡动画 */
  621. .fade-enter-active, .fade-leave-active {
  622. transition: opacity 0.3s, transform 0.3s;
  623. }
  624. .fade-enter, .fade-leave-to {
  625. opacity: 0;
  626. transform: translateY(-10px);
  627. }
  628. /* lock-time 弹窗补充样式 */
  629. .lock-time {
  630. margin-top: clamp(4px, calc(var(--s) * 10px), 15px);
  631. background-color: rgba(20, 30, 50, 0.9);
  632. }
  633. /* 单选框基础对齐 */
  634. .lock-time-option label {
  635. display: flex;
  636. align-items: center;
  637. gap: clamp(3px, calc(var(--s) * 6px), 8px);
  638. cursor: pointer;
  639. }
  640. </style>