Commit 9e053bd9 authored by nick zheng's avatar nick zheng

chore(数据库): 增加示例数据

parent 79f74572
......@@ -167,6 +167,7 @@ common_module:
submit_failure: 'Submit failure'
mermaid_render_error: 'There is an error in the chart rendering. Please ask again'
mermaid_rendering: 'The chart is being rendered...'
example: 'Ex.'
dialogue_module:
continue_question_message: 'You can keep asking questions'
......
......@@ -166,6 +166,7 @@ common_module:
submit_failure: '提交失败'
mermaid_render_error: '图表渲染出错了,请重新提问'
mermaid_rendering: '图表正在渲染中...'
example: '示例'
dialogue_module:
continue_question_message: '你可以继续提问'
......
......@@ -166,6 +166,7 @@ common_module:
submit_failure: '提交失敗'
mermaid_render_error: '圖表渲染出錯了,請重新提問'
mermaid_rendering: '圖表正在渲染中...'
example: '示例'
dialogue_module:
continue_question_message: '你可以繼續提問'
......
......@@ -179,7 +179,7 @@ function handleRemoveDatabaseId(dbId: number, databaseTitle: string) {
<template #default="{ item }: { item: DatabaseItemInterface }">
<div
:key="item.id"
class="border-inactive-border-color hover:border-theme-color mb-4.5 flex h-[118px] w-full cursor-pointer items-center gap-4 rounded-[10px] border px-4 py-3.5"
class="border-inactive-border-color hover:border-theme-color mb-4.5 relative flex h-[118px] w-full cursor-pointer items-center gap-4 overflow-hidden rounded-[10px] border px-4 py-3.5"
@click="handleToDatabaseDetail(item.id)"
>
<div class="flex flex-1 flex-col overflow-hidden">
......@@ -264,6 +264,13 @@ function handleRemoveDatabaseId(dbId: number, databaseTitle: string) {
>
{{ t('common_module.remove') }}
</n-button>
<span
v-if="item.example"
class="bg-theme-color absolute -right-[18px] -top-[4px] z-10 rotate-45 px-[16px] pt-[6px] text-[10px] text-white"
>
{{ t('common_module.example') }}
</span>
</div>
</template>
</n-virtual-list>
......
......@@ -60,18 +60,26 @@ export function createDatabaseColumn(handleDatabaseTableAction: (actionType: str
>
{t('common_module.data_table_module.view')}
</span>
{!row.example ? (
<span
className='text-theme-color mr-5 cursor-pointer hover:opacity-80'
onClick={() => handleDatabaseTableAction('edit', row.id)}
>
{t('common_module.data_table_module.edit')}
</span>
) : (
''
)}
{!row.example ? (
<span
className='text-error-font-color mr-5 cursor-pointer hover:opacity-80'
onClick={() => handleDatabaseTableAction('delete', row.id)}
>
{t('common_module.data_table_module.delete')}
</span>
) : (
''
)}
</div>
)
},
......
......@@ -17,6 +17,7 @@ export interface DatabaseItemInterface {
dbPassword: string
modifiedTime: Date
tableInfos: DatabaseTableInfoItem[]
example: boolean
}
export type DatabaseFormInterface = Omit<DatabaseItemInterface, 'id' | 'modifiedTime' | 'tableInfos'>
export type DatabaseFormInterface = Omit<DatabaseItemInterface, 'id' | 'modifiedTime' | 'tableInfos' | 'example'>
......@@ -166,6 +166,7 @@ declare namespace I18n {
submit_failure: string
mermaid_render_error: string
mermaid_rendering: string
example: string
dialogue_module: {
continue_question_message: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment