Browse Source

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

3.1.0-release
songjianet 2 years ago committed by GitHub
parent
commit
d798be0e73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      dolphinscheduler-ui/src/views/projects/task/definition/components/version-modal.tsx
  2. 22
      dolphinscheduler-ui/src/views/projects/task/definition/components/version.module.scss

14
dolphinscheduler-ui/src/views/projects/task/definition/components/version-modal.tsx

@ -15,12 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
import { defineComponent, PropType, toRefs, watch } from 'vue' import { defineComponent, toRefs, watch } from 'vue'
import Modal from '@/components/modal' import { NDataTable, NPagination, NSpace } from 'naive-ui'
import { NDataTable, NPagination } from 'naive-ui'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { useVersion } from './use-version' import { useVersion } from './use-version'
import styles from './version.module.scss' import Modal from '@/components/modal'
import type { PropType } from 'vue'
const props = { const props = {
show: { show: {
@ -86,19 +86,21 @@ const VersionModal = defineComponent({
cancelShow={false} cancelShow={false}
onConfirm={onConfirm} onConfirm={onConfirm}
> >
<NSpace vertical>
<NDataTable <NDataTable
loading={loadingRef} loading={loadingRef}
columns={this.columns} columns={this.columns}
data={this.tableData} data={this.tableData}
/> />
<div class={styles.pagination}> <NSpace justify='center'>
<NPagination <NPagination
v-model:page={this.page} v-model:page={this.page}
v-model:page-size={this.pageSize} v-model:page-size={this.pageSize}
page-count={this.totalPage} page-count={this.totalPage}
onUpdatePage={requestData} onUpdatePage={requestData}
/> />
</div> </NSpace>
</NSpace>
</Modal> </Modal>
) )
} }

22
dolphinscheduler-ui/src/views/projects/task/definition/components/version.module.scss

@ -1,22 +0,0 @@
/*
* 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;
}
Loading…
Cancel
Save