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
|
@@ -23254,20 +23254,27 @@ const NumberKeyboard = (p) => {
|
|
|
23254
23254
|
onKeyPress(e2, "BACKSPACE");
|
|
23255
23255
|
};
|
|
23256
23256
|
const renderKey = (key, index2) => {
|
|
23257
|
-
const
|
|
23258
|
-
|
|
23257
|
+
const keyConfig = typeof key === "string" ? {
|
|
23258
|
+
key,
|
|
23259
|
+
title: key
|
|
23260
|
+
} : key;
|
|
23261
|
+
const realKey = keyConfig.key;
|
|
23262
|
+
const isNumberKey = /^\d$/.test(realKey);
|
|
23263
|
+
const isBackspace = realKey === "BACKSPACE";
|
|
23264
|
+
const title2 = isBackspace ? locale.Input.clear : keyConfig.title;
|
|
23259
23265
|
const className = classNames(`${classPrefix$x}-key`, {
|
|
23260
23266
|
[`${classPrefix$x}-key-number`]: isNumberKey,
|
|
23261
|
-
[`${classPrefix$x}-key-sign`]: !isNumberKey &&
|
|
23267
|
+
[`${classPrefix$x}-key-sign`]: !isNumberKey && realKey,
|
|
23262
23268
|
[`${classPrefix$x}-key-mid`]: index2 === 9 && !!confirmText && keys2.length < 12
|
|
23263
23269
|
});
|
|
23264
|
-
const ariaProps =
|
|
23270
|
+
const ariaProps = realKey ? {
|
|
23265
23271
|
role: "button",
|
|
23266
|
-
title:
|
|
23272
|
+
title: title2,
|
|
23273
|
+
"aria-label": title2,
|
|
23267
23274
|
tabIndex: -1
|
|
23268
23275
|
} : void 0;
|
|
23269
23276
|
return React$3.createElement("div", Object.assign({
|
|
23270
|
-
key,
|
|
23277
|
+
key: realKey,
|
|
23271
23278
|
className,
|
|
23272
23279
|
// 仅为 backspace 绑定,支持长按快速删除
|
|
23273
23280
|
onTouchStart: isBackspace ? onBackspaceTouchStart : void 0,
|
|
@@ -23279,9 +23286,9 @@ const NumberKeyboard = (p) => {
|
|
|
23279
23286
|
// backspace touchend 时会 preventDefault 阻止其后续 click 事件
|
|
23280
23287
|
onClick: (e2) => {
|
|
23281
23288
|
stopContinueClear();
|
|
23282
|
-
onKeyPress(e2,
|
|
23289
|
+
onKeyPress(e2, realKey);
|
|
23283
23290
|
}
|
|
23284
|
-
}, ariaProps), isBackspace ? React$3.createElement(TextDeletionOutline, null) :
|
|
23291
|
+
}, ariaProps), isBackspace ? React$3.createElement(TextDeletionOutline, null) : realKey);
|
|
23285
23292
|
};
|
|
23286
23293
|
return React$3.createElement(Popup, {
|
|
23287
23294
|
visible,
|