@tarojs/components-react 4.0.8-beta.0 → 4.0.8-beta.3
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/README.md +31 -0
- package/dist/components/button/index.js +36 -10
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/image/index.js +1 -1
- package/dist/components/image/index.js.map +1 -1
- package/dist/components/image/style/{index.css.js → index.scss.js} +1 -1
- package/dist/components/image/style/index.scss.js.map +1 -0
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/picker/index.js +788 -0
- package/dist/components/picker/index.js.map +1 -0
- package/dist/components/picker/picker-group.js +491 -0
- package/dist/components/picker/picker-group.js.map +1 -0
- package/dist/components/{scroll-view/style/index.css.js → picker/style/index.scss.js} +1 -1
- package/dist/components/picker/style/index.scss.js.map +1 -0
- package/dist/components/pull-down-refresh/index.js +1 -1
- package/dist/components/pull-down-refresh/index.js.map +1 -1
- package/dist/components/pull-down-refresh/style/{index.css.js → index.scss.js} +1 -1
- package/dist/components/pull-down-refresh/style/index.scss.js.map +1 -0
- package/dist/components/refresher/index.js +7 -0
- package/dist/components/refresher/index.js.map +1 -0
- package/dist/components/scroll-view/index.js +8 -3
- package/dist/components/scroll-view/index.js.map +1 -1
- package/dist/components/{swiper/style/index.css.js → scroll-view/style/index.scss.js} +1 -1
- package/dist/components/scroll-view/style/index.scss.js.map +1 -0
- package/dist/components/swiper/index.js +5 -3
- package/dist/components/swiper/index.js.map +1 -1
- package/dist/components/swiper/style/index.scss.js +4 -0
- package/dist/components/swiper/style/index.scss.js.map +1 -0
- package/dist/components/text/index.js +1 -1
- package/dist/components/text/index.js.map +1 -1
- package/dist/components/text/style/index.scss.js +4 -0
- package/dist/components/text/style/index.scss.js.map +1 -0
- package/dist/components/view/index.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/original/components/button/index.js +113 -0
- package/dist/original/components/button/index.js.map +1 -0
- package/dist/original/components/button/style/index.scss +354 -0
- package/dist/original/components/icon/index.js +36 -0
- package/dist/original/components/icon/index.js.map +1 -0
- package/dist/original/components/icon/style/index.scss +304 -0
- package/dist/original/components/image/index.js +86 -0
- package/dist/original/components/image/index.js.map +1 -0
- package/dist/original/components/image/style/index.scss +90 -0
- package/dist/original/components/input/index.js +233 -0
- package/dist/original/components/input/index.js.map +1 -0
- package/dist/original/components/input/style/index.scss +71 -0
- package/dist/original/components/picker/index.js +788 -0
- package/dist/original/components/picker/index.js.map +1 -0
- package/dist/original/components/picker/picker-group.js +491 -0
- package/dist/original/components/picker/picker-group.js.map +1 -0
- package/dist/original/components/picker/style/index.scss +297 -0
- package/dist/original/components/pull-down-refresh/index.js +320 -0
- package/dist/original/components/pull-down-refresh/index.js.map +1 -0
- package/dist/original/components/pull-down-refresh/style/index.scss +53 -0
- package/dist/original/components/refresher/index.js +7 -0
- package/dist/original/components/refresher/index.js.map +1 -0
- package/dist/original/components/scroll-view/index.js +189 -0
- package/dist/original/components/scroll-view/index.js.map +1 -0
- package/dist/original/components/scroll-view/style/index.scss +22 -0
- package/dist/original/components/swiper/index.js +461 -0
- package/dist/original/components/swiper/index.js.map +1 -0
- package/dist/original/components/swiper/style/index.scss +9 -0
- package/dist/original/components/text/index.js +28 -0
- package/dist/original/components/text/index.js.map +1 -0
- package/dist/original/components/text/style/index.scss +13 -0
- package/dist/original/components/view/index.js +80 -0
- package/dist/original/components/view/index.js.map +1 -0
- package/dist/original/index.js +15 -0
- package/dist/original/index.js.map +1 -0
- package/dist/original/utils/hooks.react.js +15 -0
- package/dist/original/utils/hooks.react.js.map +1 -0
- package/dist/original/utils/index.js +162 -0
- package/dist/original/utils/index.js.map +1 -0
- package/dist/solid/components/button/index.js +50 -29
- package/dist/solid/components/button/index.js.map +1 -1
- package/dist/solid/components/icon/index.js.map +1 -1
- package/dist/solid/components/image/index.js +1 -1
- package/dist/solid/components/image/index.js.map +1 -1
- package/dist/solid/components/image/style/index.scss.js +4 -0
- package/dist/solid/components/image/style/index.scss.js.map +1 -0
- package/dist/solid/components/picker/index.js +830 -0
- package/dist/solid/components/picker/index.js.map +1 -0
- package/dist/solid/components/picker/picker-group.js +512 -0
- package/dist/solid/components/picker/picker-group.js.map +1 -0
- package/dist/solid/components/picker/style/index.scss.js +4 -0
- package/dist/solid/components/picker/style/index.scss.js.map +1 -0
- package/dist/solid/components/refresher/index.js +7 -0
- package/dist/solid/components/refresher/index.js.map +1 -0
- package/dist/solid/components/scroll-view/index.js +8 -3
- package/dist/solid/components/scroll-view/index.js.map +1 -1
- package/dist/solid/components/scroll-view/style/index.scss.js +4 -0
- package/dist/solid/components/scroll-view/style/index.scss.js.map +1 -0
- package/dist/solid/components/text/index.js +1 -1
- package/dist/solid/components/text/index.js.map +1 -1
- package/dist/solid/components/text/style/index.scss.js +4 -0
- package/dist/solid/components/text/style/index.scss.js.map +1 -0
- package/dist/solid/components/view/index.js.map +1 -1
- package/dist/solid/index.css +1 -1
- package/dist/solid/index.js +3 -1
- package/dist/solid/index.js.map +1 -1
- package/dist/solid/utils/hooks.solid.js.map +1 -1
- package/dist/solid/utils/index.js +103 -1
- package/dist/solid/utils/index.js.map +1 -1
- package/dist/utils/hooks.react.js.map +1 -1
- package/dist/utils/index.js +103 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +23 -9
- package/types/global.d.ts +1 -1
- package/types/index.d.ts +3 -1
- package/dist/components/image/style/index.css.js.map +0 -1
- package/dist/components/pull-down-refresh/style/index.css.js.map +0 -1
- package/dist/components/scroll-view/style/index.css.js.map +0 -1
- package/dist/components/swiper/style/index.css.js.map +0 -1
- package/dist/components/text/style/index.css.js +0 -4
- package/dist/components/text/style/index.css.js.map +0 -1
- package/dist/solid/components/image/style/index.css.js +0 -4
- package/dist/solid/components/image/style/index.css.js.map +0 -1
- package/dist/solid/components/scroll-view/style/index.css.js +0 -4
- package/dist/solid/components/scroll-view/style/index.css.js.map +0 -1
- package/dist/solid/components/text/style/index.css.js +0 -4
- package/dist/solid/components/text/style/index.css.js.map +0 -1
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
.weui-icon-circle:before { content: '\EA01' } /* '' */
|
|
2
|
+
.weui-icon-download:before { content: '\EA02' } /* '' */
|
|
3
|
+
.weui-icon-info:before { content: '\EA03' } /* '' */
|
|
4
|
+
.weui-icon-safe-success:before { content: '\EA04' } /* '' */
|
|
5
|
+
.weui-icon-safe-warn:before { content: '\EA05' } /* '' */
|
|
6
|
+
.weui-icon-success:before { content: '\EA06' } /* '' */
|
|
7
|
+
.weui-icon-success-circle:before { content: '\EA07' } /* '' */
|
|
8
|
+
.weui-icon-success-no-circle:before { content: '\EA08' } /* '' */
|
|
9
|
+
.weui-icon-waiting:before { content: '\EA09' } /* '' */
|
|
10
|
+
.weui-icon-waiting-circle:before { content: '\EA0A' } /* '' */
|
|
11
|
+
.weui-icon-warn:before { content: '\EA0B' } /* '' */
|
|
12
|
+
.weui-icon-info-circle:before { content: '\EA0C' } /* '' */
|
|
13
|
+
.weui-icon-cancel:before { content: '\EA0D' } /* '' */
|
|
14
|
+
.weui-icon-search:before { content: '\EA0E' } /* '' */
|
|
15
|
+
.weui-icon-clear:before { content: '\EA0F' } /* '' */
|
|
16
|
+
.weui-icon-back:before { content: '\EA10' } /* '' */
|
|
17
|
+
.weui-icon-delete:before { content: '\EA11' } /* '' */
|
|
18
|
+
|
|
19
|
+
.weui-icon-success {
|
|
20
|
+
font-size: 23px;
|
|
21
|
+
color: #09BB07;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.weui-icon-waiting {
|
|
25
|
+
font-size: 23px;
|
|
26
|
+
color: #10AEFF;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.weui-icon-warn {
|
|
30
|
+
font-size: 23px;
|
|
31
|
+
color: #F43530;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.weui-icon-info {
|
|
35
|
+
font-size: 23px;
|
|
36
|
+
color: #10AEFF;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.weui-icon-success-circle {
|
|
40
|
+
font-size: 23px;
|
|
41
|
+
color: #09BB07;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.weui-icon-success-no-circle {
|
|
45
|
+
font-size: 23px;
|
|
46
|
+
color: #09BB07;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.weui-icon-waiting-circle {
|
|
50
|
+
font-size: 23px;
|
|
51
|
+
color: #10AEFF;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.weui-icon-circle {
|
|
55
|
+
font-size: 23px;
|
|
56
|
+
color: #C9C9C9;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.weui-icon-download {
|
|
60
|
+
font-size: 23px;
|
|
61
|
+
color: #09BB07;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.weui-icon-info-circle {
|
|
65
|
+
font-size: 23px;
|
|
66
|
+
color: #09BB07;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.weui-icon-safe-success {
|
|
70
|
+
color: #09BB07;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.weui-icon-safe-warn {
|
|
74
|
+
color: #FFBE00;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.weui-icon-cancel {
|
|
78
|
+
color: #F43530;
|
|
79
|
+
font-size: 22px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.weui-icon-search {
|
|
83
|
+
color: #B2B2B2;
|
|
84
|
+
font-size: 14px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.weui-icon-clear {
|
|
88
|
+
color: #B2B2B2;
|
|
89
|
+
font-size: 14px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.weui-icon-delete {
|
|
93
|
+
&.weui-icon_gallery-delete {
|
|
94
|
+
color: #FFFFFF;
|
|
95
|
+
font-size: 22px;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.weui-icon_msg {
|
|
100
|
+
font-size: 93px;
|
|
101
|
+
|
|
102
|
+
&.weui-icon-warn {
|
|
103
|
+
color: #F76260;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.weui-icon_msg-primary {
|
|
108
|
+
font-size: 93px;
|
|
109
|
+
|
|
110
|
+
&.weui-icon-warn {
|
|
111
|
+
color: #FFBE00;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** Note: 暂不考虑切换到 SVG 模式,原因如下:
|
|
116
|
+
* 1. 实际使用体验与原先使用 WEUI V1.1.3 通过字体加载 Icon 的方式存在差异;
|
|
117
|
+
* 2. 当前 SVG 模式下,图标大小不一致需要进一步调试。
|
|
118
|
+
* 需要注意的是,移除字体文件可以为全局的 css 样式节省约 6.7KB 的大小。
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
// icon map
|
|
122
|
+
// .weui-icon-circle {
|
|
123
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%221000%22%20height%3D%221000%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M500%20916.667C269.881%20916.667%2083.333%20730.119%2083.333%20500%2083.333%20269.881%20269.881%2083.333%20500%2083.333c230.119%200%20416.667%20186.548%20416.667%20416.667%200%20230.119-186.548%20416.667-416.667%20416.667zm0-50c202.504%200%20366.667-164.163%20366.667-366.667%200-202.504-164.163-366.667-366.667-366.667-202.504%200-366.667%20164.163-366.667%20366.667%200%20202.504%20164.163%20366.667%20366.667%20366.667z%22%20fill-rule%3D%22evenodd%22%20fill-opacity%3D%22.9%22%2F%3E%3C%2Fsvg%3E);
|
|
124
|
+
// }
|
|
125
|
+
// .weui-icon-download {
|
|
126
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M11.25%2012.04l-1.72-1.72-1.06%201.06%202.828%202.83a1%201%200%20001.414-.001l2.828-2.828-1.06-1.061-1.73%201.73V7h-1.5v5.04zm0-5.04V2h1.5v5h6.251c.55%200%20.999.446.999.996v13.008a.998.998%200%2001-.996.996H4.996A.998.998%200%20014%2021.004V7.996A1%201%200%20014.999%207h6.251z%22%2F%3E%3C%2Fsvg%3E);
|
|
127
|
+
// }
|
|
128
|
+
// .weui-icon-info {
|
|
129
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-.75-12v7h1.5v-7h-1.5zM12%209a1%201%200%20100-2%201%201%200%20000%202z%22%2F%3E%3C%2Fsvg%3E);
|
|
130
|
+
// }
|
|
131
|
+
// .weui-icon-safe-success {
|
|
132
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201000%201000%22%3E%3Cpath%20d%3D%22M500.9%204.6C315.5%2046.7%20180.4%2093.1%2057.6%20132c0%20129.3.2%20231.7.2%20339.7%200%20304.2%20248.3%20471.6%20443.1%20523.7C695.7%20943.3%20944%20775.9%20944%20471.7c0-108%20.2-210.4.2-339.7C821.4%2093.1%20686.3%2046.7%20500.9%204.6zm248.3%20349.1l-299.7%20295c-2.1%202-5.3%202-7.4-.1L304.4%20506.1c-2-2.1-2.3-5.7-.6-8l18.3-24.9c1.7-2.3%205-2.8%207.2-1l112.2%2086c2.3%201.8%206%201.7%208.1-.1l274.7-228.9c2.2-1.8%205.7-1.7%207.7.3l17%2016.8c2.2%202.1%202.2%205.3.2%207.4z%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20fill%3D%22%23070202%22%2F%3E%3C%2Fsvg%3E);
|
|
133
|
+
// }
|
|
134
|
+
// .weui-icon-safe-warn {
|
|
135
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201000%201000%22%3E%3Cpath%20d%3D%22M500.9%204.5c-185.4%2042-320.4%2088.4-443.2%20127.3%200%20129.3.2%20231.7.2%20339.6%200%20304.1%20248.2%20471.4%20443%20523.6%20194.7-52.2%20443-219.5%20443-523.6%200-107.9.2-210.3.2-339.6C821.3%2092.9%20686.2%2046.5%20500.9%204.5zm-26.1%20271.1h52.1c5.8%200%2010.3%204.7%2010.1%2010.4l-11.6%20313.8c-.1%202.8-2.5%205.2-5.4%205.2h-38.2c-2.9%200-5.3-2.3-5.4-5.2L464.8%20286c-.2-5.8%204.3-10.4%2010-10.4zm26.1%20448.3c-20.2%200-36.5-16.3-36.5-36.5s16.3-36.5%2036.5-36.5%2036.5%2016.3%2036.5%2036.5-16.4%2036.5-36.5%2036.5z%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20fill%3D%22%23020202%22%2F%3E%3C%2Fsvg%3E);
|
|
136
|
+
// }
|
|
137
|
+
// .weui-icon-success {
|
|
138
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-1.177-7.86l-2.765-2.767L7%2012.431l3.119%203.121a1%201%200%20001.414%200l5.952-5.95-1.062-1.062-5.6%205.6z%22%2F%3E%3C%2Fsvg%3E);
|
|
139
|
+
// }
|
|
140
|
+
// .weui-icon-success-circle {
|
|
141
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm0-1.2a8.8%208.8%200%20100-17.6%208.8%208.8%200%20000%2017.6zm-1.172-6.242l5.809-5.808.848.849-5.95%205.95a1%201%200%2001-1.414%200L7%2012.426l.849-.849%202.98%202.98z%22%2F%3E%3C%2Fsvg%3E);
|
|
142
|
+
// }
|
|
143
|
+
// .weui-icon-success-no-circle {
|
|
144
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.657%2018.435L3%2012.778l1.414-1.414%204.95%204.95L20.678%205l1.414%201.414-12.02%2012.021a1%201%200%2001-1.415%200z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
|
|
145
|
+
// }
|
|
146
|
+
// .weui-icon-waiting {
|
|
147
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.75%2011.38V6h-1.5v6l4.243%204.243%201.06-1.06-3.803-3.804zM12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
|
|
148
|
+
// }
|
|
149
|
+
// .weui-icon-waiting-circle {
|
|
150
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.6%2011.503l3.891%203.891-.848.849L11.4%2012V6h1.2v5.503zM12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm0-1.2a8.8%208.8%200%20100-17.6%208.8%208.8%200%20000%2017.6z%22%2F%3E%3C%2Fsvg%3E);
|
|
151
|
+
// }
|
|
152
|
+
// .weui-icon-warn {
|
|
153
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-.763-15.864l.11%207.596h1.305l.11-7.596h-1.525zm.759%2010.967c.512%200%20.902-.383.902-.882%200-.5-.39-.882-.902-.882a.878.878%200%2000-.896.882c0%20.499.396.882.896.882z%22%2F%3E%3C%2Fsvg%3E);
|
|
154
|
+
// }
|
|
155
|
+
// .weui-icon-outlined-warn {
|
|
156
|
+
// mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12ZM20.8 12C20.8 16.8601 16.8601 20.8 12 20.8C7.13989 20.8 3.2 16.8601 3.2 12C3.2 7.13989 7.13989 3.2 12 3.2C16.8601 3.2 20.8 7.13989 20.8 12ZM12.6592 6.43115L12.5713 13.4917H11.4287L11.3408 6.43115H12.6592ZM11.165 16.2383C11.165 16.707 11.5312 17.0732 12 17.0732C12.4761 17.0732 12.835 16.707 12.835 16.2383C12.835 15.7622 12.4761 15.4033 12 15.4033C11.5312 15.4033 11.165 15.7622 11.165 16.2383Z' fill='black' /%3E%3C/svg%3E%0A");
|
|
157
|
+
// }
|
|
158
|
+
// .weui-icon-info-circle {
|
|
159
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm0-1.2a8.8%208.8%200%20100-17.6%208.8%208.8%200%20000%2017.6zM11.4%2010h1.2v7h-1.2v-7zm.6-1a1%201%200%20110-2%201%201%200%20010%202z%22%2F%3E%3C%2Fsvg%3E);
|
|
160
|
+
// }
|
|
161
|
+
// .weui-icon-cancel {
|
|
162
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm0-1.2a8.8%208.8%200%20100-17.6%208.8%208.8%200%20000%2017.6z%22%20fill-rule%3D%22nonzero%22%2F%3E%3Cpath%20d%3D%22M12.849%2012l3.11%203.111-.848.849L12%2012.849l-3.111%203.11-.849-.848L11.151%2012l-3.11-3.111.848-.849L12%2011.151l3.111-3.11.849.848L12.849%2012z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E);
|
|
163
|
+
// }
|
|
164
|
+
// .weui-icon-search {
|
|
165
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M16.31%2015.561l4.114%204.115-.848.848-4.123-4.123a7%207%200%2011.857-.84zM16.8%2011a5.8%205.8%200%2010-11.6%200%205.8%205.8%200%200011.6%200z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
|
|
166
|
+
// }
|
|
167
|
+
// .weui-icon-clear {
|
|
168
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.06%2012l3.006-3.005-1.06-1.06L12%2010.938%208.995%207.934l-1.06%201.06L10.938%2012l-3.005%203.005%201.06%201.06L12%2013.062l3.005%203.005%201.06-1.06L13.062%2012zM12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010z%22%2F%3E%3C%2Fsvg%3E);
|
|
169
|
+
// }
|
|
170
|
+
// .weui-icon-back {
|
|
171
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm1.999-6.563L10.68%2012%2014%208.562%2012.953%207.5%209.29%2011.277a1.045%201.045%200%20000%201.446l3.663%203.777L14%2015.437z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
|
|
172
|
+
// }
|
|
173
|
+
// .weui-icon-delete {
|
|
174
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M6.774%206.4l.812%2013.648a.8.8%200%2000.798.752h7.232a.8.8%200%2000.798-.752L17.226%206.4H6.774zm11.655%200l-.817%2013.719A2%202%200%200115.616%2022H8.384a2%202%200%2001-1.996-1.881L5.571%206.4H3.5v-.7a.5.5%200%2001.5-.5h16a.5.5%200%2001.5.5v.7h-2.071zM14%203a.5.5%200%2001.5.5v.7h-5v-.7A.5.5%200%200110%203h4zM9.5%209h1.2l.5%209H10l-.5-9zm3.8%200h1.2l-.5%209h-1.2l.5-9z%22%2F%3E%3C%2Fsvg%3E);
|
|
175
|
+
// }
|
|
176
|
+
// .weui-icon-success-no-circle-thin {
|
|
177
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.864%2016.617l-5.303-5.303-1.061%201.06%205.657%205.657a1%201%200%20001.414%200L21.238%206.364l-1.06-1.06L8.864%2016.616z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
|
|
178
|
+
// }
|
|
179
|
+
// .weui-icon-arrow {
|
|
180
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.454%206.58l1.06-1.06%205.78%205.779a.996.996%200%20010%201.413l-5.78%205.779-1.06-1.061%205.425-5.425-5.425-5.424z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
|
|
181
|
+
// }
|
|
182
|
+
// .weui-icon-arrow-bold {
|
|
183
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2212%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.157%2012.711L4.5%2018.368l-1.414-1.414%204.95-4.95-4.95-4.95L4.5%205.64l5.657%205.657a1%201%200%20010%201.414z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
|
|
184
|
+
// }
|
|
185
|
+
// .weui-icon-back-arrow {
|
|
186
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.343%2012l7.071%207.071L9%2020.485l-7.778-7.778a1%201%200%20010-1.414L9%203.515l1.414%201.414L3.344%2012z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
|
|
187
|
+
// }
|
|
188
|
+
// .weui-icon-back-arrow-thin {
|
|
189
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10%2019.438L8.955%2020.5l-7.666-7.79a1.02%201.02%200%20010-1.42L8.955%203.5%2010%204.563%202.682%2012%2010%2019.438z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
|
|
190
|
+
// }
|
|
191
|
+
// .weui-icon-close {
|
|
192
|
+
// mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.25 10.6932L6.05682 4.5L5 5.55682L11.1932 11.75L5 17.9432L6.05682 19L12.25 12.8068L18.4432 19L19.5 17.9432L13.3068 11.75L19.5 5.55682L18.4432 4.5L12.25 10.6932Z' fill='black' /%3E%3C/svg%3E%0A");
|
|
193
|
+
// }
|
|
194
|
+
// .weui-icon-close-thin {
|
|
195
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.25%2010.693L6.057%204.5%205%205.557l6.193%206.193L5%2017.943%206.057%2019l6.193-6.193L18.443%2019l1.057-1.057-6.193-6.193L19.5%205.557%2018.443%204.5z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
|
|
196
|
+
// }
|
|
197
|
+
// .weui-icon-back-circle {
|
|
198
|
+
// mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm0-1.2a8.8%208.8%200%20100-17.6%208.8%208.8%200%20000%2017.6zm1.999-5.363L12.953%2016.5%209.29%2012.723a1.045%201.045%200%20010-1.446L12.953%207.5%2014%208.563%2010.68%2012%2014%2015.438z%22%2F%3E%3C%2Fsvg%3E);
|
|
199
|
+
// }
|
|
200
|
+
|
|
201
|
+
// icon setting
|
|
202
|
+
// .weui-icon-success {
|
|
203
|
+
// color: $weuiColorPrimary;
|
|
204
|
+
// }
|
|
205
|
+
// .weui-icon-waiting {
|
|
206
|
+
// color: var(--weui-BLUE);
|
|
207
|
+
// }
|
|
208
|
+
// .weui-icon-warn {
|
|
209
|
+
// color: $weuiColorWarn;
|
|
210
|
+
// }
|
|
211
|
+
// .weui-icon-info {
|
|
212
|
+
// color: var(--weui-BLUE);
|
|
213
|
+
// }
|
|
214
|
+
|
|
215
|
+
// .weui-icon-success-circle {
|
|
216
|
+
// color: $weuiColorPrimary;
|
|
217
|
+
// }
|
|
218
|
+
// .weui-icon-success-no-circle,
|
|
219
|
+
// .weui-icon-success-no-circle-thin {
|
|
220
|
+
// color: $weuiColorPrimary;
|
|
221
|
+
// }
|
|
222
|
+
// .weui-icon-waiting-circle {
|
|
223
|
+
// color: var(--weui-BLUE);
|
|
224
|
+
// }
|
|
225
|
+
// .weui-icon-circle {
|
|
226
|
+
// color: $weuiTextColorTips;
|
|
227
|
+
// }
|
|
228
|
+
// .weui-icon-download {
|
|
229
|
+
// color: $weuiColorPrimary;
|
|
230
|
+
// }
|
|
231
|
+
|
|
232
|
+
// .weui-icon-info-circle {
|
|
233
|
+
// color: $weuiTextColorTips;
|
|
234
|
+
// }
|
|
235
|
+
|
|
236
|
+
// .weui-icon-safe-success {
|
|
237
|
+
// color: $weuiColorPrimary;
|
|
238
|
+
// }
|
|
239
|
+
// .weui-icon-safe-warn {
|
|
240
|
+
// color: var(--weui-YELLOW);
|
|
241
|
+
// }
|
|
242
|
+
|
|
243
|
+
// .weui-icon-cancel {
|
|
244
|
+
// color: $weuiColorWarn;
|
|
245
|
+
// }
|
|
246
|
+
|
|
247
|
+
// .weui-icon-search {
|
|
248
|
+
// color: $weuiTextColorDesc;
|
|
249
|
+
// }
|
|
250
|
+
|
|
251
|
+
// .weui-icon-clear {
|
|
252
|
+
// color: $weuiTextColorTips;
|
|
253
|
+
// &:active {
|
|
254
|
+
// color: $weuiTextColorDesc;
|
|
255
|
+
// }
|
|
256
|
+
// }
|
|
257
|
+
|
|
258
|
+
// .weui-icon-delete {
|
|
259
|
+
// &.weui-icon_gallery-delete {
|
|
260
|
+
// color: var(--weui-WHITE);
|
|
261
|
+
// }
|
|
262
|
+
// }
|
|
263
|
+
// .weui-icon-arrow,
|
|
264
|
+
// .weui-icon-arrow-bold,
|
|
265
|
+
// .weui-icon-back-arrow,
|
|
266
|
+
// .weui-icon-back-arrow-thin {
|
|
267
|
+
// & {
|
|
268
|
+
// width: 1.2em;
|
|
269
|
+
// }
|
|
270
|
+
// }
|
|
271
|
+
// .weui-icon-arrow,
|
|
272
|
+
// .weui-icon-arrow-bold {
|
|
273
|
+
// color: $weuiTextColorTips;
|
|
274
|
+
// }
|
|
275
|
+
// .weui-icon-back-arrow,
|
|
276
|
+
// .weui-icon-back-arrow-thin {
|
|
277
|
+
// color: $weuiTextColorTitle;
|
|
278
|
+
// }
|
|
279
|
+
// .weui-icon-back,
|
|
280
|
+
// .weui-icon-back-circle {
|
|
281
|
+
// color: $weuiTextColorTitle;
|
|
282
|
+
// }
|
|
283
|
+
|
|
284
|
+
// .weui-icon_msg {
|
|
285
|
+
// & {
|
|
286
|
+
// width: 6.4em;
|
|
287
|
+
// height: 6.4em;
|
|
288
|
+
// &.weui-icon-warn {
|
|
289
|
+
// color: $weuiColorWarn;
|
|
290
|
+
// }
|
|
291
|
+
// &.weui-icon-info-circle {
|
|
292
|
+
// color: var(--weui-BLUE);
|
|
293
|
+
// }
|
|
294
|
+
// }
|
|
295
|
+
// }
|
|
296
|
+
// .weui-icon_msg-primary {
|
|
297
|
+
// & {
|
|
298
|
+
// width: 6.4em;
|
|
299
|
+
// height: 6.4em;
|
|
300
|
+
// &.weui-icon-warn {
|
|
301
|
+
// color: var(--weui-YELLOW);
|
|
302
|
+
// }
|
|
303
|
+
// }
|
|
304
|
+
// }
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import './style/index.scss';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { createForwardRefComponent } from '../../utils/index.js';
|
|
5
|
+
import { useRef, useState, useCallback, useEffect } from '../../utils/hooks.react.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function Image(props) {
|
|
9
|
+
const imgRef = useRef(null);
|
|
10
|
+
const observer = useRef({});
|
|
11
|
+
const [, setIsLoaded] = useState(false);
|
|
12
|
+
const {
|
|
13
|
+
className,
|
|
14
|
+
style = {},
|
|
15
|
+
src,
|
|
16
|
+
mode,
|
|
17
|
+
onError,
|
|
18
|
+
lazyLoad,
|
|
19
|
+
imgProps,
|
|
20
|
+
forwardedRef
|
|
21
|
+
} = props,
|
|
22
|
+
reset = __rest(props, ["className", "style", "src", "mode", "onError", "lazyLoad", "imgProps", "forwardedRef"]);
|
|
23
|
+
const cls = classNames('taro-img', {
|
|
24
|
+
'taro-img__widthfix': mode === 'widthFix'
|
|
25
|
+
}, className);
|
|
26
|
+
const imgCls = classNames('taro-img__mode-' + (mode || 'scaleToFill').toLowerCase().replace(/\s/g, ''));
|
|
27
|
+
const imageOnLoad = useCallback(e => {
|
|
28
|
+
const {
|
|
29
|
+
onLoad
|
|
30
|
+
} = props;
|
|
31
|
+
Object.defineProperty(e, 'detail', {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: {
|
|
35
|
+
width: e.target.width,
|
|
36
|
+
height: e.target.height
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
onLoad && onLoad(e);
|
|
40
|
+
}, [props]);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
if (lazyLoad) {
|
|
44
|
+
observer.current = new IntersectionObserver(entries => {
|
|
45
|
+
// 异步 api 关系
|
|
46
|
+
if (entries[entries.length - 1].isIntersecting) {
|
|
47
|
+
setIsLoaded(true);
|
|
48
|
+
// findDOMNode(this).children[0].src = src
|
|
49
|
+
imgRef.current.src = src;
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
rootMargin: '300px 0px'
|
|
53
|
+
});
|
|
54
|
+
(_b = (_a = observer.current).observe) === null || _b === void 0 ? void 0 : _b.call(_a, imgRef.current);
|
|
55
|
+
}
|
|
56
|
+
return () => {
|
|
57
|
+
var _a, _b;
|
|
58
|
+
(_b = (_a = observer.current) === null || _a === void 0 ? void 0 : _a.disconnect) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
59
|
+
};
|
|
60
|
+
}, [lazyLoad, src]);
|
|
61
|
+
return /*#__PURE__*/jsx("div", {
|
|
62
|
+
className: cls,
|
|
63
|
+
style: style,
|
|
64
|
+
ref: forwardedRef,
|
|
65
|
+
...reset,
|
|
66
|
+
children: lazyLoad ? /*#__PURE__*/jsx("img", {
|
|
67
|
+
ref: img => imgRef.current = img,
|
|
68
|
+
className: imgCls,
|
|
69
|
+
"data-src": src,
|
|
70
|
+
onLoad: imageOnLoad,
|
|
71
|
+
onError: onError,
|
|
72
|
+
...imgProps
|
|
73
|
+
}) : /*#__PURE__*/jsx("img", {
|
|
74
|
+
ref: img => imgRef.current = img,
|
|
75
|
+
className: imgCls,
|
|
76
|
+
src: src,
|
|
77
|
+
onLoad: imageOnLoad,
|
|
78
|
+
onError: onError,
|
|
79
|
+
...imgProps
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
var index = createForwardRefComponent(Image);
|
|
84
|
+
|
|
85
|
+
export { index as default };
|
|
86
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/image/index.tsx"],"sourcesContent":["import './style/index.scss'\n\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent } from '../../utils'\nimport { useCallback, useEffect, useRef, useState } from '../../utils/hooks'\n\nimport type React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n src: string\n mode: string\n onError: () => void\n onLoad: (e) => void\n lazyLoad?: boolean\n imgProps?: Record<string, any>\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\n}\n\nfunction Image (props: IProps) {\n const imgRef = useRef<HTMLImageElement | null>(null)\n const observer = useRef<Partial<IntersectionObserver>>({})\n const [, setIsLoaded] = useState(false)\n const {\n className,\n style = {},\n src,\n mode,\n onError,\n lazyLoad,\n imgProps,\n forwardedRef,\n ...reset\n } = props\n\n const cls = classNames(\n 'taro-img',\n {\n 'taro-img__widthfix': mode === 'widthFix'\n },\n className\n )\n const imgCls = classNames(\n 'taro-img__mode-' +\n (mode || 'scaleToFill').toLowerCase().replace(/\\s/g, '')\n )\n\n const imageOnLoad = useCallback((e) => {\n const { onLoad } = props\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n writable: true,\n value: {\n width: e.target.width,\n height: e.target.height\n }\n })\n\n onLoad && onLoad(e)\n }, [props])\n\n useEffect(() => {\n if (lazyLoad) {\n observer.current = new IntersectionObserver(\n entries => {\n // 异步 api 关系\n if (entries[entries.length - 1].isIntersecting) {\n setIsLoaded(true)\n // findDOMNode(this).children[0].src = src\n imgRef.current!.src = src\n }\n },\n {\n rootMargin: '300px 0px'\n }\n )\n observer.current.observe?.(imgRef.current!)\n }\n\n return () => {\n observer.current?.disconnect?.()\n }\n }, [lazyLoad, src])\n\n return (\n <div className={cls} style={style} ref={forwardedRef} {...reset}>\n {lazyLoad ? (\n <img\n ref={img => (imgRef.current = img)}\n className={imgCls}\n data-src={src}\n onLoad={imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n ) : (\n <img\n ref={img => (imgRef.current = img)}\n className={imgCls}\n src={src}\n onLoad={imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n )}\n </div>\n )\n}\n\nexport default createForwardRefComponent(Image)\n"],"names":["Image","props","imgRef","useRef","observer","setIsLoaded","useState","className","style","src","mode","onError","lazyLoad","imgProps","forwardedRef","reset","__rest","cls","classNames","imgCls","toLowerCase","replace","imageOnLoad","useCallback","e","onLoad","Object","defineProperty","enumerable","writable","value","width","target","height","useEffect","current","IntersectionObserver","entries","length","isIntersecting","rootMargin","_b","_a","observe","call","disconnect","_jsx","ref","children","img","createForwardRefComponent"],"mappings":"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"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
img[src=''] {
|
|
2
|
+
opacity: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.taro-img {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
position: relative;
|
|
9
|
+
width: 320px;
|
|
10
|
+
height: 240px;
|
|
11
|
+
font-size: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.taro-img.taro-img__widthfix {
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.taro-img__mode-heightfix {
|
|
19
|
+
height: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.taro-img__mode-scaletofill {
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.taro-img__mode-aspectfit {
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 100%;
|
|
30
|
+
object-fit: contain;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.taro-img__mode-aspectfill {
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
object-fit: cover;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.taro-img__mode-widthfix {
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.taro-img__mode-top {
|
|
44
|
+
position: absolute;
|
|
45
|
+
left: 50%;
|
|
46
|
+
transform: translate(-50%, 0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.taro-img__mode-bottom {
|
|
50
|
+
position: absolute;
|
|
51
|
+
left: 50%;
|
|
52
|
+
bottom: 0;
|
|
53
|
+
transform: translate(-50%, 0);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.taro-img__mode-center {
|
|
57
|
+
position: absolute;
|
|
58
|
+
left: 50%;
|
|
59
|
+
top: 50%;
|
|
60
|
+
transform: translate(-50%, -50%);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.taro-img__mode-left {
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 50%;
|
|
66
|
+
transform: translate(0, -50%);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.taro-img__mode-right {
|
|
70
|
+
position: absolute;
|
|
71
|
+
right: 0;
|
|
72
|
+
top: 50%;
|
|
73
|
+
transform: translate(0, -50%);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.taro-img__mode-topright {
|
|
77
|
+
position: absolute;
|
|
78
|
+
right: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.taro-img__mode-bottomleft {
|
|
82
|
+
position: absolute;
|
|
83
|
+
bottom: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.taro-img__mode-bottomright {
|
|
87
|
+
position: absolute;
|
|
88
|
+
right: 0;
|
|
89
|
+
bottom: 0;
|
|
90
|
+
}
|