Skip to content

Commit

Permalink
修复配置值文本过长溢出问题
Browse files Browse the repository at this point in the history
  • Loading branch information
HalcyonAlcedo committed Jun 27, 2024
1 parent c929c79 commit ddfc6f1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/views/config/KarinConfigPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ getConfigs()
></v-pagination>
</div>
</template>
<template v-slot:item.value="{ item }">
<p class="auto-wrap-text">{{ item.value }}</p>
</template>
<template v-slot:item.actions="{ item }">
<v-icon size="small" @click="deleteItem(item)">
mdi-delete
Expand Down Expand Up @@ -160,3 +163,11 @@ getConfigs()
</v-list>
</v-dialog>
</template>
<style scoped>
.auto-wrap-text {
max-width: 60vw;
white-space: pre-wrap;
overflow-wrap: break-word;
}
</style>
15 changes: 13 additions & 2 deletions src/views/config/PluginConfigPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ onMounted(() => {

<template>
<BaseBreadcrumb :title="route.params.plugin" :breadcrumbs="breadcrumbs"></BaseBreadcrumb>
<v-banner v-if="changeConfig.length > 0" elevation="2" sticky style="z-index: 100;">
<v-banner v-if="changeConfig.length > 0" elevation="2" sticky style="z-index: 100">
<v-data-table v-model="setConfig" v-model:page="page" :headers="headers" :items="changeConfig" items-per-page="5"
show-select return-object>
show-select return-object>
<template v-slot:top>
<v-toolbar flat>
<v-toolbar-title>确认修改项</v-toolbar-title>
Expand All @@ -214,6 +214,9 @@ onMounted(() => {
<v-pagination v-model="page" :length="pageCount"></v-pagination>
</div>
</template>
<template v-slot:item.value="{ item }">
<p class="auto-wrap-text">{{ item.value }}</p>
</template>
<template v-slot:item.actions="{ item }">
<v-icon size="small" @click="deleteItem(item)">
mdi-delete
Expand Down Expand Up @@ -254,3 +257,11 @@ onMounted(() => {
</v-list>
</v-dialog>
</template>

<style scoped>
.auto-wrap-text {
max-width: 60vw;
white-space: pre-wrap;
overflow-wrap: break-word;
}
</style>

0 comments on commit ddfc6f1

Please sign in to comment.