更新依赖

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: { imports: {
vue: '//jscdn.ink/vue/3.2.47/vue.runtime.esm-browser.prod.js', 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' fetch: '//jscdn.ink/@bytedo/fetch/latest/next.js'
} }
} }

View File

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

View File

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

View File

@ -27,7 +27,7 @@ body {
font-size: 14px; font-size: 14px;
color: var(--color-dark-1); color: var(--color-dark-1);
} }
.app { #app {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
@ -41,5 +41,6 @@ body {
.main { .main {
flex: 1; flex: 1;
display: flex; display: flex;
height: calc(100% - 48px);
} }
</style> </style>

View File

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

View File

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

View File

@ -30,11 +30,11 @@ export default {
methods: { methods: {
createNewConversation() { createNewConversation() {
this.conversation = { this.$store.conversation = {
id: '', id: '',
lastMessageId: '' tokens: 0,
records: []
} }
this.records = []
}, },
removeConversation(it, idx) { removeConversation(it, idx) {
@ -112,6 +112,7 @@ export default {
} }
.close { .close {
font-size: 12px;
opacity: 0.1; opacity: 0.1;
transition: opacity 0.2s ease-in; transition: opacity 0.2s ease-in;
} }

View File

@ -4,6 +4,8 @@
<section class="item" v-for="it in records" :key="it.id"> <section class="item" v-for="it in records" :key="it.id">
<Avatar :name="it.role === 0 ? '我' : ''" /> <Avatar :name="it.role === 0 ? '我' : ''" />
<div class="content" v-html="md2html(it.content)"></div> <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> </section>
</div> </div>
<textarea <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) { &:nth-child(odd) {
.content { .content {
background: #d9ecff; background: #d9ecff;