From 355e0b1dd60e7191d73174c7b96412d1d160d5cb Mon Sep 17 00:00:00 2001 From: yutent Date: Sat, 27 May 2023 21:10:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fite.config.js | 3 ++- index.html | 2 +- package.json | 4 ++-- src/app.vue | 3 ++- src/main.js | 2 +- src/store.js | 3 ++- src/views/aside.vue | 7 ++++--- src/views/chat.vue | 14 ++++++++++++++ 8 files changed, 28 insertions(+), 10 deletions(-) diff --git a/fite.config.js b/fite.config.js index 235493b..a67e533 100644 --- a/fite.config.js +++ b/fite.config.js @@ -28,7 +28,8 @@ export default { // 也可以在页面中直接引入完整的路径, 而不必须在这里声明 imports: { vue: '//jscdn.ink/vue/3.2.47/vue.runtime.esm-browser.prod.js', - '@bd/core': '//jscdn.ink/@bd/core/latest/index.js', + wkit: '//jscdn.ink/wkit/latest/index.js', + '@bd/core': '//jscdn.ink/wkit/latest/index.js', fetch: '//jscdn.ink/@bytedo/fetch/latest/next.js' } } diff --git a/index.html b/index.html index 5a0a518..ce5af8e 100644 --- a/index.html +++ b/index.html @@ -12,7 +12,7 @@ -
+
diff --git a/package.json b/package.json index 3de97b4..76ae3c7 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,6 @@ "build": "fite build" }, "devDependencies": { - "fite": "^0.7.5" + "fite": "^1.1.6" } -} \ No newline at end of file +} diff --git a/src/app.vue b/src/app.vue index 425cf35..370e5b0 100644 --- a/src/app.vue +++ b/src/app.vue @@ -27,7 +27,7 @@ body { font-size: 14px; color: var(--color-dark-1); } -.app { +#app { display: flex; flex-direction: column; width: 100%; @@ -41,5 +41,6 @@ body { .main { flex: 1; display: flex; + height: calc(100% - 48px); } diff --git a/src/main.js b/src/main.js index c5f2f19..9282717 100644 --- a/src/main.js +++ b/src/main.js @@ -5,4 +5,4 @@ import store from './store' const app = createApp(App) -app.use(store).mount('.app') +app.use(store).mount('#app') diff --git a/src/store.js b/src/store.js index 7cfd607..acb2f7b 100644 --- a/src/store.js +++ b/src/store.js @@ -7,7 +7,8 @@ const store = reactive({ conversations: [], conversation: { id: '', - lastMessageId: '' + tokens: 0, + records: [] }, records: [] }) diff --git a/src/views/aside.vue b/src/views/aside.vue index 588f4b6..da9f778 100644 --- a/src/views/aside.vue +++ b/src/views/aside.vue @@ -30,11 +30,11 @@ export default { methods: { createNewConversation() { - this.conversation = { + this.$store.conversation = { id: '', - lastMessageId: '' + tokens: 0, + records: [] } - this.records = [] }, removeConversation(it, idx) { @@ -112,6 +112,7 @@ export default { } .close { + font-size: 12px; opacity: 0.1; transition: opacity 0.2s ease-in; } diff --git a/src/views/chat.vue b/src/views/chat.vue index 98c6d3d..94ead7f 100644 --- a/src/views/chat.vue +++ b/src/views/chat.vue @@ -4,6 +4,8 @@
+ +