未验证 提交 d798be0e 编写于 作者: S songjianet 提交者: GitHub

[Refactor][UI] Refactor task definition version using NSpace component. (#11495)

上级 68316f68
......@@ -15,12 +15,12 @@
* limitations under the License.
*/
import { defineComponent, PropType, toRefs, watch } from 'vue'
import Modal from '@/components/modal'
import { NDataTable, NPagination } from 'naive-ui'
import { defineComponent, toRefs, watch } from 'vue'
import { NDataTable, NPagination, NSpace } from 'naive-ui'
import { useI18n } from 'vue-i18n'
import { useVersion } from './use-version'
import styles from './version.module.scss'
import Modal from '@/components/modal'
import type { PropType } from 'vue'
const props = {
show: {
......@@ -86,19 +86,21 @@ const VersionModal = defineComponent({
cancelShow={false}
onConfirm={onConfirm}
>
<NDataTable
loading={loadingRef}
columns={this.columns}
data={this.tableData}
/>
<div class={styles.pagination}>
<NPagination
v-model:page={this.page}
v-model:page-size={this.pageSize}
page-count={this.totalPage}
onUpdatePage={requestData}
<NSpace vertical>
<NDataTable
loading={loadingRef}
columns={this.columns}
data={this.tableData}
/>
</div>
<NSpace justify='center'>
<NPagination
v-model:page={this.page}
v-model:page-size={this.pageSize}
page-count={this.totalPage}
onUpdatePage={requestData}
/>
</NSpace>
</NSpace>
</Modal>
)
}
......
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.pagination {
margin-top: 20px;
display: flex;
justify-content: center;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册