fix build fail
This commit is contained in:
@@ -154,10 +154,6 @@ function getSelectedUnit(item: ProductStock): ProductSkuUnit | undefined {
|
|||||||
return unitList.find(unit => unit.id === selectedUnitId) || unitList.find(unit => unit.isBase) || unitList[0];
|
return unitList.find(unit => unit.id === selectedUnitId) || unitList.find(unit => unit.isBase) || unitList[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSelectedUnitName(item: ProductStock): string {
|
|
||||||
return getSelectedUnit(item)?.name || "基础单位";
|
|
||||||
}
|
|
||||||
|
|
||||||
function getStockQuantityText(item: ProductStock, value?: number | string): string {
|
function getStockQuantityText(item: ProductStock, value?: number | string): string {
|
||||||
const quantity = convertBaseQuantityToPackageQuantity(value ?? "0", getSelectedUnit(item)?.baseQuantityPerUnit ?? "1");
|
const quantity = convertBaseQuantityToPackageQuantity(value ?? "0", getSelectedUnit(item)?.baseQuantityPerUnit ?? "1");
|
||||||
return getProductQuantityText(quantity);
|
return getProductQuantityText(quantity);
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ import { BottomPopup } from "timi-tdesign-mobile";
|
|||||||
import type { ProductSkuUnit, ProductType } from "@/types/Product";
|
import type { ProductSkuUnit, ProductType } from "@/types/Product";
|
||||||
import type { ProductSkuForm, ProductSkuUnitForm, ProductSpecForm } from "@/types/ProductEditor";
|
import type { ProductSkuForm, ProductSkuUnitForm, ProductSpecForm } from "@/types/ProductEditor";
|
||||||
import { Message } from "@/utils/message";
|
import { Message } from "@/utils/message";
|
||||||
import { formatProductAmount, getProductSkuSpecEntries } from "@/utils/product";
|
import { formatProductAmount } from "@/utils/product";
|
||||||
|
|
||||||
defineOptions({ name: "ProductSkuUnitEditor" });
|
defineOptions({ name: "ProductSkuUnitEditor" });
|
||||||
|
|
||||||
@@ -91,7 +91,6 @@ const visible = computed({
|
|||||||
set: value => handleVisibleChange(value)
|
set: value => handleVisibleChange(value)
|
||||||
});
|
});
|
||||||
const unitEditorZIndex = 12100;
|
const unitEditorZIndex = 12100;
|
||||||
const skuSpecEntries = computed(() => sku.value ? getProductSkuSpecEntries(sku.value, props.specList) : []);
|
|
||||||
|
|
||||||
function handleVisibleChange(value: boolean): void {
|
function handleVisibleChange(value: boolean): void {
|
||||||
emit("update:modelValue", value);
|
emit("update:modelValue", value);
|
||||||
|
|||||||
Reference in New Issue
Block a user