st-comp 0.0.121 → 0.0.123
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.
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +246 -224
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +524 -514
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +49 -49
- package/lib/{index-dbad59c9.js → index-7f3879b3.js} +1868 -1836
- package/lib/{python-ab788b86.js → python-cbf74672.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineNew/components/KlineTips/index.vue +31 -3
- package/packages/VarietySearch/components/FactorScreen/index.vue +7 -7
- package/src/pages/VarietySearch/index.vue +3 -2
package/package.json
CHANGED
|
@@ -17,6 +17,18 @@ const props = defineProps({
|
|
|
17
17
|
type: Object,
|
|
18
18
|
require: true,
|
|
19
19
|
},
|
|
20
|
+
// K线数据
|
|
21
|
+
// candlestickData: [开, 收, 低, 高, 成交额, 涨跌值, 涨跌百分比]
|
|
22
|
+
candlestickData: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => null,
|
|
25
|
+
},
|
|
26
|
+
// 主图指标数据
|
|
27
|
+
// mainIndicatorData: [key, data, color]
|
|
28
|
+
mainIndicatorData: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default: () => null,
|
|
31
|
+
},
|
|
20
32
|
activeIndex: {
|
|
21
33
|
type: Number,
|
|
22
34
|
require: true,
|
|
@@ -24,9 +36,25 @@ const props = defineProps({
|
|
|
24
36
|
});
|
|
25
37
|
|
|
26
38
|
const mainTips = computed(() => {
|
|
27
|
-
const { drawData, activeIndex } = props as any;
|
|
28
|
-
|
|
29
|
-
|
|
39
|
+
const { drawData, activeIndex, candlestickData } = props as any;
|
|
40
|
+
if (candlestickData?.length && candlestickData[activeIndex]) {
|
|
41
|
+
// 新版传参 [开, 收, 低, 高, 成交额, 涨跌值, 涨跌百分比]
|
|
42
|
+
let diffColor;
|
|
43
|
+
if (candlestickData[activeIndex][6] > 0) {
|
|
44
|
+
diffColor = "red";
|
|
45
|
+
} else if (candlestickData[activeIndex][6] < 0) {
|
|
46
|
+
diffColor = "green";
|
|
47
|
+
}
|
|
48
|
+
return [
|
|
49
|
+
{ label: "开", value: round(candlestickData[activeIndex][0]) },
|
|
50
|
+
{ label: "高", value: round(candlestickData[activeIndex][3]) },
|
|
51
|
+
{ label: "低", value: round(candlestickData[activeIndex][2]) },
|
|
52
|
+
{ label: "收", value: round(candlestickData[activeIndex][1]) },
|
|
53
|
+
{ label: "额", value: formatValue(candlestickData[activeIndex][4]) },
|
|
54
|
+
{ label: "涨跌", value: `${round(candlestickData[activeIndex][6])}%`, color: diffColor }
|
|
55
|
+
]
|
|
56
|
+
} else if (drawData.candlestickData && drawData.candlestickData[activeIndex]) {
|
|
57
|
+
// candlestickData: [开, 收, 低, 高, 昨收, 交易总额]
|
|
30
58
|
const itemData = drawData.candlestickData[activeIndex];
|
|
31
59
|
const result = [
|
|
32
60
|
{ label: "开", value: round(itemData[0]) },
|
|
@@ -268,7 +268,7 @@ const handleDeleteTag = (aciton, index) => {
|
|
|
268
268
|
>
|
|
269
269
|
<!-- 序列号 -->
|
|
270
270
|
<span class="index">{{ `条件${index + 1}` }}</span>
|
|
271
|
-
<!--
|
|
271
|
+
<!-- 对比因子: 分值因子 -->
|
|
272
272
|
<template v-if="item.key === 'compare'">
|
|
273
273
|
<!-- 周期 -->
|
|
274
274
|
<el-form-item
|
|
@@ -304,7 +304,7 @@ const handleDeleteTag = (aciton, index) => {
|
|
|
304
304
|
no-match-text="无匹配数据"
|
|
305
305
|
>
|
|
306
306
|
<el-option
|
|
307
|
-
v-for="{ label, value } in config.factorOptions"
|
|
307
|
+
v-for="{ label, value } in config.factorOptions?.filter((item) => [4].includes(item.type))"
|
|
308
308
|
:label="label"
|
|
309
309
|
:value="value"
|
|
310
310
|
:key="value"
|
|
@@ -359,7 +359,7 @@ const handleDeleteTag = (aciton, index) => {
|
|
|
359
359
|
no-match-text="无匹配数据"
|
|
360
360
|
>
|
|
361
361
|
<el-option
|
|
362
|
-
v-for="{ label, value } in config.factorOptions"
|
|
362
|
+
v-for="{ label, value } in config.factorOptions?.filter((item) => [4].includes(item.type))"
|
|
363
363
|
:label="label"
|
|
364
364
|
:value="value"
|
|
365
365
|
:key="value"
|
|
@@ -367,7 +367,7 @@ const handleDeleteTag = (aciton, index) => {
|
|
|
367
367
|
</el-select>
|
|
368
368
|
</el-form-item>
|
|
369
369
|
</template>
|
|
370
|
-
<!--
|
|
370
|
+
<!-- 常规因子: 机器打分, 人工打分因子 -->
|
|
371
371
|
<template v-else>
|
|
372
372
|
<!-- 周期 -->
|
|
373
373
|
<el-form-item
|
|
@@ -403,7 +403,7 @@ const handleDeleteTag = (aciton, index) => {
|
|
|
403
403
|
no-match-text="无匹配数据"
|
|
404
404
|
>
|
|
405
405
|
<el-option
|
|
406
|
-
v-for="{ label, value } in config.factorOptions"
|
|
406
|
+
v-for="{ label, value } in config.factorOptions?.filter((item) => [1, 3].includes(item.type))"
|
|
407
407
|
:label="label"
|
|
408
408
|
:value="value"
|
|
409
409
|
:key="value"
|
|
@@ -496,10 +496,10 @@ const handleDeleteTag = (aciton, index) => {
|
|
|
496
496
|
</template>
|
|
497
497
|
</el-dialog>
|
|
498
498
|
</div>
|
|
499
|
-
<!--
|
|
499
|
+
<!-- 因子说明: 机器打分, 人工打分因子 -->
|
|
500
500
|
<FactorDescription
|
|
501
501
|
v-model:visible="visibleDescriptions"
|
|
502
|
-
:data="config.factorDescriptions"
|
|
502
|
+
:data="config.factorDescriptions?.filter((item) => [1, 3].includes(item.type))"
|
|
503
503
|
/>
|
|
504
504
|
</template>
|
|
505
505
|
|
|
@@ -62,8 +62,9 @@ const varietySearchConfig = ref({
|
|
|
62
62
|
],
|
|
63
63
|
// 因子下拉框数据源
|
|
64
64
|
factorOptions: [
|
|
65
|
-
{ label: "
|
|
66
|
-
{ label: "
|
|
65
|
+
{ label: "机器打分", value: 1, type: 1 },
|
|
66
|
+
{ label: "人工打分", value: 3, type: 3 },
|
|
67
|
+
{ label: "分值因子", value: 4, type: 4 },
|
|
67
68
|
],
|
|
68
69
|
// 因子使用说明数据源
|
|
69
70
|
factorDescriptions: [],
|