fix: topn type (#267)

This commit is contained in:
Fine0830
2023-05-25 09:12:46 +08:00
committed by GitHub
parent fe28fae27d
commit 986fe8b90e
2 changed files with 4 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ limitations under the License. -->
type="number"
:min="1"
:max="100"
@change="changeConfigs(index, { topN: currentMetric.topN || 10 })"
@change="changeConfigs(index, { topN: Number(currentMetric.topN) || 10 })"
/>
</div>
</div>
@@ -150,7 +150,7 @@ limitations under the License. -->
() => {
currentMetric.value = {
...props.currentMetricConfig,
topN: props.currentMetricConfig.topN || 10,
topN: Number(props.currentMetricConfig.topN) || 10,
};
},
);