feat: 打包代码优化

This commit is contained in:
huanghao1412 2024-01-30 10:36:46 +08:00
parent 9a1ecb7243
commit c10b88d35a
3 changed files with 5 additions and 5 deletions

View File

@ -35,7 +35,7 @@
</n-input-number>
<n-input-number
:value="marginBottom"
@update:value="v => handleUpdate('y', v)"
@update:value="(v: number) => handleUpdate('y', v)"
:min="0"
size="small"
placeholder="px"
@ -47,7 +47,7 @@
</n-input-number>
<n-input-number
:value="marginRight"
@update:value="v => handleUpdate('x', v)"
@update:value="(v: number) => handleUpdate('x', v)"
:min="0"
size="small"
placeholder="px"

View File

@ -146,7 +146,7 @@ export const useChartCommonData = (
else throw Error()
}
} catch (error) {
window['$message'].error('数据错误')
if(!isPreview()) window['$message'].error('数据错误')
}
}
}

View File

@ -21,11 +21,11 @@ import {computed} from 'vue'
import type {Ref} from 'vue'
import {SettingItemBox} from '@/components/Pages/ChartItemSetting'
import {useTargetData} from '../../hooks/useTargetData.hook'
import {commonDataType} from '@/store/modules/chartEditStore/chartEditStore.d'
import {commonDataType, DeviceClassType} from '@/store/modules/chartEditStore/chartEditStore.d'
const {targetData} = useTargetData() as { targetData: Ref<{ commonData: commonDataType, id: string }> }
const currentObj = computed(() => {
return targetData.value.commonData[targetData.value.commonData.currentSource]
return targetData.value.commonData[targetData.value.commonData.currentSource] as DeviceClassType
})
</script>