antd-mobile 5.42.0-alpha.0 → 5.42.0-alpha.1
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/2x/bundle/antd-mobile.cjs.development.js +15 -8
- package/2x/bundle/antd-mobile.cjs.js +4 -4
- package/2x/bundle/antd-mobile.es.development.js +15 -8
- package/2x/bundle/antd-mobile.es.js +710 -706
- package/2x/bundle/antd-mobile.umd.development.js +15 -8
- package/2x/bundle/antd-mobile.umd.js +4 -4
- package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +6 -1
- package/2x/cjs/components/number-keyboard/number-keyboard.js +15 -8
- package/2x/es/components/number-keyboard/number-keyboard.d.ts +6 -1
- package/2x/es/components/number-keyboard/number-keyboard.js +15 -8
- package/2x/package.json +1 -1
- package/bundle/antd-mobile.cjs.development.js +15 -8
- package/bundle/antd-mobile.cjs.js +4 -4
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +15 -8
- package/bundle/antd-mobile.es.js +710 -706
- package/bundle/antd-mobile.umd.development.js +15 -8
- package/bundle/antd-mobile.umd.js +4 -4
- package/cjs/components/number-keyboard/number-keyboard.d.ts +6 -1
- package/cjs/components/number-keyboard/number-keyboard.js +15 -8
- package/es/components/number-keyboard/number-keyboard.d.ts +6 -1
- package/es/components/number-keyboard/number-keyboard.js +15 -8
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -23236,20 +23236,27 @@ const NumberKeyboard = (p) => {
|
|
|
23236
23236
|
onKeyPress(e2, "BACKSPACE");
|
|
23237
23237
|
};
|
|
23238
23238
|
const renderKey = (key, index2) => {
|
|
23239
|
-
const
|
|
23240
|
-
|
|
23239
|
+
const keyConfig = typeof key === "string" ? {
|
|
23240
|
+
key,
|
|
23241
|
+
title: key
|
|
23242
|
+
} : key;
|
|
23243
|
+
const realKey = keyConfig.key;
|
|
23244
|
+
const isNumberKey = /^\d$/.test(realKey);
|
|
23245
|
+
const isBackspace = realKey === "BACKSPACE";
|
|
23246
|
+
const title2 = isBackspace ? locale.Input.clear : keyConfig.title;
|
|
23241
23247
|
const className = classNames(`${classPrefix$x}-key`, {
|
|
23242
23248
|
[`${classPrefix$x}-key-number`]: isNumberKey,
|
|
23243
|
-
[`${classPrefix$x}-key-sign`]: !isNumberKey &&
|
|
23249
|
+
[`${classPrefix$x}-key-sign`]: !isNumberKey && realKey,
|
|
23244
23250
|
[`${classPrefix$x}-key-mid`]: index2 === 9 && !!confirmText && keys2.length < 12
|
|
23245
23251
|
});
|
|
23246
|
-
const ariaProps =
|
|
23252
|
+
const ariaProps = realKey ? {
|
|
23247
23253
|
role: "button",
|
|
23248
|
-
title:
|
|
23254
|
+
title: title2,
|
|
23255
|
+
"aria-label": title2,
|
|
23249
23256
|
tabIndex: -1
|
|
23250
23257
|
} : void 0;
|
|
23251
23258
|
return React__default.createElement("div", Object.assign({
|
|
23252
|
-
key,
|
|
23259
|
+
key: realKey,
|
|
23253
23260
|
className,
|
|
23254
23261
|
// 仅为 backspace 绑定,支持长按快速删除
|
|
23255
23262
|
onTouchStart: isBackspace ? onBackspaceTouchStart : void 0,
|
|
@@ -23261,9 +23268,9 @@ const NumberKeyboard = (p) => {
|
|
|
23261
23268
|
// backspace touchend 时会 preventDefault 阻止其后续 click 事件
|
|
23262
23269
|
onClick: (e2) => {
|
|
23263
23270
|
stopContinueClear();
|
|
23264
|
-
onKeyPress(e2,
|
|
23271
|
+
onKeyPress(e2, realKey);
|
|
23265
23272
|
}
|
|
23266
|
-
}, ariaProps), isBackspace ? React__default.createElement(TextDeletionOutline, null) :
|
|
23273
|
+
}, ariaProps), isBackspace ? React__default.createElement(TextDeletionOutline, null) : realKey);
|
|
23267
23274
|
};
|
|
23268
23275
|
return React__default.createElement(Popup, {
|
|
23269
23276
|
visible,
|