Commit 973af7cc by HoMeTown

chore: 更新heroui事件click to press

parent 90d0c62f
...@@ -127,7 +127,7 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth, ...@@ -127,7 +127,7 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth,
/> />
<Tooltip isOpen={Boolean(token) && showContentTips && !isAsking && !content} color="foreground" content="请输入您的问题📖" placement="top-end"> <Tooltip isOpen={Boolean(token) && showContentTips && !isAsking && !content} color="foreground" content="请输入您的问题📖" placement="top-end">
<Button className="ask-send" onClick={handleSubmit} radius="full" isDisabled={!content || isAsking} isIconOnly color="primary"> <Button className="ask-send" onPress={handleSubmit} radius="full" isDisabled={!content || isAsking} isIconOnly color="primary">
<SendIcon /> <SendIcon />
</Button> </Button>
</Tooltip> </Tooltip>
......
...@@ -89,7 +89,7 @@ export const ConversationModal: React.FC<ConversationModalProps> = ({ isOpen, on ...@@ -89,7 +89,7 @@ export const ConversationModal: React.FC<ConversationModalProps> = ({ isOpen, on
<Button onPress={onClose}> <Button onPress={onClose}>
取消 取消
</Button> </Button>
<Button isDisabled={[...selectedKeys].length === 0} color="primary" onClick={handleDelete}> <Button isDisabled={[...selectedKeys].length === 0} color="primary" onPress={handleDelete}>
删除所选 删除所选
</Button> </Button>
</ModalFooter> </ModalFooter>
......
...@@ -48,8 +48,8 @@ export const LoginModal: React.FC<LoginModalProps> = ({ isOpen, onClose }) => { ...@@ -48,8 +48,8 @@ export const LoginModal: React.FC<LoginModalProps> = ({ isOpen, onClose }) => {
> >
</Checkbox> </Checkbox>
我已阅读并同意 我已阅读并同意
<Link isExternal onClick={() => handleJump2Protocol('01')} showAnchorIcon underline="hover">《服务协议》</Link> <Link isExternal onPress={() => handleJump2Protocol('01')} showAnchorIcon underline="hover">《服务协议》</Link>
<Link isExternal onClick={() => handleJump2Protocol('02')} showAnchorIcon underline="hover">《隐私政策》</Link> <Link isExternal onPress={() => handleJump2Protocol('02')} showAnchorIcon underline="hover">《隐私政策》</Link>
</p> </p>
</ModalBody> </ModalBody>
<ModalFooter> <ModalFooter>
......
...@@ -64,7 +64,7 @@ export const UnLikeModal: React.FC<UnLikeModalProps> = ({ isOpen, onClose, answe ...@@ -64,7 +64,7 @@ export const UnLikeModal: React.FC<UnLikeModalProps> = ({ isOpen, onClose, answe
color="primary" color="primary"
variant="light" variant="light"
className={`bg-[#F8F8F8] text-left text-[#333] rounded-[23px] data-[hover=true]:bg-[#E5F6FF] data-[hover=true]:text-primary ${item.answerValue === '1' ? 'bg-[#E5F6FF] text-primary' : ''}`} className={`bg-[#F8F8F8] text-left text-[#333] rounded-[23px] data-[hover=true]:bg-[#E5F6FF] data-[hover=true]:text-primary ${item.answerValue === '1' ? 'bg-[#E5F6FF] text-primary' : ''}`}
onClick={() => handleClick(item, index)} onPress={() => handleClick(item, index)}
> >
<div className="w-full text-nowrap text-ellipsis overflow-hidden"> <div className="w-full text-nowrap text-ellipsis overflow-hidden">
<span>{item.answerName}</span> <span>{item.answerName}</span>
...@@ -85,7 +85,7 @@ export const UnLikeModal: React.FC<UnLikeModalProps> = ({ isOpen, onClose, answe ...@@ -85,7 +85,7 @@ export const UnLikeModal: React.FC<UnLikeModalProps> = ({ isOpen, onClose, answe
<Button onPress={onClose}> <Button onPress={onClose}>
取消 取消
</Button> </Button>
<Button onClick={onSubmit} color="primary"> <Button onPress={onSubmit} color="primary">
提交 提交
</Button> </Button>
</ModalFooter> </ModalFooter>
......
...@@ -43,7 +43,7 @@ export const HistoryBar: React.FC<HistoryBarProps> = ({ isVisible, onSetHistoryV ...@@ -43,7 +43,7 @@ export const HistoryBar: React.FC<HistoryBarProps> = ({ isVisible, onSetHistoryV
<div className="pt-[24px] flex flex-col h-full"> <div className="pt-[24px] flex flex-col h-full">
<div className="flex gap-[12px] px-[32px] h-[40px] sm:block"> <div className="flex gap-[12px] px-[32px] h-[40px] sm:block">
<Input value={searchValue} onValueChange={setSearchValue} classNames={{ inputWrapper: ['bg-white', 'data-[hover=true]:bg-[#fff]', 'group-data-[focus=true]:bg-white', 'rounded-[24px]'] }} placeholder="搜索历史记录" startContent={<SearchIcon />} /> <Input value={searchValue} onValueChange={setSearchValue} classNames={{ inputWrapper: ['bg-white', 'data-[hover=true]:bg-[#fff]', 'group-data-[focus=true]:bg-white', 'rounded-[24px]'] }} placeholder="搜索历史记录" startContent={<SearchIcon />} />
<Button className="flex sm:hidden" onClick={() => onSetHistoryVisible(false)} isIconOnly color="danger"> <Button className="flex sm:hidden" onPress={() => onSetHistoryVisible(false)} isIconOnly color="danger">
<CloseIcon /> <CloseIcon />
</Button> </Button>
</div> </div>
...@@ -51,7 +51,7 @@ export const HistoryBar: React.FC<HistoryBarProps> = ({ isVisible, onSetHistoryV ...@@ -51,7 +51,7 @@ export const HistoryBar: React.FC<HistoryBarProps> = ({ isVisible, onSetHistoryV
<HistoryBarList onSetHistoryVisible={onSetHistoryVisible} searchValue={searchValue} /> <HistoryBarList onSetHistoryVisible={onSetHistoryVisible} searchValue={searchValue} />
</div> </div>
<div className="text-[12px] border-t-solid border-t-[1px] border-t-[#82969C12] w-full h-[48px] flex items-center justify-center"> <div className="text-[12px] border-t-solid border-t-[1px] border-t-[#82969C12] w-full h-[48px] flex items-center justify-center">
<Button onClick={handleOpen} className="w-full" color="primary" variant="light" startContent={<HistoryMenuIcon />}> <Button onPress={handleOpen} className="w-full" color="primary" variant="light" startContent={<HistoryMenuIcon />}>
<span className="text-[#82969C]">管理对话记录</span> <span className="text-[#82969C]">管理对话记录</span>
</Button> </Button>
</div> </div>
......
...@@ -62,7 +62,7 @@ export const HistoryBarList: React.FC<HistoryBarListProps> = ({ searchValue, onS ...@@ -62,7 +62,7 @@ export const HistoryBarList: React.FC<HistoryBarListProps> = ({ searchValue, onS
color="primary" color="primary"
variant="light" variant="light"
className={`text-left w-full text-[#333] rounded-[23px] data-[hover=true]:bg-[#E5F6FF] data-[hover=true]:text-primary ${currentConversationId === item.conversationId ? 'bg-[#E5F6FF] text-primary' : ''}`} className={`text-left w-full text-[#333] rounded-[23px] data-[hover=true]:bg-[#E5F6FF] data-[hover=true]:text-primary ${currentConversationId === item.conversationId ? 'bg-[#E5F6FF] text-primary' : ''}`}
onClick={() => handleClick(item)} onPress={() => handleClick(item)}
> >
<div className="w-full text-nowrap text-ellipsis overflow-hidden"> <div className="w-full text-nowrap text-ellipsis overflow-hidden">
<span>{item.conversationTitle}</span> <span>{item.conversationTitle}</span>
......
...@@ -60,7 +60,7 @@ export const NavBarItem: React.FC<NavBarItemProps> = ({ isHistoryVisible, onClic ...@@ -60,7 +60,7 @@ export const NavBarItem: React.FC<NavBarItemProps> = ({ isHistoryVisible, onClic
<motion.div className={`${styles.NavBarItem}`}> <motion.div className={`${styles.NavBarItem}`}>
<div className={`${styles.icon}`}> <div className={`${styles.icon}`}>
<Tooltip color="foreground" content={label} placement="right"> <Tooltip color="foreground" content={label} placement="right">
<Button className={handleActive() ? 'bg-[#e4e4e5]' : ''} onClick={() => onClick(type)} variant="light" isIconOnly aria-label="Like"> <Button className={handleActive() ? 'bg-[#e4e4e5]' : ''} onPress={() => onClick(type)} variant="light" isIconOnly aria-label="Like">
{React.createElement(icon)} {React.createElement(icon)}
</Button> </Button>
</Tooltip> </Tooltip>
......
...@@ -91,7 +91,7 @@ const UserNotLoginBase: React.FC<WithAuthProps> = ({ showLoginTip, checkAuth }) ...@@ -91,7 +91,7 @@ const UserNotLoginBase: React.FC<WithAuthProps> = ({ showLoginTip, checkAuth })
return ( return (
<Tooltip isOpen={navBarVisible && showLoginTip && !isMobile()} color="foreground" content="登录体验更多功能" placement="right"> <Tooltip isOpen={navBarVisible && showLoginTip && !isMobile()} color="foreground" content="登录体验更多功能" placement="right">
<Button onClick={checkAuth} variant="light" isIconOnly aria-label="Like"> <Button onPress={checkAuth} variant="light" isIconOnly aria-label="Like">
<UserIcon /> <UserIcon />
</Button> </Button>
</Tooltip> </Tooltip>
......
...@@ -3,7 +3,6 @@ import { useParams } from 'react-router-dom' ...@@ -3,7 +3,6 @@ import { useParams } from 'react-router-dom'
import { Button } from '@heroui/react' import { Button } from '@heroui/react'
import { motion } from 'framer-motion' import { motion } from 'framer-motion'
import { useScroll } from 'ahooks' import { useScroll } from 'ahooks'
import { toast } from 'react-hot-toast'
import styles from './Chat.module.less' import styles from './Chat.module.less'
import { ChatSlogan } from './components/ChatSlogan' import { ChatSlogan } from './components/ChatSlogan'
import { ChatMaskBar } from './components/ChatMaskBar' import { ChatMaskBar } from './components/ChatMaskBar'
...@@ -16,13 +15,12 @@ import { ChatEditor } from '@/components/ChatEditor' ...@@ -16,13 +15,12 @@ import { ChatEditor } from '@/components/ChatEditor'
import type { ChatRecord } from '@/types/chat' import type { ChatRecord } from '@/types/chat'
import { fetchUserQaRecordPage } from '@/api/conversation' import { fetchUserQaRecordPage } from '@/api/conversation'
import { fetchCheckTokenApi, fetchStreamResponse } from '@/api/chat' import { fetchCheckTokenApi, fetchStreamResponse } from '@/api/chat'
import { clearShouldSendQuestion, createConversation, fetchConversations } from '@/store/conversationSlice' import { clearShouldSendQuestion, fetchConversations } from '@/store/conversationSlice'
import type { RootState } from '@/store' import type { RootState } from '@/store'
import { useAppDispatch, useAppSelector } from '@/store/hook' import { useAppDispatch, useAppSelector } from '@/store/hook'
import ScrollBtoIcon from '@/assets/svg/scrollBto.svg?react' import ScrollBtoIcon from '@/assets/svg/scrollBto.svg?react'
import { setIsAsking } from '@/store/chatSlice' import { setIsAsking } from '@/store/chatSlice'
import SdreamLoading from '@/components/SdreamLoading' import SdreamLoading from '@/components/SdreamLoading'
import AddNewChat from '@/assets/svg/addNewChat.svg?react'
export const Chat: React.FC = () => { export const Chat: React.FC = () => {
let ignore = false let ignore = false
...@@ -59,33 +57,33 @@ export const Chat: React.FC = () => { ...@@ -59,33 +57,33 @@ export const Chat: React.FC = () => {
/** 处理超过最大条数的数据 */ /** 处理超过最大条数的数据 */
const handleChatMaxCount = (msg: any, question: string) => { const handleChatMaxCount = (msg: any, question: string) => {
toast(t => ( // toast(t => (
<div className="flex items-center"> // <div className="flex items-center">
<p className="text-[14px]">⚠️ 超过最大轮数上限!请新建对话 👉🏻</p> // <p className="text-[14px]">⚠️ 超过最大轮数上限!请新建对话 👉🏻</p>
<Button // <Button
color="primary" // color="primary"
size="sm" // size="sm"
variant="light" // variant="light"
isIconOnly // isIconOnly
onClick={() => { // onClick={() => {
dispatch(createConversation({ // dispatch(createConversation({
conversationData: {}, // conversationData: {},
shouldNavigate: true, // shouldNavigate: true,
shouldSendQuestion: '', // shouldSendQuestion: '',
})) // }))
toast.dismiss(t.id) // toast.dismiss(t.id)
}} // }}
> // >
<AddNewChat /> // <AddNewChat />
</Button> // </Button>
</div> // </div>
), { // ), {
position: 'bottom-center', // position: 'bottom-center',
duration: 0, // duration: 0,
style: { // style: {
marginBottom: '120px', // marginBottom: '120px',
}, // },
}) // })
setAllItems((prevItems) => { setAllItems((prevItems) => {
const newItems = [...prevItems] // 创建数组的浅拷贝 const newItems = [...prevItems] // 创建数组的浅拷贝
const lastIndex = newItems.length - 1 const lastIndex = newItems.length - 1
...@@ -243,7 +241,7 @@ export const Chat: React.FC = () => { ...@@ -243,7 +241,7 @@ export const Chat: React.FC = () => {
}} }}
transition={{ duration: 0.3, ease: 'easeInOut' }} transition={{ duration: 0.3, ease: 'easeInOut' }}
> >
<Button onClick={scrollToBottom} radius="full" isIconOnly color="primary"> <Button onPress={scrollToBottom} radius="full" isIconOnly color="primary">
<ScrollBtoIcon /> <ScrollBtoIcon />
</Button> </Button>
</motion.div> </motion.div>
......
...@@ -87,7 +87,7 @@ export const ChatAnswerAttachment: React.FC<ChatAnswerAttachmentProps> = ({ from ...@@ -87,7 +87,7 @@ export const ChatAnswerAttachment: React.FC<ChatAnswerAttachmentProps> = ({ from
<motion.li <motion.li
key={product.productCode} key={product.productCode}
> >
<Button onClick={() => handleClickBoxItem(product.productName, product.productCode)} isDisabled={!isLastAnswer} color="primary" variant="light" className="text-left bg-[#F7FCFF] w-full text-[#333] rounded-[23px] data-[hover=true]:bg-[#E5F6FF] data-[hover=true]:text-primary"> <Button onPress={() => handleClickBoxItem(product.productName, product.productCode)} isDisabled={!isLastAnswer} color="primary" variant="light" className="text-left bg-[#F7FCFF] w-full text-[#333] rounded-[23px] data-[hover=true]:bg-[#E5F6FF] data-[hover=true]:text-primary">
<div className="w-full text-nowrap text-ellipsis overflow-hidden"> <div className="w-full text-nowrap text-ellipsis overflow-hidden">
<span className="ml-[8px]">{product.productName}</span> <span className="ml-[8px]">{product.productName}</span>
</div> </div>
......
...@@ -3,6 +3,7 @@ import { useEffect, useState } from 'react' ...@@ -3,6 +3,7 @@ import { useEffect, useState } from 'react'
import { ChatAnswerShower } from './ChatAnswerShower' import { ChatAnswerShower } from './ChatAnswerShower'
import { ChatAnswerParser } from './ChatAnswerParser' import { ChatAnswerParser } from './ChatAnswerParser'
import { ChatAnswerRecommend } from './ChatAnswerRecommend' import { ChatAnswerRecommend } from './ChatAnswerRecommend'
import { ChatMaxCount } from './ChatMaxCount'
import type { Answer, ChatRecord } from '@/types/chat' import type { Answer, ChatRecord } from '@/types/chat'
import AvatarBot from '@/assets/avatarBot.png' import AvatarBot from '@/assets/avatarBot.png'
import { useAppDispatch } from '@/store/hook' import { useAppDispatch } from '@/store/hook'
...@@ -61,7 +62,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex, ...@@ -61,7 +62,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
<div className="content"> <div className="content">
{item.isShow && <ChatAnswerShower onSubmitQuestion={onSubmitQuestion} isLastAnswer={isLastAnswer} answer={item} />} {item.isShow && <ChatAnswerShower onSubmitQuestion={onSubmitQuestion} isLastAnswer={isLastAnswer} answer={item} />}
{!item.isShow && !item.isChatMaxCount && <ChatAnswerParser onSubmitQuestion={onSubmitQuestion} isLastAnswer={isLastAnswer} isStopTyping={item.isStopTyping} onTyping={handleTyping} onComplate={() => handleComplate(item)} answer={item} />} {!item.isShow && !item.isChatMaxCount && <ChatAnswerParser onSubmitQuestion={onSubmitQuestion} isLastAnswer={isLastAnswer} isStopTyping={item.isStopTyping} onTyping={handleTyping} onComplate={() => handleComplate(item)} answer={item} />}
{!item.isShow && item.isChatMaxCount && <div>{item.answer}</div>} {!item.isShow && item.isChatMaxCount && <ChatMaxCount />}
</div> </div>
) )
: <SdreamLoading />} : <SdreamLoading />}
...@@ -71,7 +72,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex, ...@@ -71,7 +72,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
</div> </div>
{isTyping && ( {isTyping && (
<div className="sm:pl-[62px] mt-[12px]"> <div className="sm:pl-[62px] mt-[12px]">
<Button onClick={handleStopTyping} color="primary" variant="bordered"> <Button onPress={handleStopTyping} color="primary" variant="bordered">
停止生成 停止生成
</Button> </Button>
</div> </div>
......
...@@ -98,23 +98,23 @@ export const ChatAnswerOperate: React.FC<ChatAnswerOperateProps> = ({ answer }) ...@@ -98,23 +98,23 @@ export const ChatAnswerOperate: React.FC<ChatAnswerOperateProps> = ({ answer })
<div className="sm:mt-[12px] flex gap-[4px] justify-end"> <div className="sm:mt-[12px] flex gap-[4px] justify-end">
{/* 点赞 */} {/* 点赞 */}
<Tooltip color="foreground" content={isLike ? '取消点赞' : '点赞'} className="capitalize"> <Tooltip color="foreground" content={isLike ? '取消点赞' : '点赞'} className="capitalize">
<Button variant="light" isIconOnly aria-label="LikeIcon" onClick={handleLike.run}> <Button variant="light" isIconOnly aria-label="LikeIcon" onPress={handleLike.run}>
{isLike ? <LikeIconA /> : <LikeIcon />} {isLike ? <LikeIconA /> : <LikeIcon />}
</Button> </Button>
</Tooltip> </Tooltip>
{/* 点踩 */} {/* 点踩 */}
<Tooltip color="foreground" content={isUnLike ? '取消点踩' : '点踩'} className="capitalize"> <Tooltip color="foreground" content={isUnLike ? '取消点踩' : '点踩'} className="capitalize">
<Button variant="light" isIconOnly aria-label="UnLikeIcon" onClick={handleUnLike}> <Button variant="light" isIconOnly aria-label="UnLikeIcon" onPress={handleUnLike}>
{isUnLike ? <UnLikeIconA /> : <UnLikeIcon />} {isUnLike ? <UnLikeIconA /> : <UnLikeIcon />}
</Button> </Button>
</Tooltip> </Tooltip>
{/* 复制 */} {/* 复制 */}
<Tooltip color="foreground" content="复制" className="capitalize"> <Tooltip color="foreground" content="复制" className="capitalize">
<Button variant="light" isIconOnly aria-label="CopyIcon" onClick={handleCopy}><CopyIcon /></Button> <Button variant="light" isIconOnly aria-label="CopyIcon" onPress={handleCopy}><CopyIcon /></Button>
</Tooltip> </Tooltip>
{/* 收藏 */} {/* 收藏 */}
<Tooltip color="foreground" content={isCollect ? '取消收藏' : '收藏'} className="capitalize"> <Tooltip color="foreground" content={isCollect ? '取消收藏' : '收藏'} className="capitalize">
<Button variant="light" isIconOnly aria-label="CollectIcon" onClick={handleCollect.run}> <Button variant="light" isIconOnly aria-label="CollectIcon" onPress={handleCollect.run}>
{isCollect ? <CollectIconA /> : <CollectIcon />} {isCollect ? <CollectIconA /> : <CollectIcon />}
</Button> </Button>
</Tooltip> </Tooltip>
......
...@@ -33,7 +33,7 @@ export const ChatAnswerRecommend: React.FC<ChatAnswerRecommendProps> = ({ answer ...@@ -33,7 +33,7 @@ export const ChatAnswerRecommend: React.FC<ChatAnswerRecommendProps> = ({ answer
<div className="flex flex-col gap-[8px]"> <div className="flex flex-col gap-[8px]">
{ {
questionList.map((item, index) => ( questionList.map((item, index) => (
<Button onClick={() => onSubmitQuestion(item)} key={index} color="primary" variant="light" className="text-left bg-[#fff] w-fit max-w-full text-[#333] rounded-[8px] data-[hover=true]:bg-[#F6F6F8] data-[hover=true]:text-[#333]"> <Button onPress={() => onSubmitQuestion(item)} key={index} color="primary" variant="light" className="text-left bg-[#fff] w-fit max-w-full text-[#333] rounded-[8px] data-[hover=true]:bg-[#F6F6F8] data-[hover=true]:text-[#333]">
<div className="w-full sm:w-full text-nowrap text-ellipsis overflow-hidden"> <div className="w-full sm:w-full text-nowrap text-ellipsis overflow-hidden">
{item} {item}
</div> </div>
......
import { Alert } from '@heroui/alert'
import { Button } from '@heroui/react'
import { useAppDispatch } from '@/store/hook'
import { createConversation } from '@/store/conversationSlice'
export const ChatMaxCount: React.FC = () => { export const ChatMaxCount: React.FC = () => {
const dispatch = useAppDispatch()
return ( return (
<div> <div className="flex items-center justify-center">
<div className="flex items-center"> <Alert
<p className="text-[14px] mr-[12px]">⚠️ 超过最大轮数上限!请您新建对话~</p> color="warning"
</div> description="超过最大轮数上限"
title="提示"
variant="faded"
endContent={(
<Button
color="warning"
size="sm"
variant="flat"
className="ml-[12px]"
onPress={() => {
dispatch(createConversation({
conversationData: {},
shouldNavigate: true,
shouldSendQuestion: '',
}))
}}
>
新建对话
</Button>
)}
>
</Alert>
</div> </div>
) )
} }
...@@ -138,10 +138,10 @@ export const Collect: React.FC = () => { ...@@ -138,10 +138,10 @@ export const Collect: React.FC = () => {
</div> </div>
<div> <div>
<Tooltip color="foreground" content="复制" className="capitalize"> <Tooltip color="foreground" content="复制" className="capitalize">
<Button variant="light" isIconOnly aria-label="CopyIcon" onClick={() => handleCopy(item)}><CopyIcon /></Button> <Button variant="light" isIconOnly aria-label="CopyIcon" onPress={() => handleCopy(item)}><CopyIcon /></Button>
</Tooltip> </Tooltip>
<Tooltip color="foreground" content="删除" className="capitalize"> <Tooltip color="foreground" content="删除" className="capitalize">
<Button variant="light" isIconOnly aria-label="DeleteIcon" onClick={() => handleDelete(item)}><DeleteIcon /></Button> <Button variant="light" isIconOnly aria-label="DeleteIcon" onPress={() => handleDelete(item)}><DeleteIcon /></Button>
</Tooltip> </Tooltip>
</div> </div>
</div> </div>
...@@ -165,7 +165,7 @@ export const Collect: React.FC = () => { ...@@ -165,7 +165,7 @@ export const Collect: React.FC = () => {
{ {
!isLoading && collectList.length < total && ( !isLoading && collectList.length < total && (
<div className="w-full max-w-[912px] mx-auto flex justify-center mt-[24px]"> <div className="w-full max-w-[912px] mx-auto flex justify-center mt-[24px]">
<Button onClick={handleLoadMore} color="primary" variant="light"> <Button onPress={handleLoadMore} color="primary" variant="light">
加载更多 加载更多
</Button> </Button>
</div> </div>
......
...@@ -88,7 +88,7 @@ const QuestionListBase: React.FC<QuestionListProps & WithAuthProps> = ({ checkAu ...@@ -88,7 +88,7 @@ const QuestionListBase: React.FC<QuestionListProps & WithAuthProps> = ({ checkAu
showRefresh showRefresh
? ( ? (
<Button <Button
onClick={handleRefresh} onPress={handleRefresh}
isDisabled={isRotating} isDisabled={isRotating}
isIconOnly isIconOnly
color="primary" color="primary"
...@@ -130,7 +130,7 @@ const QuestionListBase: React.FC<QuestionListProps & WithAuthProps> = ({ checkAu ...@@ -130,7 +130,7 @@ const QuestionListBase: React.FC<QuestionListProps & WithAuthProps> = ({ checkAu
layout layout
className="w-full" className="w-full"
> >
<Button onClick={() => handleClick(item)} color="primary" variant="light" className="text-left bg-[#F7FCFF] w-full text-[#333] rounded-[23px] data-[hover=true]:bg-[#E5F6FF] data-[hover=true]:text-primary"> <Button onPress={() => handleClick(item)} color="primary" variant="light" className="text-left bg-[#F7FCFF] w-full text-[#333] rounded-[23px] data-[hover=true]:bg-[#E5F6FF] data-[hover=true]:text-primary">
<div className="w-full text-nowrap text-ellipsis overflow-hidden"> <div className="w-full text-nowrap text-ellipsis overflow-hidden">
<span style={{ color: dotColor }}>·</span> <span style={{ color: dotColor }}>·</span>
<span className="ml-[8px]">{item}</span> <span className="ml-[8px]">{item}</span>
......
...@@ -77,7 +77,7 @@ const WelcomeWordBase: React.FC<WithAuthProps> = ({ checkAuth }) => { ...@@ -77,7 +77,7 @@ const WelcomeWordBase: React.FC<WithAuthProps> = ({ checkAuth }) => {
<div className="px-[18px] pt-[58px] pb-[18px] relative z-[1] box-border sm:pb-0 sm:px-[24px] sm:pt-[68px]"> <div className="px-[18px] pt-[58px] pb-[18px] relative z-[1] box-border sm:pb-0 sm:px-[24px] sm:pt-[68px]">
<SayHi /> <SayHi />
<p className="mt-[16px] text-[#27353C] text-[15px] sm:mt-[24px] mb-[16px]">作为您的智能保险伙伴,您有各类专业相关的问题都可以抛给我哟~让我们互相帮助共同成长吧~</p> <p className="mt-[16px] text-[#27353C] text-[15px] sm:mt-[24px] mb-[16px]">作为您的智能保险伙伴,您有各类专业相关的问题都可以抛给我哟~让我们互相帮助共同成长吧~</p>
<Button className="bg-white w-full text-[#20ABD9] font-medium rounded-[20px] sm:w-auto" onClick={handleGo}>立即前往 ➔</Button> <Button className="bg-white w-full text-[#20ABD9] font-medium rounded-[20px] sm:w-auto" onPress={handleGo}>立即前往 ➔</Button>
</div> </div>
</div> </div>
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment