替换发送为图标

This commit is contained in:
2024-03-08 14:04:12 +08:00
parent 03e19fbf58
commit c3c0a37a41
2 changed files with 20 additions and 6 deletions

View File

@@ -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({