-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: 修复因子key相同导致搜索时激活项展示异常问题 * feat: add demo * style: code style * style: code style * feat: optimize code
- Loading branch information
1 parent
d14633b
commit 3e0eaa9
Showing
8 changed files
with
166 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: search | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../../examples/search.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* eslint-disable no-console */ | ||
import React from 'react'; | ||
import '../assets/index.less'; | ||
import Cascader from '../src'; | ||
|
||
const addressOptions = [ | ||
{ | ||
label: '福建', | ||
value: 'fj', | ||
children: [ | ||
{ | ||
label: '福州', | ||
value: 'fuzhou', | ||
children: [ | ||
{ | ||
label: '马尾', | ||
value: 'mawei', | ||
}, | ||
], | ||
}, | ||
{ | ||
label: '泉州', | ||
value: 'quanzhou', | ||
}, | ||
], | ||
}, | ||
{ | ||
label: '浙江', | ||
value: 'zj', | ||
children: [ | ||
{ | ||
label: '杭州', | ||
value: 'hangzhou', | ||
children: [ | ||
{ | ||
label: '余杭', | ||
value: 'yuhang', | ||
}, | ||
{ | ||
label: '福州', | ||
value: 'fuzhou', | ||
children: [ | ||
{ | ||
label: '马尾', | ||
value: 'mawei', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
label: '北京', | ||
value: 'bj', | ||
children: [ | ||
{ | ||
label: '朝阳区', | ||
value: 'chaoyang', | ||
}, | ||
{ | ||
label: '海淀区', | ||
value: 'haidian', | ||
}, | ||
], | ||
}, | ||
]; | ||
|
||
class Demo extends React.Component { | ||
render() { | ||
return <Cascader options={addressOptions} showSearch />; | ||
} | ||
} | ||
|
||
export default Demo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3e0eaa9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
cascader – ./
cascader-git-master-react-component.vercel.app
cascader-react-component.vercel.app