- 
                Notifications
    
You must be signed in to change notification settings  - Fork 286
 
feat(actionsheet): v15多端适配 #3213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            Miles-hxy
  wants to merge
  14
  commits into
  jdf2e:feat_v3.x
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
Miles-hxy:feat_actionsheet_v15
  
      
      
   
  
    
  
  
  
 
  
      
    base: feat_v3.x
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from 6 commits
      Commits
    
    
            Show all changes
          
          
            14 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      d11473e
              
                feat(actionsheet): v15 H5版本适配
              
              
                Miles-hxy 017b617
              
                feat(actionsheet): v15 taro版本适配
              
              
                Miles-hxy 175a6db
              
                feat(actionsheet): v15 harmony版本适配
              
              
                Miles-hxy 5d8dd8b
              
                feat(actionsheet): v15 harmony版本适配
              
              
                Miles-hxy 4880128
              
                feat(actionsheet): v15 harmony版本适配
              
              
                Miles-hxy b84bdb0
              
                feat(actionsheet): v15 config tag
              
              
                Miles-hxy 7b10c15
              
                fix: review
              
              
                Miles-hxy bd0a102
              
                fix: review
              
              
                Miles-hxy 5cddeb6
              
                fix: review
              
              
                Miles-hxy 08339ec
              
                fix: review
              
              
                Miles-hxy 78dc90d
              
                fix: review
              
              
                Miles-hxy 7c2eebc
              
                fix: review
              
              
                Miles-hxy 5a5ee5a
              
                fix: merge nut-3x branch
              
              
                Miles-hxy 6d9ec98
              
                chore: cr adjust
              
              
                Miles-hxy File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or 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 | 
|---|---|---|
| 
          
            
          
           | 
    @@ -843,7 +843,7 @@ | |
| "sort": 11, | ||
| "show": true, | ||
| "taro": true, | ||
| "v15": 2, | ||
| "v15": 1, | ||
| "author": "dsj", | ||
| "dd": true | ||
| }, | ||
| 
          
            
          
           | 
    ||
  
    
      This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 | 
|---|---|---|
| @@ -1,39 +1,38 @@ | ||
| import React, { useState } from 'react' | ||
| import { ActionSheet, Cell } from '@nutui/nutui-react' | ||
| 
     | 
||
| const Demo2 = () => { | ||
| const [isVisible, setIsVisible] = useState(false) | ||
| const Demo = () => { | ||
| const [val, setVal] = useState('') | ||
| const [isVisible, setIsVisible] = useState(false) | ||
| const options = [ | ||
| { | ||
| name: '权限设置', | ||
| name: '分享给朋友', | ||
| }, | ||
| { | ||
| name: '重命名', | ||
| }, | ||
| { | ||
| name: '删除', | ||
| name: '添加到收藏夹', | ||
| }, | ||
| ] | ||
| 
     | 
||
| const handleSelect = (item: any) => { | ||
| setVal(item.name) | ||
| setIsVisible(false) | ||
| } | ||
| 
     | 
||
| return ( | ||
| <> | ||
| <Cell onClick={() => setIsVisible(!isVisible)}> | ||
| <span>展示取消按钮</span> | ||
| <span>展示标题</span> | ||
| <div style={{ marginInlineStart: '10px', color: '#999' }}>{val}</div> | ||
| </Cell> | ||
| 
     | 
||
| <ActionSheet | ||
| title="标题" | ||
| visible={isVisible} | ||
| cancelText="取消" | ||
| options={options} | ||
| onSelect={handleSelect} | ||
| onCancel={() => setIsVisible(false)} | ||
| cancelText="取消" | ||
| /> | ||
| </> | ||
| ) | ||
| } | ||
| export default Demo2 | ||
| export default Demo | 
  
    
      This file contains hidden or 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 hidden or 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
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.