@@ -26,16 +26,16 @@ npm i vue-element-plus-x
2626在你的 Vue 3 项目中引入 ` Bubble ` 组件:
2727
2828``` vue
29- <template>
30- <Bubble :content="yourContent" :typing="true" />
31- </template>
32-
3329<script setup>
34- import { Bubble } from " vue-element-plus-x";
35- import { ref } from " vue";
30+ import { ref } from ' vue'
31+ import { Bubble } from ' vue-element-plus-x'
3632
37- const yourContent = ref(" This is a bubble content.");
33+ const yourContent = ref(' This is a bubble content.')
3834</script>
35+
36+ <template>
37+ <Bubble :content="yourContent" :typing="true" />
38+ </template>
3939```
4040
4141## 四、组件属性
@@ -67,7 +67,7 @@ const yourContent = ref("This is a bubble content.");
6767<template>
6868 <Bubble>
6969 <template #avatar>
70- <img src="your-avatar-url" alt="Avatar" / >
70+ <img src="your-avatar-url" alt="Avatar">
7171 </template>
7272 </Bubble>
7373</template>
@@ -137,8 +137,8 @@ const yourContent = ref("This is a bubble content.");
137137
138138``` vue
139139<template>
140- <Bubble placement="start" : content="' Left bubble content' " />
141- <Bubble placement="end" : content="' Right bubble content' " />
140+ <Bubble placement="start" content="Left bubble content" />
141+ <Bubble placement="end" content="Right bubble content" />
142142</template>
143143```
144144
@@ -148,11 +148,11 @@ const yourContent = ref("This is a bubble content.");
148148
149149``` vue
150150<template>
151- <Bubble shape="round" variant="shadow" : content="' Rounded shadow bubble' " />
151+ <Bubble shape="round" variant="shadow" content="Rounded shadow bubble" />
152152 <Bubble
153153 shape="corner"
154154 variant="outlined"
155- : content="' Cornered outlined bubble' "
155+ content="Cornered outlined bubble"
156156 />
157157</template>
158158```
@@ -165,7 +165,7 @@ const yourContent = ref("This is a bubble content.");
165165<template>
166166 <Bubble
167167 :typing="{ speed: 3, suffix: '>' }"
168- : content="' Typing with custom settings' "
168+ content="Typing with custom settings"
169169 />
170170</template>
171171```
@@ -176,7 +176,7 @@ const yourContent = ref("This is a bubble content.");
176176
177177``` vue
178178<template>
179- <Bubble :loading="true" : content="' Loading...' " />
179+ <Bubble :loading="true" content="Loading..." />
180180 <Bubble :loading="true">
181181 <template #loading>
182182 <div>Custom loading spinner...</div>
0 commit comments