@xhsreds/reds-rn-next 0.9.1-beta202510291556 → 0.9.1-test.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/CHANGELOG.md +7 -0
- package/coverage/.tmp/coverage-0.json +1 -1
- package/coverage/.tmp/coverage-1.json +1 -1
- package/coverage/.tmp/coverage-10.json +1 -1
- package/coverage/.tmp/coverage-11.json +1 -1
- package/coverage/.tmp/coverage-12.json +1 -1
- package/coverage/.tmp/coverage-13.json +1 -1
- package/coverage/.tmp/coverage-14.json +1 -1
- package/coverage/.tmp/coverage-15.json +1 -1
- package/coverage/.tmp/coverage-16.json +1 -1
- package/coverage/.tmp/coverage-17.json +1 -1
- package/coverage/.tmp/coverage-18.json +1 -1
- package/coverage/.tmp/coverage-19.json +1 -1
- package/coverage/.tmp/coverage-2.json +1 -1
- package/coverage/.tmp/coverage-20.json +1 -1
- package/coverage/.tmp/coverage-23.json +1 -1
- package/coverage/.tmp/coverage-24.json +1 -1
- package/coverage/.tmp/coverage-29.json +1 -1
- package/coverage/.tmp/coverage-3.json +1 -1
- package/coverage/.tmp/coverage-30.json +1 -1
- package/coverage/.tmp/coverage-31.json +1 -1
- package/coverage/.tmp/coverage-33.json +1 -1
- package/coverage/.tmp/coverage-34.json +1 -1
- package/coverage/.tmp/coverage-35.json +1 -1
- package/coverage/.tmp/coverage-36.json +1 -1
- package/coverage/.tmp/coverage-37.json +1 -1
- package/coverage/.tmp/coverage-38.json +1 -1
- package/coverage/.tmp/coverage-39.json +1 -1
- package/coverage/.tmp/coverage-40.json +1 -1
- package/coverage/.tmp/coverage-42.json +1 -1
- package/coverage/.tmp/coverage-43.json +1 -1
- package/coverage/.tmp/coverage-5.json +1 -1
- package/coverage/.tmp/coverage-7.json +1 -1
- package/coverage/.tmp/coverage-8.json +1 -1
- package/coverage/.tmp/coverage-9.json +1 -1
- package/lib/cjs/_chunks/CwkpVXDI.js.map +1 -1
- package/lib/cjs/components/Carousel/Carousel.js +2 -9
- package/lib/cjs/components/Carousel/Carousel.js.map +1 -1
- package/lib/cjs/components/Popover/Popover.js +3 -4
- package/lib/cjs/components/Popover/Popover.js.map +1 -1
- package/lib/cjs/components/Radio/Radio.js.map +1 -1
- package/lib/cjs/components/Sheets/styles.js +2 -2
- package/lib/cjs/components/Sheets/styles.js.map +1 -1
- package/lib/cjs/pvCount/pvData.js +1 -1
- package/lib/esm/_chunks/Da9cW8JG.js.map +1 -1
- package/lib/esm/components/Carousel/Carousel.js +2 -9
- package/lib/esm/components/Carousel/Carousel.js.map +1 -1
- package/lib/esm/components/Popover/Popover.js +3 -4
- package/lib/esm/components/Popover/Popover.js.map +1 -1
- package/lib/esm/components/Radio/Radio.js.map +1 -1
- package/lib/esm/components/Sheets/styles.js +2 -2
- package/lib/esm/components/Sheets/styles.js.map +1 -1
- package/lib/esm/pvCount/pvData.js +1 -1
- package/lib/src/components/Popover/Popover.d.ts +1 -1
- package/lib/src/components/Popover/interface/index.d.ts +0 -1
- package/lib/types/components/Popover/Popover.d.ts +1 -1
- package/lib/types/components/Popover/interface/index.d.ts +0 -1
- package/package.json +2 -2
- package/src/components/Carousel/Carousel.tsx +3 -15
- package/src/components/Carousel/demo/index.tsx +2 -14
- package/src/components/Popover/Popover.tsx +3 -4
- package/src/components/Popover/doc/index.mdx +21 -22
- package/src/components/Popover/interface/index.ts +0 -1
- package/src/components/Sheets/styles.ts +2 -2
- package/src/i18n/@types/resources.d.ts +27 -27
- package/src/i18n/index.json +31 -31
- package/src/index.ts +1 -0
|
@@ -49,11 +49,11 @@ var styles = StyleSheet.create({
|
|
|
49
49
|
borderTopRightRadius: 12
|
|
50
50
|
},
|
|
51
51
|
cancel: {
|
|
52
|
-
fontSize: typography.
|
|
52
|
+
fontSize: typography.B1LooseFontSize,
|
|
53
53
|
fontWeight: typography.B1LooseFontWeight
|
|
54
54
|
},
|
|
55
55
|
confirm: {
|
|
56
|
-
fontSize: typography.
|
|
56
|
+
fontSize: typography.B1LooseFontSize,
|
|
57
57
|
fontWeight: typography.T3FontWeight
|
|
58
58
|
},
|
|
59
59
|
label: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/components/Sheets/styles.ts"],"sourcesContent":["import { StyleSheet } from \"react-native\";\nimport { typography } from \"@xhsreds/reds-token-next\";\n\nconst styles = StyleSheet.create({\n wrapper: {\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n top: 0,\n },\n mask: {\n width: \"100%\",\n height: \"100%\",\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n top: 0,\n },\n picker: {\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n },\n labelContainer: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n flexDirection: \"row\",\n height: 44,\n paddingLeft: 16,\n paddingRight: 16,\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n },\n leftLabelContainer: {\n display: \"flex\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n flexDirection: \"row\",\n height: 44,\n paddingLeft: 16,\n paddingRight: 16,\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n },\n cancel: {\n fontSize: typography.
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/Sheets/styles.ts"],"sourcesContent":["import { StyleSheet } from \"react-native\";\nimport { typography } from \"@xhsreds/reds-token-next\";\n\nconst styles = StyleSheet.create({\n wrapper: {\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n top: 0,\n },\n mask: {\n width: \"100%\",\n height: \"100%\",\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n top: 0,\n },\n picker: {\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n },\n labelContainer: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n flexDirection: \"row\",\n height: 44,\n paddingLeft: 16,\n paddingRight: 16,\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n },\n leftLabelContainer: {\n display: \"flex\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n flexDirection: \"row\",\n height: 44,\n paddingLeft: 16,\n paddingRight: 16,\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n },\n cancel: {\n fontSize: typography.B1LooseFontSize,\n fontWeight: typography.B1LooseFontWeight,\n },\n confirm: {\n fontSize: typography.B1LooseFontSize,\n fontWeight: typography.T3FontWeight,\n },\n label: {\n fontSize: typography.B1LooseFontSize,\n fontWeight: typography.T3FontWeight,\n },\n iconBg: {\n width: 28,\n height: 28,\n borderRadius: 28,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n dragableContainer: {\n width: \"100%\",\n height: 20,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n dragable: {\n width: 33,\n height: 4,\n borderRadius: 10,\n },\n block: {\n width: 28,\n height: 28,\n },\n actionContainer: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n flexDirection: \"row\",\n width: \"100%\",\n paddingHorizontal: 56,\n },\n action: {\n flex: 1,\n marginHorizontal: 12,\n },\n});\n\nexport default styles;\n"],"names":["styles","StyleSheet","create","wrapper","position","bottom","left","right","top","mask","width","height","picker","borderTopLeftRadius","borderTopRightRadius","labelContainer","display","justifyContent","alignItems","flexDirection","paddingLeft","paddingRight","leftLabelContainer","cancel","fontSize","typography","B1LooseFontSize","fontWeight","B1LooseFontWeight","confirm","T3FontWeight","label","iconBg","borderRadius","dragableContainer","dragable","block","actionContainer","paddingHorizontal","action","flex","marginHorizontal"],"mappings":";;;AAGA,IAAMA,MAAA,GAASC,WAAWC,MAAO,CAAA;AAC/BC,EAAAA,OAAS,EAAA;AACPC,IAAAA,QAAU,EAAA,UAAA;AACVC,IAAAA,MAAQ,EAAA,CAAA;AACRC,IA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A,gBAAkB,EAAA,EAAA;AACpB,GAAA;AACF,CAAC;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { push, pushByrequestIdleCallback } from '@xhs/reds-apm/src/index.native';
|
|
2
2
|
|
|
3
3
|
var name = "@xhs/reds-rn-next";
|
|
4
|
-
var version = "0.9.0";
|
|
4
|
+
var version = "0.9.1-test.0";
|
|
5
5
|
var author = "贾斌(呀哈) <jiabin@xiaohongshu.com>";
|
|
6
6
|
var license = "ISC";
|
|
7
7
|
var dependencies = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { RedsPopover } from "./interface/index";
|
|
3
|
-
declare const _default: ({ mode, opacity, content, children, isControl, placement, closeOnClickAgain, trigger, zIndex, visible, onVisibleChange, onClickMask: _onClickMask, popContainerStyle, arrowStyles: propsArrowStyles, offset, duration,
|
|
3
|
+
declare const _default: ({ mode, opacity, content, children, isControl, placement, closeOnClickAgain, trigger, zIndex, visible, onVisibleChange, onClickMask: _onClickMask, popContainerStyle, arrowStyles: propsArrowStyles, offset, duration, hostName, maxWidth, arrowOffset, }: RedsPopover) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { RedsPopover } from "./interface/index";
|
|
3
|
-
declare const _default: ({ mode, opacity, content, children, isControl, placement, closeOnClickAgain, trigger, zIndex, visible, onVisibleChange, onClickMask: _onClickMask, popContainerStyle, arrowStyles: propsArrowStyles, offset, duration,
|
|
3
|
+
declare const _default: ({ mode, opacity, content, children, isControl, placement, closeOnClickAgain, trigger, zIndex, visible, onVisibleChange, onClickMask: _onClickMask, popContainerStyle, arrowStyles: propsArrowStyles, offset, duration, hostName, maxWidth, arrowOffset, }: RedsPopover) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xhsreds/reds-rn-next",
|
|
3
|
-
"version": "0.9.1-
|
|
3
|
+
"version": "0.9.1-test.0",
|
|
4
4
|
"author": "贾斌(呀哈) <jiabin@xiaohongshu.com>",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"dependencies": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"react-native-fs": "2.20.0",
|
|
27
27
|
"react-native-svg": "13.14.0",
|
|
28
28
|
"@xhs/react-native-harmony": "*",
|
|
29
|
-
"@xhsreds/reds-token-next": "0.9.
|
|
29
|
+
"@xhsreds/reds-token-next": "0.9.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependenciesMeta": {
|
|
32
32
|
"ozone-schema-web": {
|
|
@@ -238,8 +238,8 @@ export const Carousel: React.FC<RedsCarousel> = (props) => {
|
|
|
238
238
|
|
|
239
239
|
requestAnimationFrame(() => {
|
|
240
240
|
let scrollOffset = index * offsetPerItem;
|
|
241
|
-
|
|
242
|
-
if (props.playingMode !== "normal"
|
|
241
|
+
|
|
242
|
+
if (props.playingMode !== "normal") {
|
|
243
243
|
scrollOffset -= containerPadding;
|
|
244
244
|
}
|
|
245
245
|
|
|
@@ -287,18 +287,10 @@ export const Carousel: React.FC<RedsCarousel> = (props) => {
|
|
|
287
287
|
props.direction === "horizontal" ? event.nativeEvent.contentOffset.x : event.nativeEvent.contentOffset.y;
|
|
288
288
|
|
|
289
289
|
let index: number;
|
|
290
|
-
// 修复:对于非无限循环的compact模式,需要调整偏移量计算
|
|
291
290
|
if (props.playingMode === "normal") {
|
|
292
291
|
index = Math.round(offset / offsetPerItem);
|
|
293
292
|
} else {
|
|
294
|
-
|
|
295
|
-
if (!props.infinite) {
|
|
296
|
-
// 非无限循环模式:不需要加containerPadding,因为滚动时已经考虑了padding
|
|
297
|
-
index = Math.round(offset / offsetPerItem);
|
|
298
|
-
} else {
|
|
299
|
-
// 无限循环模式:需要加containerPadding
|
|
300
|
-
index = Math.round((offset + containerPadding) / offsetPerItem);
|
|
301
|
-
}
|
|
293
|
+
index = Math.round((offset + containerPadding) / offsetPerItem);
|
|
302
294
|
}
|
|
303
295
|
|
|
304
296
|
index = Math.max(0, Math.min(index, extendedData.length - 1));
|
|
@@ -320,10 +312,6 @@ export const Carousel: React.FC<RedsCarousel> = (props) => {
|
|
|
320
312
|
const clampedIndex = Math.max(0, Math.min(index, length - 1));
|
|
321
313
|
setCurrentIndex(clampedIndex);
|
|
322
314
|
setRealIndex(clampedIndex);
|
|
323
|
-
// 修复:确保滚动到正确位置
|
|
324
|
-
if (props.playingMode !== "normal") {
|
|
325
|
-
scrollToIndex(clampedIndex, true);
|
|
326
|
-
}
|
|
327
315
|
}
|
|
328
316
|
|
|
329
317
|
setIsScrolling(false);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { View, Text, StyleSheet, ScrollView, Image as RNImage } from "react-native";
|
|
3
|
-
import { Carousel
|
|
3
|
+
import { Carousel } from "@xhs/reds-rn-next";
|
|
4
4
|
const styles = StyleSheet.create({
|
|
5
5
|
container: {
|
|
6
6
|
paddingBottom: 100,
|
|
@@ -54,18 +54,6 @@ export default function App() {
|
|
|
54
54
|
handlable={false}
|
|
55
55
|
/>
|
|
56
56
|
<Carousel
|
|
57
|
-
data={images}
|
|
58
|
-
autoPlay={false}
|
|
59
|
-
currentIndex={3}
|
|
60
|
-
onChange={handleChange}
|
|
61
|
-
onClick={handleClick}
|
|
62
|
-
displayNumbers={true}
|
|
63
|
-
// duration={3000}
|
|
64
|
-
playingMode={CarouselType.PLAYINGMODE.COMPACT}
|
|
65
|
-
handlable={true}
|
|
66
|
-
infinite={false}
|
|
67
|
-
/>
|
|
68
|
-
{/* <Carousel
|
|
69
57
|
autoPlay={true}
|
|
70
58
|
currentIndex={3}
|
|
71
59
|
onChange={handleChange}
|
|
@@ -94,7 +82,7 @@ export default function App() {
|
|
|
94
82
|
{images.map((item, idx) => (
|
|
95
83
|
<RNImage style={{ width: 300, height: 200 }} source={{ uri: item }} />
|
|
96
84
|
))}
|
|
97
|
-
</Carousel>
|
|
85
|
+
</Carousel>
|
|
98
86
|
{/* <Desc>自动播放(默认轮播间隔1000ms)</Desc>
|
|
99
87
|
<Carousel data={images} duration={3000} />
|
|
100
88
|
|
|
@@ -24,7 +24,6 @@ export default ({
|
|
|
24
24
|
arrowStyles: propsArrowStyles,
|
|
25
25
|
offset,
|
|
26
26
|
duration,
|
|
27
|
-
animation_duration,
|
|
28
27
|
hostName,
|
|
29
28
|
maxWidth,
|
|
30
29
|
arrowOffset,
|
|
@@ -122,18 +121,18 @@ export default ({
|
|
|
122
121
|
if (layout.x !== defaultValue) {
|
|
123
122
|
Animated.timing(progress, {
|
|
124
123
|
toValue: 1,
|
|
125
|
-
duration:
|
|
124
|
+
duration: duration ?? 400,
|
|
126
125
|
useNativeDriver: false,
|
|
127
126
|
}).start();
|
|
128
127
|
}
|
|
129
128
|
} else {
|
|
130
129
|
Animated.timing(progress, {
|
|
131
130
|
toValue: 0,
|
|
132
|
-
duration:
|
|
131
|
+
duration: duration ?? 400,
|
|
133
132
|
useNativeDriver: false,
|
|
134
133
|
}).start();
|
|
135
134
|
}
|
|
136
|
-
}, [_visible, layout
|
|
135
|
+
}, [_visible, layout]);
|
|
137
136
|
|
|
138
137
|
const onMaskChange = (event: GestureResponderEvent, value: boolean) => {
|
|
139
138
|
if (isControl) return;
|
|
@@ -8,28 +8,27 @@ import BaseDemo from "!!raw-loader!../demo/index.tsx";
|
|
|
8
8
|
|
|
9
9
|
### Props
|
|
10
10
|
|
|
11
|
-
| 属性
|
|
12
|
-
|
|
|
13
|
-
| visible
|
|
14
|
-
| placement
|
|
15
|
-
| content
|
|
16
|
-
| opacity
|
|
17
|
-
| mode
|
|
18
|
-
| trigger
|
|
19
|
-
| duration
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
| layoutChange | 布局是否变化 | any | `{}` |
|
|
11
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
12
|
+
| ----------------- | --------------------------------- | --------------------------------------------------------------------------------------------------- | --------------- |
|
|
13
|
+
| visible | 是否显示气泡 | boolean | undefined |
|
|
14
|
+
| placement | 气泡方向 | "top-start" | "top" | "top-end" | "bottom-start" | "bottom" | "bottom-end" | top |
|
|
15
|
+
| content | 弹出内容 | ReactNode | (() => ReactNode) | |
|
|
16
|
+
| opacity | 遮罩透明度 | number | 0 |
|
|
17
|
+
| mode | 主题色 | "light" | "dark" | "alwaysLight" | "alwaysDark" | light |
|
|
18
|
+
| trigger | 触发方式 | "click" | "touch" | click |
|
|
19
|
+
| duration | 固定时间后popover消失 | number | |
|
|
20
|
+
| zIndex | 层级 | number | 1000 |
|
|
21
|
+
| popContainerStyle | 气泡框的样式 | ViewStyle | `{}` |
|
|
22
|
+
| closeOnClickAgain | 再次点击关闭 | boolean | true |
|
|
23
|
+
| children | popover 作用的目标节点 | ReactNode | |
|
|
24
|
+
| floatingStyles | floating style | ViewStyle | `{}` |
|
|
25
|
+
| arrowStyles | arrow style | ImageStyle | `{}` |
|
|
26
|
+
| isControl | 是否受控 | boolean | false |
|
|
27
|
+
| offset | 气泡偏移位置 用于特殊场景适配 | Offset | `{"x":0,"y":0}` |
|
|
28
|
+
| arrowOffset | 气泡箭头偏移位置 用于特殊场景适配 | Offset | `{"x":0,"y":0}` |
|
|
29
|
+
| hostName | hostName | string | root |
|
|
30
|
+
| maxWidth | popover最大宽度 | number | 280 |
|
|
31
|
+
| layoutChange | 布局是否变化 | any | `{}` |
|
|
33
32
|
|
|
34
33
|
### Events
|
|
35
34
|
|
|
@@ -49,11 +49,11 @@ const styles = StyleSheet.create({
|
|
|
49
49
|
borderTopRightRadius: 12,
|
|
50
50
|
},
|
|
51
51
|
cancel: {
|
|
52
|
-
fontSize: typography.
|
|
52
|
+
fontSize: typography.B1LooseFontSize,
|
|
53
53
|
fontWeight: typography.B1LooseFontWeight,
|
|
54
54
|
},
|
|
55
55
|
confirm: {
|
|
56
|
-
fontSize: typography.
|
|
56
|
+
fontSize: typography.B1LooseFontSize,
|
|
57
57
|
fontWeight: typography.T3FontWeight,
|
|
58
58
|
},
|
|
59
59
|
label: {
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
interface Resources {
|
|
2
2
|
componentKey: {
|
|
3
|
-
sureKey: "
|
|
4
|
-
satisfyKey: "
|
|
5
|
-
confirmKey: "
|
|
6
|
-
uploadingKey: "
|
|
7
|
-
resetKey: "
|
|
8
|
-
NoDataKey: "
|
|
9
|
-
liveStreamingKey: "
|
|
10
|
-
generallyKey: "
|
|
11
|
-
uploadFailedKey: "
|
|
12
|
-
submitKey: "
|
|
13
|
-
requestSuccessfulKey: "
|
|
14
|
-
cancelKey: "
|
|
15
|
-
PullDownToRefreshKey: "
|
|
16
|
-
selectAllKey: "
|
|
17
|
-
requestDataKey: "
|
|
18
|
-
closeKey: "
|
|
19
|
-
veryBadKey: "
|
|
20
|
-
searchKey: "
|
|
21
|
-
expandKey: "
|
|
22
|
-
IDCardPhotoKey: "
|
|
23
|
-
finishKey: "
|
|
24
|
-
surpriseKey: "
|
|
25
|
-
releaseRefreshKey: "
|
|
26
|
-
nationalEmblemSideOfIDCardKey: "
|
|
27
|
-
buttonKey: "
|
|
28
|
-
jumpKey: "
|
|
29
|
-
disappointmentKey: "
|
|
3
|
+
sureKey: "Confirm";
|
|
4
|
+
satisfyKey: "Satisfy";
|
|
5
|
+
confirmKey: "Confirm";
|
|
6
|
+
uploadingKey: "Uploading";
|
|
7
|
+
resetKey: "Reset";
|
|
8
|
+
NoDataKey: "No data available at the moment";
|
|
9
|
+
liveStreamingKey: "live";
|
|
10
|
+
generallyKey: "Generally";
|
|
11
|
+
uploadFailedKey: "Upload failed";
|
|
12
|
+
submitKey: "Submit";
|
|
13
|
+
requestSuccessfulKey: "Request successful";
|
|
14
|
+
cancelKey: "Cancel";
|
|
15
|
+
PullDownToRefreshKey: "Pull down to refresh";
|
|
16
|
+
selectAllKey: "SelectAll";
|
|
17
|
+
requestDataKey: "Request data";
|
|
18
|
+
closeKey: "Close";
|
|
19
|
+
veryBadKey: "Very bad";
|
|
20
|
+
searchKey: "Search";
|
|
21
|
+
expandKey: "Expand";
|
|
22
|
+
IDCardPhotoKey: "ID card photo";
|
|
23
|
+
finishKey: "Finish";
|
|
24
|
+
surpriseKey: "Surprise";
|
|
25
|
+
releaseRefreshKey: "Release refresh";
|
|
26
|
+
nationalEmblemSideOfIDCardKey: "National emblem side of ID card";
|
|
27
|
+
buttonKey: "Button";
|
|
28
|
+
jumpKey: "Jump";
|
|
29
|
+
disappointmentKey: "Disappointment";
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
export default Resources;
|
package/src/i18n/index.json
CHANGED
|
@@ -1,35 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"zh_tw": {
|
|
3
|
-
"componentKey": {
|
|
4
|
-
"sureKey": "確定",
|
|
5
|
-
"satisfyKey": "滿意",
|
|
6
|
-
"confirmKey": "確認",
|
|
7
|
-
"uploadingKey": "上傳中",
|
|
8
|
-
"resetKey": "重置",
|
|
9
|
-
"NoDataKey": "暫無數據",
|
|
10
|
-
"liveStreamingKey": "直播",
|
|
11
|
-
"generallyKey": "一般",
|
|
12
|
-
"uploadFailedKey": "上傳失敗",
|
|
13
|
-
"submitKey": "提交",
|
|
14
|
-
"requestSuccessfulKey": "請求成功",
|
|
15
|
-
"cancelKey": "取消",
|
|
16
|
-
"PullDownToRefreshKey": "下拉重繪",
|
|
17
|
-
"selectAllKey": "全選",
|
|
18
|
-
"requestDataKey": "請求數據中",
|
|
19
|
-
"closeKey": "收起",
|
|
20
|
-
"veryBadKey": "極差",
|
|
21
|
-
"searchKey": "蒐索",
|
|
22
|
-
"expandKey": "展開",
|
|
23
|
-
"IDCardPhotoKey": "身份證人像面",
|
|
24
|
-
"finishKey": "完成",
|
|
25
|
-
"surpriseKey": "驚喜",
|
|
26
|
-
"releaseRefreshKey": "鬆開重繪",
|
|
27
|
-
"nationalEmblemSideOfIDCardKey": "身份证国徽面",
|
|
28
|
-
"buttonKey": "按鈕",
|
|
29
|
-
"jumpKey": "跳轉",
|
|
30
|
-
"disappointmentKey": "失望"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
2
|
"en_us": {
|
|
34
3
|
"componentKey": {
|
|
35
4
|
"sureKey": "Confirm",
|
|
@@ -91,5 +60,36 @@
|
|
|
91
60
|
"jumpKey": "跳转",
|
|
92
61
|
"disappointmentKey": "失望"
|
|
93
62
|
}
|
|
63
|
+
},
|
|
64
|
+
"zh_tw": {
|
|
65
|
+
"componentKey": {
|
|
66
|
+
"sureKey": "確定",
|
|
67
|
+
"satisfyKey": "滿意",
|
|
68
|
+
"confirmKey": "確認",
|
|
69
|
+
"uploadingKey": "上傳中",
|
|
70
|
+
"resetKey": "重置",
|
|
71
|
+
"NoDataKey": "暫無數據",
|
|
72
|
+
"liveStreamingKey": "直播",
|
|
73
|
+
"generallyKey": "一般",
|
|
74
|
+
"uploadFailedKey": "上傳失敗",
|
|
75
|
+
"submitKey": "提交",
|
|
76
|
+
"requestSuccessfulKey": "請求成功",
|
|
77
|
+
"cancelKey": "取消",
|
|
78
|
+
"PullDownToRefreshKey": "下拉重繪",
|
|
79
|
+
"selectAllKey": "全選",
|
|
80
|
+
"requestDataKey": "請求數據中",
|
|
81
|
+
"closeKey": "收起",
|
|
82
|
+
"veryBadKey": "極差",
|
|
83
|
+
"searchKey": "蒐索",
|
|
84
|
+
"expandKey": "展開",
|
|
85
|
+
"IDCardPhotoKey": "身份證人像面",
|
|
86
|
+
"finishKey": "完成",
|
|
87
|
+
"surpriseKey": "驚喜",
|
|
88
|
+
"releaseRefreshKey": "鬆開重繪",
|
|
89
|
+
"nationalEmblemSideOfIDCardKey": "身份证国徽面",
|
|
90
|
+
"buttonKey": "按鈕",
|
|
91
|
+
"jumpKey": "跳轉",
|
|
92
|
+
"disappointmentKey": "失望"
|
|
93
|
+
}
|
|
94
94
|
}
|
|
95
95
|
}
|
package/src/index.ts
CHANGED