react-native-fxdialog 1.0.0-beta03 → 1.0.0-beta05
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/FXDialog.d.ts +18 -2
- package/FXDialog.d.ts.map +1 -1
- package/FXDialog.js +26 -4
- package/FXDialogView.d.ts +7 -2
- package/FXDialogView.d.ts.map +1 -1
- package/FXDialogView.js +38 -20
- package/README.md +51 -14
- package/index.d.ts +2 -1
- package/index.d.ts.map +1 -1
- package/index.js +6 -1
- package/package.json +1 -1
- package/style.d.ts +1 -1
- package/style.d.ts.map +1 -1
- package/style.js +120 -106
- package/types.d.ts +9 -3
- package/types.d.ts.map +1 -1
- package/types.js +5 -3
package/FXDialog.d.ts
CHANGED
|
@@ -39,15 +39,31 @@ declare class FXDialog {
|
|
|
39
39
|
* 设置点击背景是否关闭
|
|
40
40
|
*/
|
|
41
41
|
clickBackgroundClose(enable: boolean): this;
|
|
42
|
+
/**
|
|
43
|
+
* 添加背景样式
|
|
44
|
+
*/
|
|
45
|
+
backgroundStyle(style: ViewStyle): this;
|
|
42
46
|
/**
|
|
43
47
|
* 设置容器样式
|
|
44
48
|
*/
|
|
45
49
|
containerStyle(style: ViewStyle): this;
|
|
46
50
|
/**
|
|
47
|
-
*
|
|
51
|
+
* 设置内容区域容器样式 除按钮外的内容区域样式
|
|
52
|
+
*/
|
|
53
|
+
contentsContainerStyle(style: ViewStyle): this;
|
|
54
|
+
/**
|
|
55
|
+
* 设置按钮区样式
|
|
56
|
+
*/
|
|
57
|
+
actionsContainerStyle(style: ViewStyle): this;
|
|
58
|
+
/**
|
|
59
|
+
* 设置弹窗显示动画时长
|
|
60
|
+
* @param duration 动画时长 ms
|
|
48
61
|
*/
|
|
49
|
-
backgroundStyle(style: ViewStyle): this;
|
|
50
62
|
showAnimationDuration(duration: number): this;
|
|
63
|
+
/**
|
|
64
|
+
* 设置弹窗关闭动画时长
|
|
65
|
+
* @param duration 动画时长 ms
|
|
66
|
+
*/
|
|
51
67
|
closeAnimationDuration(duration: number): this;
|
|
52
68
|
/**
|
|
53
69
|
* 设置动画:支持传入内置类型
|
package/FXDialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FXDialog.d.ts","sourceRoot":"","sources":["FXDialog.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,qBAAqB,EACrB,cAAc,EAGd,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAElB,qBAAqB,EAGtB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;GAEG;AACH,cAAM,QAAQ;IAEZ,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,CAAa;IAC9B,OAAO,CAAC,SAAS,CAAC,CAA0C;IAE5D,OAAO,CAAC,UAAU,CAAkC;IACpD,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,oBAAoB,CAI1B;IACF,OAAO,CAAC,iBAAiB,CAIvB;IACF;;OAEG;IACH,MAAM,CAAC,KAAK,IAAI,QAAQ;IAIxB,MAAM,CAAC,WAAW,IAAI,QAAQ;IAO9B,MAAM,CAAC,KAAK,IAAI,QAAQ;IAIxB,OAAO,CAAC,MAAM,CAAC,YAAY;IAY3B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAQpC;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAQ1C;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;IAWvC;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,kBAAkB,GAAG,IAAI;IAQzC;;OAEG;IACH,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAK3C;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,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
|
package/FXDialog.js
CHANGED
|
@@ -36,7 +36,7 @@ class FXDialog {
|
|
|
36
36
|
return this.createDialog(types_1.FXDialogType.Popup, types_1.FXDialogAnimationType.SlideUp);
|
|
37
37
|
}
|
|
38
38
|
static createDialog(dialogType, animationType) {
|
|
39
|
-
const dialog = new
|
|
39
|
+
const dialog = new this();
|
|
40
40
|
dialog.viewConfiguration.type = dialogType;
|
|
41
41
|
dialog.viewDefaultAnimation.animationType =
|
|
42
42
|
animationType || types_1.FXDialogAnimationType.Scale;
|
|
@@ -94,6 +94,13 @@ class FXDialog {
|
|
|
94
94
|
this.viewConfiguration.closeOnClickBackground = enable;
|
|
95
95
|
return this;
|
|
96
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* 添加背景样式
|
|
99
|
+
*/
|
|
100
|
+
backgroundStyle(style) {
|
|
101
|
+
this.viewConfiguration.backgroundStyle = Object.assign(Object.assign({}, this.viewConfiguration.backgroundStyle), style);
|
|
102
|
+
return this;
|
|
103
|
+
}
|
|
97
104
|
/**
|
|
98
105
|
* 设置容器样式
|
|
99
106
|
*/
|
|
@@ -102,16 +109,31 @@ class FXDialog {
|
|
|
102
109
|
return this;
|
|
103
110
|
}
|
|
104
111
|
/**
|
|
105
|
-
*
|
|
112
|
+
* 设置内容区域容器样式 除按钮外的内容区域样式
|
|
106
113
|
*/
|
|
107
|
-
|
|
108
|
-
this.viewConfiguration.
|
|
114
|
+
contentsContainerStyle(style) {
|
|
115
|
+
this.viewConfiguration.contentsContainerStyle = Object.assign(Object.assign({}, this.viewConfiguration.contentsContainerStyle), style);
|
|
116
|
+
return this;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* 设置按钮区样式
|
|
120
|
+
*/
|
|
121
|
+
actionsContainerStyle(style) {
|
|
122
|
+
this.viewConfiguration.actionsContainerStyle = Object.assign(Object.assign({}, this.viewConfiguration.actionsContainerStyle), style);
|
|
109
123
|
return this;
|
|
110
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* 设置弹窗显示动画时长
|
|
127
|
+
* @param duration 动画时长 ms
|
|
128
|
+
*/
|
|
111
129
|
showAnimationDuration(duration) {
|
|
112
130
|
this.viewDefaultAnimation.showDuration = duration;
|
|
113
131
|
return this;
|
|
114
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* 设置弹窗关闭动画时长
|
|
135
|
+
* @param duration 动画时长 ms
|
|
136
|
+
*/
|
|
115
137
|
closeAnimationDuration(duration) {
|
|
116
138
|
this.viewDefaultAnimation.closeDuration = duration;
|
|
117
139
|
return this;
|
package/FXDialogView.d.ts
CHANGED
|
@@ -4,8 +4,10 @@ import { FXDialogType, FXDialogAction, FXDialogElement, FXDialogAnimationImpl, F
|
|
|
4
4
|
export interface FXDialogViewProps {
|
|
5
5
|
type?: FXDialogType;
|
|
6
6
|
elements?: FXDialogElement[];
|
|
7
|
-
containerStyle?: ViewStyle;
|
|
8
7
|
backgroundStyle?: ViewStyle;
|
|
8
|
+
containerStyle?: ViewStyle;
|
|
9
|
+
contentsContainerStyle?: ViewStyle;
|
|
10
|
+
actionsContainerStyle?: ViewStyle;
|
|
9
11
|
animator?: FXDialogAnimationImpl;
|
|
10
12
|
closeOnClickBackground?: boolean;
|
|
11
13
|
actionsScrollMinHeight?: number;
|
|
@@ -26,6 +28,8 @@ interface FXDialogViewState {
|
|
|
26
28
|
measureElements?: FXDialogElement[];
|
|
27
29
|
containerStyle?: ViewStyle;
|
|
28
30
|
backgroundStyle?: ViewStyle;
|
|
31
|
+
contentsContainerStyle?: ViewStyle;
|
|
32
|
+
actionsContainerStyle?: ViewStyle;
|
|
29
33
|
}
|
|
30
34
|
export declare const FXDialogViewDefaultScrollConfig: {
|
|
31
35
|
layout: {
|
|
@@ -61,7 +65,8 @@ export default class FXDialogView extends Component<FXDialogViewProps, FXDialogV
|
|
|
61
65
|
private renderCustomView;
|
|
62
66
|
private renderContentElement;
|
|
63
67
|
renderActions: (actions: FXDialogAction[]) => React.JSX.Element;
|
|
64
|
-
|
|
68
|
+
renderContents: (contentComponents: React.ReactNode[]) => React.JSX.Element;
|
|
69
|
+
renderAllArea: (elements: FXDialogElement[]) => React.JSX.Element;
|
|
65
70
|
render(): React.JSX.Element;
|
|
66
71
|
}
|
|
67
72
|
export {};
|
package/FXDialogView.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FXDialogView.d.ts","sourceRoot":"","sources":["FXDialogView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAML,SAAS,EAKV,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,YAAY,EACZ,cAAc,EAEd,eAAe,EAOf,qBAAqB,EAErB,2BAA2B,EAC5B,MAAM,SAAS,CAAC;AAQjB,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,
|
|
1
|
+
{"version":3,"file":"FXDialogView.d.ts","sourceRoot":"","sources":["FXDialogView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAML,SAAS,EAKV,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,YAAY,EACZ,cAAc,EAEd,eAAe,EAOf,qBAAqB,EAErB,2BAA2B,EAC5B,MAAM,SAAS,CAAC;AAQjB,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,sBAAsB,CAAC,EAAE,SAAS,CAAC;IACnC,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC,QAAQ,CAAC,EAAE,qBA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;IA4ClD,OAAO,CAAC,mBAAmB,CAQzB;IAEF,OAAO,CAAC,mBAAmB,CAQzB;IAEF,OAAO,CAAC,mBAAmB,CAIzB;IAEF,OAAO,CAAC,6BAA6B,CAE9B;IAEP,OAAO,CAAC,oBAAoB,CAgB1B;IAEF,mBAAmB,aAKjB;IAEF,iBAAiB,GAAI,QAAQ,cAAc,UAiBzC;IAEF,OAAO,CAAC,kBAAkB,CAgBxB;IAEF,OAAO,CAAC,WAAW,CAcjB;IAEF,OAAO,CAAC,aAAa,CAcnB;IAEF,OAAO,CAAC,gBAAgB,CAEtB;IAEF,OAAO,CAAC,oBAAoB,CA8B1B;IAEF,aAAa,GAAI,SAAS,cAAc,EAAE,uBA6ExC;IAEF,cAAc,GAAI,mBAAmB,KAAK,CAAC,SAAS,EAAE,uBA8BpD;IAEF,aAAa,GAAI,UAAU,eAAe,EAAE,uBAQ1C;IAEF,MAAM;CA6CP"}
|
package/FXDialogView.js
CHANGED
|
@@ -103,12 +103,14 @@ class FXDialogView extends react_1.Component {
|
|
|
103
103
|
if (action.onPress) {
|
|
104
104
|
action.onPress();
|
|
105
105
|
}
|
|
106
|
+
const closeTypeMap = {
|
|
107
|
+
[types_1.FXDialogActionType.Cancel]: types_1.FXDialogCloseSystemType.ActionCancel,
|
|
108
|
+
[types_1.FXDialogActionType.Default]: types_1.FXDialogCloseSystemType.ActionDefault,
|
|
109
|
+
[types_1.FXDialogActionType.Highlight]: types_1.FXDialogCloseSystemType.ActionHighlight,
|
|
110
|
+
};
|
|
106
111
|
if (closeOnClick && this.props.close) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
: action.type === types_1.FXDialogActionType.Cancel
|
|
110
|
-
? types_1.FXDialogCloseSystemType.Cancel
|
|
111
|
-
: types_1.FXDialogCloseSystemType.Action);
|
|
112
|
+
const actionCloseType = closeTypeMap[action.type || types_1.FXDialogActionType.Default];
|
|
113
|
+
this.props.close(action.closeType ? action.closeType : actionCloseType);
|
|
112
114
|
}
|
|
113
115
|
};
|
|
114
116
|
this.categorizeElements = (elements) => {
|
|
@@ -163,7 +165,7 @@ class FXDialogView extends react_1.Component {
|
|
|
163
165
|
}
|
|
164
166
|
};
|
|
165
167
|
this.renderActions = (actions) => {
|
|
166
|
-
const { actionsScrollable, adjustedActionsHeight, measureElements } = this.state;
|
|
168
|
+
const { actionsScrollable, adjustedActionsHeight, measureElements, actionsContainerStyle, } = this.state;
|
|
167
169
|
if (actions.length === 0) {
|
|
168
170
|
return (<react_native_1.View onLayout={measureElements ? this.handleActionsLayout : undefined}/>);
|
|
169
171
|
}
|
|
@@ -180,38 +182,46 @@ class FXDialogView extends react_1.Component {
|
|
|
180
182
|
: isLast
|
|
181
183
|
? this.style.actionButtonLast
|
|
182
184
|
: this.style.actionButton;
|
|
185
|
+
const buttonStyles = [buttonStyle || {}];
|
|
183
186
|
const textStyle = [this.style.actionText];
|
|
184
187
|
if (action.type === types_1.FXDialogActionType.Cancel) {
|
|
185
188
|
textStyle.push(this.style.actionCancelText);
|
|
189
|
+
buttonStyles.push(this.style.cancelButton);
|
|
186
190
|
}
|
|
187
191
|
else if (action.type === types_1.FXDialogActionType.Highlight) {
|
|
188
192
|
textStyle.push(this.style.actionHighlightText);
|
|
189
193
|
}
|
|
190
|
-
return (<react_native_1.TouchableOpacity key={index} style={[
|
|
194
|
+
return (<react_native_1.TouchableOpacity key={index} style={[...buttonStyles, action.containerStyle]} onPress={() => this.handleActionPress(action)}>
|
|
191
195
|
{(0, types_1.actionIsDefault)(action) ? (<react_native_1.Text style={[textStyle, action.style]} numberOfLines={action.numberOfLines || 1} ellipsizeMode={action.ellipsizeMode || "tail"}>
|
|
192
196
|
{action.action}
|
|
193
197
|
</react_native_1.Text>) : (action.action)}
|
|
194
198
|
</react_native_1.TouchableOpacity>);
|
|
195
199
|
});
|
|
196
|
-
return (<react_native_1.ScrollView style={actionsScrollable ? { height: adjustedActionsHeight } : undefined} scrollEnabled={actionsScrollable} showsVerticalScrollIndicator={false} bounces={
|
|
200
|
+
return (<react_native_1.ScrollView style={actionsScrollable ? { height: adjustedActionsHeight } : undefined} scrollEnabled={actionsScrollable} showsVerticalScrollIndicator={false} bounces={false} nestedScrollEnabled={true}>
|
|
197
201
|
<react_native_1.View onLayout={measureElements ? this.handleActionsLayout : undefined}>
|
|
198
|
-
<react_native_1.View style={containerStyle}>
|
|
202
|
+
<react_native_1.View style={[containerStyle, actionsContainerStyle]}>
|
|
203
|
+
{actionsButtons}
|
|
204
|
+
</react_native_1.View>
|
|
199
205
|
</react_native_1.View>
|
|
200
206
|
</react_native_1.ScrollView>);
|
|
201
207
|
};
|
|
202
|
-
this.
|
|
203
|
-
const { contentScrollable, adjustedContentHeight, measureElements } = this.state;
|
|
204
|
-
if (!
|
|
208
|
+
this.renderContents = (contentComponents) => {
|
|
209
|
+
const { contentScrollable, adjustedContentHeight, measureElements, contentsContainerStyle, } = this.state;
|
|
210
|
+
if (!contentComponents || contentComponents.length === 0) {
|
|
205
211
|
return (<react_native_1.View onLayout={measureElements ? this.handleContentLayout : undefined}/>);
|
|
206
212
|
}
|
|
213
|
+
return (<react_native_1.ScrollView style={[contentScrollable && { height: adjustedContentHeight }]} scrollEnabled={contentScrollable} showsVerticalScrollIndicator={false} bounces={false} nestedScrollEnabled={true}>
|
|
214
|
+
<react_native_1.View onLayout={measureElements ? this.handleContentLayout : undefined}>
|
|
215
|
+
<react_native_1.View style={[this.style.contentsContainer, contentsContainerStyle]}>
|
|
216
|
+
{contentComponents}
|
|
217
|
+
</react_native_1.View>
|
|
218
|
+
</react_native_1.View>
|
|
219
|
+
</react_native_1.ScrollView>);
|
|
220
|
+
};
|
|
221
|
+
this.renderAllArea = (elements) => {
|
|
207
222
|
const { contentComponents, actions } = this.categorizeElements(elements);
|
|
208
223
|
return (<>
|
|
209
|
-
|
|
210
|
-
<react_native_1.View onLayout={measureElements ? this.handleContentLayout : undefined}>
|
|
211
|
-
<react_native_1.View style={this.style.contentContainer}>{contentComponents}</react_native_1.View>
|
|
212
|
-
</react_native_1.View>
|
|
213
|
-
</react_native_1.ScrollView>
|
|
214
|
-
|
|
224
|
+
{this.renderContents(contentComponents)}
|
|
215
225
|
{this.renderActions(actions)}
|
|
216
226
|
</>);
|
|
217
227
|
};
|
|
@@ -233,6 +243,8 @@ class FXDialogView extends react_1.Component {
|
|
|
233
243
|
measureElements: this.props.elements || [],
|
|
234
244
|
containerStyle: this.props.containerStyle,
|
|
235
245
|
backgroundStyle: this.props.backgroundStyle,
|
|
246
|
+
contentsContainerStyle: this.props.contentsContainerStyle,
|
|
247
|
+
actionsContainerStyle: this.props.actionsContainerStyle,
|
|
236
248
|
};
|
|
237
249
|
}
|
|
238
250
|
componentDidMount() {
|
|
@@ -278,6 +290,12 @@ class FXDialogView extends react_1.Component {
|
|
|
278
290
|
if (updates.containerStyle) {
|
|
279
291
|
stateUpdates.containerStyle = updates.containerStyle;
|
|
280
292
|
}
|
|
293
|
+
if (updates.contentsContainerStyle) {
|
|
294
|
+
stateUpdates.contentsContainerStyle = updates.contentsContainerStyle;
|
|
295
|
+
}
|
|
296
|
+
if (updates.actionsContainerStyle) {
|
|
297
|
+
stateUpdates.actionsContainerStyle = updates.actionsContainerStyle;
|
|
298
|
+
}
|
|
281
299
|
this.setState(stateUpdates);
|
|
282
300
|
}
|
|
283
301
|
render() {
|
|
@@ -291,10 +309,10 @@ class FXDialogView extends react_1.Component {
|
|
|
291
309
|
: []),
|
|
292
310
|
];
|
|
293
311
|
// ✅ 可见层:始终展示旧内容
|
|
294
|
-
const displayLayer = this.
|
|
312
|
+
const displayLayer = this.renderAllArea(displayElements || []);
|
|
295
313
|
// ✅ 隐藏测量层:只在 measureElements 存在时渲染
|
|
296
314
|
const measureLayer = measureElements ? (<react_native_1.View style={{ position: "absolute", opacity: 0, bottom: 9999 }}>
|
|
297
|
-
{this.
|
|
315
|
+
{this.renderAllArea(measureElements)}
|
|
298
316
|
</react_native_1.View>) : null;
|
|
299
317
|
return (<react_native_1.Animated.View style={[
|
|
300
318
|
style_1.styles.overlay,
|
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ npm install react react-native
|
|
|
30
30
|
## 🚀 快速开始
|
|
31
31
|
|
|
32
32
|
```typescript
|
|
33
|
-
import { FXDialog } from 'react-native-fxdialog';
|
|
33
|
+
import { FXDialog, FXDialogActionType } from 'react-native-fxdialog';
|
|
34
34
|
|
|
35
35
|
// 简单警告框
|
|
36
36
|
FXDialog.alert()
|
|
@@ -38,7 +38,7 @@ FXDialog.alert()
|
|
|
38
38
|
.addMessage({ message: "这是一个简单的警告框" })
|
|
39
39
|
.addAction({ action: "确定", type: FXDialogActionType.Highlight })
|
|
40
40
|
.show();
|
|
41
|
-
|
|
41
|
+
```
|
|
42
42
|
// 操作表
|
|
43
43
|
FXDialog.actionSheet()
|
|
44
44
|
.addTitle({ title: "选择操作" })
|
|
@@ -238,6 +238,9 @@ controller.update({
|
|
|
238
238
|
#### `FXDialog.clearAll(fxViewId)`
|
|
239
239
|
关闭指定视图上的所有弹窗。
|
|
240
240
|
|
|
241
|
+
#### `FXDialog.clearAll(fxViewId)`
|
|
242
|
+
关闭指定视图上的所有弹窗。
|
|
243
|
+
|
|
241
244
|
### 弹窗构建器方法
|
|
242
245
|
|
|
243
246
|
#### 配置方法
|
|
@@ -257,6 +260,7 @@ controller.update({
|
|
|
257
260
|
| `containerScrollMaxHeight(height)` | `number` | 容器最大高度 |
|
|
258
261
|
| `actionsScrollMinHeight(height)` | `number` | 按钮区最小高度 |
|
|
259
262
|
| `actionsScrollMaxHeight(height)` | `number` | 按钮区最大高度 |
|
|
263
|
+
| `animator(animator)` | `FXDialogAnimationImpl` | 自定义动画控制器 |
|
|
260
264
|
| `enqueue(enable)` | `boolean` | 启用队列管理 |
|
|
261
265
|
| `setPriority(priority)` | `number` | 设置显示优先级 |
|
|
262
266
|
| `didShow(callback)` | `() => void` | 显示回调 |
|
|
@@ -305,9 +309,9 @@ interface FXDialogTitle {
|
|
|
305
309
|
id?: string; // 可选ID,更新时必须
|
|
306
310
|
title: string; // 标题文本
|
|
307
311
|
style?: TextStyle; // 文本样式
|
|
308
|
-
numberOfLines?: number; //
|
|
309
|
-
ellipsizeMode?: "head" | "middle" | "tail" | "clip"; //
|
|
310
|
-
containerStyle?: ViewStyle; //
|
|
312
|
+
numberOfLines?: number; // 最大显示行数,默认为 1
|
|
313
|
+
ellipsizeMode?: "head" | "middle" | "tail" | "clip"; // 文本溢出时的省略模式
|
|
314
|
+
containerStyle?: ViewStyle; // 标题容器样式
|
|
311
315
|
}
|
|
312
316
|
```
|
|
313
317
|
|
|
@@ -317,24 +321,30 @@ interface FXDialogMessage {
|
|
|
317
321
|
id?: string; // 可选ID,更新时必须
|
|
318
322
|
message: string; // 消息文本
|
|
319
323
|
style?: TextStyle; // 文本样式
|
|
320
|
-
numberOfLines?: number; //
|
|
321
|
-
ellipsizeMode?: "head" | "middle" | "tail" | "clip"; //
|
|
322
|
-
containerStyle?: ViewStyle; //
|
|
324
|
+
numberOfLines?: number; // 最大显示行数
|
|
325
|
+
ellipsizeMode?: "head" | "middle" | "tail" | "clip"; // 文本溢出时的省略模式
|
|
326
|
+
containerStyle?: ViewStyle; // 消息容器样式
|
|
323
327
|
}
|
|
324
328
|
```
|
|
325
329
|
|
|
326
330
|
#### FXDialogAction
|
|
327
331
|
```typescript
|
|
328
|
-
|
|
332
|
+
// 文本按钮
|
|
333
|
+
type FXDialogDefaultAction = {
|
|
329
334
|
id?: string; // 可选ID,更新时必须
|
|
330
335
|
action: string; // 按钮文本
|
|
331
336
|
type?: FXDialogActionType; // 按钮类型
|
|
332
337
|
style?: TextStyle; // 文本样式
|
|
338
|
+
numberOfLines?: number; // 最大显示行数
|
|
339
|
+
ellipsizeMode?: "head" | "middle" | "tail" | "clip"; // 省略模式
|
|
333
340
|
containerStyle?: ViewStyle; // 容器样式
|
|
334
341
|
closeOnClick?: boolean; // 点击后是否自动关闭
|
|
335
342
|
closeType?: FXDialogCloseType; // 关闭类型
|
|
336
343
|
onPress?: () => void; // 点击回调
|
|
337
|
-
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// 自定义组件按钮
|
|
347
|
+
type FXDialogCustomAction = {
|
|
338
348
|
id?: string; // 可选ID,更新时必须
|
|
339
349
|
action: React.ReactNode; // 自定义组件
|
|
340
350
|
type?: FXDialogActionType; // 按钮类型
|
|
@@ -343,32 +353,59 @@ type FXDialogAction = {
|
|
|
343
353
|
closeType?: FXDialogCloseType; // 关闭类型
|
|
344
354
|
onPress?: () => void; // 点击回调
|
|
345
355
|
}
|
|
356
|
+
|
|
357
|
+
type FXDialogAction = FXDialogDefaultAction | FXDialogCustomAction;
|
|
346
358
|
```
|
|
347
359
|
|
|
348
360
|
#### FXDialogController
|
|
349
361
|
```typescript
|
|
350
362
|
interface FXDialogController {
|
|
363
|
+
/**
|
|
364
|
+
* 关闭弹窗
|
|
365
|
+
* @param closeType - 可选,关闭类型,用于区分不同的关闭触发方式
|
|
366
|
+
*/
|
|
351
367
|
close: (closeType?: FXDialogCloseType) => void;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* 更新弹窗内容
|
|
371
|
+
* @param updates - 要更新的内容配置
|
|
372
|
+
*/
|
|
352
373
|
update: (updates: FXDialogUpdateConfiguration) => void;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* 获取弹窗所在的FXView ID
|
|
377
|
+
* @returns FXView ID 或 undefined
|
|
378
|
+
*/
|
|
353
379
|
fxViewId: () => string | undefined;
|
|
354
380
|
}
|
|
381
|
+
|
|
382
|
+
#### FXDialogUpdateConfiguration
|
|
383
|
+
```typescript
|
|
384
|
+
interface FXDialogUpdateConfiguration {
|
|
385
|
+
/** 更新容器样式 */
|
|
386
|
+
containerStyle?: ViewStyle;
|
|
387
|
+
/** 更新背景样式 */
|
|
388
|
+
backgroundStyle?: ViewStyle;
|
|
389
|
+
/** 更新元素(必须有ID) */
|
|
390
|
+
items?: FXDialogItem[];
|
|
391
|
+
}
|
|
355
392
|
```
|
|
356
393
|
|
|
357
394
|
## 🎭 动画示例
|
|
358
395
|
|
|
359
396
|
### 自定义动画
|
|
360
397
|
```typescript
|
|
361
|
-
import { FXDialogAnimationImpl } from 'react-native-fxdialog';
|
|
398
|
+
import { FXDialogAnimationImpl, FXDialogAnimationType } from 'react-native-fxdialog';
|
|
362
399
|
|
|
363
400
|
const customAnimator: FXDialogAnimationImpl = {
|
|
364
401
|
showDuration: 500,
|
|
365
402
|
closeDuration: 300,
|
|
366
403
|
backgroundStyle: () => ({
|
|
367
|
-
opacity:
|
|
404
|
+
opacity: 0.5, // 背景半透明
|
|
368
405
|
}),
|
|
369
406
|
containerStyle: () => ({
|
|
370
|
-
transform: [{ scale:
|
|
371
|
-
opacity:
|
|
407
|
+
transform: [{ scale: 0.8 }], // 容器缩放
|
|
408
|
+
opacity: 0.9,
|
|
372
409
|
})
|
|
373
410
|
};
|
|
374
411
|
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as FXDialog } from "./FXDialog";
|
|
2
2
|
export { default as FXDialogView } from "./FXDialogView";
|
|
3
3
|
export { FXDialogAnimation } from "./animation/FXDialogAnimation";
|
|
4
|
-
export type { FXDialogFXViewCategory, FXDialogType,
|
|
4
|
+
export type { FXDialogFXViewCategory, FXDialogType, FXDialogCloseType, FXDialogElement, FXDialogItem, FXDialogTitle, FXDialogMessage, FXDialogAction, FXDialogDefaultAction, FXDialogCustomAction, FXDialogCustomView, FXDialogUpdateConfiguration, FXDialogController, FXDialogAnimationImpl, } from "./types";
|
|
5
|
+
export { FXDialogActionType, FXDialogCloseSystemType, FXDialogElementType, FXDialogAnimationType, } from "./types";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,YAAY,EACV,sBAAsB,EACtB,YAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,YAAY,EACV,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
|
package/index.js
CHANGED
|
@@ -3,10 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.FXDialogAnimation = exports.FXDialogView = exports.FXDialog = void 0;
|
|
6
|
+
exports.FXDialogAnimationType = exports.FXDialogElementType = exports.FXDialogCloseSystemType = exports.FXDialogActionType = exports.FXDialogAnimation = exports.FXDialogView = exports.FXDialog = void 0;
|
|
7
7
|
var FXDialog_1 = require("./FXDialog");
|
|
8
8
|
Object.defineProperty(exports, "FXDialog", { enumerable: true, get: function () { return __importDefault(FXDialog_1).default; } });
|
|
9
9
|
var FXDialogView_1 = require("./FXDialogView");
|
|
10
10
|
Object.defineProperty(exports, "FXDialogView", { enumerable: true, get: function () { return __importDefault(FXDialogView_1).default; } });
|
|
11
11
|
var FXDialogAnimation_1 = require("./animation/FXDialogAnimation");
|
|
12
12
|
Object.defineProperty(exports, "FXDialogAnimation", { enumerable: true, get: function () { return FXDialogAnimation_1.FXDialogAnimation; } });
|
|
13
|
+
var types_1 = require("./types");
|
|
14
|
+
Object.defineProperty(exports, "FXDialogActionType", { enumerable: true, get: function () { return types_1.FXDialogActionType; } });
|
|
15
|
+
Object.defineProperty(exports, "FXDialogCloseSystemType", { enumerable: true, get: function () { return types_1.FXDialogCloseSystemType; } });
|
|
16
|
+
Object.defineProperty(exports, "FXDialogElementType", { enumerable: true, get: function () { return types_1.FXDialogElementType; } });
|
|
17
|
+
Object.defineProperty(exports, "FXDialogAnimationType", { enumerable: true, get: function () { return types_1.FXDialogAnimationType; } });
|
package/package.json
CHANGED
package/style.d.ts
CHANGED
package/style.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;CAejB,CAAC;AAEH;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAElC,SAAS,EAAE,SAAS,CAAC;IACrB,
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;CAejB,CAAC;AAEH;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAElC,SAAS,EAAE,SAAS,CAAC;IACrB,iBAAiB,EAAE,SAAS,CAAC;IAE7B,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IAGrB,cAAc,EAAE,SAAS,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAC;IAGjB,gBAAgB,EAAE,SAAS,CAAC;IAC5B,OAAO,EAAE,SAAS,CAAC;IAGnB,gBAAgB,EAAE,SAAS,CAAC;IAC5B,wBAAwB,EAAE,SAAS,CAAC;IAGpC,YAAY,EAAE,SAAS,CAAC;IACxB,oBAAoB,EAAE,SAAS,CAAC;IAChC,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,wBAAwB,CAAC,EAAE,SAAS,CAAC;IAGrC,UAAU,EAAE,SAAS,CAAC;IACtB,gBAAgB,EAAE,SAAS,CAAC;IAC5B,mBAAmB,EAAE,SAAS,CAAC;IAG/B,YAAY,EAAE,SAAS,CAAC;CACzB;AAED,eAAO,MAAM,UAAU,EAAE,mBA6GxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,mBAmG9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,mBA8GxB,CAAC;AAEF,eAAO,MAAM,kBAAkB;mBACd,MAAM,CAAC,YAAY,EAAE,mBAAmB,CAAC;mBAOzC,YAAY,GAAG,mBAAmB;CAGlD,CAAC"}
|
package/style.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.styles = react_native_1.StyleSheet.create({
|
|
|
13
13
|
bottom: 0,
|
|
14
14
|
justifyContent: "center",
|
|
15
15
|
alignItems: "center",
|
|
16
|
-
backgroundColor: "rgba(0, 0, 0, 0.
|
|
16
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
17
17
|
},
|
|
18
18
|
responder: Object.assign({}, react_native_1.StyleSheet.absoluteFillObject),
|
|
19
19
|
});
|
|
@@ -21,75 +21,81 @@ exports.alertStyle = {
|
|
|
21
21
|
overlay: exports.styles.overlay,
|
|
22
22
|
responder: exports.styles.responder,
|
|
23
23
|
container: {
|
|
24
|
-
backgroundColor: "
|
|
25
|
-
borderRadius:
|
|
26
|
-
shadowColor: "#000",
|
|
24
|
+
backgroundColor: "#FFFFFF",
|
|
25
|
+
borderRadius: 8,
|
|
27
26
|
width: 280,
|
|
27
|
+
shadowColor: "#000000",
|
|
28
28
|
shadowOffset: { width: 0, height: 2 },
|
|
29
|
-
shadowOpacity: 0.
|
|
30
|
-
shadowRadius:
|
|
31
|
-
elevation:
|
|
29
|
+
shadowOpacity: 0.15,
|
|
30
|
+
shadowRadius: 8,
|
|
31
|
+
elevation: 6,
|
|
32
|
+
overflow: "hidden",
|
|
32
33
|
},
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
contentsContainer: {
|
|
35
|
+
paddingTop: 20,
|
|
36
|
+
paddingHorizontal: 24,
|
|
35
37
|
},
|
|
36
38
|
titleContainer: {
|
|
37
39
|
justifyContent: "center",
|
|
38
40
|
alignItems: "center",
|
|
39
|
-
marginBottom:
|
|
40
|
-
paddingHorizontal:
|
|
41
|
+
marginBottom: 8,
|
|
42
|
+
paddingHorizontal: 0,
|
|
41
43
|
},
|
|
42
44
|
title: {
|
|
43
45
|
fontSize: 17,
|
|
44
|
-
fontWeight: "
|
|
45
|
-
color: "#
|
|
46
|
+
fontWeight: "500",
|
|
47
|
+
color: "#000000",
|
|
48
|
+
textAlign: "center",
|
|
49
|
+
lineHeight: 22,
|
|
46
50
|
},
|
|
47
51
|
messageContainer: {
|
|
48
52
|
justifyContent: "center",
|
|
49
53
|
alignItems: "center",
|
|
50
|
-
marginBottom:
|
|
51
|
-
paddingHorizontal:
|
|
54
|
+
marginBottom: 20,
|
|
55
|
+
paddingHorizontal: 0,
|
|
52
56
|
},
|
|
53
57
|
message: {
|
|
54
|
-
fontSize:
|
|
55
|
-
color: "#
|
|
56
|
-
lineHeight:
|
|
58
|
+
fontSize: 15,
|
|
59
|
+
color: "#666666",
|
|
60
|
+
lineHeight: 21,
|
|
61
|
+
textAlign: "center",
|
|
62
|
+
fontWeight: "400",
|
|
57
63
|
},
|
|
58
64
|
actionsContainer: {
|
|
59
65
|
flexDirection: "row",
|
|
60
66
|
borderTopWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
61
|
-
borderTopColor: "#
|
|
67
|
+
borderTopColor: "#E5E5E5",
|
|
62
68
|
},
|
|
63
69
|
actionsContainerVertical: {
|
|
64
70
|
flexDirection: "column",
|
|
65
71
|
borderTopWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
66
|
-
borderTopColor: "#
|
|
72
|
+
borderTopColor: "#E5E5E5",
|
|
67
73
|
},
|
|
68
74
|
actionButton: {
|
|
69
75
|
flex: 1,
|
|
70
76
|
justifyContent: "center",
|
|
71
77
|
alignItems: "center",
|
|
72
78
|
paddingHorizontal: 8,
|
|
73
|
-
height:
|
|
79
|
+
height: 48,
|
|
74
80
|
borderRightWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
75
|
-
borderRightColor: "#
|
|
81
|
+
borderRightColor: "#E5E5E5",
|
|
76
82
|
},
|
|
77
83
|
actionButtonVertical: {
|
|
78
84
|
justifyContent: "center",
|
|
79
85
|
alignItems: "center",
|
|
80
86
|
paddingHorizontal: 8,
|
|
81
87
|
paddingVertical: 12,
|
|
82
|
-
height:
|
|
88
|
+
height: 48,
|
|
83
89
|
borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
84
|
-
borderBottomColor: "#
|
|
90
|
+
borderBottomColor: "#E5E5E5",
|
|
85
91
|
},
|
|
86
92
|
actionButtonLast: {
|
|
87
93
|
flex: 1,
|
|
88
94
|
justifyContent: "center",
|
|
89
95
|
alignItems: "center",
|
|
90
96
|
paddingHorizontal: 8,
|
|
91
|
-
height:
|
|
92
|
-
borderRightColor: "#
|
|
97
|
+
height: 48,
|
|
98
|
+
borderRightColor: "#E5E5E5",
|
|
93
99
|
borderRightWidth: 0,
|
|
94
100
|
},
|
|
95
101
|
actionButtonVerticalLast: {
|
|
@@ -97,27 +103,27 @@ exports.alertStyle = {
|
|
|
97
103
|
alignItems: "center",
|
|
98
104
|
paddingHorizontal: 8,
|
|
99
105
|
paddingVertical: 12,
|
|
100
|
-
height:
|
|
101
|
-
borderBottomColor: "#
|
|
106
|
+
height: 48,
|
|
107
|
+
borderBottomColor: "#E5E5E5",
|
|
102
108
|
borderBottomWidth: 0,
|
|
103
109
|
},
|
|
104
110
|
actionText: {
|
|
105
111
|
fontSize: 17,
|
|
106
|
-
color: "#
|
|
107
|
-
fontWeight: "
|
|
112
|
+
color: "#000000",
|
|
113
|
+
fontWeight: "400",
|
|
108
114
|
textAlignVertical: "center",
|
|
109
115
|
},
|
|
110
116
|
actionCancelText: {
|
|
111
117
|
fontSize: 17,
|
|
112
118
|
textAlignVertical: "center",
|
|
113
|
-
color: "#
|
|
114
|
-
fontWeight: "
|
|
119
|
+
color: "#666666",
|
|
120
|
+
fontWeight: "400",
|
|
115
121
|
},
|
|
116
122
|
actionHighlightText: {
|
|
117
123
|
fontSize: 17,
|
|
118
|
-
fontWeight: "
|
|
124
|
+
fontWeight: "400",
|
|
119
125
|
textAlignVertical: "center",
|
|
120
|
-
color: "#
|
|
126
|
+
color: "#07C160",
|
|
121
127
|
},
|
|
122
128
|
cancelButton: {},
|
|
123
129
|
};
|
|
@@ -129,92 +135,97 @@ exports.actionSheetStyle = {
|
|
|
129
135
|
bottom: 0,
|
|
130
136
|
left: 0,
|
|
131
137
|
right: 0,
|
|
132
|
-
backgroundColor: "
|
|
133
|
-
borderTopLeftRadius:
|
|
134
|
-
borderTopRightRadius:
|
|
138
|
+
backgroundColor: "#F7F7F7",
|
|
139
|
+
borderTopLeftRadius: 8,
|
|
140
|
+
borderTopRightRadius: 8,
|
|
135
141
|
overflow: "hidden",
|
|
136
142
|
},
|
|
137
|
-
|
|
143
|
+
contentsContainer: {
|
|
138
144
|
padding: 16,
|
|
145
|
+
backgroundColor: "#FFFFFF",
|
|
139
146
|
},
|
|
140
147
|
titleContainer: {
|
|
141
148
|
marginBottom: 8,
|
|
142
149
|
},
|
|
143
150
|
title: {
|
|
144
151
|
fontSize: 13,
|
|
145
|
-
color: "#
|
|
152
|
+
color: "#888888",
|
|
146
153
|
textAlign: "center",
|
|
154
|
+
fontWeight: "400",
|
|
155
|
+
lineHeight: 18,
|
|
147
156
|
},
|
|
148
157
|
messageContainer: {
|
|
149
158
|
marginBottom: 8,
|
|
150
159
|
},
|
|
151
160
|
message: {
|
|
152
161
|
fontSize: 13,
|
|
153
|
-
color: "#
|
|
162
|
+
color: "#888888",
|
|
154
163
|
lineHeight: 18,
|
|
164
|
+
textAlign: "center",
|
|
165
|
+
fontWeight: "400",
|
|
155
166
|
},
|
|
156
167
|
actionsContainer: {
|
|
157
168
|
flexDirection: "column",
|
|
158
|
-
|
|
159
|
-
|
|
169
|
+
borderRadius: 8,
|
|
170
|
+
overflow: "hidden",
|
|
171
|
+
backgroundColor: "#F7F7F7",
|
|
160
172
|
},
|
|
161
173
|
actionsContainerVertical: {
|
|
162
174
|
flexDirection: "column",
|
|
163
|
-
|
|
164
|
-
|
|
175
|
+
borderRadius: 8,
|
|
176
|
+
overflow: "hidden",
|
|
177
|
+
backgroundColor: "#F7F7F7",
|
|
165
178
|
},
|
|
166
179
|
actionButton: {
|
|
167
|
-
// ActionSheet按钮始终纵向排列
|
|
168
180
|
flex: 1,
|
|
169
181
|
borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
170
|
-
borderBottomColor: "#
|
|
182
|
+
borderBottomColor: "#E5E5E5",
|
|
171
183
|
justifyContent: "center",
|
|
172
|
-
height:
|
|
184
|
+
height: 54,
|
|
185
|
+
backgroundColor: "#FFFFFF",
|
|
173
186
|
},
|
|
174
187
|
actionButtonVertical: {
|
|
175
|
-
// ActionSheet按钮始终纵向排列
|
|
176
188
|
flex: 1,
|
|
177
189
|
borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
178
|
-
borderBottomColor: "#
|
|
190
|
+
borderBottomColor: "#E5E5E5",
|
|
179
191
|
justifyContent: "center",
|
|
180
|
-
paddingHorizontal:
|
|
181
|
-
height:
|
|
192
|
+
paddingHorizontal: 16,
|
|
193
|
+
height: 54,
|
|
194
|
+
backgroundColor: "#FFFFFF",
|
|
182
195
|
},
|
|
183
196
|
actionButtonLast: {
|
|
184
|
-
// 和 actionButton 一样
|
|
185
197
|
flex: 1,
|
|
186
|
-
borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
187
|
-
borderBottomColor: "#e0e0e0",
|
|
188
198
|
justifyContent: "center",
|
|
189
|
-
height:
|
|
199
|
+
height: 54,
|
|
200
|
+
backgroundColor: "#FFFFFF",
|
|
190
201
|
},
|
|
191
202
|
actionButtonVerticalLast: {
|
|
192
|
-
// 和 actionButtonVertical 一样
|
|
193
|
-
flex: 1,
|
|
194
|
-
borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
195
|
-
borderBottomColor: "#e0e0e0",
|
|
196
203
|
justifyContent: "center",
|
|
197
|
-
|
|
204
|
+
paddingHorizontal: 16,
|
|
205
|
+
height: 54,
|
|
206
|
+
backgroundColor: "#FFFFFF",
|
|
198
207
|
},
|
|
199
208
|
actionText: {
|
|
200
|
-
fontSize:
|
|
201
|
-
color: "#
|
|
209
|
+
fontSize: 18,
|
|
210
|
+
color: "#000000",
|
|
202
211
|
textAlign: "center",
|
|
203
212
|
fontWeight: "400",
|
|
204
213
|
},
|
|
205
214
|
actionCancelText: {
|
|
206
|
-
fontSize:
|
|
207
|
-
color: "#
|
|
215
|
+
fontSize: 18,
|
|
216
|
+
color: "#666666",
|
|
208
217
|
textAlign: "center",
|
|
209
|
-
fontWeight: "
|
|
218
|
+
fontWeight: "400",
|
|
210
219
|
},
|
|
211
220
|
actionHighlightText: {
|
|
212
|
-
fontSize:
|
|
221
|
+
fontSize: 18,
|
|
213
222
|
textAlign: "center",
|
|
214
|
-
fontWeight: "
|
|
215
|
-
color: "#
|
|
223
|
+
fontWeight: "400",
|
|
224
|
+
color: "#07C160",
|
|
225
|
+
},
|
|
226
|
+
cancelButton: {
|
|
227
|
+
marginTop: 8,
|
|
216
228
|
},
|
|
217
|
-
cancelButton: {},
|
|
218
229
|
};
|
|
219
230
|
exports.popupStyle = {
|
|
220
231
|
overlay: exports.styles.overlay,
|
|
@@ -224,91 +235,94 @@ exports.popupStyle = {
|
|
|
224
235
|
bottom: 0,
|
|
225
236
|
left: 0,
|
|
226
237
|
right: 0,
|
|
227
|
-
backgroundColor: "
|
|
228
|
-
borderTopLeftRadius:
|
|
229
|
-
borderTopRightRadius:
|
|
238
|
+
backgroundColor: "#FFFFFF",
|
|
239
|
+
borderTopLeftRadius: 12,
|
|
240
|
+
borderTopRightRadius: 12,
|
|
230
241
|
overflow: "hidden",
|
|
231
242
|
},
|
|
232
|
-
|
|
233
|
-
paddingTop:
|
|
234
|
-
paddingBottom:
|
|
235
|
-
paddingHorizontal:
|
|
243
|
+
contentsContainer: {
|
|
244
|
+
paddingTop: 20,
|
|
245
|
+
paddingBottom: 16,
|
|
246
|
+
paddingHorizontal: 20,
|
|
236
247
|
},
|
|
237
248
|
titleContainer: {
|
|
238
249
|
alignItems: "center",
|
|
239
|
-
marginBottom:
|
|
250
|
+
marginBottom: 12,
|
|
240
251
|
},
|
|
241
252
|
title: {
|
|
242
|
-
fontSize:
|
|
243
|
-
fontWeight: "
|
|
244
|
-
color: "#
|
|
253
|
+
fontSize: 18,
|
|
254
|
+
fontWeight: "500",
|
|
255
|
+
color: "#000000",
|
|
256
|
+
textAlign: "center",
|
|
257
|
+
lineHeight: 24,
|
|
245
258
|
},
|
|
246
259
|
messageContainer: {
|
|
247
260
|
alignItems: "center",
|
|
248
|
-
marginBottom:
|
|
261
|
+
marginBottom: 16,
|
|
249
262
|
},
|
|
250
263
|
message: {
|
|
251
|
-
fontSize:
|
|
252
|
-
color: "#
|
|
253
|
-
lineHeight:
|
|
264
|
+
fontSize: 15,
|
|
265
|
+
color: "#666666",
|
|
266
|
+
lineHeight: 21,
|
|
254
267
|
textAlign: "center",
|
|
268
|
+
fontWeight: "400",
|
|
255
269
|
},
|
|
256
270
|
actionsContainer: {
|
|
257
271
|
flexDirection: "row",
|
|
258
|
-
paddingHorizontal:
|
|
259
|
-
paddingBottom:
|
|
272
|
+
paddingHorizontal: 16,
|
|
273
|
+
paddingBottom: 16,
|
|
260
274
|
gap: 12,
|
|
261
275
|
},
|
|
262
276
|
actionsContainerVertical: {
|
|
263
277
|
flexDirection: "column",
|
|
264
|
-
paddingHorizontal:
|
|
265
|
-
paddingBottom:
|
|
266
|
-
gap:
|
|
278
|
+
paddingHorizontal: 16,
|
|
279
|
+
paddingBottom: 16,
|
|
280
|
+
gap: 8,
|
|
267
281
|
},
|
|
268
282
|
actionButton: {
|
|
269
283
|
flex: 1,
|
|
270
|
-
height:
|
|
271
|
-
borderRadius:
|
|
284
|
+
height: 46,
|
|
285
|
+
borderRadius: 6,
|
|
272
286
|
justifyContent: "center",
|
|
273
287
|
alignItems: "center",
|
|
274
288
|
backgroundColor: "#F5F5F5",
|
|
275
289
|
},
|
|
276
290
|
actionButtonVertical: {
|
|
277
|
-
height:
|
|
278
|
-
borderRadius:
|
|
291
|
+
height: 46,
|
|
292
|
+
borderRadius: 6,
|
|
279
293
|
justifyContent: "center",
|
|
280
294
|
alignItems: "center",
|
|
281
295
|
backgroundColor: "#F5F5F5",
|
|
282
296
|
},
|
|
283
297
|
actionButtonLast: {
|
|
284
298
|
flex: 1,
|
|
285
|
-
height:
|
|
286
|
-
borderRadius:
|
|
299
|
+
height: 46,
|
|
300
|
+
borderRadius: 6,
|
|
287
301
|
justifyContent: "center",
|
|
288
302
|
alignItems: "center",
|
|
289
303
|
backgroundColor: "#F5F5F5",
|
|
290
304
|
},
|
|
291
305
|
actionButtonVerticalLast: {
|
|
292
|
-
height:
|
|
293
|
-
borderRadius:
|
|
306
|
+
height: 46,
|
|
307
|
+
borderRadius: 6,
|
|
294
308
|
justifyContent: "center",
|
|
295
309
|
alignItems: "center",
|
|
296
310
|
backgroundColor: "#F5F5F5",
|
|
297
311
|
},
|
|
298
312
|
actionText: {
|
|
299
|
-
fontSize:
|
|
300
|
-
color: "#
|
|
301
|
-
fontWeight: "
|
|
313
|
+
fontSize: 16,
|
|
314
|
+
color: "#000000",
|
|
315
|
+
fontWeight: "400",
|
|
302
316
|
},
|
|
303
317
|
actionCancelText: {
|
|
304
|
-
fontSize:
|
|
305
|
-
color: "#
|
|
306
|
-
fontWeight: "
|
|
318
|
+
fontSize: 16,
|
|
319
|
+
color: "#666666",
|
|
320
|
+
fontWeight: "400",
|
|
307
321
|
},
|
|
308
322
|
actionHighlightText: {
|
|
309
|
-
fontSize:
|
|
310
|
-
fontWeight: "
|
|
311
|
-
color: "#
|
|
323
|
+
fontSize: 16,
|
|
324
|
+
fontWeight: "400",
|
|
325
|
+
color: "#07C160",
|
|
312
326
|
},
|
|
313
327
|
cancelButton: {},
|
|
314
328
|
};
|
package/types.d.ts
CHANGED
|
@@ -54,9 +54,11 @@ export declare enum FXDialogCloseSystemType {
|
|
|
54
54
|
/** 点击背景蒙层关闭 */
|
|
55
55
|
Background = "background",
|
|
56
56
|
/** 点击取消按钮关闭 */
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
|
|
57
|
+
ActionCancel = "cancel",
|
|
58
|
+
/** 点击默认类型操作按钮关闭 */
|
|
59
|
+
ActionDefault = "default",
|
|
60
|
+
/** 点击高亮类型操作按钮关闭 */
|
|
61
|
+
ActionHighlight = "highlight",
|
|
60
62
|
/** 自定义关闭 - 用户主动调用 close 方法且未传递关闭类型时使用 */
|
|
61
63
|
Custom = "custom"
|
|
62
64
|
}
|
|
@@ -257,6 +259,10 @@ export interface FXDialogUpdateConfiguration {
|
|
|
257
259
|
containerStyle?: ViewStyle;
|
|
258
260
|
/** 更新背景样式 */
|
|
259
261
|
backgroundStyle?: ViewStyle;
|
|
262
|
+
/** 更新内容容器样式 */
|
|
263
|
+
contentsContainerStyle?: ViewStyle;
|
|
264
|
+
/** 更新操作按钮容器样式 */
|
|
265
|
+
actionsContainerStyle?: ViewStyle;
|
|
260
266
|
/** 更新元素(必须有ID) */
|
|
261
267
|
items?: FXDialogItem[];
|
|
262
268
|
}
|
package/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,YAAY,EAAE,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IAEjB,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,mBAAmB,CAAC,EAAE,eAAe,CAAC;IACtC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAErD,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,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AAc,CAAC,EAAE,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,2BAA2B;IAC1C,aAAa;IACb,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,aAAa;IACb,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,eAAe;IACf,sBAAsB,CAAC,EAAE,SAAS,CAAC;IACnC,iBAAiB;IACjB,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC,kBAAkB;IAClB,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;OASG;IACH,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,MAAM,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,IAAI,CAAC;IACvD,QAAQ,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CACpC"}
|
package/types.js
CHANGED
|
@@ -32,9 +32,11 @@ var FXDialogCloseSystemType;
|
|
|
32
32
|
/** 点击背景蒙层关闭 */
|
|
33
33
|
FXDialogCloseSystemType["Background"] = "background";
|
|
34
34
|
/** 点击取消按钮关闭 */
|
|
35
|
-
FXDialogCloseSystemType["
|
|
36
|
-
/**
|
|
37
|
-
FXDialogCloseSystemType["
|
|
35
|
+
FXDialogCloseSystemType["ActionCancel"] = "cancel";
|
|
36
|
+
/** 点击默认类型操作按钮关闭 */
|
|
37
|
+
FXDialogCloseSystemType["ActionDefault"] = "default";
|
|
38
|
+
/** 点击高亮类型操作按钮关闭 */
|
|
39
|
+
FXDialogCloseSystemType["ActionHighlight"] = "highlight";
|
|
38
40
|
/** 自定义关闭 - 用户主动调用 close 方法且未传递关闭类型时使用 */
|
|
39
41
|
FXDialogCloseSystemType["Custom"] = "custom";
|
|
40
42
|
})(FXDialogCloseSystemType || (exports.FXDialogCloseSystemType = FXDialogCloseSystemType = {}));
|