This commit is contained in:
2023-10-19 10:44:01 +08:00
parent eea4e71414
commit 692ae68433
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
import { Span, Button, List, ListItem, Input } from './weigets.js' import { Span, Button, List, ListItem, Input, createElement } from './weigets.js'
// 先不划分频道, 只有一个公共聊天室 // 先不划分频道, 只有一个公共聊天室
export default class Chat { export default class Chat {
@ -9,7 +9,7 @@ export default class Chat {
document.body.appendChild(this.ul) // 元素加入页面 document.body.appendChild(this.ul) // 元素加入页面
// 添加输入框 // 添加输入框
const input = Input({ const input = createElement({
type: 'text', type: 'text',
placeholder: '输入聊天内容', placeholder: '输入聊天内容',
style: { style: {
@ -28,7 +28,7 @@ export default class Chat {
} }
} }
} }
}) }, 'textarea')
document.body.appendChild(input) document.body.appendChild(input)
// 写入 css 样式到 head // 写入 css 样式到 head