ChatUIで選択したタイムラインを記憶するように

This commit is contained in:
syuilo 2021-02-20 11:15:08 +09:00
parent 7eb6038f92
commit 53c7077d1d
3 changed files with 9 additions and 2 deletions

View file

@ -10,7 +10,7 @@
<script lang="ts">
import { defineComponent, defineAsyncComponent } from 'vue';
import XWidgets from '@/components/widgets.vue';
import { store } from './store.ts';
import { store } from './store';
export default defineComponent({
components: {
@ -34,6 +34,7 @@ export default defineComponent({
},
updateWidget({ id, data }) {
// TODO: throttle
store.set('widgets', store.state.widgets.map(w => w.id === id ? {
...w,
data: data