ui: fix handler for deploy button menu (#11116)

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2025-07-03 19:00:42 +05:30 committed by GitHub
parent 1a251c8b78
commit ed7bd5e580
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 27 additions and 28 deletions

View File

@ -845,7 +845,7 @@
:deployButtonMenuOptions="deployMenuOptions"
@handle-cancel="() => $router.back()"
@handle-deploy="handleSubmit"
@handle-deploy-menu="handleSubmitAndStay" />
@handle-deploy-menu="(index, e) => handleSubmitAndStay(e)" />
</div>
</a-form>
</a-card>
@ -860,7 +860,7 @@
:deployButtonMenuOptions="deployMenuOptions"
@handle-cancel="() => $router.back()"
@handle-deploy="handleSubmit"
@handle-deploy-menu="handleSubmitAndStay" />
@handle-deploy-menu="(index, e) => handleSubmitAndStay(e)" />
</template>
</info-card>
</a-affix>

View File

@ -825,7 +825,7 @@
:deployButtonMenuOptions="deployMenuOptions"
@handle-cancel="() => $router.back()"
@handle-deploy="handleSubmit"
@handle-deploy-menu="handleSubmitAndStay" />
@handle-deploy-menu="(index, e) => handleSubmitAndStay(e)" />
</div>
</a-form>
</a-card>
@ -840,7 +840,7 @@
:deployButtonMenuOptions="deployMenuOptions"
@handle-cancel="() => $router.back()"
@handle-deploy="handleSubmit"
@handle-deploy-menu="handleSubmitAndStay" />
@handle-deploy-menu="(index, e) => handleSubmitAndStay(e)" />
</template>
</info-card>
</a-affix>

View File

@ -86,7 +86,7 @@ export default {
this.$emit('handle-deploy', e)
},
handleMenu (e) {
this.$emit('handle-deploy-menu', e.key - 1)
this.$emit('handle-deploy-menu', e.key - 1, e)
}
}
}
@ -94,37 +94,36 @@ export default {
<style lang="less" scoped>
.button-container {
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: flex-start;
}
.equal-size-button {
flex-grow: 1; /* Make each button grow equally */
min-width: 120px; /* Set a minimum width so that the buttons don't shrink too much */
}
@media (max-width: 600px) {
.button-container {
flex-direction: column;
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: flex-start;
}
}
.equal-size-button {
flex-grow: 1; /* Make each button grow equally */
min-width: 120px; /* Set a minimum width so that the buttons don't shrink too much */
}
.btn-stay-on-page {
&.ant-dropdown-menu-dark {
.ant-dropdown-menu-item:hover {
background: transparent !important;
@media (max-width: 600px) {
.button-container {
flex-direction: column;
}
}
}
</style>
<style lang="less">
.ant-btn-group > .ant-btn:first-child:not(:last-child) {
flex-grow: 1; /* Make each button grow equally */
}
.btn-stay-on-page {
&.ant-dropdown-menu-dark {
.ant-dropdown-menu-item:hover {
background: transparent !important;
}
}
}
.ant-btn-group > .ant-btn:first-child:not(:last-child) {
flex-grow: 1; /* Make each button grow equally */
}
</style>