init
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useGlobalStore } from '@/store/global';
|
||||
import './index.css';
|
||||
import { isEmpty } from 'lodash-es';
|
||||
import { EVENT, mujian } from '@/utils/mujian';
|
||||
import { EVENT, getMujian } from '@/utils/mujian';
|
||||
|
||||
function Home() {
|
||||
const { count, increment } = useGlobalStore((state) => state);
|
||||
@@ -10,6 +10,7 @@ function Home() {
|
||||
|
||||
console.log('isEmpty', isEmpty(count));
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
@@ -19,17 +20,21 @@ function Home() {
|
||||
<button type="button" onClick={increment}>
|
||||
Increment
|
||||
</button>
|
||||
|
||||
<p>Count: {count}</p>
|
||||
|
||||
<br />
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
mujian.emit(EVENT.MUJIAN_AI_CHAT_SEND_MESSAGE, {
|
||||
onClick={async() => {
|
||||
(await getMujian()).emit(EVENT.MUJIAN_AI_CHAT_SEND_MESSAGE, {
|
||||
message: 'Hello, World!',
|
||||
});
|
||||
}}
|
||||
>
|
||||
Hello
|
||||
</button>
|
||||
<p>Count: {count}</p>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user