fix add-point-card invalid
This commit is contained in:
@@ -32,9 +32,9 @@
|
||||
:show-viewer-actions="false"
|
||||
:add-actions="attachmentAddActions"
|
||||
@add="openAttachmentPicker('OTHER')"
|
||||
@action="handleAttachmentAction"
|
||||
@capture-photo="capturePhoto"
|
||||
@capture-video="captureVideo"
|
||||
@add-other="openAttachmentPicker('OTHER')"
|
||||
/>
|
||||
</t-form-item>
|
||||
<t-form-item label="纯色封面" label-width="8rem" content-align="right">
|
||||
@@ -214,6 +214,7 @@ import MediaSelector from "@/components/mediaSelector/MediaSelector.vue";
|
||||
import ProductSkuEditor from "@/pages/product/component/ProductSkuEditor.vue";
|
||||
import ProductSkuUnitEditor from "@/pages/product/component/ProductSkuUnitEditor.vue";
|
||||
import ProductSkuUnitBatchEditor from "@/pages/product/component/ProductSkuUnitBatchEditor.vue";
|
||||
import type { MediaSelectorAddAction } from "@/components/mediaSelector/types";
|
||||
import { useNavBarStore } from "@/store/navBarStore";
|
||||
import type { PhotoItem } from "@/types/Photo";
|
||||
import type { Product, ProductAttachmentType, ProductCategory, ProductSku, ProductSkuUnit, ProductSpec, ProductType } from "@/types/Product";
|
||||
@@ -567,6 +568,12 @@ function captureVideo(): void {
|
||||
videoInputRef.value?.click();
|
||||
}
|
||||
|
||||
function handleAttachmentAction(action: MediaSelectorAddAction): void {
|
||||
if (action.emit === "add-other") {
|
||||
openAttachmentPicker("OTHER");
|
||||
}
|
||||
}
|
||||
|
||||
function openCoverColorPicker(): void {
|
||||
coverColorDraft.value = solidColorCoverColor.value || DEFAULT_COVER_COLOR;
|
||||
coverColorPickerVisible.value = true;
|
||||
|
||||
Reference in New Issue
Block a user