st-comp 0.0.222 → 0.0.224
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/ChartLayout.js +4 -4
- package/es/CustomFunction.js +30 -30
- package/es/FactorWarning.js +33 -33
- package/es/Kline.js +17 -17
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +381 -374
- package/es/KlineConfig.js +61 -61
- package/es/KlineNew.js +16 -16
- package/es/KlinePlus.js +19 -19
- package/es/Pagination.js +73 -73
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.js +38 -38
- package/es/TreeMap.cjs +2 -1
- package/es/TreeMap.js +163 -1
- package/es/User.js +44 -44
- package/es/VarSelectDialog.js +24 -24
- package/es/VarietyAutoComplete.js +10 -10
- package/es/VarietySearch.js +35 -35
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +15 -15
- package/es/VirtualTable.js +70 -70
- package/es/{_initCloneObject-71a2d663.js → _initCloneObject-eaef9418.js} +7 -7
- package/es/{base-ff0e366f.js → base-a5af3db3.js} +40 -40
- package/es/{castArray-15070be9.js → castArray-7741a212.js} +1 -1
- package/es/{config-provider-ef3c8ca2.js → config-provider-b16efd62.js} +6 -6
- package/es/{debounce-e9e47f9a.js → debounce-8d53f4dd.js} +1 -1
- package/es/{dropdown-41512a70.js → dropdown-a59bba73.js} +13 -13
- package/es/{el-autocomplete-6b56f161.js → el-autocomplete-ba808eb6.js} +16 -16
- package/es/{el-button-72e66b1c.js → el-button-c95adb85.js} +39 -39
- package/es/{el-checkbox-7df65088.js → el-checkbox-7421ccd3.js} +31 -31
- package/es/{el-dialog-7d6e8f91.js → el-dialog-41ab8417.js} +15 -15
- package/es/{el-divider-4fe55ebe.js → el-divider-4e059794.js} +1 -1
- package/es/{el-empty-ceecb81c.js → el-empty-33cb66f1.js} +5 -5
- package/es/{el-form-item-706eb72e.js → el-form-item-c53c374d.js} +36 -36
- package/es/{el-input-8cafa639.js → el-input-2f75c4ba.js} +55 -55
- package/es/{el-input-number-7907c63c.js → el-input-number-5193fe6d.js} +36 -36
- package/es/{el-loading-3cfc4e19.js → el-loading-f6022062.js} +5 -5
- package/es/{el-menu-item-f7436984.js → el-menu-item-7e881203.js} +22 -22
- package/es/{el-message-box-8e4d6990.js → el-message-box-a93d2f6a.js} +11 -11
- package/es/{el-message-f3d56a3e.js → el-message-e544a8f5.js} +23 -23
- package/es/{el-overlay-31707230.js → el-overlay-09ad71cd.js} +56 -56
- package/es/{el-popconfirm-b113716a.js → el-popconfirm-81dcd202.js} +20 -20
- package/es/{el-popper-f28554e1.js → el-popper-b4f97157.js} +109 -109
- package/es/{el-segmented-5f4d8e64.js → el-segmented-b868d074.js} +8 -8
- package/es/{el-select-90ba1ff9.js → el-select-95627997.js} +64 -64
- package/es/{el-table-column-bccab55d.js → el-table-column-376cd907.js} +15 -15
- package/es/{el-tag-f03f602d.js → el-tag-66cab138.js} +15 -15
- package/es/{el-text-f106c80e.js → el-text-ac60d0f2.js} +2 -2
- package/es/{index-b792012c.js → index-1f7d4f70.js} +2 -2
- package/es/{index-00e91ed2.js → index-57672682.js} +3 -3
- package/es/{index-158df623.js → index-844bdd85.js} +34 -34
- package/es/{index-89707217.js → index-88546436.js} +17 -17
- package/es/{index-269b8a8c.js → index-960806da.js} +36 -36
- package/es/{index-065f4c40.js → index-a871c3eb.js} +29 -29
- package/es/{index-93a8960e.js → index-d77a7336.js} +1 -1
- package/es/{index-49767c81.js → index-d91dc23f.js} +12 -12
- package/es/{index-60dd8509.js → index-e5566b94.js} +43 -43
- package/es/raf-80ef0c0a.js +6 -0
- package/es/{scroll-41b4f625.js → scroll-679bd6bf.js} +5 -5
- package/es/style.css +1 -1
- package/es/{use-form-common-props-1f967d2e.js → use-form-common-props-815d48a6.js} +67 -67
- package/es/{use-global-config-ded5e07b.js → use-global-config-b5e9d3d5.js} +14 -14
- package/es/{validator-5c8b5cdc.js → validator-764a9db0.js} +1 -1
- package/es/{vnode-06571d5b.js → vnode-5ddb7ed1.js} +1 -1
- package/es/{zh-cn-cae8ba43.js → zh-cn-e963c628.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-b2c7b8c5.js → index-f21f4ed2.js} +377 -370
- package/lib/{python-430bbf9c.js → python-dfab6a0b.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/components/KlineTips/index.vue +17 -1
- package/packages/KlineBasic/components/Tips/index.vue +7 -4
- package/es/raf-8e05a7f4.js +0 -6
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script setup>
|
|
9
|
-
import { computed } from "vue";
|
|
9
|
+
import { computed, watch, ref } from "vue";
|
|
10
10
|
import Tips from "../Tips/index.vue";
|
|
11
11
|
import { stMath } from "st-func";
|
|
12
12
|
const { round, formatValue } = stMath;
|
|
@@ -23,6 +23,14 @@ const props = defineProps({
|
|
|
23
23
|
},
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
+
const close = ref(null);
|
|
27
|
+
|
|
28
|
+
watch(() => props.activeIndex, () => {
|
|
29
|
+
if (close.value === null) {
|
|
30
|
+
close.value = props.data.data[props.activeIndex][1]
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
26
34
|
const mainTips = computed(() => {
|
|
27
35
|
const { data, activeIndex } = props;
|
|
28
36
|
if (data.data && data.data[activeIndex]) {
|
|
@@ -43,6 +51,14 @@ const mainTips = computed(() => {
|
|
|
43
51
|
diffColor = "green";
|
|
44
52
|
}
|
|
45
53
|
result.push({ label: "涨跌", value: `${round(itemData[6])}%`, color: diffColor });
|
|
54
|
+
const mowPercent = ((close.value / itemData[1]) - 1) * 100
|
|
55
|
+
let nowPercentColor;
|
|
56
|
+
if (mowPercent > 0) {
|
|
57
|
+
nowPercentColor = "red";
|
|
58
|
+
} else if (mowPercent < 0) {
|
|
59
|
+
nowPercentColor = "green";
|
|
60
|
+
}
|
|
61
|
+
result.push({ label: "至今涨幅", value: `${round(mowPercent)}%`, color: nowPercentColor });
|
|
46
62
|
return result;
|
|
47
63
|
}
|
|
48
64
|
return [];
|
|
@@ -26,10 +26,14 @@
|
|
|
26
26
|
if (widthList.value.length === 0) {
|
|
27
27
|
nextTick(() => {
|
|
28
28
|
Array.from(tipsRef.value.children).forEach((item: any, index) => {
|
|
29
|
-
if (
|
|
30
|
-
widthList.value[index] = '
|
|
29
|
+
if (props.data?.[index]?.label === '涨跌') {
|
|
30
|
+
widthList.value[index] = '85px'
|
|
31
|
+
} else if(props.data?.[index]?.label === '至今涨跌') {
|
|
32
|
+
widthList.value[index] = '100px'
|
|
33
|
+
} else if(props.data?.[index]?.label === '额') {
|
|
34
|
+
widthList.value[index] = '75px'
|
|
31
35
|
} else {
|
|
32
|
-
widthList.value[index] = `${item.offsetWidth +
|
|
36
|
+
widthList.value[index] = `${item.offsetWidth + 30}px`
|
|
33
37
|
}
|
|
34
38
|
})
|
|
35
39
|
})
|
|
@@ -45,7 +49,6 @@
|
|
|
45
49
|
line-height: 1.5;
|
|
46
50
|
&-item {
|
|
47
51
|
display: inline-block;
|
|
48
|
-
margin-right: 10px;
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
</style>
|