Browse Source

[Refactor][UI] Refactor workflow definition version using NSpace component. (#11420)

3.1.0-release
songjianet 2 years ago committed by GitHub
parent
commit
20b87ee761
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      dolphinscheduler-ui/src/views/projects/workflow/definition/components/use-table.ts
  2. 10
      dolphinscheduler-ui/src/views/projects/workflow/definition/components/version-modal.tsx
  3. 34
      dolphinscheduler-ui/src/views/projects/workflow/definition/index.module.scss

4
dolphinscheduler-ui/src/views/projects/workflow/definition/components/use-table.ts

@ -107,7 +107,7 @@ export function useTable(
{
circle: true,
type: 'info',
size: 'tiny',
size: 'small',
disabled: _row.version === variables.row.version
},
{
@ -139,7 +139,7 @@ export function useTable(
{
circle: true,
type: 'error',
size: 'tiny',
size: 'small',
disabled: _row.version === variables.row.version
},
{

10
dolphinscheduler-ui/src/views/projects/workflow/definition/components/version-modal.tsx

@ -20,9 +20,8 @@ import { useI18n } from 'vue-i18n'
import { useForm } from './use-form'
import { useModal } from './use-modal'
import { useTable } from './use-table'
import { NDataTable, NPagination } from 'naive-ui'
import { NDataTable, NPagination, NSpace } from 'naive-ui'
import Modal from '@/components/modal'
import styles from '../index.module.scss'
import type { IDefinitionData } from '../types'
const props = {
@ -100,22 +99,23 @@ export default defineComponent({
onCancel={this.hideModal}
onConfirm={this.hideModal}
>
<NSpace vertical>
<NDataTable
loading={loadingRef}
columns={this.columns}
data={this.tableData}
striped
size={'small'}
class={styles.table}
/>
<div class={styles.pagination}>
<NSpace justify='center'>
<NPagination
v-model:page={this.page}
v-model:page-size={this.pageSize}
page-count={this.totalPage}
onUpdatePage={requestData}
/>
</div>
</NSpace>
</NSpace>
</Modal>
)
}

34
dolphinscheduler-ui/src/views/projects/workflow/definition/index.module.scss

@ -15,40 +15,6 @@
* limitations under the License.
*/
.table {
table {
width: 100%;
tr {
height: 40px;
font-size: 12px;
th,
td {
&:nth-child(1) {
width: 50px;
text-align: center;
}
}
th {
&:nth-child(1) {
width: 60px;
text-align: center;
}
> span {
font-size: 12px;
color: #555;
}
}
}
}
}
.pagination {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
}
.startup {
align-items: center;
> div:first-child {

Loading…
Cancel
Save