types(Sku): add methods types

This commit is contained in:
陈嘉涵
2019-12-22 17:36:47 +08:00
committed by neverland
parent cf191e09cb
commit d2bb9fa81b
3 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import { BORDER_BOTTOM } from '../../utils/constant';
// Types
import Vue, { CreateElement, RenderContext } from 'vue/types';
import { DefaultSlots } from '../../utils/types';
import { SkuData, SkuGoodsData, SelectedSkuData } from '../type';
import { SkuData, SkuGoodsData, SelectedSkuData } from '../../../types/sku';
export type SkuHeaderProps = {
sku: SkuData;
+1 -1
View File
@@ -5,7 +5,7 @@ import { BORDER_BOTTOM } from '../../utils/constant';
// Types
import { CreateElement, RenderContext } from 'vue/types';
import { DefaultSlots } from '../../utils/types';
import { SkuTreeItemData } from '../type';
import { SkuTreeItemData } from '../../../types/sku';
export type SkuRowProps = {
skuRow: SkuTreeItemData;
-51
View File
@@ -1,51 +0,0 @@
/* eslint-disable camelcase */
export type SkuData = {
price: string;
none_sku: boolean;
stock_num: number;
hide_stock: boolean;
collection_id: number;
tree: SkuTreeItemData[];
list: SkuListItemData[];
messages: SkuMessageData[];
};
export type SkuTreeItemData = {
k: string;
v: SkuTreeItemValueData[];
k_s: string;
};
export type SkuTreeItemValueData = {
id: string;
name: string;
imgUrl?: string;
img_url?: string;
previewImgUrl?: string;
};
export type SkuListItemData = {
id: number;
s1: string;
s2: string;
s3: string;
price: number;
stock_num: number;
};
export type SkuMessageData = {
name: string;
type: string;
required?: string;
datetime?: string;
multiple?: string;
placeholder?: string;
};
export type SkuGoodsData = {
title: string;
picture: string;
};
export type SelectedSkuData = Record<string, string>;