Skip to content

Commit 82ea4bb

Browse files
committed
fix: inputNumber props id name no work #1477
1 parent 024698d commit 82ea4bb

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

components/input-number/__tests__/__snapshots__/demo.test.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`renders ./components/input-number/demo/basic.md correctly 1`] = `
44
<div>
55
<div class="ant-input-number">
66
<div class="ant-input-number-handler-wrap"><span class="ant-input-number-handler ant-input-number-handler-up " unselectable="unselectable" role="button" aria-label="Increase Value"><i aria-label="icon: up" class="ant-input-number-handler-up-inner anticon anticon-up"><svg viewBox="64 64 896 896" data-icon="up" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 0 0 140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"></path></svg></i></span><span class="ant-input-number-handler ant-input-number-handler-down " unselectable="unselectable" role="button" aria-label="Decrease Value"><i aria-label="icon: down" class="ant-input-number-handler-down-inner anticon anticon-down"><svg viewBox="64 64 896 896" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></i></span></div>
7-
<div role="spinbutton" aria-valuemin="1" aria-valuemax="10" aria-valuenow="3" class="ant-input-number-input-wrap"><input autocomplete="off" max="10" min="1" step="1" class="ant-input-number-input"></div>
7+
<div role="spinbutton" aria-valuemin="1" aria-valuemax="10" aria-valuenow="3" class="ant-input-number-input-wrap"><input autocomplete="off" max="10" min="1" step="1" id="inputNumber" class="ant-input-number-input"></div>
88
</div>
99
当前值:3
1010
</div>

components/input-number/demo/basic.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Numeric-only input box.
1111
```tpl
1212
<template>
1313
<div>
14-
<a-input-number :min="1" :max="10" v-model="value" @change="onChange" />
14+
<a-input-number id="inputNumber" :min="1" :max="10" v-model="value" @change="onChange" />
1515
当前值:{{value}}
1616
</div>
1717
</template>

components/vc-input-number/src/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ const inputNumberProps = {
6868
decimalSeparator: PropTypes.string,
6969
autoComplete: PropTypes.string,
7070
title: PropTypes.string,
71+
name: PropTypes.string,
72+
id: PropTypes.string,
7173
};
7274

7375
export default {

0 commit comments

Comments
 (0)