@@ -62,41 +62,45 @@ function onDestroy() {
6262 </script >
6363
6464<template >
65- <div style =" display : flex ; flex-direction : column ; gap : 12px ;" >
66- <div style =" display : flex ;" >
67- <el-button v-if =" isTypingValue" type =" warning" style =" width : fit-content ;" @click =" onInterrupt" >
68- <el-icon :size =" 18" >
69- <VideoPause />
70- </el-icon >
71- <span >暂停</span >
72- </el-button >
73- <el-button v-if =" !isTypingValue && (progressValue !== 0 && progressValue !== 100)" type =" success" style =" width : fit-content ;" @click =" bubbleRef?.continue()" >
74- <el-icon :size =" 18" >
75- <VideoPlay />
76- </el-icon >
77- <span >继续</span >
78- </el-button >
79- <el-button v-if =" !isTypingValue && (progressValue === 0 || progressValue === 100)" type =" primary" style =" width : fit-content ;" @click =" bubbleRef?.restart()" >
80- <el-icon :size =" 18" >
81- <RefreshLeft />
82- </el-icon >
83- <span >重播</span >
84- </el-button >
85- <el-button type =" danger" style =" width : fit-content ;" @click =" onDestroy" >
86- <el-icon ><Delete /></el-icon >
87- <span >销毁</span >
88- </el-button >
89- </div >
65+ <ClientOnly >
66+ <div style =" display : flex ; flex-direction : column ; gap : 12px ;" >
67+ <div style =" display : flex ;" >
68+ <el-button v-if =" isTypingValue" type =" warning" style =" width : fit-content ;" @click =" onInterrupt" >
69+ <el-icon :size =" 18" >
70+ <VideoPause />
71+ </el-icon >
72+ <span >暂停</span >
73+ </el-button >
74+ <el-button v-if =" !isTypingValue && (progressValue !== 0 && progressValue !== 100)" type =" success"
75+ style =" width : fit-content ;" @click =" bubbleRef?.continue()" >
76+ <el-icon :size =" 18" >
77+ <VideoPlay />
78+ </el-icon >
79+ <span >继续</span >
80+ </el-button >
81+ <el-button v-if =" !isTypingValue && (progressValue === 0 || progressValue === 100)" type =" primary"
82+ style =" width : fit-content ;" @click =" bubbleRef?.restart()" >
83+ <el-icon :size =" 18" >
84+ <RefreshLeft />
85+ </el-icon >
86+ <span >重播</span >
87+ </el-button >
88+ <el-button type =" danger" style =" width : fit-content ;" @click =" onDestroy" >
89+ <el-icon >
90+ <Delete />
91+ </el-icon >
92+ <span >销毁</span >
93+ </el-button >
94+ </div >
9095
91- <el-progress v-if =" progressValue > 0 && progressValue !== 100" :duration =" 0" :percentage =" progressValue" />
92- <el-progress v-if =" progressValue === 100" :percentage =" 100" status =" success" />
96+ <el-progress v-if =" progressValue > 0 && progressValue !== 100" :duration =" 0" :percentage =" progressValue" />
97+ <el-progress v-if =" progressValue === 100" :percentage =" 100" status =" success" />
9398
94- <!-- 这里展示了如果是 markdown 的话,typing.suffix 会被忽略 -->
95- <Bubble
96- ref =" bubbleRef" :content =" markdownContent" :typing =" { suffix: '💩', interval: 40 }" :is-markdown =" true"
97- @start =" onStart" @writing =" onWriting" @finish =" onFinish"
98- />
99- </div >
99+ <!-- 这里展示了如果是 markdown 的话,typing.suffix 会被忽略 -->
100+ <Bubble ref =" bubbleRef" :content =" markdownContent" :typing =" { suffix: '💩', interval: 40 }" :is-markdown =" true"
101+ @start =" onStart" @writing =" onWriting" @finish =" onFinish" />
102+ </div >
103+ </ClientOnly >
100104</template >
101105
102106<style scoped lang="less">
0 commit comments