From 692ae684331e99465798d5526cc48f6905eadd6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Thu, 19 Oct 2023 10:44:01 +0800 Subject: [PATCH] textarea --- src/chat.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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