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" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Tensors</title>
|
<title>Tensors</title>
|
||||||
<script type="module" crossorigin src="/assets/index-C2fGYMRK.js"></script>
|
<script type="module" crossorigin src="/assets/index-CFzDN2Nk.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-BJzI3xR2.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-BwgrwH8m.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed, reactive } from 'vue'
|
||||||
import { useAppStore } from '@/stores/app'
|
import { useAppStore } from '@/stores/app'
|
||||||
import * as api from '@/api/client'
|
import * as api from '@/api/client'
|
||||||
import type { GeneratedImage } from '@/types'
|
import type { GeneratedImage } from '@/types'
|
||||||
@@ -58,12 +58,12 @@ async function generate() {
|
|||||||
const { width, height } = store.resolution
|
const { width, height } = store.resolution
|
||||||
const paramsStr = `${width}×${height}, ${store.steps} steps${store.batchSize > 1 ? `, batch ${store.batchSize}` : ''}${store.selectedLora ? ', +LoRA' : ''}`
|
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,
|
prompt: currentPrompt,
|
||||||
params: paramsStr,
|
params: paramsStr,
|
||||||
images: [],
|
images: [],
|
||||||
loading: true,
|
loading: true,
|
||||||
}
|
})
|
||||||
messages.value.push(message)
|
messages.value.push(message)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user