@xhsreds/reds-rn-next 0.9.0 → 0.9.1-beta202510271514
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/coverage/.tmp/coverage-0.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-21.json +1 -1
- package/coverage/.tmp/coverage-22.json +1 -1
- package/coverage/.tmp/coverage-23.json +1 -1
- package/coverage/.tmp/coverage-24.json +1 -1
- package/coverage/.tmp/coverage-25.json +1 -1
- package/coverage/.tmp/coverage-3.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-4.json +1 -1
- package/coverage/.tmp/coverage-40.json +1 -1
- package/coverage/.tmp/coverage-41.json +1 -1
- package/coverage/.tmp/coverage-5.json +1 -1
- package/coverage/.tmp/coverage-6.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 +9 -2
- package/lib/cjs/components/Carousel/Carousel.js.map +1 -1
- package/lib/cjs/components/Popover/Popover.js +4 -3
- package/lib/cjs/components/Popover/Popover.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/esm/_chunks/Da9cW8JG.js.map +1 -1
- package/lib/esm/components/Carousel/Carousel.js +9 -2
- package/lib/esm/components/Carousel/Carousel.js.map +1 -1
- package/lib/esm/components/Popover/Popover.js +4 -3
- package/lib/esm/components/Popover/Popover.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/src/components/Popover/Popover.d.ts +1 -1
- package/lib/src/components/Popover/interface/index.d.ts +1 -0
- package/lib/types/components/Popover/Popover.d.ts +1 -1
- package/lib/types/components/Popover/interface/index.d.ts +1 -0
- package/package.json +2 -2
- package/src/components/Carousel/Carousel.tsx +15 -3
- package/src/components/Carousel/demo/index.tsx +14 -2
- package/src/components/Popover/Popover.tsx +4 -3
- package/src/components/Popover/doc/index.mdx +22 -21
- package/src/components/Popover/interface/index.ts +1 -0
- package/src/components/Sheets/styles.ts +2 -2
- package/src/i18n/@types/resources.d.ts +27 -27
- package/src/i18n/index.json +31 -31
|
@@ -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.B2LooseSwitchFontSize,\n fontWeight: typography.B1LooseFontWeight,\n },\n confirm: {\n fontSize: typography.B2LooseSwitchFontSize,\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","B2LooseSwitchFontSize","fontWeight","B1LooseFontWeight","confirm","T3FontWeight","label","B1LooseFontSize","iconBg","borderRadius","dragableContainer","dragable","block","actionContainer","paddingHorizontal","action","flex","marginHorizontal"],"mappings":"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"}
|
|
@@ -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, hostName, maxWidth, arrowOffset, }: RedsPopover) => React.JSX.Element;
|
|
3
|
+
declare const _default: ({ mode, opacity, content, children, isControl, placement, closeOnClickAgain, trigger, zIndex, visible, onVisibleChange, onClickMask: _onClickMask, popContainerStyle, arrowStyles: propsArrowStyles, offset, duration, animation_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, hostName, maxWidth, arrowOffset, }: RedsPopover) => React.JSX.Element;
|
|
3
|
+
declare const _default: ({ mode, opacity, content, children, isControl, placement, closeOnClickAgain, trigger, zIndex, visible, onVisibleChange, onClickMask: _onClickMask, popContainerStyle, arrowStyles: propsArrowStyles, offset, duration, animation_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.
|
|
3
|
+
"version": "0.9.1-beta202510271514",
|
|
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.1-beta202510271514"
|
|
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
|
+
// 修复:只有在无限循环模式下才需要减去containerPadding
|
|
242
|
+
if (props.playingMode !== "normal" && props.infinite) {
|
|
243
243
|
scrollOffset -= containerPadding;
|
|
244
244
|
}
|
|
245
245
|
|
|
@@ -287,10 +287,18 @@ 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模式,需要调整偏移量计算
|
|
290
291
|
if (props.playingMode === "normal") {
|
|
291
292
|
index = Math.round(offset / offsetPerItem);
|
|
292
293
|
} else {
|
|
293
|
-
|
|
294
|
+
// 对于compact和card模式
|
|
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
|
+
}
|
|
294
302
|
}
|
|
295
303
|
|
|
296
304
|
index = Math.max(0, Math.min(index, extendedData.length - 1));
|
|
@@ -312,6 +320,10 @@ export const Carousel: React.FC<RedsCarousel> = (props) => {
|
|
|
312
320
|
const clampedIndex = Math.max(0, Math.min(index, length - 1));
|
|
313
321
|
setCurrentIndex(clampedIndex);
|
|
314
322
|
setRealIndex(clampedIndex);
|
|
323
|
+
// 修复:确保滚动到正确位置
|
|
324
|
+
if (props.playingMode !== "normal") {
|
|
325
|
+
scrollToIndex(clampedIndex, true);
|
|
326
|
+
}
|
|
315
327
|
}
|
|
316
328
|
|
|
317
329
|
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 } from "@xhs/reds-rn-next";
|
|
3
|
+
import { Carousel, CarouselType } from "@xhs/reds-rn-next";
|
|
4
4
|
const styles = StyleSheet.create({
|
|
5
5
|
container: {
|
|
6
6
|
paddingBottom: 100,
|
|
@@ -54,6 +54,18 @@ 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
|
|
57
69
|
autoPlay={true}
|
|
58
70
|
currentIndex={3}
|
|
59
71
|
onChange={handleChange}
|
|
@@ -82,7 +94,7 @@ export default function App() {
|
|
|
82
94
|
{images.map((item, idx) => (
|
|
83
95
|
<RNImage style={{ width: 300, height: 200 }} source={{ uri: item }} />
|
|
84
96
|
))}
|
|
85
|
-
</Carousel>
|
|
97
|
+
</Carousel> */}
|
|
86
98
|
{/* <Desc>自动播放(默认轮播间隔1000ms)</Desc>
|
|
87
99
|
<Carousel data={images} duration={3000} />
|
|
88
100
|
|
|
@@ -24,6 +24,7 @@ export default ({
|
|
|
24
24
|
arrowStyles: propsArrowStyles,
|
|
25
25
|
offset,
|
|
26
26
|
duration,
|
|
27
|
+
animation_duration,
|
|
27
28
|
hostName,
|
|
28
29
|
maxWidth,
|
|
29
30
|
arrowOffset,
|
|
@@ -121,18 +122,18 @@ export default ({
|
|
|
121
122
|
if (layout.x !== defaultValue) {
|
|
122
123
|
Animated.timing(progress, {
|
|
123
124
|
toValue: 1,
|
|
124
|
-
duration:
|
|
125
|
+
duration: animation_duration ?? 400,
|
|
125
126
|
useNativeDriver: false,
|
|
126
127
|
}).start();
|
|
127
128
|
}
|
|
128
129
|
} else {
|
|
129
130
|
Animated.timing(progress, {
|
|
130
131
|
toValue: 0,
|
|
131
|
-
duration:
|
|
132
|
+
duration: animation_duration ?? 400,
|
|
132
133
|
useNativeDriver: false,
|
|
133
134
|
}).start();
|
|
134
135
|
}
|
|
135
|
-
}, [_visible, layout]);
|
|
136
|
+
}, [_visible, layout, animation_duration]);
|
|
136
137
|
|
|
137
138
|
const onMaskChange = (event: GestureResponderEvent, value: boolean) => {
|
|
138
139
|
if (isControl) return;
|
|
@@ -8,27 +8,28 @@ 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
|
-
|
|
|
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
|
+
| animation_duration | animation_duration 动画时间 | number | |
|
|
21
|
+
| zIndex | 层级 | number | 1000 |
|
|
22
|
+
| popContainerStyle | 气泡框的样式 | ViewStyle | `{}` |
|
|
23
|
+
| closeOnClickAgain | 再次点击关闭 | boolean | true |
|
|
24
|
+
| children | popover 作用的目标节点 | ReactNode | |
|
|
25
|
+
| floatingStyles | floating style | ViewStyle | `{}` |
|
|
26
|
+
| arrowStyles | arrow style | ImageStyle | `{}` |
|
|
27
|
+
| isControl | 是否受控 | boolean | false |
|
|
28
|
+
| offset | 气泡偏移位置 用于特殊场景适配 | Offset | `{"x":0,"y":0}` |
|
|
29
|
+
| arrowOffset | 气泡箭头偏移位置 用于特殊场景适配 | Offset | `{"x":0,"y":0}` |
|
|
30
|
+
| hostName | hostName | string | root |
|
|
31
|
+
| maxWidth | popover最大宽度 | number | 280 |
|
|
32
|
+
| layoutChange | 布局是否变化 | any | `{}` |
|
|
32
33
|
|
|
33
34
|
### Events
|
|
34
35
|
|
|
@@ -49,11 +49,11 @@ const styles = StyleSheet.create({
|
|
|
49
49
|
borderTopRightRadius: 12,
|
|
50
50
|
},
|
|
51
51
|
cancel: {
|
|
52
|
-
fontSize: typography.
|
|
52
|
+
fontSize: typography.B2LooseSwitchFontSize,
|
|
53
53
|
fontWeight: typography.B1LooseFontWeight,
|
|
54
54
|
},
|
|
55
55
|
confirm: {
|
|
56
|
-
fontSize: typography.
|
|
56
|
+
fontSize: typography.B2LooseSwitchFontSize,
|
|
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: "確定";
|
|
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: "失望";
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
export default Resources;
|
package/src/i18n/index.json
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
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
|
+
},
|
|
2
33
|
"en_us": {
|
|
3
34
|
"componentKey": {
|
|
4
35
|
"sureKey": "Confirm",
|
|
@@ -60,36 +91,5 @@
|
|
|
60
91
|
"jumpKey": "跳转",
|
|
61
92
|
"disappointmentKey": "失望"
|
|
62
93
|
}
|
|
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
|
}
|