diff --git a/src/chat.js b/src/chat.js index 07ac6cc..838b7d3 100644 --- a/src/chat.js +++ b/src/chat.js @@ -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 { @@ -9,7 +9,7 @@ export default class Chat { document.body.appendChild(this.ul) // 元素加入页面 // 添加输入框 - const input = Input({ + const input = createElement({ type: 'text', placeholder: '输入聊天内容', style: { @@ -28,7 +28,7 @@ export default class Chat { } } } - }) + }, 'textarea') document.body.appendChild(input) // 写入 css 样式到 head