fix(code): 🪲️修复ts编译错误
This commit is contained in:
parent
4af53113e4
commit
9e383cd989
@ -92,16 +92,6 @@ async function initInputList() {
|
||||
type: it.type,
|
||||
unit: it.unit,
|
||||
})
|
||||
if (it.addition) {
|
||||
setting.push({
|
||||
title: it.name,
|
||||
key: it.addition.key,
|
||||
value: '',
|
||||
placeholder: it.addition.placeholder, // + (it.unit?`(${it.unit})`:'')
|
||||
type: it.type,
|
||||
unit: it.addition.unit,
|
||||
})
|
||||
}
|
||||
})
|
||||
settingList.value = setting
|
||||
}
|
||||
|
@ -55,16 +55,16 @@
|
||||
<div class="form-item-container">
|
||||
<Form.Item label="指标名称" name="name"
|
||||
:rules="[{ required: true, message: '请输入指标名称' }]">
|
||||
<Input placeholder="请输入指标名称" v-model:value="saveData.name"/>
|
||||
<Input placeholder="请输入指标名称" v-model:value="saveData!.name"/>
|
||||
</Form.Item>
|
||||
<Form.Item label="指标Key" name="key" :rules="[{ required: true, message: '请输入指标Key' }]">
|
||||
<Input placeholder="请输入指标Key" v-model:value="saveData.key"/>
|
||||
<Input placeholder="请输入指标Key" v-model:value="saveData!.key"/>
|
||||
</Form.Item>
|
||||
<Form.Item label="输入提示" name="placeholder">
|
||||
<Input placeholder="请输入指标提示,留空默认使用:入液量(ml)" v-model:value="saveData.placeholder"/>
|
||||
<Input placeholder="请输入指标提示,留空默认使用:入液量(ml)" v-model:value="saveData!.placeholder"/>
|
||||
</Form.Item>
|
||||
<Form.Item label="单位" name="unit">
|
||||
<Input placeholder="请输入指标单位,留空默认使用:ml" v-model:value="saveData.unit"/>
|
||||
<Input placeholder="请输入指标单位,留空默认使用:ml" v-model:value="saveData!.unit"/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -18,8 +18,8 @@ export async function getList(param: ProductSearchParam) {
|
||||
await sleep(200);
|
||||
return await post<DataList<ProductInfoModel>>(`/product/all`, param);
|
||||
}
|
||||
export async function getProductDataInput(product_id: number) {
|
||||
await sleep(200);
|
||||
export async function getProductDataInput(product_id?: number) {
|
||||
await sleep(50);
|
||||
return await post<DataList<ProductDataInputModel>>(`/input/all`, { product_id });
|
||||
}
|
||||
export async function saveProductDataInput(data: Partial<ProductDataInputModel>) {
|
||||
|
4
src/vite-env.d.ts
vendored
4
src/vite-env.d.ts
vendored
@ -9,7 +9,7 @@ type SettingItem = {
|
||||
title: string;
|
||||
value: number | string;
|
||||
key: string;
|
||||
placeholder: string;
|
||||
type: string;
|
||||
placeholder?: string;
|
||||
type?: string;
|
||||
unit?: string;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user