st-comp 0.0.270 → 0.0.272

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "st-comp",
3
3
  "public": true,
4
- "version": "0.0.270",
4
+ "version": "0.0.272",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -209,7 +209,6 @@ const sendMessage = async () => {
209
209
  scrollToBottom();
210
210
  return;
211
211
  }
212
-
213
212
  if (type === "node") {
214
213
  if (!firstNodeReceived) {
215
214
  firstNodeReceived = true;
@@ -229,7 +228,6 @@ const sendMessage = async () => {
229
228
  scrollToBottom();
230
229
  return;
231
230
  }
232
-
233
231
  if (type === "message") {
234
232
  fullResponse = data;
235
233
  const lastMessage = messageList.value[messageList.value.length - 1];
@@ -238,7 +236,6 @@ const sendMessage = async () => {
238
236
  scrollToBottom();
239
237
  }
240
238
  }
241
-
242
239
  if (type === "finish") {
243
240
  isSending.value = false;
244
241
  showFinalResult.value = true;
@@ -0,0 +1,52 @@
1
+ <script setup>
2
+ const props = defineProps({
3
+ tags: {
4
+ type: Array,
5
+ required: true,
6
+ },
7
+ });
8
+
9
+ const emit = defineEmits(["edit", "delete"]);
10
+
11
+ const handleEdit = (item) => {
12
+ emit("edit", item);
13
+ };
14
+
15
+ const handleDelete = (index) => {
16
+ emit("delete", index);
17
+ };
18
+ </script>
19
+
20
+ <template>
21
+ <div class="tags">
22
+ <el-tag
23
+ v-for="(item, index) in props.tags"
24
+ :key="item.key"
25
+ closable
26
+ type="info"
27
+ @close="handleDelete(index)"
28
+ >
29
+ <span>{{ item.tagText }}</span>
30
+ <span
31
+ class="edit"
32
+ @click="handleEdit(item)"
33
+ >编辑</span
34
+ >
35
+ </el-tag>
36
+ </div>
37
+ </template>
38
+
39
+ <style scoped>
40
+ .tags {
41
+ display: flex;
42
+ flex-wrap: wrap;
43
+ }
44
+ .tags .el-tag {
45
+ margin: 6px 10px 6px 0;
46
+ }
47
+ .tags .edit {
48
+ cursor: pointer;
49
+ color: var(--el-color-primary);
50
+ margin-left: 6px;
51
+ }
52
+ </style>