@conecli/cone-render 0.8.20-shop.221 → 0.8.20-shop.223
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/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
- package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
- package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
- package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
- package/dist/jumpEventReport/base.ts +1 -1
- package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
- package/dist/open/components/index.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
// 默认标签高度14 部分特殊的16,因此设置最大高度16
|
|
3
|
+
|
|
4
|
+
.d-shop-tag-list {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
justify-content: flex-start;
|
|
9
|
+
align-content: flex-start;
|
|
10
|
+
align-items: center;
|
|
11
|
+
align-self: flex-start;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
font-size: 0;
|
|
14
|
+
line-height: 10px; // 解决换行后上下无间隙导致看到线条的问题
|
|
15
|
+
max-height: 16PX;
|
|
16
|
+
|
|
17
|
+
&.d-shop-sku-tag-list{
|
|
18
|
+
margin: -2PX 8px 0 0;
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
//height: 14PX;
|
|
21
|
+
//line-height: 14PX;
|
|
22
|
+
vertical-align: middle;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.d-tag-item{
|
|
26
|
+
margin-right: 8px;
|
|
27
|
+
&:last-child{
|
|
28
|
+
margin-right: 0;
|
|
29
|
+
}
|
|
30
|
+
.d-tag-item-canvas{
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
height: 100%;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
const getThisLeGaoTagKey = `${tagId}-${tagText}}`;
|
|
1
3
|
const getLeGaoTagCacheNode = shopLeGaoTagNodeMap.get(getThisLeGaoTagKey) || false;
|
|
2
4
|
return getLeGaoTagCacheNode
|
|
3
5
|
? getLeGaoTagCacheNode
|
|
4
6
|
: useMemo(() => {
|
|
5
7
|
const createCanVasTag = (
|
|
6
8
|
<canvas-tag
|
|
7
9
|
className={classNames(shopTagStyle['d-tag-item-canvas'])}
|
|
8
10
|
tagId={tagId}
|
|
9
11
|
text={tagText}
|
|
10
12
|
appVersion={getJdAppVersionStr}
|
|
11
13
|
lang={languageNowType}
|
|
12
14
|
/>
|
|
13
15
|
);
|
|
14
16
|
shopLeGaoTagNodeMap.set(getThisLeGaoTagKey, createCanVasTag);
|
|
15
17
|
return createCanVasTag;
|
|
16
18
|
}, [tagId, tagText]);
|
|
17
19
|
const {
|
|
18
20
|
tagInfoList = [],
|
|
19
21
|
className,
|
|
20
22
|
itemClassName,
|
|
21
23
|
isSkuBaseTag = false,
|
|
22
24
|
itemClickCallback,
|
|
23
25
|
} = props;
|
|
24
26
|
const getTagInfoList = Array.isArray(tagInfoList) ? tagInfoList : [];
|
|
25
27
|
const getTagInfoListNum = getTagInfoList.length;
|
|
26
28
|
const isCallBackFn = typeof itemClickCallback === 'function';
|
|
27
29
|
return getTagInfoListNum > 0 ? (
|
|
28
30
|
<View
|
|
29
31
|
className={classNames(
|
|
30
32
|
shopTagStyle['d-shop-tag-list'],
|
|
31
33
|
{
|
|
32
34
|
[shopTagStyle['d-shop-sku-tag-list']]: isSkuBaseTag,
|
|
33
35
|
},
|
|
34
36
|
className,
|
|
35
37
|
)}
|
|
36
38
|
>
|
|
37
39
|
{}
|
|
38
40
|
<View style={{ width: '1px', height: '100%' }} />
|
|
39
41
|
{getTagInfoList.map((item, index) => {
|
|
40
42
|
const { tagId, tabIconId, tagText, type, tabIconType, tabText } = item;
|
|
41
43
|
const getTagId = tagId || tabIconId;
|
|
42
44
|
const getTagType = type || tabIconType;
|
|
43
45
|
const getTagText = tagText || tabText;
|
|
44
46
|
return getTagId ? (
|
|
45
47
|
<View
|
|
46
48
|
key={getTagId + getTagType + index}
|
|
47
49
|
className={classNames(shopTagStyle['d-tag-item'], itemClassName)}
|
|
48
50
|
onClick={isCallBackFn && itemClickCallback.bind(this, item, index)}
|
|
49
51
|
>
|
|
50
52
|
<LeGaoTagComponent tagId={getTagId} tagText={getTagText} />
|
|
51
53
|
</View>
|
|
52
54
|
) : null;
|
|
53
55
|
})}
|
|
54
56
|
</View>
|
|
55
57
|
) : null;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
// 默认标签高度14 部分特殊的16,因此设置最大高度16
|
|
3
|
+
|
|
4
|
+
.d-shop-tag-list {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
justify-content: flex-start;
|
|
9
|
+
align-content: flex-start;
|
|
10
|
+
align-items: center;
|
|
11
|
+
align-self: flex-start;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
font-size: 0;
|
|
14
|
+
line-height: 10px; // 解决换行后上下无间隙导致看到线条的问题
|
|
15
|
+
max-height: 32px;
|
|
16
|
+
|
|
17
|
+
&.d-shop-sku-tag-list{
|
|
18
|
+
margin: -6px 8px 0 0;
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
height: 28px;
|
|
21
|
+
line-height: 28px;
|
|
22
|
+
vertical-align: middle;
|
|
23
|
+
}
|
|
24
|
+
.d-tag-item{
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
margin-right: 8px;
|
|
27
|
+
width: auto;
|
|
28
|
+
height: 28px;
|
|
29
|
+
&:last-child{
|
|
30
|
+
margin-right: 0;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
"tab_054": "https://m.360buyimg.com/cc/jfs/t1/88382/20/39502/894/64d36235Fc720ec9d/908e4378fec75555.png",
|
|
1
3
|
"tab_054_home": "https://m.360buyimg.com/cc/jfs/t1/88382/20/39502/894/64d36235Fc720ec9d/908e4378fec75555.png",
|
|
2
4
|
"tab_665": "https://m.360buyimg.com/cc/jfs/t1/252765/17/9937/2555/677c9155F246ead31/55243d94eb9ca8db.png",
|
|
3
5
|
"tab_6209_dp": "https://m.360buyimg.com/cc/jfs/t1/252765/17/9937/2555/677c9155F246ead31/55243d94eb9ca8db.png",
|
|
4
6
|
const { tagInfoList = [], className, itemClassName, isSkuBaseTag = false } = props;
|
|
5
7
|
const getTagInfoList = Array.isArray(tagInfoList) ? tagInfoList : [];
|
|
6
8
|
const getTagInfoListNum = getTagInfoList.length;
|
|
7
9
|
return getTagInfoListNum > 0 ? (
|
|
8
10
|
<View className={classNames(shopTagStyle['d-shop-tag-list'],{
|
|
9
11
|
[shopTagStyle['d-shop-sku-tag-list']]: isSkuBaseTag
|
|
10
12
|
}, className)}>
|
|
11
13
|
{}
|
|
12
14
|
<View style={{ width: '1px', height: '100%' }} />
|
|
13
15
|
{getTagInfoList.map((item, index) => {
|
|
14
16
|
const { tabIconId,tagId, tabImageUrl,type, tabIconType} = item;
|
|
15
17
|
const getTagId = tagId || tabIconId;
|
|
16
18
|
const getTagType = type || tabIconType;
|
|
17
19
|
const getUrl =
|
|
18
20
|
typeof tabImageUrl === 'string' ? tabImageUrl : shopTagIconDefaultUrl[getTagId];
|
|
19
21
|
return getUrl && getUrl !== "" ? (
|
|
20
22
|
<Image
|
|
21
23
|
key={index + getTagId + getTagType}
|
|
22
24
|
className={classNames(shopTagStyle['d-tag-item'], itemClassName)}
|
|
23
25
|
mode="heightFix"
|
|
24
26
|
src={getUrl}
|
|
25
27
|
/>
|
|
26
28
|
) : null;
|
|
27
29
|
})}
|
|
28
30
|
</View>
|
|
29
31
|
) : null;
|