Fix Vue reactivity: use reactive() for message objects
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 49 KiB |
+1
-1
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
@@ -5,8 +5,8 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Tensors</title>
|
||||
<script type="module" crossorigin src="/assets/index-C2fGYMRK.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BJzI3xR2.css">
|
||||
<script type="module" crossorigin src="/assets/index-CFzDN2Nk.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BwgrwH8m.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, computed, reactive } from 'vue'
|
||||
import { useAppStore } from '@/stores/app'
|
||||
import * as api from '@/api/client'
|
||||
import type { GeneratedImage } from '@/types'
|
||||
@@ -58,12 +58,12 @@ async function generate() {
|
||||
const { width, height } = store.resolution
|
||||
const paramsStr = `${width}×${height}, ${store.steps} steps${store.batchSize > 1 ? `, batch ${store.batchSize}` : ''}${store.selectedLora ? ', +LoRA' : ''}`
|
||||
|
||||
const message: ChatMessage = {
|
||||
const message = reactive<ChatMessage>({
|
||||
prompt: currentPrompt,
|
||||
params: paramsStr,
|
||||
images: [],
|
||||
loading: true,
|
||||
}
|
||||
})
|
||||
messages.value.push(message)
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user