diff --git a/src/components/calc/index.vue b/src/components/calc/index.vue index e34e2bc..5bfc86d 100644 --- a/src/components/calc/index.vue +++ b/src/components/calc/index.vue @@ -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 } diff --git a/src/pages/product/input/index.vue b/src/pages/product/input/index.vue index ed435fd..0f9df88 100644 --- a/src/pages/product/input/index.vue +++ b/src/pages/product/input/index.vue @@ -55,16 +55,16 @@
- + - + - + - +
diff --git a/src/service/api/product.ts b/src/service/api/product.ts index 4ba6507..95a4fc2 100644 --- a/src/service/api/product.ts +++ b/src/service/api/product.ts @@ -18,8 +18,8 @@ export async function getList(param: ProductSearchParam) { await sleep(200); return await post>(`/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>(`/input/all`, { product_id }); } export async function saveProductDataInput(data: Partial) { diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index 1614b3a..0a45c0c 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -9,7 +9,7 @@ type SettingItem = { title: string; value: number | string; key: string; - placeholder: string; - type: string; + placeholder?: string; + type?: string; unit?: string; } \ No newline at end of file