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. 34
      dolphinscheduler-ui/src/views/projects/task/definition/components/version-modal.tsx
  2. 22
      dolphinscheduler-ui/src/views/projects/task/definition/components/version.module.scss

34
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}
> >
<NDataTable <NSpace vertical>
loading={loadingRef} <NDataTable
columns={this.columns} loading={loadingRef}
data={this.tableData} 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}
/> />
</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> </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