From e333ad88c45d245022267e58317fca31babd9b19 Mon Sep 17 00:00:00 2001 From: xujiang Date: Sat, 12 Sep 2020 21:54:38 +0800 Subject: [PATCH] =?UTF-8?q?:ambulance:=20=E6=B7=BB=E5=8A=A0=E6=8C=89?= =?UTF-8?q?=E9=9C=80=E5=AF=BC=E5=85=A5=E8=81=8A=E5=A4=A9=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=8C=E6=9B=B4=E6=96=B0=E8=AF=AD=E6=96=99?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/index.tsx | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 20458de..ac71fca 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -1,9 +1,15 @@ import React, { useCallback, useState } from 'react'; import { library, generateRespones, RenderList, useRegister } from 'chatbot-antd'; import { IRouteComponentProps } from 'umi'; -import { Button } from 'antd'; +import { Button, Avatar, Input, Modal, Popconfirm } from 'antd'; import { CustomerServiceOutlined } from '@ant-design/icons'; -import 'antd/dist/antd.css'; +// 如果直接引入antd的css,会导致umi设置的对应组件的主题色失效 +// import 'antd/lib/button/style/index.css'; +// import 'antd/lib/avatar/style/index.css'; +// import 'antd/lib/input/style/index.css'; +// import 'antd/lib/modal/style/index.css'; +// import 'antd/lib/popconfirm/style/index.css'; + library.push( //语料库,push进去,也可以不用 { @@ -11,7 +17,12 @@ library.push( reg: '你是谁', }, { - text: 'author is yehuozhili', + text: ( +
+ @徐小夕 + @yehuozhili +
+ ), useReg: /(.*?)作者是谁(.*?)/, }, ); @@ -39,7 +50,7 @@ export default function Layout({ children }: IRouteComponentProps) { title: 'h5-Dooring机器人客服', }, {}, -
welcome!欢迎使用h5-Dooring
, +
welcome!欢迎使用h5-Dooring,你有任何问题,都可以咨询我哦~
, ); return (
@@ -47,7 +58,7 @@ export default function Layout({ children }: IRouteComponentProps) { style={{ position: 'fixed', right: `${modalOpen ? '-100%' : '10px'}`, - top: '40%', + bottom: '80px', transition: 'all 0.5s ease-in-out', zIndex: 2, }}