Skip to content

Commit d805107

Browse files
committed
feat: update vc-cascaser vc-checkbox vc-collapse
1 parent 20c0cf4 commit d805107

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

components/vc-cascader/Cascader.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export default {
8383
initialValue = defaultValue || []
8484
}
8585
// warning(!('filedNames' in props),
86-
// '`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` intead.');
86+
// '`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead.');
8787

8888
return {
8989
sPopupVisible: popupVisible,
@@ -242,6 +242,7 @@ export default {
242242
return
243243
}
244244
if (e.keyCode === KeyCode.DOWN || e.keyCode === KeyCode.UP) {
245+
e.preventDefault()
245246
let nextIndex = currentIndex
246247
if (nextIndex !== -1) {
247248
if (e.keyCode === KeyCode.DOWN) {
@@ -256,8 +257,10 @@ export default {
256257
}
257258
activeValue[currentLevel] = currentOptions[nextIndex][this.getFieldName('value')]
258259
} else if (e.keyCode === KeyCode.LEFT || e.keyCode === KeyCode.BACKSPACE) {
260+
e.preventDefault()
259261
activeValue.splice(activeValue.length - 1, 1)
260262
} else if (e.keyCode === KeyCode.RIGHT) {
263+
e.preventDefault()
261264
if (currentOptions[currentIndex] &&
262265
currentOptions[currentIndex][this.getFieldName('children')]) {
263266
activeValue.push(currentOptions[currentIndex][this.getFieldName('children')][0][this.getFieldName('value')])

components/vc-cascader/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// based on rc-cascader 0.16.0
1+
// based on rc-cascader 0.16.2
22
import Cascader from './Cascader'
33
export default Cascader

components/vc-checkbox/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// based on rc-checkbox 2.1.5
1+
// based on rc-checkbox 2.1.6
22
export { default } from './src/'

components/vc-checkbox/src/Checkbox.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default {
2020
// onBlur: PropTypes.func,
2121
// onChange: PropTypes.func,
2222
// onClick: PropTypes.func,
23-
tabIndex: PropTypes.string,
23+
tabIndex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
2424
readOnly: PropTypes.bool,
2525
autoFocus: PropTypes.bool,
2626
value: PropTypes.any,

components/vc-collapse/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// based on rc-collapse 1.10.0
1+
// based on rc-collapse 1.10.2
22
import CollapsePanel from './src/Panel'
33
import Collapse from './src/Collapse'
44
import { collapseProps, panelProps } from './src/commonProps'

0 commit comments

Comments
 (0)