Add VersionHistory page

This commit is contained in:
xue jiahao
2024-12-10 17:15:55 +08:00
parent f33fd0c64b
commit 76643d280a
9 changed files with 368 additions and 109 deletions

View File

@@ -1,7 +1,7 @@
<template>
<q-btn flat padding="xs" round size="1em" icon="more_vert" class="action-menu">
<q-menu>
<q-list dense :style="'min-width:' + minWidth ">
<q-menu :max-width="maxWidth">
<q-list dense :style="{ 'min-width': minWidth }">
<template v-for="(item, index) in actions" :key="index" >
<q-item v-if="isAction(item)" :class="item.class" clickable v-close-popup @click="item.action(row)">
<q-item-section side style="color: inherit;">
@@ -17,7 +17,7 @@
</template>
<script lang="ts">
import { PropType } from 'vue';
import { PropType, Ref } from 'vue';
import { IDomainOwnerDisplay } from '../types/DomainTypes';
interface Action {
@@ -38,6 +38,10 @@ export default {
type: Object as PropType<IDomainOwnerDisplay>,
required: true
},
maxWidth: {
type: String,
default: '150px'
},
minWidth: {
type: String,
default: '100px'
@@ -56,10 +60,10 @@ export default {
</script>
<style lang="scss" scoped>
.q-table tr > td:last-child .action-menu {
opacity: 0.25;
opacity: 0.25 !important;
}
.q-table tr:hover > td:last-child .action-menu {
opacity: 1;
.q-table tr:hover > td:last-child .action-menu:not([disabled]) {
opacity: 1 !important;
}
</style>

View File

@@ -4,13 +4,13 @@
filled
autofocus
label="バージョン名"
:rules="[(val) => !val || val.length <= 30 || '30字以内で入力ください']"
:rules="[(val) => !val || val.length <= 80 || '80字以内で入力ください']"
/>
<q-input
v-model="versionInfo.comment"
filled
type="textarea"
:rules="[(val) => !val || val.length <= 80 || '80字以内で入力ください']"
:rules="[(val) => !val || val.length <= 300 || '300字以内で入力ください']"
label="説明"
/>
</template>

View File

@@ -40,8 +40,7 @@ import { IActionNode, IActionProperty } from 'src/types/ActionTypes';
},
props: {
actionNode:{
type:Object as PropType<IActionNode>,
required:true
type:Object as PropType<IActionNode>
},
drawerRight:{
type:Boolean,
@@ -55,7 +54,7 @@ import { IActionNode, IActionProperty } from 'src/types/ActionTypes';
setup(props,{emit}) {
const showPanel =ref(props.drawerRight);
const cloneProps = (actionProps:IActionProperty[]):IActionProperty[]|null=>{
const cloneProps = (actionProps:IActionProperty[]|undefined):IActionProperty[]|null=>{
if(!actionProps){
return null;
}