更新依赖

master
yutent 2023-05-27 21:10:39 +08:00
parent ceef8c7fdb
commit 355e0b1dd6
8 changed files with 28 additions and 10 deletions

View File

@ -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'
}
}

View File

@ -12,7 +12,7 @@
<script type="importmap">{{importmap}}</script>
</head>
<body>
<div class="app"></div>
<div id="app"></div>
<script src="main.js"></script>
</body>
</html>

View File

@ -6,6 +6,6 @@
"build": "fite build"
},
"devDependencies": {
"fite": "^0.7.5"
"fite": "^1.1.6"
}
}

View File

@ -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);
}
</style>

View File

@ -5,4 +5,4 @@ import store from './store'
const app = createApp(App)
app.use(store).mount('.app')
app.use(store).mount('#app')

View File

@ -7,7 +7,8 @@ const store = reactive({
conversations: [],
conversation: {
id: '',
lastMessageId: ''
tokens: 0,
records: []
},
records: []
})

View File

@ -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;
}

View File

@ -4,6 +4,8 @@
<section class="item" v-for="it in records" :key="it.id">
<Avatar :name="it.role === 0 ? '我' : ''" />
<div class="content" v-html="md2html(it.content)"></div>
<wc-icon class="act delete" name="trash"></wc-icon>
<wc-icon class="act retry" name="backward"></wc-icon>
</section>
</div>
<textarea
@ -168,6 +170,18 @@ export default {
}
}
.act {
display: none;
width: 16px;
height: 16px;
margin: 0 6px;
cursor: pointer;
}
&:hover .act {
display: inline-flex;
}
&:nth-child(odd) {
.content {
background: #d9ecff;