ftdsy-attr 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ftdsy-attr.cjs.js +1 -1
- package/dist/ftdsy-attr.d.ts +81 -63
- package/dist/ftdsy-attr.esm.js +1 -1
- package/dist/types/api/tb/index.d.ts +2 -2
- package/dist/types/category/departmentStore/departmentStore_commodity.d.ts +17 -0
- package/dist/types/category/departmentStore/departmentStore_holidaysupplies.d.ts +17 -0
- package/dist/types/category/departmentStore/departmentStore_tableware.d.ts +17 -0
- package/dist/types/category/numeral/numeral_game.d.ts +17 -0
- package/dist/types/category/numeral/numeral_smart.d.ts +17 -0
- package/dist/types/category/type.d.ts +18 -0
- package/dist/types/main.d.ts +28 -7
- package/dist/types/models/index.d.ts +4 -11
- package/dist/types/platform/albb.d.ts +6 -0
- package/dist/types/platform/albb.type.d.ts +27 -0
- package/dist/types/platform/dy.d.ts +3 -0
- package/dist/types/platform/dy.type.d.ts +48 -0
- package/dist/types/platform/jd.d.ts +3 -0
- package/dist/types/platform/jd.type.d.ts +30 -0
- package/dist/types/platform/ks.d.ts +3 -0
- package/dist/types/platform/ks.type.d.ts +41 -0
- package/dist/types/platform/pdd.d.ts +6 -0
- package/dist/types/platform/pdd.type.d.ts +28 -0
- package/dist/types/platform/shopee.d.ts +6 -0
- package/dist/types/platform/shopee.type.d.ts +28 -0
- package/dist/types/platform/tb.d.ts +7 -0
- package/dist/types/platform/tb.type.d.ts +63 -0
- package/dist/types/platform/tiktok.d.ts +6 -0
- package/dist/types/platform/tiktok.type.d.ts +1 -0
- package/dist/types/platform/tm.d.ts +5 -0
- package/dist/types/platform/tm.type.d.ts +1 -0
- package/dist/types/platform/wxsph.d.ts +6 -0
- package/dist/types/platform/wxsph.type.d.ts +9 -0
- package/dist/types/platform/xhs.d.ts +6 -0
- package/dist/types/platform/xhs.type.d.ts +16 -0
- package/dist/types/property/index.d.ts +3 -3
- package/dist/types/property/matchProperty.d.ts +3 -3
- package/dist/types/property/perpareProperty.d.ts +3 -3
- package/dist/types/property/predictionProperty.d.ts +2 -3
- package/dist/types/property/type.d.ts +69 -0
- package/dist/types/type.d.ts +63 -32
- package/dist/types/utils/is/index.d.ts +23 -0
- package/dist/types/utils/utils.d.ts +33 -45
- package/package.json +1 -1
- package/dist/types/platform/index.d.ts +0 -6
- package/dist/types/platform/platform/albb.d.ts +0 -6
- package/dist/types/platform/platform/dy.d.ts +0 -6
- package/dist/types/platform/platform/jd.d.ts +0 -6
- package/dist/types/platform/platform/ks.d.ts +0 -6
- package/dist/types/platform/platform/pdd.d.ts +0 -9
- package/dist/types/platform/platform/shopee.d.ts +0 -6
- package/dist/types/platform/platform/tb.d.ts +0 -6
- package/dist/types/platform/platform/tiktok.d.ts +0 -6
- package/dist/types/platform/platform/tm.d.ts +0 -6
- package/dist/types/platform/platform/wxsph.d.ts +0 -6
- package/dist/types/platform/platform/xhs.d.ts +0 -6
- package/dist/types/platform/type.d.ts +0 -70
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Response } from '@/utils/axios';
|
|
2
|
-
import {
|
|
3
|
-
export declare const getAlibabaItemPublihProps: (options: any) => Promise<Response<
|
|
2
|
+
import { TbAttr } from "@/platform/tb.type";
|
|
3
|
+
export declare const getAlibabaItemPublihProps: (options: any) => Promise<Response<TbAttr[]> | undefined>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const departmentStore_commodity: {
|
|
2
|
+
title: string;
|
|
3
|
+
path: string;
|
|
4
|
+
pdd: string;
|
|
5
|
+
tb: string;
|
|
6
|
+
tm: string;
|
|
7
|
+
jd: string;
|
|
8
|
+
dy: string;
|
|
9
|
+
shopee: string;
|
|
10
|
+
xhs: string;
|
|
11
|
+
ks: string;
|
|
12
|
+
albb: string;
|
|
13
|
+
wxsph: string;
|
|
14
|
+
tiktok: string;
|
|
15
|
+
tiktokUs: string;
|
|
16
|
+
}[];
|
|
17
|
+
export default departmentStore_commodity;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const departmentStore_holidaysupplies: {
|
|
2
|
+
title: string;
|
|
3
|
+
path: string;
|
|
4
|
+
pdd: string;
|
|
5
|
+
tb: string;
|
|
6
|
+
tm: string;
|
|
7
|
+
jd: string;
|
|
8
|
+
dy: string;
|
|
9
|
+
shopee: string;
|
|
10
|
+
xhs: string;
|
|
11
|
+
ks: string;
|
|
12
|
+
albb: string;
|
|
13
|
+
wxsph: string;
|
|
14
|
+
tiktok: string;
|
|
15
|
+
tiktokUs: string;
|
|
16
|
+
}[];
|
|
17
|
+
export default departmentStore_holidaysupplies;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const departmentStoreTableware: {
|
|
2
|
+
title: string;
|
|
3
|
+
path: string;
|
|
4
|
+
pdd: string;
|
|
5
|
+
tb: string;
|
|
6
|
+
tm: string;
|
|
7
|
+
jd: string;
|
|
8
|
+
dy: string;
|
|
9
|
+
shopee: string;
|
|
10
|
+
xhs: string;
|
|
11
|
+
ks: string;
|
|
12
|
+
albb: string;
|
|
13
|
+
wxsph: string;
|
|
14
|
+
tiktok: string;
|
|
15
|
+
tiktokUs: string;
|
|
16
|
+
}[];
|
|
17
|
+
export default departmentStoreTableware;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const numeral_game: {
|
|
2
|
+
title: string;
|
|
3
|
+
path: string;
|
|
4
|
+
pdd: string;
|
|
5
|
+
tb: string;
|
|
6
|
+
tm: string;
|
|
7
|
+
jd: string;
|
|
8
|
+
dy: string;
|
|
9
|
+
shopee: string;
|
|
10
|
+
xhs: string;
|
|
11
|
+
ks: string;
|
|
12
|
+
albb: string;
|
|
13
|
+
wxsph: string;
|
|
14
|
+
tiktok: string;
|
|
15
|
+
tiktokUs: string;
|
|
16
|
+
}[];
|
|
17
|
+
export default numeral_game;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const numeral_smart: {
|
|
2
|
+
title: string;
|
|
3
|
+
path: string;
|
|
4
|
+
pdd: string;
|
|
5
|
+
tb: string;
|
|
6
|
+
tm: string;
|
|
7
|
+
jd: string;
|
|
8
|
+
dy: string;
|
|
9
|
+
shopee: string;
|
|
10
|
+
xhs: string;
|
|
11
|
+
ks: string;
|
|
12
|
+
albb: string;
|
|
13
|
+
wxsph: string;
|
|
14
|
+
tiktok: string;
|
|
15
|
+
tiktokUs: string;
|
|
16
|
+
}[];
|
|
17
|
+
export default numeral_smart;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type Category = {
|
|
2
|
+
title: string;
|
|
3
|
+
path?: string;
|
|
4
|
+
dsy?: string;
|
|
5
|
+
pdd: string;
|
|
6
|
+
tb: string;
|
|
7
|
+
tm: string;
|
|
8
|
+
jd: string;
|
|
9
|
+
dy: string;
|
|
10
|
+
shopee: string;
|
|
11
|
+
shopeebt?: string;
|
|
12
|
+
xhs: string;
|
|
13
|
+
ks: string;
|
|
14
|
+
albb: string;
|
|
15
|
+
wxsph: string;
|
|
16
|
+
tiktok: string;
|
|
17
|
+
tiktokUs: string;
|
|
18
|
+
};
|
package/dist/types/main.d.ts
CHANGED
|
@@ -1,21 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { MatchDatas } from './type';
|
|
1
|
+
import type { DsyAttr, DsyAttrWithValue, goodsAttr, MatchDatas, Pt } from './type';
|
|
2
|
+
export * from './type';
|
|
4
3
|
declare const _default: {
|
|
5
4
|
version: string;
|
|
6
|
-
matchCategoryProperties: typeof matchCategoryProperties;
|
|
7
5
|
createCategoryProperties: typeof createCategoryProperties;
|
|
6
|
+
matchCategoryProperties: typeof matchCategoryProperties;
|
|
8
7
|
createCategoryPropertyTemplate: typeof createCategoryPropertyTemplate;
|
|
9
8
|
};
|
|
10
9
|
export default _default;
|
|
10
|
+
/**
|
|
11
|
+
* 转换自定义属性列表,
|
|
12
|
+
* */
|
|
13
|
+
declare function createCategoryProperties(platform: Pt, ptAttrs: any): DsyAttr[] | null;
|
|
11
14
|
/**
|
|
12
15
|
* 匹配属性值
|
|
13
16
|
* @param matchDatas 匹配数据
|
|
14
17
|
* @param matchLevel 匹配等级
|
|
15
|
-
* @param outType 匹配结果输出类型 group:
|
|
18
|
+
* @param outType 匹配结果输出类型 group: 分组(已去除),template: 模板, list: 自定义属性列表(不含’品牌‘)
|
|
16
19
|
* */
|
|
17
|
-
declare function matchCategoryProperties(matchDatas: MatchDatas, matchLevel?: number, outType?:
|
|
20
|
+
declare function matchCategoryProperties(matchDatas: MatchDatas, matchLevel?: number, outType?: 'template' | 'list'): Promise<{
|
|
21
|
+
msg: string;
|
|
22
|
+
data: DsyAttrWithValue[];
|
|
23
|
+
code: number;
|
|
24
|
+
} | {
|
|
25
|
+
msg: string;
|
|
26
|
+
data: goodsAttr[];
|
|
27
|
+
code: number;
|
|
28
|
+
}>;
|
|
18
29
|
/**
|
|
19
30
|
* 创建分类属性模板
|
|
31
|
+
*
|
|
32
|
+
* 返回案例如下:
|
|
33
|
+
* input: { attr_name: '货号', value: 'abc' };
|
|
34
|
+
* date: { attr_name: '日期', value: '2025-8-1' };
|
|
35
|
+
* inputComponent: { attr_name: '含量', value: '100%' };
|
|
36
|
+
* singleSelect: { attr_name: '材质', value: '聚酯纤维' };
|
|
37
|
+
* singleSelect: { attr_name: '材质', value: '聚酯纤维' };
|
|
38
|
+
* multiSelect: { attr_name: '材质', value: '[聚酯纤维, 棉]' };
|
|
39
|
+
* multiComplex: { attr_name: '材质', value: '[聚酯纤维[80%], 棉[20%]]' };
|
|
40
|
+
* treeSingleSelect: { attr_name: '风格', value: '休闲风-简约风' };
|
|
20
41
|
* */
|
|
21
|
-
declare function createCategoryPropertyTemplate(properties:
|
|
42
|
+
declare function createCategoryPropertyTemplate(properties: (DsyAttrWithValue | goodsAttr)[]): goodsAttr[];
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import { MatchInfo } from "@/type";
|
|
2
|
-
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
attrSimilarity: typeof attrSimilarity;
|
|
6
|
-
attrValueSimilarity: typeof attrValueSimilarity;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
9
|
-
declare function getAttrDefaultValue(matchInfo: MatchInfo, propertyItem: PropertyItem): any;
|
|
10
|
-
declare function attrSimilarity(attr_name1: string, attr_name2: string): number;
|
|
11
|
-
declare function attrValueSimilarity(attr: string, attr_value1: string, attr_value2: string, min_similarity?: number): number;
|
|
1
|
+
import { MatchInfo, MatchAttr } from "@/property/type";
|
|
2
|
+
export declare function getAttrDefaultValue(matchInfo: MatchInfo, propertyItem: MatchAttr): any;
|
|
3
|
+
export declare function attrSimilarity(attr_name1: string, attr_name2: string): number;
|
|
4
|
+
export declare function attrValueSimilarity(attr: string, attr_value1: string, attr_value2: string, min_similarity?: number): number;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type DataSource = {
|
|
2
|
+
value: string;
|
|
3
|
+
text: string;
|
|
4
|
+
help?: string;
|
|
5
|
+
};
|
|
6
|
+
export type AlbbAttr = {
|
|
7
|
+
propertyId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
label: string;
|
|
10
|
+
uiType: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
propType: string;
|
|
13
|
+
maxCustomItems: number;
|
|
14
|
+
maxItems: number;
|
|
15
|
+
maxLength: number;
|
|
16
|
+
supportLevelProp: boolean;
|
|
17
|
+
useAiAgent: boolean;
|
|
18
|
+
fieldType: string;
|
|
19
|
+
dataSource?: DataSource[];
|
|
20
|
+
asyncCheck: boolean;
|
|
21
|
+
customizable?: boolean;
|
|
22
|
+
supportValueSearch?: boolean;
|
|
23
|
+
unit: string;
|
|
24
|
+
async?: {
|
|
25
|
+
childPropUrl?: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export type Option = {
|
|
2
|
+
name: string;
|
|
3
|
+
sequence: number;
|
|
4
|
+
value: string;
|
|
5
|
+
value_id: number;
|
|
6
|
+
};
|
|
7
|
+
export type ValueModules = {
|
|
8
|
+
input_type: string;
|
|
9
|
+
module_id: number;
|
|
10
|
+
prefix: string;
|
|
11
|
+
suffix: string;
|
|
12
|
+
units: [];
|
|
13
|
+
validate_rule: {
|
|
14
|
+
data_type: string;
|
|
15
|
+
max: number;
|
|
16
|
+
min: number;
|
|
17
|
+
precision: number;
|
|
18
|
+
time_format: string;
|
|
19
|
+
unit_rules: [];
|
|
20
|
+
};
|
|
21
|
+
value_required: boolean;
|
|
22
|
+
values: {
|
|
23
|
+
value_name: string;
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
26
|
+
export type Measure = {
|
|
27
|
+
display_name: string;
|
|
28
|
+
template_id: number;
|
|
29
|
+
value_modules: ValueModules[];
|
|
30
|
+
};
|
|
31
|
+
export type DyAttr = {
|
|
32
|
+
category_id: number;
|
|
33
|
+
cid: number;
|
|
34
|
+
diy_type: 0 | 1;
|
|
35
|
+
has_sub_property: boolean;
|
|
36
|
+
important_type: 0 | 1;
|
|
37
|
+
measure_templates: Measure[];
|
|
38
|
+
multi_select_max: number;
|
|
39
|
+
options: Option[];
|
|
40
|
+
property_id: number;
|
|
41
|
+
property_name: string;
|
|
42
|
+
property_type: number;
|
|
43
|
+
relation_id: number;
|
|
44
|
+
required: 0 | 1;
|
|
45
|
+
sequence: number;
|
|
46
|
+
status: number;
|
|
47
|
+
type: 'select' | 'multi_select' | 'text' | 'multi_value_measure' | 'measure';
|
|
48
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type AttrValue = {
|
|
2
|
+
attId: number;
|
|
3
|
+
catId: number;
|
|
4
|
+
features: {
|
|
5
|
+
key: string;
|
|
6
|
+
fvalue: string;
|
|
7
|
+
}[];
|
|
8
|
+
id: number;
|
|
9
|
+
name: string;
|
|
10
|
+
orderSort: number;
|
|
11
|
+
};
|
|
12
|
+
export type Feature = {
|
|
13
|
+
cn: null;
|
|
14
|
+
fvalue: string;
|
|
15
|
+
key: string;
|
|
16
|
+
};
|
|
17
|
+
export type JdAttr = {
|
|
18
|
+
attrGroup: null;
|
|
19
|
+
attrValueList: AttrValue[];
|
|
20
|
+
attributeType: number;
|
|
21
|
+
catId: number;
|
|
22
|
+
features: Feature[];
|
|
23
|
+
graphic: string;
|
|
24
|
+
id: number;
|
|
25
|
+
inputType: number;
|
|
26
|
+
isRequired: boolean;
|
|
27
|
+
name: string;
|
|
28
|
+
orderSort: 1;
|
|
29
|
+
originCategoryId: null | number;
|
|
30
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
type InputFormatConfig = {
|
|
2
|
+
patternList: string[];
|
|
3
|
+
useLimit: boolean;
|
|
4
|
+
max: number;
|
|
5
|
+
min: number;
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
type ImageInputConfig = {
|
|
9
|
+
minCount: number;
|
|
10
|
+
maxCount: number;
|
|
11
|
+
minWidth: number;
|
|
12
|
+
minHeight: number;
|
|
13
|
+
};
|
|
14
|
+
type PropInputConfig = {
|
|
15
|
+
dateInputConfig: null;
|
|
16
|
+
inputFormatConfig: InputFormatConfig | null;
|
|
17
|
+
imageInputConfig: ImageInputConfig | null;
|
|
18
|
+
};
|
|
19
|
+
export type Option = {
|
|
20
|
+
propValueId: number;
|
|
21
|
+
propValue: string;
|
|
22
|
+
};
|
|
23
|
+
export type UnitPropValue = {
|
|
24
|
+
unitPropValueId: string;
|
|
25
|
+
unitPropValueName: string;
|
|
26
|
+
};
|
|
27
|
+
export type KsAttr = {
|
|
28
|
+
propId: string;
|
|
29
|
+
propName: string;
|
|
30
|
+
preConstraint: boolean;
|
|
31
|
+
prePropValues: any[];
|
|
32
|
+
required: boolean;
|
|
33
|
+
propValueMaximum: number;
|
|
34
|
+
sortNum: number;
|
|
35
|
+
propInputConfig: PropInputConfig | null;
|
|
36
|
+
propInputType: string;
|
|
37
|
+
unitProp: UnitPropValue[];
|
|
38
|
+
customInput: boolean;
|
|
39
|
+
options: Option[];
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type Value = {
|
|
2
|
+
vid: number;
|
|
3
|
+
value: string;
|
|
4
|
+
parent_value: string[];
|
|
5
|
+
};
|
|
6
|
+
export type Condition = {
|
|
7
|
+
parent_ref_pid: number;
|
|
8
|
+
parent_vids: number[];
|
|
9
|
+
};
|
|
10
|
+
export type PddAttr = {
|
|
11
|
+
can_note: boolean;
|
|
12
|
+
choose_max_num: number;
|
|
13
|
+
input_max_num: number;
|
|
14
|
+
is_important: boolean;
|
|
15
|
+
is_sale: boolean;
|
|
16
|
+
is_sku: boolean;
|
|
17
|
+
max_value: string;
|
|
18
|
+
min_value: string;
|
|
19
|
+
name: string;
|
|
20
|
+
property_value_type: number;
|
|
21
|
+
ref_pid: number;
|
|
22
|
+
required: boolean;
|
|
23
|
+
required_rule_type: number;
|
|
24
|
+
show_condition: Condition[];
|
|
25
|
+
value_precision: number;
|
|
26
|
+
value_unit: string[];
|
|
27
|
+
values: Value[];
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type MultiLang = {
|
|
2
|
+
language: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
export type AttributeValue = {
|
|
6
|
+
value_id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
multi_lang?: MultiLang[];
|
|
9
|
+
child_attribute_list?: ShopeeAttr[];
|
|
10
|
+
};
|
|
11
|
+
export type AttributeInfo = {
|
|
12
|
+
input_type: number;
|
|
13
|
+
input_validation_type: number;
|
|
14
|
+
format_type: number;
|
|
15
|
+
is_oem: boolean;
|
|
16
|
+
support_search_value: boolean;
|
|
17
|
+
max_value_count?: number;
|
|
18
|
+
mandatory_region?: string[];
|
|
19
|
+
attribute_unit_list?: string[];
|
|
20
|
+
};
|
|
21
|
+
export type ShopeeAttr = {
|
|
22
|
+
attribute_id: number;
|
|
23
|
+
mandatory: boolean;
|
|
24
|
+
name: string;
|
|
25
|
+
attribute_value_list?: AttributeValue[];
|
|
26
|
+
multi_lang?: MultiLang[];
|
|
27
|
+
attribute_info: AttributeInfo;
|
|
28
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DsyAttr } from "../type";
|
|
2
|
+
import type { TbAttr } from "./tb.type";
|
|
3
|
+
export declare const getOriginProperty: (type: string) => string;
|
|
4
|
+
/**
|
|
5
|
+
* 将淘宝属性列表 转换自定义属性列表,
|
|
6
|
+
* */
|
|
7
|
+
export declare function createCategoryProperties(categoryProperties: TbAttr[]): DsyAttr[] | null;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export type Rule = {
|
|
2
|
+
exProperty?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
unit?: string;
|
|
5
|
+
value: string;
|
|
6
|
+
};
|
|
7
|
+
export type Option = {
|
|
8
|
+
displayName: string;
|
|
9
|
+
value: string;
|
|
10
|
+
};
|
|
11
|
+
export type Format = {
|
|
12
|
+
placeholder: string;
|
|
13
|
+
type: string;
|
|
14
|
+
text?: string;
|
|
15
|
+
};
|
|
16
|
+
export type UnitName = {
|
|
17
|
+
value: string;
|
|
18
|
+
};
|
|
19
|
+
export type Property = {
|
|
20
|
+
formats: {
|
|
21
|
+
format: Format | Format[];
|
|
22
|
+
};
|
|
23
|
+
key: string;
|
|
24
|
+
precision: {
|
|
25
|
+
name: string;
|
|
26
|
+
value: string;
|
|
27
|
+
};
|
|
28
|
+
taoSirType: {
|
|
29
|
+
value: string;
|
|
30
|
+
};
|
|
31
|
+
tip: {
|
|
32
|
+
value: string;
|
|
33
|
+
};
|
|
34
|
+
type: string;
|
|
35
|
+
unitNames: {
|
|
36
|
+
unitName: UnitName | UnitName[];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type Field = {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
options: {
|
|
43
|
+
option: Option[];
|
|
44
|
+
};
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
export type TbAttr = {
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
rules: {
|
|
51
|
+
rule: Rule | Rule[];
|
|
52
|
+
};
|
|
53
|
+
options: {
|
|
54
|
+
option: Option[];
|
|
55
|
+
};
|
|
56
|
+
properties: {
|
|
57
|
+
property: Property;
|
|
58
|
+
};
|
|
59
|
+
fields: {
|
|
60
|
+
field: Field | Field[];
|
|
61
|
+
};
|
|
62
|
+
type: 'singleCheck' | 'multiCheck' | 'input' | 'multiComplex';
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TiktokAttr = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TmAttr = {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type AttributeValue = {
|
|
2
|
+
valueId: string;
|
|
3
|
+
valueName: string;
|
|
4
|
+
};
|
|
5
|
+
export type XhsAttr = {
|
|
6
|
+
id: string;
|
|
7
|
+
isRequired: boolean;
|
|
8
|
+
name: string;
|
|
9
|
+
enName: string;
|
|
10
|
+
acceptsImage: boolean;
|
|
11
|
+
isMulti: boolean;
|
|
12
|
+
inputType: number;
|
|
13
|
+
dataType: number;
|
|
14
|
+
customizable: boolean;
|
|
15
|
+
values_list: AttributeValue[];
|
|
16
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { DsyAttr, DsyAttrWithValue, goodsAttr } from "@/type";
|
|
2
|
+
import type { MatchInfo, MatchGoods } from "./type";
|
|
3
3
|
declare const _default: {
|
|
4
4
|
matchPropertiesValue: typeof matchPropertiesValue;
|
|
5
5
|
};
|
|
@@ -7,4 +7,4 @@ export default _default;
|
|
|
7
7
|
/**
|
|
8
8
|
* 匹配属性值
|
|
9
9
|
* */
|
|
10
|
-
declare function matchPropertiesValue(matchInfo: MatchInfo, properties:
|
|
10
|
+
declare function matchPropertiesValue(matchInfo: MatchInfo, properties: DsyAttr[], attrs?: goodsAttr[], goods?: MatchGoods): Promise<DsyAttrWithValue[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { goodsAttr } from "@/type";
|
|
2
|
+
import type { MatchInfo, MatchGoods, MatchAttr } from "./type";
|
|
3
3
|
/**
|
|
4
4
|
* 匹配属性
|
|
5
5
|
* */
|
|
6
|
-
export declare function matchPropertyItem(matchInfo: MatchInfo, propertyItem:
|
|
6
|
+
export declare function matchPropertyItem(matchInfo: MatchInfo, propertyItem: MatchAttr, attrs?: goodsAttr[], goods?: MatchGoods): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { DsyAttr } from "@/type";
|
|
2
|
+
import type { PropertiesData } from "./type";
|
|
3
3
|
/**
|
|
4
4
|
* 匹配前进行属性重组以及分组
|
|
5
5
|
* 1.过滤掉’品牌‘属性
|
|
6
6
|
* 2.区分必填、非必填、子属性
|
|
7
7
|
* 3.将子属性添加到对应父属性下
|
|
8
8
|
* */
|
|
9
|
-
export declare function perparePropertyGroup(properties:
|
|
9
|
+
export declare function perparePropertyGroup(properties: DsyAttr[]): PropertiesData;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { MatchInfo, MatchGoods } from "
|
|
2
|
-
import { PropertyItem } from "../platform/type";
|
|
1
|
+
import type { MatchInfo, MatchGoods, MatchAttr } from "./type";
|
|
3
2
|
/**
|
|
4
3
|
* 预测属性值
|
|
5
4
|
*
|
|
6
5
|
* 1.优先根据已有信息进行填写(标题,备注,货号等)
|
|
7
6
|
* 2.再设置默认值(使用默认值表)
|
|
8
7
|
* */
|
|
9
|
-
export declare function predictionPropertyItem(matchInfo: MatchInfo, propertyItem:
|
|
8
|
+
export declare function predictionPropertyItem(matchInfo: MatchInfo, propertyItem: MatchAttr, selectAttrs: string, goods: MatchGoods): void;
|