闪变支持配置Pst
This commit is contained in:
@@ -38,11 +38,20 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: end">
|
||||
<el-form-item label="变动量(%)" label-width="180px">
|
||||
<el-form-item label="Pst" label-width="70px">
|
||||
<el-input
|
||||
placeholder="请输入Pst"
|
||||
style="width: 90px"
|
||||
v-model="form[0].flickerData.flickerValue"
|
||||
@change="changeFlickerValue"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="变动量(%)" label-width="90px">
|
||||
<el-input
|
||||
placeholder="请输入变动量"
|
||||
style="width: 180px"
|
||||
style="width: 90px"
|
||||
v-model="form[0].flickerData.fchagValue"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@@ -82,6 +91,7 @@
|
||||
<script setup lang="ts">
|
||||
import {computed, watch} from 'vue'
|
||||
import {normalizeFlickerData} from './flickerData.js'
|
||||
|
||||
const props = defineProps({
|
||||
childForm: {
|
||||
type: [Array, Object] as any,
|
||||
@@ -354,10 +364,23 @@ const changeLable = e => {
|
||||
}
|
||||
// [频率变化]
|
||||
const changeWaveType = e => {
|
||||
props.childForm[0].flickerData.fchagValue = waveChildrenList.value.filter(
|
||||
let fchagValueTemp = waveChildrenList.value.filter(
|
||||
(item: any) => item.fchagFre == e
|
||||
)[0].fchagValue
|
||||
props.childForm[0].flickerData.fchagValue = fchagValueTemp * props.childForm[0].flickerData.flickerValue
|
||||
}
|
||||
|
||||
const changeFlickerValue = e => {
|
||||
if(e<0.2||e>10){
|
||||
ElMessage.warning('Pst限制在0.2-10之间!')
|
||||
props.childForm[0].flickerData.flickerValue=1
|
||||
}
|
||||
let fchagValueTemp = waveChildrenList.value.filter(
|
||||
(item: any) => item.fchagFre == props.childForm[0].flickerData.fchagFre
|
||||
)[0].fchagValue
|
||||
props.childForm[0].flickerData.fchagValue = fchagValueTemp * props.childForm[0].flickerData.flickerValue
|
||||
}
|
||||
|
||||
const form: any = computed({
|
||||
get() {
|
||||
return props.childForm
|
||||
|
||||
Reference in New Issue
Block a user