react-native-fxdialog 1.0.0-beta06 → 1.0.0-beta08
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 +21 -0
- package/FXDialog.d.ts.map +1 -1
- package/FXDialog.js +31 -5
- package/FXDialogView.d.ts +3 -0
- package/FXDialogView.d.ts.map +1 -1
- package/FXDialogView.js +32 -6
- package/README.md +190 -34
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/package.json +4 -3
- package/style/FXDialogStyleInterceptor.d.ts +46 -0
- package/style/FXDialogStyleInterceptor.d.ts.map +1 -0
- package/style/FXDialogStyleInterceptor.js +110 -0
- package/style/style.d.ts +82 -0
- package/style/style.d.ts.map +1 -0
- package/style/style.js +264 -0
- package/types.d.ts +2 -1
- package/types.d.ts.map +1 -1
package/FXDialog.d.ts
CHANGED
|
@@ -40,6 +40,11 @@ declare class FXDialog {
|
|
|
40
40
|
* 添加自定义视图
|
|
41
41
|
*/
|
|
42
42
|
addCustom(view: FXDialogCustomContent): this;
|
|
43
|
+
/**
|
|
44
|
+
* 添加自定义挂起视图,内部布局是绝对定位,默认样式 position: "absolute",哪怕外部样式设置了类似 position: "relative",也会被忽略
|
|
45
|
+
* @param suspension 自定义挂起视图
|
|
46
|
+
*/
|
|
47
|
+
addSuspension(suspension: React.ReactNode): this;
|
|
43
48
|
/**
|
|
44
49
|
* 添加背景,有默认样式,默认铺满overlay,position: "absolute",传进来的组件带style,会合并默认样式
|
|
45
50
|
* 注意:这里设置style属性最好不要设置布局相关的样式,比如宽高、margin、padding, top/left/right/bottom 等,这些设置不管用,会被默认样式覆盖
|
|
@@ -142,9 +147,25 @@ declare class FXDialog {
|
|
|
142
147
|
* @param actions 要更新的操作按钮,通过id匹配
|
|
143
148
|
*/
|
|
144
149
|
protected updateAction(update: FXDialogAction): void;
|
|
150
|
+
/**
|
|
151
|
+
* 更新背景样式
|
|
152
|
+
* @param style 要更新的背景样式
|
|
153
|
+
*/
|
|
145
154
|
protected updateBackgroundStyle(style: ViewStyle): void;
|
|
155
|
+
/**
|
|
156
|
+
* 更新弹窗容器样式
|
|
157
|
+
* @param style 要更新的弹窗容器样式
|
|
158
|
+
*/
|
|
146
159
|
protected updateContainerStyle(style: ViewStyle): void;
|
|
160
|
+
/**
|
|
161
|
+
* 更新弹窗内容容器样式
|
|
162
|
+
* @param style 要更新的弹窗内容容器样式
|
|
163
|
+
*/
|
|
147
164
|
protected updateContentsContainerStyle(style: ViewStyle): void;
|
|
165
|
+
/**
|
|
166
|
+
* 更新弹窗操作按钮容器样式
|
|
167
|
+
* @param style 要更新的弹窗操作按钮容器样式
|
|
168
|
+
*/
|
|
148
169
|
protected updateActionsContainerStyle(style: ViewStyle): void;
|
|
149
170
|
/**
|
|
150
171
|
* 显示弹窗
|
package/FXDialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FXDialog.d.ts","sourceRoot":"","sources":["FXDialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAEL,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAElB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,wBAAwB,EAEzB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,
|
|
1
|
+
{"version":3,"file":"FXDialog.d.ts","sourceRoot":"","sources":["FXDialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAEL,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB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CAAC,EAAE,iBAAiB,KAAK,IAAI,GAAG,IAAI;IAKjE;;;OAGG;IACH,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,oBAAoB;IAoB9C;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,eAAe;IAM/C;;;OAGG;IACH,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,cAAc;IAM7C;;;OAGG;IACH,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,SAAS;IAMhD;;;OAGG;IACH,SAAS,CAAC,oBAAoB,CAAC,KAAK,EAAE,SAAS;IAM/C;;;OAGG;IACH,SAAS,CAAC,4BAA4B,CAAC,KAAK,EAAE,SAAS;IAMvD;;;OAGG;IACH,SAAS,CAAC,2BAA2B,CAAC,KAAK,EAAE,SAAS;IAQtD;;OAEG;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI;IAiDlD;;OAEG;IACH,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,iBAAiB;IAU7C;;;OAGG;IACH,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,iBAAiB;IAW7D;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM;CAIjC;AAED,eAAe,QAAQ,CAAC"}
|
package/FXDialog.js
CHANGED
|
@@ -23,8 +23,9 @@ class FXDialog {
|
|
|
23
23
|
closeOnClickBackground: true,
|
|
24
24
|
contents: [],
|
|
25
25
|
actions: [],
|
|
26
|
+
suspensions: [],
|
|
26
27
|
};
|
|
27
|
-
this._styleInterceptor = FXDialogStyleInterceptor_1.
|
|
28
|
+
this._styleInterceptor = FXDialogStyleInterceptor_1.FXDialogStyleInterceptorSystem;
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
* 设置弹窗类型
|
|
@@ -78,6 +79,15 @@ class FXDialog {
|
|
|
78
79
|
(_a = this._viewConfiguration.contents) === null || _a === void 0 ? void 0 : _a.push(view);
|
|
79
80
|
return this;
|
|
80
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* 添加自定义挂起视图,内部布局是绝对定位,默认样式 position: "absolute",哪怕外部样式设置了类似 position: "relative",也会被忽略
|
|
84
|
+
* @param suspension 自定义挂起视图
|
|
85
|
+
*/
|
|
86
|
+
addSuspension(suspension) {
|
|
87
|
+
var _a;
|
|
88
|
+
(_a = this._viewConfiguration.suspensions) === null || _a === void 0 ? void 0 : _a.push(suspension);
|
|
89
|
+
return this;
|
|
90
|
+
}
|
|
81
91
|
/**
|
|
82
92
|
* 添加背景,有默认样式,默认铺满overlay,position: "absolute",传进来的组件带style,会合并默认样式
|
|
83
93
|
* 注意:这里设置style属性最好不要设置布局相关的样式,比如宽高、margin、padding, top/left/right/bottom 等,这些设置不管用,会被默认样式覆盖
|
|
@@ -114,21 +124,21 @@ class FXDialog {
|
|
|
114
124
|
* 设置容器样式
|
|
115
125
|
*/
|
|
116
126
|
containerStyle(style) {
|
|
117
|
-
this._viewConfiguration.containerStyle =
|
|
127
|
+
this._viewConfiguration.containerStyle = style;
|
|
118
128
|
return this;
|
|
119
129
|
}
|
|
120
130
|
/**
|
|
121
131
|
* 设置内容区域容器样式 除按钮外的内容区域样式
|
|
122
132
|
*/
|
|
123
133
|
contentsContainerStyle(style) {
|
|
124
|
-
this._viewConfiguration.contentsContainerStyle =
|
|
134
|
+
this._viewConfiguration.contentsContainerStyle = style;
|
|
125
135
|
return this;
|
|
126
136
|
}
|
|
127
137
|
/**
|
|
128
138
|
* 设置按钮区样式
|
|
129
139
|
*/
|
|
130
140
|
actionsContainerStyle(style) {
|
|
131
|
-
this._viewConfiguration.actionsContainerStyle =
|
|
141
|
+
this._viewConfiguration.actionsContainerStyle = style;
|
|
132
142
|
return this;
|
|
133
143
|
}
|
|
134
144
|
/**
|
|
@@ -263,21 +273,37 @@ class FXDialog {
|
|
|
263
273
|
actions: [update],
|
|
264
274
|
});
|
|
265
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* 更新背景样式
|
|
278
|
+
* @param style 要更新的背景样式
|
|
279
|
+
*/
|
|
266
280
|
updateBackgroundStyle(style) {
|
|
267
281
|
this.update({
|
|
268
282
|
backgroundStyle: style,
|
|
269
283
|
});
|
|
270
284
|
}
|
|
285
|
+
/**
|
|
286
|
+
* 更新弹窗容器样式
|
|
287
|
+
* @param style 要更新的弹窗容器样式
|
|
288
|
+
*/
|
|
271
289
|
updateContainerStyle(style) {
|
|
272
290
|
this.update({
|
|
273
291
|
containerStyle: style,
|
|
274
292
|
});
|
|
275
293
|
}
|
|
294
|
+
/**
|
|
295
|
+
* 更新弹窗内容容器样式
|
|
296
|
+
* @param style 要更新的弹窗内容容器样式
|
|
297
|
+
*/
|
|
276
298
|
updateContentsContainerStyle(style) {
|
|
277
299
|
this.update({
|
|
278
300
|
contentsContainerStyle: style,
|
|
279
301
|
});
|
|
280
302
|
}
|
|
303
|
+
/**
|
|
304
|
+
* 更新弹窗操作按钮容器样式
|
|
305
|
+
* @param style 要更新的弹窗操作按钮容器样式
|
|
306
|
+
*/
|
|
281
307
|
updateActionsContainerStyle(style) {
|
|
282
308
|
this.update({
|
|
283
309
|
actionsContainerStyle: style,
|
|
@@ -295,7 +321,7 @@ class FXDialog {
|
|
|
295
321
|
if (this._styleInterceptor) {
|
|
296
322
|
this._viewConfiguration = this._styleInterceptor.intercept(this._viewConfiguration);
|
|
297
323
|
}
|
|
298
|
-
react_native_fxview_1.logger.
|
|
324
|
+
react_native_fxview_1.logger.warn("Dialog show", this._styleInterceptor, this._viewConfiguration);
|
|
299
325
|
this._queueItem = FXDialogManager_1.default.getInstance().show({
|
|
300
326
|
fxViewId: fxViewId,
|
|
301
327
|
priority: this._priority,
|
package/FXDialogView.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface FXDialogViewProps {
|
|
|
5
5
|
type?: FXDialogType;
|
|
6
6
|
contents?: FXDialogContent[];
|
|
7
7
|
actions?: FXDialogAction[];
|
|
8
|
+
suspensions?: React.ReactNode[];
|
|
8
9
|
backgroundStyle?: ViewStyle;
|
|
9
10
|
containerStyle?: ViewStyle;
|
|
10
11
|
contentsContainerStyle?: ViewStyle;
|
|
@@ -23,6 +24,7 @@ interface FXDialogViewState {
|
|
|
23
24
|
hasMeasuredActions: boolean;
|
|
24
25
|
measureContentHeight: number;
|
|
25
26
|
measureActionHeight: number;
|
|
27
|
+
suspensions?: React.ReactNode[];
|
|
26
28
|
contentScrollable: boolean;
|
|
27
29
|
actionsScrollable: boolean;
|
|
28
30
|
adjustedContentHeight: number;
|
|
@@ -75,6 +77,7 @@ export default class FXDialogView extends Component<FXDialogViewProps, FXDialogV
|
|
|
75
77
|
private renderSingleAction;
|
|
76
78
|
renderAppendBackground(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
77
79
|
renderAppendContainer(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
80
|
+
renderSuspensions: () => (React.ReactElement<any, string | React.JSXElementConstructor<any>> | null)[] | undefined;
|
|
78
81
|
renderActions: (actions: FXDialogAction[]) => React.JSX.Element;
|
|
79
82
|
renderContents: (contents: FXDialogContent[]) => React.JSX.Element;
|
|
80
83
|
renderAllArea: (contents: FXDialogContent[], actions: FXDialogAction[]) => React.JSX.Element;
|
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;AAMtB,OAAO,EACL,YAAY,EACZ,cAAc,EAOd,qBAAqB,EAErB,oBAAoB,EACpB,eAAe,EAGhB,MAAM,SAAS,CAAC;AAQjB,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QA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;IAI5B,qBAAqB,CACnB,SAAS,EAAE,iBAAiB,EAC5B,SAAS,EAAE,iBAAiB,GAC3B,OAAO;IA8BV,MAAM,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI;IAyD3C,OAAO,CAAC,mBAAmB,CAQzB;IAEF,OAAO,CAAC,mBAAmB,CAQzB;IAEF,OAAO,CAAC,mBAAmB,CAIzB;IAEF,OAAO,CAAC,6BAA6B,CAE9B;IAEP,OAAO,CAAC,oBAAoB,CAkB1B;IAEF,mBAAmB,aAKjB;IAEF,iBAAiB,GAAI,QAAQ,cAAc,UAiBzC;IACF,OAAO,CAAC,kBAAkB,CASxB;IAEF,OAAO,CAAC,UAAU,CAShB;IAEF,OAAO,CAAC,WAAW,CAsBjB;IAEF,OAAO,CAAC,aAAa,CAqBnB;IAEF,OAAO,CAAC,mBAAmB,CAEzB;IAEF,OAAO,CAAC,mBAAmB,CAwBzB;IAEF,OAAO,CAAC,kBAAkB;IAoC1B,sBAAsB;IAgBtB,qBAAqB;IAYrB,iBAAiB,kGAYf;IAEF,aAAa,GAAI,SAAS,cAAc,EAAE,uBAkCxC;IAEF,cAAc,GAAI,UAAU,eAAe,EAAE,uBA8B3C;IAEF,aAAa,GAAI,UAAU,eAAe,EAAE,EAAE,SAAS,cAAc,EAAE,uBAOrE;IAEF,MAAM;CAoDP"}
|
package/FXDialogView.js
CHANGED
|
@@ -136,20 +136,29 @@ class FXDialogView extends react_1.Component {
|
|
|
136
136
|
this.renderTitle = (title) => {
|
|
137
137
|
const style = this.style.title;
|
|
138
138
|
const containerStyle = this.style.titleContainer;
|
|
139
|
-
|
|
139
|
+
// 根据是否有 onPress 决定使用 TouchableOpacity 还是 View
|
|
140
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
141
|
+
const WrapperComponent = title.onPress
|
|
142
|
+
? react_native_1.TouchableOpacity
|
|
143
|
+
: react_native_1.View;
|
|
144
|
+
return (<WrapperComponent style={[containerStyle, title.containerStyle]} onPress={title.onPress}>
|
|
140
145
|
<react_native_1.Text style={[style, title.style]} numberOfLines={title.numberOfLines || types_1.FXDialogMaxNumberOfLines} ellipsizeMode={title.ellipsizeMode || "tail"}>
|
|
141
146
|
{title.title}
|
|
142
147
|
</react_native_1.Text>
|
|
143
|
-
</
|
|
148
|
+
</WrapperComponent>);
|
|
144
149
|
};
|
|
145
150
|
this.renderMessage = (message) => {
|
|
146
151
|
const style = this.style.message;
|
|
147
152
|
const containerStyle = this.style.messageContainer;
|
|
148
|
-
|
|
153
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
154
|
+
const WrapperComponent = message.onPress
|
|
155
|
+
? react_native_1.TouchableOpacity
|
|
156
|
+
: react_native_1.View;
|
|
157
|
+
return (<WrapperComponent style={[containerStyle, message.containerStyle]} onPress={message.onPress}>
|
|
149
158
|
<react_native_1.Text style={[style, message.style]} numberOfLines={message.numberOfLines || types_1.FXDialogMaxNumberOfLines} ellipsizeMode={message.ellipsizeMode || "tail"}>
|
|
150
159
|
{message.message}
|
|
151
160
|
</react_native_1.Text>
|
|
152
|
-
</
|
|
161
|
+
</WrapperComponent>);
|
|
153
162
|
};
|
|
154
163
|
this.renderCustomContent = (content) => {
|
|
155
164
|
return <react_native_1.View style={content.containerStyle}>{content.content}</react_native_1.View>;
|
|
@@ -170,6 +179,19 @@ class FXDialogView extends react_1.Component {
|
|
|
170
179
|
return null;
|
|
171
180
|
}
|
|
172
181
|
};
|
|
182
|
+
this.renderSuspensions = () => {
|
|
183
|
+
const { suspensions } = this.state;
|
|
184
|
+
return suspensions === null || suspensions === void 0 ? void 0 : suspensions.map((suspension, index) => {
|
|
185
|
+
if (react_1.default.isValidElement(suspension)) {
|
|
186
|
+
return react_1.default.cloneElement(suspension, {
|
|
187
|
+
key: index,
|
|
188
|
+
// 这里注意,是默认样式覆盖自定义样式,必须保证position: "absolute"
|
|
189
|
+
style: [suspension.props.style, this.style.suspension],
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
return null;
|
|
193
|
+
});
|
|
194
|
+
};
|
|
173
195
|
this.renderActions = (actions) => {
|
|
174
196
|
const { actionsScrollable, adjustedActionsHeight, measureActions, actionsContainerStyle, } = this.state;
|
|
175
197
|
if (actions.length === 0) {
|
|
@@ -215,6 +237,7 @@ class FXDialogView extends react_1.Component {
|
|
|
215
237
|
hasMeasuredActions: false,
|
|
216
238
|
measureContentHeight: 0,
|
|
217
239
|
measureActionHeight: 0,
|
|
240
|
+
suspensions: this.props.suspensions || [],
|
|
218
241
|
contentScrollable: false,
|
|
219
242
|
actionsScrollable: false,
|
|
220
243
|
adjustedContentHeight: 0,
|
|
@@ -317,7 +340,8 @@ class FXDialogView extends react_1.Component {
|
|
|
317
340
|
if (react_1.default.isValidElement(appendBackground)) {
|
|
318
341
|
react_native_fxview_1.logger.info("appendBackground - style", Object.assign(Object.assign({}, this.style.appendBackground), appendBackground.props.style));
|
|
319
342
|
return react_1.default.cloneElement(appendBackground, {
|
|
320
|
-
|
|
343
|
+
// 这里注意,是默认样式覆盖自定义样式,必须保证position: "absolute" …… 几个属性
|
|
344
|
+
style: [appendBackground.props.style, this.style.appendBackground],
|
|
321
345
|
});
|
|
322
346
|
}
|
|
323
347
|
return null;
|
|
@@ -327,7 +351,8 @@ class FXDialogView extends react_1.Component {
|
|
|
327
351
|
// 如果是 React 元素,克隆并添加样式
|
|
328
352
|
if (react_1.default.isValidElement(appendContainer)) {
|
|
329
353
|
return react_1.default.cloneElement(appendContainer, {
|
|
330
|
-
|
|
354
|
+
// 这里注意,是默认样式覆盖自定义样式,必须保证position: "absolute" …… 几个属性
|
|
355
|
+
style: [appendContainer.props.style, this.style.appendContainer],
|
|
331
356
|
});
|
|
332
357
|
}
|
|
333
358
|
return null;
|
|
@@ -361,6 +386,7 @@ class FXDialogView extends react_1.Component {
|
|
|
361
386
|
{this.renderAppendContainer()}
|
|
362
387
|
{displayLayer}
|
|
363
388
|
{measureLayer}
|
|
389
|
+
{this.renderSuspensions()}
|
|
364
390
|
</react_native_1.Animated.View>
|
|
365
391
|
</react_native_1.Animated.View>);
|
|
366
392
|
}
|
package/README.md
CHANGED
|
@@ -143,16 +143,16 @@ import { FXDialog } from 'react-native-fxdialog';
|
|
|
143
143
|
|
|
144
144
|
const showControlledDialog = () => {
|
|
145
145
|
const controller = FXDialog.alert()
|
|
146
|
-
.addTitle({ title: "处理中..." })
|
|
147
|
-
.addMessage({ message: "请稍候" })
|
|
146
|
+
.addTitle({ id: "statusTitle", title: "处理中..." })
|
|
147
|
+
.addMessage({ id: "statusMessage", message: "请稍候" })
|
|
148
148
|
.show();
|
|
149
149
|
|
|
150
150
|
// 2秒后更新弹窗内容
|
|
151
151
|
setTimeout(() => {
|
|
152
152
|
controller.update({
|
|
153
|
-
|
|
154
|
-
{
|
|
155
|
-
{
|
|
153
|
+
contents: [
|
|
154
|
+
{ id: "statusTitle", title: "完成!" },
|
|
155
|
+
{ id: "statusMessage", message: "操作成功完成" }
|
|
156
156
|
]
|
|
157
157
|
});
|
|
158
158
|
}, 2000);
|
|
@@ -171,10 +171,11 @@ const showControlledDialog = () => {
|
|
|
171
171
|
**更新弹窗内容时,必须满足以下条件:**
|
|
172
172
|
|
|
173
173
|
1. **元素必须有ID** - 要更新的元素必须设置`id`属性
|
|
174
|
-
2.
|
|
174
|
+
2. **使用正确的API格式** - 使用`contents`数组更新内容,`actions`数组更新按钮
|
|
175
|
+
3. **直接传递对象** - 不需要`type`和`item`包装,直接传递内容对象
|
|
175
176
|
|
|
176
177
|
```typescript
|
|
177
|
-
// ✅ 正确的做法:元素有ID,使用
|
|
178
|
+
// ✅ 正确的做法:元素有ID,使用contents
|
|
178
179
|
const controller = FXDialog.alert()
|
|
179
180
|
.addTitle({
|
|
180
181
|
id: "myTitle", // 必须有ID
|
|
@@ -188,32 +189,23 @@ const controller = FXDialog.alert()
|
|
|
188
189
|
|
|
189
190
|
// 更新内容
|
|
190
191
|
controller.update({
|
|
191
|
-
|
|
192
|
+
contents: [
|
|
192
193
|
{
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
id: "myTitle", // ID必须匹配
|
|
196
|
-
title: "新标题"
|
|
197
|
-
}
|
|
194
|
+
id: "myTitle", // ID必须匹配
|
|
195
|
+
title: "新标题"
|
|
198
196
|
},
|
|
199
197
|
{
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
id: "myMessage", // ID必须匹配
|
|
203
|
-
message: "新消息"
|
|
204
|
-
}
|
|
198
|
+
id: "myMessage", // ID必须匹配
|
|
199
|
+
message: "新消息"
|
|
205
200
|
}
|
|
206
201
|
]
|
|
207
202
|
});
|
|
208
203
|
|
|
209
204
|
// ❌ 错误的做法:元素没有ID
|
|
210
205
|
controller.update({
|
|
211
|
-
|
|
206
|
+
contents: [
|
|
212
207
|
{
|
|
213
|
-
|
|
214
|
-
item: {
|
|
215
|
-
title: "新标题" // 缺少ID,更新会失败
|
|
216
|
-
}
|
|
208
|
+
title: "新标题" // 缺少ID,更新会失败
|
|
217
209
|
}
|
|
218
210
|
]
|
|
219
211
|
});
|
|
@@ -250,9 +242,14 @@ controller.update({
|
|
|
250
242
|
| `addTitle(title)` | `FXDialogTitle` | 添加标题元素 |
|
|
251
243
|
| `addMessage(message)` | `FXDialogMessage` | 添加消息元素 |
|
|
252
244
|
| `addAction(action)` | `FXDialogAction` | 添加操作按钮 |
|
|
253
|
-
| `addCustom(view)` | `
|
|
245
|
+
| `addCustom(view)` | `FXDialogCustomContent` | 添加自定义内容 |
|
|
246
|
+
| `addSuspension(suspension)` | `React.ReactNode` | 添加自定义挂起视图(绝对定位) |
|
|
247
|
+
| `appendBackground(view)` | `React.ReactNode` | 添加背景组件(默认铺满,绝对定位) |
|
|
248
|
+
| `appendContainer(view)` | `React.ReactNode` | 添加容器背景组件(默认铺满,绝对定位) |
|
|
254
249
|
| `containerStyle(style)` | `ViewStyle` | 设置容器样式 |
|
|
255
250
|
| `backgroundStyle(style)` | `ViewStyle` | 设置背景样式 |
|
|
251
|
+
| `contentsContainerStyle(style)` | `ViewStyle` | 设置内容区域容器样式(除按钮外的区域) |
|
|
252
|
+
| `actionsContainerStyle(style)` | `ViewStyle` | 设置按钮区样式 |
|
|
256
253
|
| `clickBackgroundClose(enable)` | `boolean` | 启用/禁用点击背景关闭 |
|
|
257
254
|
| `animationType(type)` | `FXDialogAnimationType` | 设置动画类型 |
|
|
258
255
|
| `showAnimationDuration(duration)` | `number` | 显示动画时长(毫秒) |
|
|
@@ -262,7 +259,7 @@ controller.update({
|
|
|
262
259
|
| `actionsScrollMaxHeight(height)` | `number` | 按钮区最大高度 |
|
|
263
260
|
| `animator(animator)` | `FXDialogAnimationImpl` | 自定义动画控制器 |
|
|
264
261
|
| `enqueue(enable)` | `boolean` | 启用队列管理 |
|
|
265
|
-
| `
|
|
262
|
+
| `priority(priority)` | `number` | 设置显示优先级(数值越大优先级越高) |
|
|
266
263
|
| `didShow(callback)` | `() => void` | 显示回调 |
|
|
267
264
|
| `didClose(callback)` | `(type?) => void` | 关闭回调 |
|
|
268
265
|
|
|
@@ -370,7 +367,43 @@ interface FXDialogController {
|
|
|
370
367
|
* 更新弹窗内容
|
|
371
368
|
* @param updates - 要更新的内容配置
|
|
372
369
|
*/
|
|
373
|
-
update: (updates:
|
|
370
|
+
update: (updates: FXDialogUpdateConfig) => void;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* 更新单个内容元素
|
|
374
|
+
* @param update - 要更新的内容元素(必须有ID)
|
|
375
|
+
*/
|
|
376
|
+
updateContent: (update: FXDialogContent) => void;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* 更新单个操作按钮
|
|
380
|
+
* @param update - 要更新的操作按钮(必须有ID)
|
|
381
|
+
*/
|
|
382
|
+
updateAction: (update: FXDialogAction) => void;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* 更新背景样式
|
|
386
|
+
* @param update - 要更新的背景样式
|
|
387
|
+
*/
|
|
388
|
+
updateBackgroundStyle: (update: ViewStyle) => void;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* 更新容器样式
|
|
392
|
+
* @param update - 要更新的容器样式
|
|
393
|
+
*/
|
|
394
|
+
updateContainerStyle: (update: ViewStyle) => void;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* 更新内容容器样式
|
|
398
|
+
* @param update - 要更新的内容容器样式
|
|
399
|
+
*/
|
|
400
|
+
updateContentContainerStyle: (update: ViewStyle) => void;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* 更新按钮容器样式
|
|
404
|
+
* @param update - 要更新的按钮容器样式
|
|
405
|
+
*/
|
|
406
|
+
updateActionsContainerStyle: (update: ViewStyle) => void;
|
|
374
407
|
|
|
375
408
|
/**
|
|
376
409
|
* 获取弹窗所在的FXView ID
|
|
@@ -379,15 +412,21 @@ interface FXDialogController {
|
|
|
379
412
|
fxViewId: () => string | undefined;
|
|
380
413
|
}
|
|
381
414
|
|
|
382
|
-
####
|
|
415
|
+
#### FXDialogUpdateConfig
|
|
383
416
|
```typescript
|
|
384
|
-
interface
|
|
417
|
+
interface FXDialogUpdateConfig {
|
|
385
418
|
/** 更新容器样式 */
|
|
386
419
|
containerStyle?: ViewStyle;
|
|
387
420
|
/** 更新背景样式 */
|
|
388
421
|
backgroundStyle?: ViewStyle;
|
|
389
|
-
/**
|
|
390
|
-
|
|
422
|
+
/** 更新内容容器样式 */
|
|
423
|
+
contentsContainerStyle?: ViewStyle;
|
|
424
|
+
/** 更新按钮容器样式 */
|
|
425
|
+
actionsContainerStyle?: ViewStyle;
|
|
426
|
+
/** 更新内容元素(必须有ID) */
|
|
427
|
+
contents?: FXDialogContent[];
|
|
428
|
+
/** 更新操作按钮(必须有ID) */
|
|
429
|
+
actions?: FXDialogAction[];
|
|
391
430
|
}
|
|
392
431
|
```
|
|
393
432
|
|
|
@@ -450,10 +489,122 @@ FXDialog.alert()
|
|
|
450
489
|
|
|
451
490
|
## ⚠️ 重要注意事项
|
|
452
491
|
|
|
453
|
-
1.
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
492
|
+
### 1. **样式优先级规则**
|
|
493
|
+
|
|
494
|
+
**外部传入样式 > 拦截器设置的样式 > 默认样式**
|
|
495
|
+
|
|
496
|
+
- **外部样式**:通过API直接设置的样式(最高优先级)
|
|
497
|
+
- **拦截器样式**:由样式拦截器自动添加的样式
|
|
498
|
+
- **默认样式**:组件内部的默认样式(最低优先级)
|
|
499
|
+
|
|
500
|
+
### 2. **特殊组件的布局说明**
|
|
501
|
+
|
|
502
|
+
以下组件具有特殊的布局处理,**position属性会被强制设置为absolute**:
|
|
503
|
+
|
|
504
|
+
| 方法 | 说明 | 布局特性 |
|
|
505
|
+
|------|------|----------|
|
|
506
|
+
| `appendBackground()` | 添加背景组件 | 铺满整个背景区域,position: "absolute" |
|
|
507
|
+
| `appendContainer()` | 添加容器背景组件 | 铺满弹窗容器,position: "absolute" |
|
|
508
|
+
| `addSuspension()` | 添加挂起视图 | 绝对定位,可自由设置位置 |
|
|
509
|
+
|
|
510
|
+
**注意**:即使传入了 `position: "relative"` 等其他值,也会被忽略,这是为了确保这些组件能正确显示在预期位置。
|
|
511
|
+
|
|
512
|
+
### 3. **队列管理**
|
|
513
|
+
- 对重要弹窗使用 `enqueue(true)`,确保一定会显示
|
|
514
|
+
- 优先级高的弹窗会先显示(`priority()` 数值越大优先级越高)
|
|
515
|
+
|
|
516
|
+
### 4. **其他注意事项**
|
|
517
|
+
- **内存管理**: 不需要时及时关闭弹窗
|
|
518
|
+
- **性能优化**: 避免在低端设备上使用复杂动画
|
|
519
|
+
- **无障碍访问**: 使用屏幕阅读器测试无障碍兼容性
|
|
520
|
+
- **更新操作**: 更新元素时必须设置 `id` 属性以确保正确匹配
|
|
521
|
+
|
|
522
|
+
## 🎨 样式拦截器
|
|
523
|
+
|
|
524
|
+
### 什么是样式拦截器?
|
|
525
|
+
|
|
526
|
+
样式拦截器是FXDialog的一个核心特性,用于**自动处理复杂的布局逻辑**。它在弹窗显示前自动运行,根据弹窗类型和内容自动调整布局和样式。
|
|
527
|
+
|
|
528
|
+
### 拦截器接口
|
|
529
|
+
|
|
530
|
+
所有拦截器必须实现 `FXDialogStyleInterceptor` 接口:
|
|
531
|
+
|
|
532
|
+
```typescript
|
|
533
|
+
interface FXDialogStyleInterceptor {
|
|
534
|
+
intercept: (props: FXDialogViewProps) => FXDialogViewProps;
|
|
535
|
+
}
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### 内置拦截器
|
|
539
|
+
|
|
540
|
+
| 拦截器 | 作用 | 适用类型 |
|
|
541
|
+
|--------|------|----------|
|
|
542
|
+
| `AlertStyleInterceptor` | 处理Alert的按钮布局(横向/纵向)和边框 | Alert |
|
|
543
|
+
| `ActionSheetStyleInterceptor` | 处理ActionSheet的按钮布局和间距 | ActionSheet |
|
|
544
|
+
| `PopupStyleInterceptor` | 处理Popup的特殊布局需求 | Popup |
|
|
545
|
+
| `FXDialogStyleInterceptorSystem` | 默认拦截器系统,根据弹窗类型自动选择合适的拦截器 | 所有类型 |
|
|
546
|
+
|
|
547
|
+
### 拦截器工作原理
|
|
548
|
+
|
|
549
|
+
#### 默认拦截器系统 (`FXDialogStyleInterceptorSystem`)
|
|
550
|
+
|
|
551
|
+
`FXDialogStyleInterceptorSystem` 是FXDialog的默认拦截器,它会:
|
|
552
|
+
|
|
553
|
+
1. **自动识别弹窗类型**:根据 `props.type` 确定弹窗类型
|
|
554
|
+
2. **选择合适的拦截器**:为不同类型的弹窗选择对应的专用拦截器
|
|
555
|
+
3. **执行拦截逻辑**:调用相应的拦截器处理布局和样式
|
|
556
|
+
|
|
557
|
+
#### 拦截器执行流程
|
|
558
|
+
|
|
559
|
+
1. **自动布局**:根据按钮数量自动选择横向或纵向布局
|
|
560
|
+
2. **边框处理**:自动添加分割线和边框
|
|
561
|
+
3. **样式增强**:为不同类型的弹窗添加合适的默认样式
|
|
562
|
+
4. **样式优先级**:确保外部传入的样式优先级高于拦截器设置的样式
|
|
563
|
+
|
|
564
|
+
#### 拦截器执行时机
|
|
565
|
+
|
|
566
|
+
拦截器在调用 `show()` 方法时执行,在动画开始前完成布局和样式的调整。
|
|
567
|
+
|
|
568
|
+
### 示例:Alert的自动布局
|
|
569
|
+
|
|
570
|
+
```typescript
|
|
571
|
+
// 1-2个按钮:横向布局
|
|
572
|
+
FXDialog.alert()
|
|
573
|
+
.addAction({ action: "确定" })
|
|
574
|
+
.addAction({ action: "取消" })
|
|
575
|
+
.show(); // 自动使用横向布局
|
|
576
|
+
|
|
577
|
+
// 3个以上按钮:纵向布局
|
|
578
|
+
FXDialog.alert()
|
|
579
|
+
.addAction({ action: "选项1" })
|
|
580
|
+
.addAction({ action: "选项2" })
|
|
581
|
+
.addAction({ action: "选项3" })
|
|
582
|
+
.addAction({ action: "取消" })
|
|
583
|
+
.show(); // 自动使用纵向布局并添加分割线
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
### 自定义拦截器
|
|
587
|
+
|
|
588
|
+
```typescript
|
|
589
|
+
import { FXDialogStyleInterceptor, FXDialogViewProps } from 'react-native-fxdialog';
|
|
590
|
+
|
|
591
|
+
const MyCustomInterceptor: FXDialogStyleInterceptor = {
|
|
592
|
+
intercept(props: FXDialogViewProps): FXDialogViewProps {
|
|
593
|
+
// 自定义布局逻辑
|
|
594
|
+
return {
|
|
595
|
+
...props,
|
|
596
|
+
// 添加自定义样式
|
|
597
|
+
containerStyle: {
|
|
598
|
+
...props.containerStyle,
|
|
599
|
+
borderWidth: 2,
|
|
600
|
+
borderColor: '#FF6B6B'
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
// 使用自定义拦截器(需要通过子类或扩展实现)
|
|
607
|
+
```
|
|
457
608
|
|
|
458
609
|
## 🐛 故障排除
|
|
459
610
|
|
|
@@ -467,6 +618,11 @@ FXDialog.alert()
|
|
|
467
618
|
- 验证对等依赖是否已安装
|
|
468
619
|
- 清理并重新构建项目
|
|
469
620
|
|
|
621
|
+
### 更新失败
|
|
622
|
+
- 确保要更新的元素设置了 `id` 属性
|
|
623
|
+
- 检查元素类型是否正确
|
|
624
|
+
- 验证更新参数格式是否符合 `FXDialogUpdateConfig` 接口
|
|
625
|
+
|
|
470
626
|
## 📄 许可证
|
|
471
627
|
|
|
472
628
|
MIT 许可证 - 详见 LICENSE 文件
|
package/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export { FXDialogAnimation } from "./animation/FXDialogAnimation";
|
|
|
4
4
|
export type { FXDialogFXViewCategory, FXDialogType, FXDialogCloseType, FXDialogContent, FXDialogTitle, FXDialogMessage, FXDialogAction, FXDialogDefaultAction, FXDialogCustomAction, FXDialogCustomContent, FXDialogUpdateConfig, FXDialogController, FXDialogAnimationImpl, } from "./types";
|
|
5
5
|
export { FXDialogActionType, FXDialogCloseSystemType, FXDialogAnimationType, } from "./types";
|
|
6
6
|
export type { FXDialogStyleInterceptor } from "./style/FXDialogStyleInterceptor";
|
|
7
|
+
export { FXDialogStyleInterceptorSystem } from "./style/FXDialogStyleInterceptor";
|
|
7
8
|
//# 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,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC"}
|
|
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,aAAa,EACb,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC"}
|
package/index.js
CHANGED
|
@@ -3,7 +3,7 @@ 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.FXDialogAnimationType = exports.FXDialogCloseSystemType = exports.FXDialogActionType = exports.FXDialogAnimation = exports.FXDialogView = exports.FXDialog = void 0;
|
|
6
|
+
exports.FXDialogStyleInterceptorSystem = exports.FXDialogAnimationType = 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");
|
|
@@ -14,3 +14,5 @@ var types_1 = require("./types");
|
|
|
14
14
|
Object.defineProperty(exports, "FXDialogActionType", { enumerable: true, get: function () { return types_1.FXDialogActionType; } });
|
|
15
15
|
Object.defineProperty(exports, "FXDialogCloseSystemType", { enumerable: true, get: function () { return types_1.FXDialogCloseSystemType; } });
|
|
16
16
|
Object.defineProperty(exports, "FXDialogAnimationType", { enumerable: true, get: function () { return types_1.FXDialogAnimationType; } });
|
|
17
|
+
var FXDialogStyleInterceptor_1 = require("./style/FXDialogStyleInterceptor");
|
|
18
|
+
Object.defineProperty(exports, "FXDialogStyleInterceptorSystem", { enumerable: true, get: function () { return FXDialogStyleInterceptor_1.FXDialogStyleInterceptorSystem; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-fxdialog",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-beta08",
|
|
4
4
|
"description": "A powerful and customizable dialog component for React Native with multiple types and animations",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"*.{js,d.ts,d.ts.map}",
|
|
9
9
|
"animation/**/*.{js,d.ts,d.ts.map}",
|
|
10
10
|
"tool/**/*.{js,d.ts,d.ts.map}",
|
|
11
|
+
"style/**/*.{js,d.ts,d.ts.map}",
|
|
11
12
|
"README.md",
|
|
12
13
|
"LICENSE",
|
|
13
14
|
"tsconfig.json"
|
|
@@ -36,10 +37,10 @@
|
|
|
36
37
|
"homepage": "https://github.com/yourusername/react-native-fxdialog#readme",
|
|
37
38
|
"peerDependencies": {
|
|
38
39
|
"react": ">=16.8.0",
|
|
39
|
-
"react-native": ">=0.60.0"
|
|
40
|
+
"react-native": ">=0.60.0",
|
|
41
|
+
"react-native-fxview": "^1.0.3-beta5"
|
|
40
42
|
},
|
|
41
43
|
"dependencies": {
|
|
42
|
-
"react-native-fxview": "^1.0.3-beta5"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@types/react": "^18.0.0",
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 样式拦截器 - 在show之前调用,处理布局逻辑
|
|
3
|
+
*
|
|
4
|
+
* 作用:处理默认样式不够用的情况,比如alert需要纵向布局,默认横向。需要加线分割,让alert更美观。
|
|
5
|
+
*
|
|
6
|
+
* 布局优先级:外部设置的样式 > 拦截器设置的默认样式 > style默认样式
|
|
7
|
+
* 所以可以看到拦截器代码的样式覆盖是props的样式覆盖这里的样式,而在dialogView内部会有props的样式覆盖默认样式。
|
|
8
|
+
*/
|
|
9
|
+
import { FXDialogViewProps } from "../FXDialogView";
|
|
10
|
+
/**
|
|
11
|
+
* 样式拦截器接口
|
|
12
|
+
*/
|
|
13
|
+
export interface FXDialogStyleInterceptor {
|
|
14
|
+
intercept: (props: FXDialogViewProps) => FXDialogViewProps;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Alert样式拦截器
|
|
18
|
+
* 处理Alert类型的自动布局(横向/纵向)和边框
|
|
19
|
+
*/
|
|
20
|
+
export declare const AlertStyleInterceptor: {
|
|
21
|
+
intercept(props: FXDialogViewProps): FXDialogViewProps;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* ActionSheet样式拦截器
|
|
25
|
+
* ActionSheet默认纵向布局,主要处理按钮间距和边框
|
|
26
|
+
*/
|
|
27
|
+
export declare const ActionSheetStyleInterceptor: {
|
|
28
|
+
intercept(props: FXDialogViewProps): FXDialogViewProps;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Popup样式拦截器
|
|
32
|
+
* Popup通常从底部弹出,可以添加特殊处理
|
|
33
|
+
*/
|
|
34
|
+
export declare const PopupStyleInterceptor: {
|
|
35
|
+
intercept(props: FXDialogViewProps): FXDialogViewProps;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* 样式拦截器链
|
|
39
|
+
* 统一管理所有类型的样式拦截
|
|
40
|
+
*/
|
|
41
|
+
export declare const FXDialogStyleInterceptorSystem: FXDialogStyleInterceptor & {
|
|
42
|
+
interceptAlert: (props: FXDialogViewProps) => FXDialogViewProps;
|
|
43
|
+
interceptActionSheet: (props: FXDialogViewProps) => FXDialogViewProps;
|
|
44
|
+
interceptPopup: (props: FXDialogViewProps) => FXDialogViewProps;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=FXDialogStyleInterceptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FXDialogStyleInterceptor.d.ts","sourceRoot":"","sources":["FXDialogStyleInterceptor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIpD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,iBAAiB,CAAC;CAC5D;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB;qBACf,iBAAiB,GAAG,iBAAiB;CAkDvD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B;qBACrB,iBAAiB,GAAG,iBAAiB;CAyBvD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB;qBACf,iBAAiB,GAAG,iBAAiB;CAgBvD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,wBAAwB,GAAG;IACtE,cAAc,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,iBAAiB,CAAC;IAChE,oBAAoB,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,iBAAiB,CAAC;IACtE,cAAc,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,iBAAiB,CAAC;CAwCjE,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 样式拦截器 - 在show之前调用,处理布局逻辑
|
|
4
|
+
*
|
|
5
|
+
* 作用:处理默认样式不够用的情况,比如alert需要纵向布局,默认横向。需要加线分割,让alert更美观。
|
|
6
|
+
*
|
|
7
|
+
* 布局优先级:外部设置的样式 > 拦截器设置的默认样式 > style默认样式
|
|
8
|
+
* 所以可以看到拦截器代码的样式覆盖是props的样式覆盖这里的样式,而在dialogView内部会有props的样式覆盖默认样式。
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.FXDialogStyleInterceptorSystem = exports.PopupStyleInterceptor = exports.ActionSheetStyleInterceptor = exports.AlertStyleInterceptor = void 0;
|
|
12
|
+
const react_native_fxview_1 = require("react-native-fxview");
|
|
13
|
+
const types_1 = require("../types");
|
|
14
|
+
const react_native_1 = require("react-native");
|
|
15
|
+
/**
|
|
16
|
+
* Alert样式拦截器
|
|
17
|
+
* 处理Alert类型的自动布局(横向/纵向)和边框
|
|
18
|
+
*/
|
|
19
|
+
exports.AlertStyleInterceptor = {
|
|
20
|
+
intercept(props) {
|
|
21
|
+
const { actions } = props;
|
|
22
|
+
react_native_fxview_1.logger.warn("Alert style interceptor", actions === null || actions === void 0 ? void 0 : actions.length);
|
|
23
|
+
if (!actions || actions.length === 0)
|
|
24
|
+
return props;
|
|
25
|
+
const actionsContainerStyle = {
|
|
26
|
+
borderTopWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
27
|
+
borderTopColor: "#E5E5E5",
|
|
28
|
+
};
|
|
29
|
+
if (actions.length > 2) {
|
|
30
|
+
// 纵向布局:超过2个按钮,这里的顺序注意动不了,样式优先级低于props本身的样式
|
|
31
|
+
return Object.assign(Object.assign({}, props), { actionsContainerStyle: Object.assign(Object.assign(Object.assign({}, actionsContainerStyle), { flexDirection: "column" }), props.actionsContainerStyle), actions: actions.map((action, index) => (Object.assign(Object.assign({}, action), { containerStyle: Object.assign({ borderBottomWidth: index < actions.length - 1 ? react_native_1.StyleSheet.hairlineWidth : 0, borderBottomColor: index < actions.length - 1 ? "#E5E5E5" : undefined }, action.containerStyle) }))) });
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
// 横向布局:1-2个按钮,添加右边框
|
|
35
|
+
return Object.assign(Object.assign({}, props), { actionsContainerStyle: Object.assign(Object.assign({}, actionsContainerStyle), props.actionsContainerStyle), actions: actions.map((action, index) => (Object.assign(Object.assign({}, action), { containerStyle: Object.assign({ borderRightWidth: index < actions.length - 1 ? react_native_1.StyleSheet.hairlineWidth : 0, borderRightColor: index < actions.length - 1 ? "#E5E5E5" : undefined }, action.containerStyle) }))) });
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* ActionSheet样式拦截器
|
|
41
|
+
* ActionSheet默认纵向布局,主要处理按钮间距和边框
|
|
42
|
+
*/
|
|
43
|
+
exports.ActionSheetStyleInterceptor = {
|
|
44
|
+
intercept(props) {
|
|
45
|
+
const { actions } = props;
|
|
46
|
+
if (!actions || actions.length === 0)
|
|
47
|
+
return props;
|
|
48
|
+
const actionsContainerStyle = {
|
|
49
|
+
borderTopWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
50
|
+
borderTopColor: "#E5E5E5",
|
|
51
|
+
};
|
|
52
|
+
return Object.assign(Object.assign({}, props), { actionsContainerStyle: Object.assign(Object.assign({}, actionsContainerStyle), props.actionsContainerStyle), actions: actions.map((action, index) => (Object.assign(Object.assign({}, action), { containerStyle: Object.assign({ borderBottomWidth: index < actions.length - 1 ? react_native_1.StyleSheet.hairlineWidth : 0, borderBottomColor: "#E5E5E5" }, action.containerStyle) }))) });
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Popup样式拦截器
|
|
57
|
+
* Popup通常从底部弹出,可以添加特殊处理
|
|
58
|
+
*/
|
|
59
|
+
exports.PopupStyleInterceptor = {
|
|
60
|
+
intercept(props) {
|
|
61
|
+
const { actions } = props;
|
|
62
|
+
if (!actions || actions.length === 0)
|
|
63
|
+
return props;
|
|
64
|
+
if (actions.length > 2) {
|
|
65
|
+
// 纵向布局:超过2个按钮,这里的顺序注意动不了,样式优先级低于props本身的样式
|
|
66
|
+
return Object.assign(Object.assign({}, props), { actionsContainerStyle: Object.assign({ flexDirection: "column" }, props.actionsContainerStyle) });
|
|
67
|
+
}
|
|
68
|
+
return props;
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* 样式拦截器链
|
|
73
|
+
* 统一管理所有类型的样式拦截
|
|
74
|
+
*/
|
|
75
|
+
exports.FXDialogStyleInterceptorSystem = {
|
|
76
|
+
/**
|
|
77
|
+
* 统一拦截入口
|
|
78
|
+
*/
|
|
79
|
+
intercept(props) {
|
|
80
|
+
const { type } = props;
|
|
81
|
+
switch (type) {
|
|
82
|
+
case types_1.FXDialogType.Alert:
|
|
83
|
+
return this.interceptAlert(props);
|
|
84
|
+
case types_1.FXDialogType.ActionSheet:
|
|
85
|
+
return this.interceptActionSheet(props);
|
|
86
|
+
case types_1.FXDialogType.Popup:
|
|
87
|
+
return this.interceptPopup(props);
|
|
88
|
+
default:
|
|
89
|
+
return props;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* Alert拦截器入口
|
|
94
|
+
*/
|
|
95
|
+
interceptAlert(props) {
|
|
96
|
+
return exports.AlertStyleInterceptor.intercept(props);
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* ActionSheet拦截器入口
|
|
100
|
+
*/
|
|
101
|
+
interceptActionSheet(props) {
|
|
102
|
+
return exports.ActionSheetStyleInterceptor.intercept(props);
|
|
103
|
+
},
|
|
104
|
+
/**
|
|
105
|
+
* Popup拦截器入口
|
|
106
|
+
*/
|
|
107
|
+
interceptPopup(props) {
|
|
108
|
+
return exports.PopupStyleInterceptor.intercept(props);
|
|
109
|
+
},
|
|
110
|
+
};
|
package/style/style.d.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 这里的样式是默认样式,优先级最低
|
|
3
|
+
*/
|
|
4
|
+
import { TextStyle, ViewStyle } from "react-native";
|
|
5
|
+
import { FXDialogType } from "../types";
|
|
6
|
+
export declare const styles: {
|
|
7
|
+
overlay: {
|
|
8
|
+
position: "absolute";
|
|
9
|
+
top: number;
|
|
10
|
+
left: number;
|
|
11
|
+
right: number;
|
|
12
|
+
bottom: number;
|
|
13
|
+
justifyContent: "center";
|
|
14
|
+
alignItems: "center";
|
|
15
|
+
backgroundColor: string;
|
|
16
|
+
};
|
|
17
|
+
responder: {
|
|
18
|
+
position: "absolute";
|
|
19
|
+
left: 0;
|
|
20
|
+
right: 0;
|
|
21
|
+
top: 0;
|
|
22
|
+
bottom: 0;
|
|
23
|
+
};
|
|
24
|
+
appendBackground: {
|
|
25
|
+
margin: number;
|
|
26
|
+
padding: number;
|
|
27
|
+
width: undefined;
|
|
28
|
+
height: undefined;
|
|
29
|
+
transform: undefined;
|
|
30
|
+
position: "absolute";
|
|
31
|
+
left: 0;
|
|
32
|
+
right: 0;
|
|
33
|
+
top: 0;
|
|
34
|
+
bottom: 0;
|
|
35
|
+
};
|
|
36
|
+
appendContainer: {
|
|
37
|
+
margin: number;
|
|
38
|
+
padding: number;
|
|
39
|
+
width: undefined;
|
|
40
|
+
height: undefined;
|
|
41
|
+
transform: undefined;
|
|
42
|
+
position: "absolute";
|
|
43
|
+
left: 0;
|
|
44
|
+
right: 0;
|
|
45
|
+
top: 0;
|
|
46
|
+
bottom: 0;
|
|
47
|
+
};
|
|
48
|
+
suspension: {
|
|
49
|
+
position: "absolute";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* 统一的样式协议接口
|
|
54
|
+
* 所有弹窗类型都必须实现此协议
|
|
55
|
+
*/
|
|
56
|
+
export interface FXDialogStyleProtocol {
|
|
57
|
+
overlay: ViewStyle;
|
|
58
|
+
responder: ViewStyle;
|
|
59
|
+
appendBackground: ViewStyle;
|
|
60
|
+
appendContainer: ViewStyle;
|
|
61
|
+
suspension: ViewStyle;
|
|
62
|
+
container: ViewStyle;
|
|
63
|
+
contentsContainer: ViewStyle;
|
|
64
|
+
titleContainer: ViewStyle;
|
|
65
|
+
title: TextStyle;
|
|
66
|
+
messageContainer: ViewStyle;
|
|
67
|
+
message: TextStyle;
|
|
68
|
+
actionsContainer: ViewStyle;
|
|
69
|
+
actionButton: ViewStyle;
|
|
70
|
+
actionText: TextStyle;
|
|
71
|
+
actionCancelText: TextStyle;
|
|
72
|
+
actionHighlightText: TextStyle;
|
|
73
|
+
cancelButton: ViewStyle;
|
|
74
|
+
}
|
|
75
|
+
export declare const alertStyle: FXDialogStyleProtocol;
|
|
76
|
+
export declare const actionSheetStyle: FXDialogStyleProtocol;
|
|
77
|
+
export declare const popupStyle: FXDialogStyleProtocol;
|
|
78
|
+
export declare const DialogStyleFactory: {
|
|
79
|
+
allStyleMap(): Record<FXDialogType, FXDialogStyleProtocol>;
|
|
80
|
+
getStyle(type: FXDialogType): FXDialogStyleProtocol;
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["style.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAc,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCjB,CAAC;AAEH;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,gBAAgB,EAAE,SAAS,CAAC;IAC5B,eAAe,EAAE,SAAS,CAAC;IAC3B,UAAU,EAAE,SAAS,CAAC;IAEtB,SAAS,EAAE,SAAS,CAAC;IACrB,iBAAiB,EAAE,SAAS,CAAC;IAG7B,cAAc,EAAE,SAAS,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAC;IAGjB,gBAAgB,EAAE,SAAS,CAAC;IAC5B,OAAO,EAAE,SAAS,CAAC;IAGnB,gBAAgB,EAAE,SAAS,CAAC;IAG5B,YAAY,EAAE,SAAS,CAAC;IAGxB,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,qBA4ExB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,qBAyE9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,qBA+ExB,CAAC;AAEF,eAAO,MAAM,kBAAkB;mBACd,MAAM,CAAC,YAAY,EAAE,qBAAqB,CAAC;mBAO3C,YAAY,GAAG,qBAAqB;CAGpD,CAAC"}
|
package/style/style.js
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DialogStyleFactory = exports.popupStyle = exports.actionSheetStyle = exports.alertStyle = exports.styles = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* 这里的样式是默认样式,优先级最低
|
|
6
|
+
*/
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const types_1 = require("../types");
|
|
9
|
+
exports.styles = react_native_1.StyleSheet.create({
|
|
10
|
+
// 覆盖层样式
|
|
11
|
+
overlay: {
|
|
12
|
+
position: "absolute",
|
|
13
|
+
top: 0,
|
|
14
|
+
left: 0,
|
|
15
|
+
right: 0,
|
|
16
|
+
bottom: 0,
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
20
|
+
},
|
|
21
|
+
responder: Object.assign({}, react_native_1.StyleSheet.absoluteFillObject),
|
|
22
|
+
appendBackground: Object.assign(Object.assign({}, react_native_1.StyleSheet.absoluteFillObject), { margin: 0, padding: 0, width: undefined, height: undefined, transform: undefined }),
|
|
23
|
+
appendContainer: Object.assign(Object.assign({}, react_native_1.StyleSheet.absoluteFillObject), { margin: 0, padding: 0, width: undefined, height: undefined, transform: undefined }),
|
|
24
|
+
suspension: {
|
|
25
|
+
position: "absolute",
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
exports.alertStyle = {
|
|
29
|
+
overlay: exports.styles.overlay,
|
|
30
|
+
responder: exports.styles.responder,
|
|
31
|
+
appendBackground: exports.styles.appendBackground,
|
|
32
|
+
appendContainer: exports.styles.appendContainer,
|
|
33
|
+
suspension: exports.styles.suspension,
|
|
34
|
+
container: {
|
|
35
|
+
backgroundColor: "#FFFFFF",
|
|
36
|
+
borderRadius: 8,
|
|
37
|
+
width: 280,
|
|
38
|
+
shadowColor: "#000000",
|
|
39
|
+
shadowOffset: { width: 0, height: 2 },
|
|
40
|
+
shadowOpacity: 0.15,
|
|
41
|
+
shadowRadius: 8,
|
|
42
|
+
elevation: 6,
|
|
43
|
+
overflow: "hidden",
|
|
44
|
+
},
|
|
45
|
+
contentsContainer: {
|
|
46
|
+
paddingTop: 20,
|
|
47
|
+
paddingHorizontal: 24,
|
|
48
|
+
},
|
|
49
|
+
titleContainer: {
|
|
50
|
+
justifyContent: "center",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
marginBottom: 8,
|
|
53
|
+
paddingHorizontal: 0,
|
|
54
|
+
},
|
|
55
|
+
title: {
|
|
56
|
+
fontSize: 17,
|
|
57
|
+
fontWeight: "500",
|
|
58
|
+
color: "#000000",
|
|
59
|
+
textAlign: "center",
|
|
60
|
+
lineHeight: 22,
|
|
61
|
+
},
|
|
62
|
+
messageContainer: {
|
|
63
|
+
justifyContent: "center",
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
marginBottom: 20,
|
|
66
|
+
paddingHorizontal: 0,
|
|
67
|
+
},
|
|
68
|
+
message: {
|
|
69
|
+
fontSize: 15,
|
|
70
|
+
color: "#666666",
|
|
71
|
+
lineHeight: 21,
|
|
72
|
+
textAlign: "center",
|
|
73
|
+
fontWeight: "400",
|
|
74
|
+
},
|
|
75
|
+
actionsContainer: {
|
|
76
|
+
flexDirection: "row",
|
|
77
|
+
},
|
|
78
|
+
actionButton: {
|
|
79
|
+
flex: 1,
|
|
80
|
+
justifyContent: "center",
|
|
81
|
+
alignItems: "center",
|
|
82
|
+
paddingHorizontal: 8,
|
|
83
|
+
height: 48,
|
|
84
|
+
},
|
|
85
|
+
actionText: {
|
|
86
|
+
fontSize: 17,
|
|
87
|
+
color: "#000000",
|
|
88
|
+
fontWeight: "400",
|
|
89
|
+
textAlignVertical: "center",
|
|
90
|
+
},
|
|
91
|
+
actionCancelText: {
|
|
92
|
+
fontSize: 17,
|
|
93
|
+
textAlignVertical: "center",
|
|
94
|
+
color: "#666666",
|
|
95
|
+
fontWeight: "400",
|
|
96
|
+
},
|
|
97
|
+
actionHighlightText: {
|
|
98
|
+
fontSize: 17,
|
|
99
|
+
fontWeight: "400",
|
|
100
|
+
textAlignVertical: "center",
|
|
101
|
+
color: "#07C160",
|
|
102
|
+
},
|
|
103
|
+
cancelButton: {},
|
|
104
|
+
};
|
|
105
|
+
exports.actionSheetStyle = {
|
|
106
|
+
overlay: exports.styles.overlay,
|
|
107
|
+
responder: exports.styles.responder,
|
|
108
|
+
appendBackground: exports.styles.appendBackground,
|
|
109
|
+
appendContainer: exports.styles.appendContainer,
|
|
110
|
+
suspension: exports.styles.suspension,
|
|
111
|
+
container: {
|
|
112
|
+
position: "absolute",
|
|
113
|
+
bottom: 0,
|
|
114
|
+
left: 0,
|
|
115
|
+
right: 0,
|
|
116
|
+
backgroundColor: "#F7F7F7",
|
|
117
|
+
borderTopLeftRadius: 8,
|
|
118
|
+
borderTopRightRadius: 8,
|
|
119
|
+
overflow: "hidden",
|
|
120
|
+
},
|
|
121
|
+
contentsContainer: {
|
|
122
|
+
padding: 16,
|
|
123
|
+
backgroundColor: "#FFFFFF",
|
|
124
|
+
},
|
|
125
|
+
titleContainer: {
|
|
126
|
+
marginBottom: 8,
|
|
127
|
+
},
|
|
128
|
+
title: {
|
|
129
|
+
fontSize: 13,
|
|
130
|
+
color: "#888888",
|
|
131
|
+
textAlign: "center",
|
|
132
|
+
fontWeight: "400",
|
|
133
|
+
lineHeight: 18,
|
|
134
|
+
},
|
|
135
|
+
messageContainer: {
|
|
136
|
+
marginBottom: 8,
|
|
137
|
+
},
|
|
138
|
+
message: {
|
|
139
|
+
fontSize: 13,
|
|
140
|
+
color: "#888888",
|
|
141
|
+
lineHeight: 18,
|
|
142
|
+
textAlign: "center",
|
|
143
|
+
fontWeight: "400",
|
|
144
|
+
},
|
|
145
|
+
actionsContainer: {
|
|
146
|
+
flexDirection: "column",
|
|
147
|
+
borderRadius: 8,
|
|
148
|
+
overflow: "hidden",
|
|
149
|
+
backgroundColor: "#F7F7F7",
|
|
150
|
+
},
|
|
151
|
+
actionButton: {
|
|
152
|
+
flex: 1,
|
|
153
|
+
justifyContent: "center",
|
|
154
|
+
height: 54,
|
|
155
|
+
backgroundColor: "#FFFFFF",
|
|
156
|
+
},
|
|
157
|
+
actionText: {
|
|
158
|
+
fontSize: 18,
|
|
159
|
+
color: "#000000",
|
|
160
|
+
textAlign: "center",
|
|
161
|
+
fontWeight: "400",
|
|
162
|
+
},
|
|
163
|
+
actionCancelText: {
|
|
164
|
+
fontSize: 18,
|
|
165
|
+
color: "#666666",
|
|
166
|
+
textAlign: "center",
|
|
167
|
+
fontWeight: "400",
|
|
168
|
+
},
|
|
169
|
+
actionHighlightText: {
|
|
170
|
+
fontSize: 18,
|
|
171
|
+
textAlign: "center",
|
|
172
|
+
fontWeight: "400",
|
|
173
|
+
color: "#07C160",
|
|
174
|
+
},
|
|
175
|
+
cancelButton: {
|
|
176
|
+
marginTop: 8,
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
exports.popupStyle = {
|
|
180
|
+
overlay: exports.styles.overlay,
|
|
181
|
+
responder: exports.styles.responder,
|
|
182
|
+
appendBackground: exports.styles.appendBackground,
|
|
183
|
+
appendContainer: exports.styles.appendContainer,
|
|
184
|
+
suspension: exports.styles.suspension,
|
|
185
|
+
container: {
|
|
186
|
+
position: "absolute",
|
|
187
|
+
bottom: 0,
|
|
188
|
+
left: 0,
|
|
189
|
+
right: 0,
|
|
190
|
+
backgroundColor: "#FFFFFF",
|
|
191
|
+
borderTopLeftRadius: 12,
|
|
192
|
+
borderTopRightRadius: 12,
|
|
193
|
+
overflow: "hidden",
|
|
194
|
+
},
|
|
195
|
+
contentsContainer: {
|
|
196
|
+
paddingTop: 20,
|
|
197
|
+
paddingBottom: 16,
|
|
198
|
+
paddingHorizontal: 20,
|
|
199
|
+
},
|
|
200
|
+
titleContainer: {
|
|
201
|
+
alignItems: "center",
|
|
202
|
+
marginBottom: 12,
|
|
203
|
+
},
|
|
204
|
+
title: {
|
|
205
|
+
fontSize: 18,
|
|
206
|
+
fontWeight: "500",
|
|
207
|
+
color: "#000000",
|
|
208
|
+
textAlign: "center",
|
|
209
|
+
lineHeight: 24,
|
|
210
|
+
},
|
|
211
|
+
messageContainer: {
|
|
212
|
+
alignItems: "center",
|
|
213
|
+
marginBottom: 16,
|
|
214
|
+
},
|
|
215
|
+
message: {
|
|
216
|
+
fontSize: 15,
|
|
217
|
+
color: "#666666",
|
|
218
|
+
lineHeight: 21,
|
|
219
|
+
textAlign: "center",
|
|
220
|
+
fontWeight: "400",
|
|
221
|
+
},
|
|
222
|
+
actionsContainer: {
|
|
223
|
+
flexDirection: "row",
|
|
224
|
+
paddingHorizontal: 16,
|
|
225
|
+
paddingBottom: 16,
|
|
226
|
+
gap: 8,
|
|
227
|
+
},
|
|
228
|
+
actionButton: {
|
|
229
|
+
flex: 1,
|
|
230
|
+
height: 46,
|
|
231
|
+
borderRadius: 6,
|
|
232
|
+
justifyContent: "center",
|
|
233
|
+
alignItems: "center",
|
|
234
|
+
backgroundColor: "#F5F5F5",
|
|
235
|
+
},
|
|
236
|
+
actionText: {
|
|
237
|
+
fontSize: 16,
|
|
238
|
+
color: "#000000",
|
|
239
|
+
fontWeight: "400",
|
|
240
|
+
},
|
|
241
|
+
actionCancelText: {
|
|
242
|
+
fontSize: 16,
|
|
243
|
+
color: "#666666",
|
|
244
|
+
fontWeight: "400",
|
|
245
|
+
},
|
|
246
|
+
actionHighlightText: {
|
|
247
|
+
fontSize: 16,
|
|
248
|
+
fontWeight: "400",
|
|
249
|
+
color: "#07C160",
|
|
250
|
+
},
|
|
251
|
+
cancelButton: {},
|
|
252
|
+
};
|
|
253
|
+
exports.DialogStyleFactory = {
|
|
254
|
+
allStyleMap() {
|
|
255
|
+
return {
|
|
256
|
+
[types_1.FXDialogType.Alert]: exports.alertStyle,
|
|
257
|
+
[types_1.FXDialogType.ActionSheet]: exports.actionSheetStyle,
|
|
258
|
+
[types_1.FXDialogType.Popup]: exports.popupStyle,
|
|
259
|
+
};
|
|
260
|
+
},
|
|
261
|
+
getStyle(type) {
|
|
262
|
+
return this.allStyleMap()[type] || exports.alertStyle;
|
|
263
|
+
},
|
|
264
|
+
};
|
package/types.d.ts
CHANGED
|
@@ -133,6 +133,7 @@ export interface FXDialogTitle {
|
|
|
133
133
|
ellipsizeMode?: "head" | "middle" | "tail" | "clip";
|
|
134
134
|
/** 标题容器样式 */
|
|
135
135
|
containerStyle?: ViewStyle;
|
|
136
|
+
onPress?: () => void;
|
|
136
137
|
}
|
|
137
138
|
/**
|
|
138
139
|
* 默认文本消息配置
|
|
@@ -149,6 +150,7 @@ export interface FXDialogMessage {
|
|
|
149
150
|
ellipsizeMode?: "head" | "middle" | "tail" | "clip";
|
|
150
151
|
/** 消息容器样式 */
|
|
151
152
|
containerStyle?: ViewStyle;
|
|
153
|
+
onPress?: () => void;
|
|
152
154
|
}
|
|
153
155
|
/**
|
|
154
156
|
* 弹窗操作按钮配置
|
|
@@ -184,7 +186,6 @@ export interface FXDialogDefaultAction {
|
|
|
184
186
|
closeType?: FXDialogCloseType;
|
|
185
187
|
/**
|
|
186
188
|
* 按钮点击回调函数
|
|
187
|
-
* 可以返回 Promise 以支持异步操作
|
|
188
189
|
*/
|
|
189
190
|
onPress?: () => void;
|
|
190
191
|
}
|
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;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