st-comp 0.0.13 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/auto-imports.d.ts +1 -1
  2. package/components.d.ts +2 -1
  3. package/lib/bundle.js +10145 -9151
  4. package/lib/bundle.umd.cjs +10 -12
  5. package/lib/style.css +1 -1
  6. package/lib/talib.wasm +0 -0
  7. package/package.json +4 -1
  8. package/packages/Kline/components/Contextmenu/index.vue +110 -0
  9. package/packages/Kline/components/Tips/index.vue +18 -86
  10. package/packages/Kline/formatKlineData.ts +67 -40
  11. package/packages/Kline/images/buy.svg +1 -0
  12. package/packages/Kline/images/pen.png +0 -0
  13. package/packages/Kline/images/sell.svg +1 -0
  14. package/packages/Kline/images/t.svg +1 -0
  15. package/packages/Kline/index.vue +439 -119
  16. package/packages/Kline/option.ts +316 -0
  17. package/packages/Kline/type.d.ts +192 -24
  18. package/packages/Kline/utils.ts +576 -171
  19. package/packages/Table/components/Button/index.vue +7 -0
  20. package/packages/Table/index.vue +37 -24
  21. package/packages/index.ts +0 -2
  22. package/public/talib.wasm +0 -0
  23. package/src/pages/ChartLayout/index.vue +22 -22
  24. package/src/pages/Kline/api.ts +57 -0
  25. package/src/pages/Kline/components/MultiCycleSingleVariety.vue +728 -0
  26. package/src/pages/Kline/components/SingleCycleSingleVariety.vue +663 -0
  27. package/src/pages/Kline/index.vue +85 -16
  28. package/src/router/routes.ts +0 -5
  29. package/src/style.css +75 -0
  30. package/vite.config.ts +37 -27
  31. package/vitePlugins/testRelese.ts +67 -0
  32. package/packages/Echarts/index.ts +0 -8
  33. package/packages/Echarts/index.vue +0 -113
  34. package/packages/Kline/kline_theme_dark.json +0 -30
  35. package/packages/Kline/kline_theme_light.json +0 -30
  36. package/src/components/Echarts/index.vue +0 -31
  37. package/src/pages/Echarts/index.vue +0 -12
@@ -0,0 +1,728 @@
1
+ <!-- 单品种多周期K线组件-Demo -->
2
+ <script setup lang="ts">
3
+ import { RefreshRight } from '@element-plus/icons-vue'
4
+ import { ref, onMounted, onUnmounted, watch } from 'vue'
5
+ import dayjs from 'dayjs'
6
+ import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'
7
+ import { ElMessage } from 'element-plus'
8
+ import 'element-plus/dist/index.css'
9
+ import { formatValue } from '../../../../packages/Kline/utils'
10
+ import { getSingleCycleSingleVariety, getDict, getIndicatorConfig } from '../api.ts'
11
+
12
+ dayjs.extend(isSameOrAfter)
13
+
14
+ const props = defineProps({
15
+ deBugValue: {
16
+ type: Number,
17
+ },
18
+ })
19
+
20
+ // K线组件数组[多周期]
21
+ interface multiCycleKlineType {
22
+ loading: boolean
23
+ cycle: string // 周期
24
+ cycleName: string // 周期名称
25
+ sellBuyType: number // 开平/买卖类型
26
+ sellBuyTypeName: string // 开平/买卖
27
+ klineData: any[] // K线接口数据
28
+ markData: any[] // 点位接口数据
29
+ netWorkErrorMsg: string
30
+ indicatorName: string
31
+ indicator: object
32
+ }
33
+ const multiCycleKline = ref<multiCycleKlineType[]>([])
34
+
35
+ // 筛选条件相关参数
36
+ const sellBuyTypeOptions = ref<any>([
37
+ { label: '开平', value: 1 },
38
+ { label: '买卖', value: 2 },
39
+ ])
40
+ const indicatorOptions = ref<any>([])
41
+
42
+ // 接口原生-点位数据
43
+ const originPointData = ref<any>([])
44
+
45
+ // K线组件统一入参
46
+ const lineData = ref<any>([])
47
+ const brushRange = ref<any>(['2024-01-04 10:10:00', '2024-01-04 21:40:00'])
48
+ const defaultMenuData = ref([
49
+ {
50
+ label: '画线预警',
51
+ callBack: (echartsInstance: any, cursorPenVisible: any) => createWarning(echartsInstance, cursorPenVisible),
52
+ },
53
+ ])
54
+ const config = ref({
55
+ totalBarCount: 1900,
56
+ preBarCount: 100,
57
+ })
58
+
59
+ onMounted(() => {
60
+ console.log('---------单品种多周期组件: onMounted挂载成功---------')
61
+ })
62
+
63
+ // 初始化
64
+ const componentInit = async () => {
65
+ try {
66
+ await getIndicatorOptions()
67
+ await getDictCycle()
68
+ await getKlineData()
69
+ await getKlineExtendData()
70
+ } catch (error) {
71
+ console.log(error)
72
+ }
73
+ }
74
+
75
+ /**
76
+ * @description: 获取通用字典[周期],初始化多周期结构
77
+ */
78
+ const getDictCycle = async () => {
79
+ const params = {
80
+ dictIds: [1002],
81
+ }
82
+ const res = await getDict(params)
83
+ multiCycleKline.value = res.data[1002].map((item: any) => {
84
+ return {
85
+ loading: true,
86
+ cycle: Number(item.dictCode),
87
+ cycleName: item.dictName,
88
+ sellBuyType: 1,
89
+ sellBuyTypeName: '开平',
90
+ klineData: [],
91
+ markData: [],
92
+ netWorkErrorMsg: '',
93
+ indicator: indicatorOptions.value.find((i: any) => i.value === 'DKX_EMA').info,
94
+ indicatorName: 'DKX_EMA',
95
+ }
96
+ })
97
+ }
98
+ /**
99
+ * @description: 获取指标配置表
100
+ */
101
+ const getIndicatorOptions = async () => {
102
+ const res = await getIndicatorConfig()
103
+ indicatorOptions.value = Object.keys(res.data).reduce((result: any, key: any) => {
104
+ if (res.data[key].WINDOW === '#0') {
105
+ result.push({
106
+ value: key,
107
+ label: key,
108
+ info: res.data[key],
109
+ })
110
+ }
111
+ return result
112
+ }, [])
113
+ }
114
+ /**
115
+ * @description: 获取K线数据 / 点位数据
116
+ */
117
+ const getKlineData = async () => {
118
+ multiCycleKline.value.forEach(async (item: any) => {
119
+ item.loading = true
120
+
121
+ // ---------K线数据逻辑----------
122
+ const params = {
123
+ right: 1, // 复权方式
124
+ variety: 'au8888', // 品种
125
+ cycle: item.cycle, // 周期
126
+ endTime: '2024-01-04 23:59:59', // 结束时间
127
+ limit: config.value.totalBarCount + config.value.preBarCount, // 总条数
128
+ queryType: 1, // 0-按时间,1-按结束时间,2-按开始时间
129
+ }
130
+ const res = await getSingleCycleSingleVariety(params)
131
+ item.klineData = res.data.body
132
+ // ---------点位数据逻辑---------
133
+ const resultApi = [
134
+ {
135
+ key: 'sellBuy',
136
+ data: [
137
+ {
138
+ tradeAction: '开', // 交易动作
139
+ direction: '多', // 交易方向
140
+ tradeType: '开多', // 交易类型
141
+ amount: 2, // 手数
142
+ part: 2, // 份数
143
+ time: '2024-01-04 22:30:00', // 交易时间
144
+ tooltip: '<div>买卖点1</div>',
145
+ },
146
+ {
147
+ tradeAction: '平', // 交易动作
148
+ direction: '空', // 交易方向
149
+ tradeType: '平空', // 交易类型
150
+ amount: 2, // 手数
151
+ part: 2, // 份数
152
+ time: '2024-01-04 22:40:00', // 交易时间
153
+ tooltip: '<div>买卖点2</div>',
154
+ },
155
+ {
156
+ tradeAction: '开', // 交易动作
157
+ direction: '空', // 交易方向
158
+ tradeType: '开空', // 交易类型
159
+ amount: 2, // 手数
160
+ part: 2, // 份数
161
+ time: '2024-01-04 23:50:00', // 交易时间
162
+ tooltip: '<div>买卖点3</div>',
163
+ },
164
+ ],
165
+ },
166
+ {
167
+ key: 'openClose',
168
+ data: [
169
+ {
170
+ tradeAction: '开', // 交易动作
171
+ direction: '多', // 交易方向
172
+ tradeType: '开多', // 交易类型
173
+ amount: 2, // 手数
174
+ part: 2, // 份数
175
+ time: '2024-01-04 22:30:00', // 交易时间
176
+ tooltip: '<div>开平点1</div>',
177
+ },
178
+ {
179
+ tradeAction: '平', // 交易动作
180
+ direction: '空', // 交易方向
181
+ tradeType: '平空', // 交易类型
182
+ amount: 2, // 手数
183
+ part: 2, // 份数
184
+ time: '2024-01-04 22:40:00', // 交易时间
185
+ tooltip: '<div>开平点2</div>',
186
+ },
187
+ {
188
+ tradeAction: '开', // 交易动作
189
+ direction: '空', // 交易方向
190
+ tradeType: '开空', // 交易类型
191
+ amount: 2, // 手数
192
+ part: 2, // 份数
193
+ time: '2024-01-04 23:50:00', // 交易时间
194
+ tooltip: '<div>买卖点3</div>',
195
+ },
196
+ ],
197
+ },
198
+ {
199
+ key: 'signal',
200
+ data: [],
201
+ },
202
+ ]
203
+ const klineTimeAry = item.klineData.map((item: any) => item[0])
204
+ originPointData.value = resultApi.reduce((result: any, next) => {
205
+ const { data } = next
206
+ result.push({
207
+ key: next.key,
208
+ data: data.map((i: any) => {
209
+ const time = klineTimeAry.find((klineTime: string) => dayjs(klineTime).isSameOrAfter(i.time))
210
+ return {
211
+ ...i,
212
+ time,
213
+ }
214
+ }),
215
+ })
216
+ return result
217
+ }, [])
218
+ sellBuyTypeChange(item)
219
+
220
+ item.loading = false
221
+ })
222
+ }
223
+ /**
224
+ * @description: 获取K线额外画线数据
225
+ */
226
+ const getKlineExtendData = async () => {
227
+ lineData.value = [
228
+ {
229
+ key: 'warning',
230
+ data: [
231
+ {
232
+ value: 479,
233
+ text: 479,
234
+ // 自定义信息
235
+ info: {},
236
+ // 自定义配置
237
+ config: {
238
+ draggable: true,
239
+ },
240
+ },
241
+ ],
242
+ ondragstart: (params: any, info: any) => {
243
+ console.log('拖拽开始', params, info)
244
+ },
245
+ ondragend: (params: any, info: any, yAxisValue: number) => {
246
+ console.log('拖拽结束', params, info, yAxisValue)
247
+ ElMessage.success('预警线修改更新成功!')
248
+ },
249
+ oncontextmenu: (params: any, info: any, menuData: any) => {
250
+ console.log('右击了', params, info)
251
+ menuData.value = [
252
+ {
253
+ label: '删除画线',
254
+ callBack: () => ElMessage.success('预警线删除成功!'),
255
+ },
256
+ {
257
+ label: '修改画线',
258
+ callBack: () => ElMessage.success('预警线修改成功!'),
259
+ },
260
+ ]
261
+ },
262
+ },
263
+ {
264
+ key: 'position',
265
+ data: [
266
+ {
267
+ value: 480,
268
+ text: '持仓:192.14万(1份) 数量:4手 方向:多 浮动盈亏:-1280.00',
269
+ // 自定义信息
270
+ info: {},
271
+ // 自定义配置
272
+ config: {},
273
+ },
274
+ ],
275
+ },
276
+ {
277
+ key: 'condition',
278
+ data: [
279
+ {
280
+ value: 482,
281
+ text: '[多损][多盈] 开多↓2269 1份(22手)',
282
+ profitValue: 483,
283
+ profitText: '上破484',
284
+ lossValue: 481,
285
+ lossText: '下破482',
286
+ // 自定义信息
287
+ info: {},
288
+ // 自定义配置
289
+ config: {},
290
+ },
291
+ ],
292
+ },
293
+ ]
294
+ }
295
+ /**
296
+ * @description: 买卖点,开平点切换
297
+ */
298
+ const sellBuyTypeChange = (item: any) => {
299
+ if (sellBuyTypeOptions.value.length > 0) {
300
+ item.sellBuyTypeName = sellBuyTypeOptions.value.find((i: any) => i.value === item.sellBuyType).label ?? null
301
+ }
302
+ if (item.sellBuyType === 1) {
303
+ item.markData = originPointData.value.filter((i: any) => {
304
+ return i.key !== 'sellBuy'
305
+ })
306
+ } else {
307
+ item.markData = originPointData.value.filter((i: any) => {
308
+ return i.key !== 'openClose'
309
+ })
310
+ }
311
+ }
312
+ /**
313
+ * @description: 切换指标
314
+ */
315
+ const indicatorChange = (item: any) => {
316
+ item.indicator = indicatorOptions.value.find((i: any) => i.value === item.indicatorName).info
317
+ }
318
+
319
+ // 画线预警
320
+ const createWarning = (echartsInstance: any, cursorPenVisible: any) => {
321
+ // 1.打开画笔模式,并修改指示器样式[画预览线]
322
+ cursorPenVisible.value = true
323
+ const echartsOptions = echartsInstance.getOption()
324
+ const oldTooltip = (echartsOptions.tooltip as Array<any>)[0]
325
+ echartsInstance.setOption({
326
+ ...echartsOptions,
327
+ // 指示器样式
328
+ tooltip: {
329
+ ...oldTooltip,
330
+ // 坐标轴指示器
331
+ axisPointer: {
332
+ // 保留原有部分配置
333
+ ...oldTooltip.axisPointer,
334
+ // X轴指示线的宽度
335
+ lineStyle: {
336
+ width: 0,
337
+ },
338
+ // Y轴指示线的宽度
339
+ crossStyle: {
340
+ width: 2,
341
+ },
342
+ // 文本标签
343
+ label: {
344
+ // 保留原有部分配置
345
+ ...oldTooltip.axisPointer.label,
346
+ // 颜色改为透明
347
+ backgroundColor: 'transparent',
348
+ // 仅显示Y轴值
349
+ formatter: (data: any) => {
350
+ const { axisDimension, value } = data
351
+ if (axisDimension === 'y') {
352
+ return String(formatValue(value))
353
+ }
354
+ return ''
355
+ },
356
+ },
357
+ },
358
+ },
359
+ })
360
+ // 2.获取当前列数据并发送请求至后端记录
361
+ const handleClick = (el: any) => {
362
+ // 关闭画笔模式,并移除echarts点击事件
363
+ cursorPenVisible.value = false
364
+ echartsInstance.getZr().off('mousedown', handleClick)
365
+ const yAxisValue = echartsInstance.convertFromPixel({ yAxisIndex: 0 }, el.offsetY)
366
+ const newWarnPrice = Math.round(yAxisValue * 1000) / 1000
367
+ // 3.恢复指示器样式
368
+ echartsInstance.setOption({
369
+ ...echartsOptions,
370
+ // 指示器样式
371
+ tooltip: {
372
+ ...oldTooltip,
373
+ axisPointer: {
374
+ ...oldTooltip.axisPointer,
375
+ lineStyle: {
376
+ width: 1,
377
+ },
378
+ crossStyle: {
379
+ width: 1,
380
+ },
381
+ label: {
382
+ ...oldTooltip.axisPointer.label,
383
+ backgroundColor: null,
384
+ },
385
+ },
386
+ },
387
+ })
388
+ // 4.发送保存预警线请求
389
+ lineData.value[0].data.push({
390
+ value: newWarnPrice,
391
+ text: newWarnPrice,
392
+ // 自定义信息
393
+ info: {},
394
+ // 自定义配置
395
+ config: {
396
+ draggable: true,
397
+ },
398
+ })
399
+ ElMessage.success('画线预警成功!')
400
+ }
401
+ // 绑定echarts点击事件
402
+ echartsInstance.getZr().on('mousedown', handleClick)
403
+ }
404
+
405
+ watch(
406
+ () => props.deBugValue,
407
+ (newValue: any) => {
408
+ if (newValue === 1) {
409
+ // 正常模式
410
+ componentInit()
411
+ } else {
412
+ multiCycleKline.value.forEach((item: any) => {
413
+ if (newValue === 2) {
414
+ // 网络故障
415
+ item.loading = true
416
+ setTimeout(() => {
417
+ item.netWorkErrorMsg = '网络加载失败,请刷新重试'
418
+ item.loading = false
419
+ }, 1000)
420
+ } else if (newValue === 3) {
421
+ // 空数据
422
+ item.netWorkErrorMsg = ''
423
+ item.loading = true
424
+ setTimeout(() => {
425
+ item.klineData = []
426
+ item.loading = false
427
+ }, 1000)
428
+ }
429
+ })
430
+ }
431
+ },
432
+ {
433
+ immediate: true,
434
+ }
435
+ )
436
+
437
+ onUnmounted(() => {
438
+ console.log('---------单品种多周期组件: onUnmounted卸载成功---------')
439
+ })
440
+
441
+ const reFresh = async (item: any) => {
442
+ item.netWorkErrorMsg = ''
443
+ item.loading = true
444
+
445
+ // ---------K线数据逻辑----------
446
+ const params = {
447
+ right: 1, // 复权方式
448
+ variety: 'au8888', // 品种
449
+ cycle: item.cycle, // 周期
450
+ endTime: '2024-01-04 23:59:59', // 结束时间
451
+ limit: config.value.totalBarCount + config.value.preBarCount, // 总条数
452
+ queryType: 1, // 0-按时间,1-按结束时间,2-按开始时间
453
+ }
454
+ const res = await getSingleCycleSingleVariety(params)
455
+ item.klineData = res.data.body
456
+ // ---------点位数据逻辑---------
457
+ const resultApi = [
458
+ {
459
+ key: 'sellBuy',
460
+ data: [
461
+ {
462
+ tradeAction: '开', // 交易动作
463
+ direction: '多', // 交易方向
464
+ tradeType: '开多', // 交易类型
465
+ amount: 2, // 手数
466
+ part: 2, // 份数
467
+ time: '2024-01-04 22:30:00', // 交易时间
468
+ tooltip: '<div>买卖点1</div>',
469
+ },
470
+ {
471
+ tradeAction: '平', // 交易动作
472
+ direction: '空', // 交易方向
473
+ tradeType: '平空', // 交易类型
474
+ amount: 2, // 手数
475
+ part: 2, // 份数
476
+ time: '2024-01-04 22:40:00', // 交易时间
477
+ tooltip: '<div>买卖点2</div>',
478
+ },
479
+ {
480
+ tradeAction: '开', // 交易动作
481
+ direction: '空', // 交易方向
482
+ tradeType: '开空', // 交易类型
483
+ amount: 2, // 手数
484
+ part: 2, // 份数
485
+ time: '2024-01-04 23:50:00', // 交易时间
486
+ tooltip: '<div>买卖点3</div>',
487
+ },
488
+ ],
489
+ },
490
+ {
491
+ key: 'openClose',
492
+ data: [
493
+ {
494
+ tradeAction: '开', // 交易动作
495
+ direction: '多', // 交易方向
496
+ tradeType: '开多', // 交易类型
497
+ amount: 2, // 手数
498
+ part: 2, // 份数
499
+ time: '2024-01-04 22:30:00', // 交易时间
500
+ tooltip: '<div>开平点1</div>',
501
+ },
502
+ {
503
+ tradeAction: '平', // 交易动作
504
+ direction: '空', // 交易方向
505
+ tradeType: '平空', // 交易类型
506
+ amount: 2, // 手数
507
+ part: 2, // 份数
508
+ time: '2024-01-04 22:40:00', // 交易时间
509
+ tooltip: '<div>开平点2</div>',
510
+ },
511
+ {
512
+ tradeAction: '开', // 交易动作
513
+ direction: '空', // 交易方向
514
+ tradeType: '开空', // 交易类型
515
+ amount: 2, // 手数
516
+ part: 2, // 份数
517
+ time: '2024-01-04 23:50:00', // 交易时间
518
+ tooltip: '<div>买卖点3</div>',
519
+ },
520
+ ],
521
+ },
522
+ {
523
+ key: 'signal',
524
+ data: [],
525
+ },
526
+ ]
527
+ const klineTimeAry = item.klineData.map((item: any) => item[0])
528
+ originPointData.value = resultApi.reduce((result: any, next) => {
529
+ const { data } = next
530
+ result.push({
531
+ key: next.key,
532
+ data: data.map((i: any) => {
533
+ const time = klineTimeAry.find((klineTime: string) => dayjs(klineTime).isSameOrAfter(i.time))
534
+ return {
535
+ ...i,
536
+ time,
537
+ }
538
+ }),
539
+ })
540
+ return result
541
+ }, [])
542
+ sellBuyTypeChange(item)
543
+
544
+ item.loading = false
545
+
546
+ getKlineExtendData()
547
+ }
548
+ </script>
549
+
550
+ <template>
551
+ <div id="single-cycle-single-variety">
552
+ <template v-if="multiCycleKline.length">
553
+ <div
554
+ v-for="(item, index) in multiCycleKline"
555
+ :key="index"
556
+ class="st-Kline"
557
+ v-loading="item.loading"
558
+ element-loading-text="正在加载数据中,请稍等..."
559
+ >
560
+ <!-- 功能区 -->
561
+ <div class="kline-header">
562
+ <!-- 品种名称 -->
563
+ <div class="kline-header-item">黄金 au8888</div>
564
+ <!-- 周期名称 -->
565
+ <div class="kline-header-item">
566
+ <span>{{ item.cycleName }}</span>
567
+ </div>
568
+ <!-- 指标展示 + 选择 -->
569
+ <div class="kline-header-item sellBuySelect">
570
+ <span>{{ item.indicatorName }}</span>
571
+ <el-select
572
+ v-model="item.indicatorName"
573
+ popper-class="element-dark"
574
+ @change="indicatorChange(item)"
575
+ >
576
+ <el-option
577
+ v-for="(item, index) in indicatorOptions"
578
+ :key="index"
579
+ :label="item.label"
580
+ :value="item.value"
581
+ />
582
+ </el-select>
583
+ </div>
584
+ <!-- 开平/买卖展示 + 选择 -->
585
+ <div class="kline-header-item sellBuySelect">
586
+ <span>{{ item.sellBuyTypeName }}</span>
587
+ <el-select
588
+ v-model="item.sellBuyType"
589
+ popper-class="element-dark"
590
+ @change="sellBuyTypeChange(item)"
591
+ >
592
+ <el-option
593
+ v-for="(item, index) in sellBuyTypeOptions"
594
+ :key="index"
595
+ :label="item.label"
596
+ :value="item.value"
597
+ />
598
+ </el-select>
599
+ </div>
600
+ </div>
601
+ <!-- K线本体 -->
602
+ <st-kline
603
+ v-if="!item.loading && item.klineData.length && !item.netWorkErrorMsg"
604
+ class="kline"
605
+ :indicator="item.indicator"
606
+ :klineData="item.klineData"
607
+ :markData="item.markData"
608
+ :lineData="lineData"
609
+ :brushRange="brushRange"
610
+ :defaultMenuData="defaultMenuData"
611
+ :config="config"
612
+ />
613
+ <!-- 网络请求错误时 -->
614
+ <div
615
+ v-if="item.netWorkErrorMsg"
616
+ class="netWorkError"
617
+ >
618
+ <span>{{ item.netWorkErrorMsg }}</span>
619
+ <el-button
620
+ size="small"
621
+ @click="reFresh(item)"
622
+ :icon="RefreshRight"
623
+ >刷新</el-button
624
+ >
625
+ </div>
626
+ <!-- 空数据时 -->
627
+ <div
628
+ class="empty"
629
+ v-else-if="!item.loading && item.klineData.length === 0"
630
+ >
631
+ <el-empty description="暂无数据" />
632
+ </div>
633
+ </div>
634
+ </template>
635
+ </div>
636
+ </template>
637
+
638
+ <style lang="scss" scoped>
639
+ #single-cycle-single-variety {
640
+ margin: auto;
641
+ width: 100%;
642
+ height: 100%;
643
+ display: grid;
644
+ grid-template-columns: repeat(3, 33%);
645
+ grid-template-rows: repeat(6, 33%);
646
+ grid-gap: 4px;
647
+ overflow: hidden;
648
+ .st-Kline {
649
+ display: flex;
650
+ flex-direction: column;
651
+ border-radius: 2px;
652
+ box-sizing: border-box;
653
+ background-color: black;
654
+ color-scheme: dark;
655
+ --el-mask-color: rgba(0, 0, 0, 0.8);
656
+ .kline-header {
657
+ font-size: 12px;
658
+ display: flex;
659
+ align-items: center;
660
+ color: white;
661
+ border-bottom: 1px solid rgb(153, 153, 153);
662
+ .kline-header-item {
663
+ display: flex;
664
+ align-items: center;
665
+ border-right: 1px solid rgb(153, 153, 153);
666
+ padding: 6px;
667
+ box-sizing: border-box;
668
+ }
669
+ // 功能区: 开平/买卖
670
+ .sellBuySelect {
671
+ :deep(.el-select) {
672
+ margin-left: 6px;
673
+ width: 12px;
674
+ .el-input__wrapper {
675
+ height: 12px;
676
+ padding: 0;
677
+ border-radius: 50%;
678
+ background-color: #ccc;
679
+ }
680
+ .el-input__inner {
681
+ width: 0;
682
+ }
683
+ .el-select__icon {
684
+ color: black;
685
+ width: 12px;
686
+ height: 12px;
687
+ margin-left: 0;
688
+ }
689
+ }
690
+ }
691
+ }
692
+ .kline {
693
+ flex: 1;
694
+ }
695
+ .netWorkError {
696
+ color: white;
697
+ font-weight: 600;
698
+ display: flex;
699
+ flex-direction: column;
700
+ align-items: center;
701
+ justify-content: center;
702
+ width: 100%;
703
+ height: 100%;
704
+ font-size: 18px;
705
+ .el-button {
706
+ margin-top: 10px;
707
+ background-color: rgb(0, 0, 0);
708
+ color: white;
709
+ }
710
+ }
711
+ .empty {
712
+ color: white;
713
+ font-weight: 600;
714
+ display: flex;
715
+ flex-direction: column;
716
+ align-items: center;
717
+ justify-content: center;
718
+ width: 100%;
719
+ height: 100%;
720
+ :deep(.el-empty__image) {
721
+ svg {
722
+ width: 100px;
723
+ }
724
+ }
725
+ }
726
+ }
727
+ }
728
+ </style>