|
|
|
@ -26,9 +26,9 @@ import {
|
|
|
|
|
} from 'naive-ui' |
|
|
|
|
import { useI18n } from 'vue-i18n' |
|
|
|
|
import { SearchOutlined } from '@vicons/antd' |
|
|
|
|
import { useTable } from './use-table' |
|
|
|
|
import Card from '@/components/card' |
|
|
|
|
import FolderModal from './components/function-modal' |
|
|
|
|
import { useTable } from './use-table' |
|
|
|
|
import styles from './index.module.scss' |
|
|
|
|
|
|
|
|
|
export default defineComponent({ |
|
|
|
@ -94,39 +94,34 @@ export default defineComponent({
|
|
|
|
|
const { loadingRef } = this |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div class={styles.content}> |
|
|
|
|
<Card class={styles.card}> |
|
|
|
|
<div class={styles.header}> |
|
|
|
|
<NSpace> |
|
|
|
|
<NSpace vertical> |
|
|
|
|
<Card> |
|
|
|
|
<NSpace justify='space-between'> |
|
|
|
|
<NButton |
|
|
|
|
type='primary' |
|
|
|
|
size='small' |
|
|
|
|
onClick={this.handleCreateFolder} |
|
|
|
|
class='btn-create-udf-function' |
|
|
|
|
> |
|
|
|
|
{t('resource.function.create_udf_function')} |
|
|
|
|
</NButton> |
|
|
|
|
</NSpace> |
|
|
|
|
<div class={styles.right}> |
|
|
|
|
<div class={styles.search}> |
|
|
|
|
<div class={styles.list}> |
|
|
|
|
<NButton type='primary' onClick={this.handleSearch}> |
|
|
|
|
<NIcon> |
|
|
|
|
<SearchOutlined /> |
|
|
|
|
</NIcon> |
|
|
|
|
</NButton> |
|
|
|
|
</div> |
|
|
|
|
<div class={styles.list}> |
|
|
|
|
<NSpace> |
|
|
|
|
<NInput |
|
|
|
|
allowInput={this.trim} |
|
|
|
|
size='small' |
|
|
|
|
placeholder={t('resource.function.enter_keyword_tips')} |
|
|
|
|
v-model={[this.searchVal, 'value']} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<NButton type='primary' size='small' onClick={this.handleSearch}> |
|
|
|
|
<NIcon> |
|
|
|
|
<SearchOutlined/> |
|
|
|
|
</NIcon> |
|
|
|
|
</NButton> |
|
|
|
|
</NSpace> |
|
|
|
|
</NSpace> |
|
|
|
|
</Card> |
|
|
|
|
<Card title={t('resource.function.udf_function')}> |
|
|
|
|
<NSpace vertical> |
|
|
|
|
<NDataTable |
|
|
|
|
loading={loadingRef} |
|
|
|
|
columns={this.columns} |
|
|
|
@ -137,7 +132,7 @@ export default defineComponent({
|
|
|
|
|
row-class-name='items' |
|
|
|
|
scrollX={this.tableWidth} |
|
|
|
|
/> |
|
|
|
|
<div class={styles.pagination}> |
|
|
|
|
<NSpace justify='center'> |
|
|
|
|
<NPagination |
|
|
|
|
v-model:page={this.page} |
|
|
|
|
v-model:page-size={this.pageSize} |
|
|
|
@ -148,14 +143,15 @@ export default defineComponent({
|
|
|
|
|
onUpdatePage={this.requestData} |
|
|
|
|
onUpdatePageSize={this.handleChangePageSize} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</NSpace> |
|
|
|
|
</NSpace> |
|
|
|
|
</Card> |
|
|
|
|
<FolderModal |
|
|
|
|
v-model:row={this.row} |
|
|
|
|
v-model:show={this.showRef} |
|
|
|
|
onUpdateList={this.handleUpdateList} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</NSpace> |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|