_星座样本IQ.no-lint.ts
All checks were successful
/ build-and-deploy-to-vercel (push) Successful in 2m50s
/ surge (push) Successful in 2m42s
/ playwright (push) Successful in 1m52s
/ lint-build-and-check (push) Successful in 4m52s

This commit is contained in:
严浩
2025-04-11 17:52:28 +08:00
parent 09b1e481e5
commit e9676c120d
7 changed files with 6768 additions and 11 deletions

View File

@ -1,5 +1,7 @@
<!-- eslint-disable unicorn/numeric-separators-style -->
<script setup lang="ts">
import { 星座样本IQ } from './_星座样本IQ.no-lint';
definePage({
meta: {
title: '星座图 iframe',
@ -11,16 +13,17 @@ type ConstellationDiagramArr = Array<[number, number]>;
const data = ref<ConstellationDiagramArr>([
[0.20898877234451796, 0.8329353515647436],
[-0.6589349632101078, 0.5886313023998213],
[-0.5525702944049637, -0.7953057951401711],
]);
setTimeout(() => {
// 测试数据更新
data.value.push(
[0.20898877234451796, 0.8329353515647436],
[-0.6589349632101078, 0.5886313023998213],
[-0.5525702944049637, -0.7953057951401711],
);
// 将星座样本IQ数据转换为二维数组
const newData = 星座样本IQ.starI.map((i, index) => [
i, //
星座样本IQ.starQ[index],
]) as ConstellationDiagramArr;
data.value = newData.slice(0, 20);
console.debug(data.value.map((item) => item.join(',')).join('\n'));
}, 1000);
</script>

View File

@ -4,7 +4,7 @@ definePage({ meta: { title: '频谱图+瀑布图' } });
const iframeSpectrogramRef = useTemplateRef('iframeSpectrogramRef');
// 模拟生成频谱数据的函数
function generateFakeSpectrogramData(len = 200, baseLevel = -90, noiseRange = 30) {
function generateFakeSpectrogramData(len = 30, baseLevel = -90, noiseRange = 30) {
const data = [];
for (let i = 0; i < len; i++) {
// 模拟一些峰值
@ -35,7 +35,7 @@ onMounted(() => {
console.warn('[📄] 页面:无法获取 IframeSpectrogram 组件的引用来发送更新数据');
}
console.log('[📄] 页面:更新频谱数据带时间');
}, 2000);
}, 1000);
});
onUnmounted(() => {

File diff suppressed because it is too large Load Diff