feat: 调整界面

main
ChenZhaoYu 2 years ago
parent af76b89fd4
commit 0a9f9b618b

@ -257,7 +257,6 @@ const createColumns = (): DataTableColumns<DataProps> => {
{
title: t('store.title'),
key: 'renderKey',
width: 160,
},
{
title: t('store.description'),
@ -296,6 +295,7 @@ const createColumns = (): DataTableColumns<DataProps> => {
},
]
}
const columns = createColumns()
watch(
@ -321,11 +321,13 @@ const dataSource = computed(() => {
<template>
<NMessageProvider>
<NModal v-model:show="show" style="width: 90%; max-width: 900px;" preset="card">
<NCard>
<div class="space-y-4">
<NTabs type="segment">
<NTabPane name="local" :tab="$t('store.local')">
<div class="flex items-center justify-between">
<div
class="flex items-center justify-between"
:class="isMobile ? 'flex-col gap-2' : 'flex-row'"
>
<div class="flex items-center justify-end space-x-4">
<NButton
type="primary"
@ -357,7 +359,7 @@ const dataSource = computed(() => {
</NPopconfirm>
</div>
<div class="flex items-center space-x-4">
<NInput v-model:value="searchValue" />
<NInput v-model:value="searchValue" style="width: 100%" />
</div>
</div>
<br>
@ -424,25 +426,16 @@ const dataSource = computed(() => {
</NTabPane>
</NTabs>
</div>
</NCard>
</NModal>
<NModal v-model:show="showModal">
<NCard
style="width: 600px"
:bordered="false"
size="huge"
role="dialog"
aria-modal="true"
>
<NModal v-model:show="showModal" style="width: 90%; max-width: 600px;" preset="card">
<NSpace v-if="modalMode === 'add' || modalMode === 'modify'" vertical>
{{ t('store.title') }}
<NInput v-model:value="tempPromptKey" />
{{ t('store.description') }}
<NInput v-model:value="tempPromptValue" type="textarea" />
<NButton
strong
secondary
:style="{ width: '100%' }"
block
type="primary"
:disabled="inputStatus"
@click="() => { modalMode === 'add' ? addPromptTemplate() : modifyPromptTemplate() }"
>
@ -457,16 +450,14 @@ const dataSource = computed(() => {
type="textarea"
/>
<NButton
strong
secondary
:style="{ width: '100%' }"
block
type="primary"
:disabled="inputStatus"
@click="() => { importPromptTemplate() }"
>
{{ t('common.import') }}
</NButton>
</NSpace>
</NCard>
</NModal>
</NMessageProvider>
</template>

@ -18,6 +18,8 @@ export default {
clearSuccess: '清除成功',
yes: '是',
no: '否',
confirm: '確定',
download: '下載',
noData: '暫無資料',
wrong: '好像出錯了,請稍後再試。',
success: '操作成功',
@ -43,6 +45,7 @@ export default {
deleteMessage: '刪除訊息',
deleteMessageConfirm: '是否刪除此訊息?',
deleteHistoryConfirm: '確定刪除此紀錄?',
clearHistoryConfirm: '確定清除紀錄?',
},
setting: {
setting: '設定',

Loading…
Cancel
Save