替换发送为图标
This commit is contained in:
		
							
								
								
									
										13
									
								
								src/chat.js
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								src/chat.js
									
									
									
									
									
								
							@@ -41,6 +41,7 @@ export default class Chat {
 | 
			
		||||
                                boxShadow: '0 0 1rem #eee',
 | 
			
		||||
                                border: 'none',
 | 
			
		||||
                                outline: 'none',
 | 
			
		||||
                                borderRadius: '2rem'
 | 
			
		||||
                            },
 | 
			
		||||
                            onkeydown: event => {
 | 
			
		||||
                                event.stopPropagation()
 | 
			
		||||
@@ -79,7 +80,6 @@ export default class Chat {
 | 
			
		||||
                            }
 | 
			
		||||
                        }),
 | 
			
		||||
                        Button({
 | 
			
		||||
                            textContent: '发送(Enter)',
 | 
			
		||||
                            onclick: event => {
 | 
			
		||||
                                const text = event.target.previousSibling.value.trim()
 | 
			
		||||
                                if (text) {
 | 
			
		||||
@@ -88,10 +88,11 @@ export default class Chat {
 | 
			
		||||
                                }
 | 
			
		||||
                            },
 | 
			
		||||
                            style: {
 | 
			
		||||
                                padding: '.5rem 1rem',
 | 
			
		||||
                                boxSizing: 'border-box',
 | 
			
		||||
                                boxShadow: '0 0 1rem #eee',
 | 
			
		||||
                                borderRadius: '1rem',
 | 
			
		||||
                                width: '1.2rem',
 | 
			
		||||
                                height: '1.2rem',
 | 
			
		||||
                                border: 'none',
 | 
			
		||||
                                background: 'url("/send.svg") no-repeat center / cover',
 | 
			
		||||
                                margin: 'auto 0 auto -2.6rem'
 | 
			
		||||
                            }
 | 
			
		||||
                        }),
 | 
			
		||||
                    ]
 | 
			
		||||
@@ -311,7 +312,7 @@ export default class Chat {
 | 
			
		||||
                maxWidth: '24rem',
 | 
			
		||||
                borderRadius: '1rem',
 | 
			
		||||
                listStyle: 'none',
 | 
			
		||||
                backgroundColor : 'rgba(255,255,255,.9)',
 | 
			
		||||
                backgroundColor: 'rgba(255,255,255,.9)',
 | 
			
		||||
            },
 | 
			
		||||
            children: [
 | 
			
		||||
                createElement({
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user