|
@@ -115,6 +115,8 @@
|
|
|
<el-input
|
|
|
v-model="formModel.sevenRatio"
|
|
|
type="Number"
|
|
|
+ :min="0"
|
|
|
+ @input="checkNegative"
|
|
|
>
|
|
|
<template #append>%</template>
|
|
|
</el-input>
|
|
@@ -125,6 +127,8 @@
|
|
|
<el-input
|
|
|
v-model="formModel.twentyEightRatio"
|
|
|
type="Number"
|
|
|
+ :min="0"
|
|
|
+ @input="checkNegative"
|
|
|
>
|
|
|
<template #append>%</template>
|
|
|
</el-input>
|
|
@@ -325,7 +329,14 @@ const formRules = ref({
|
|
|
message: '请输入28天强度比例',
|
|
|
},
|
|
|
})
|
|
|
-
|
|
|
+const checkNegative = ()=>{
|
|
|
+ if (formModel.value.sevenRatio < 0) {
|
|
|
+ formModel.value.sevenRatio = 0
|
|
|
+ }
|
|
|
+ if (formModel.value.twentyEightRatio < 0) {
|
|
|
+ formModel.value.twentyEightRatio = 0
|
|
|
+ }
|
|
|
+}
|
|
|
//列表
|
|
|
const addNodeLoading = ref(false)
|
|
|
const tableColumn = ref([
|
|
@@ -478,3 +489,11 @@ const removeCon = async (id, index) => {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+.el-icon-percentage {
|
|
|
+ margin-left: 5px; /* 调整图标与输入框的间距 */
|
|
|
+ font-size: 20px; /* 调整图标大小 */
|
|
|
+ color: #999; /* 调整图标颜色 */
|
|
|
+}
|
|
|
+</style>
|