fix: table actions in fixed column (#5945)
This commit is contained in:
@@ -212,7 +212,12 @@ setupVbenVxeTable({
|
|||||||
Popconfirm,
|
Popconfirm,
|
||||||
{
|
{
|
||||||
getPopupContainer(el) {
|
getPopupContainer(el) {
|
||||||
return el.closest('tbody') || document.body;
|
return (
|
||||||
|
el
|
||||||
|
.closest('.vxe-table--viewport-wrapper')
|
||||||
|
?.querySelector('.vxe-table--main-wrapper')
|
||||||
|
?.querySelector('tbody') || document.body
|
||||||
|
);
|
||||||
},
|
},
|
||||||
placement: 'topLeft',
|
placement: 'topLeft',
|
||||||
title: $t('ui.actionTitle.delete', [attrs?.nameTitle || '']),
|
title: $t('ui.actionTitle.delete', [attrs?.nameTitle || '']),
|
||||||
|
@@ -11,7 +11,7 @@ export function getMenuTypeOptions() {
|
|||||||
value: 'catalog',
|
value: 'catalog',
|
||||||
},
|
},
|
||||||
{ color: 'default', label: $t('system.menu.typeMenu'), value: 'menu' },
|
{ color: 'default', label: $t('system.menu.typeMenu'), value: 'menu' },
|
||||||
{ color: 'error', label: $t('system.menu.typeButton'), value: 'button' },
|
{ color: 'error', label: $t('system.menu.typeButton'), value: 'action' },
|
||||||
{
|
{
|
||||||
color: 'success',
|
color: 'success',
|
||||||
label: $t('system.menu.typeEmbedded'),
|
label: $t('system.menu.typeEmbedded'),
|
||||||
|
@@ -241,10 +241,10 @@ const schema: VbenFormSchema[] = [
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
dependencies: {
|
dependencies: {
|
||||||
rules: (values) => {
|
rules: (values) => {
|
||||||
return values.type === 'button' ? 'required' : null;
|
return values.type === 'action' ? 'required' : null;
|
||||||
},
|
},
|
||||||
show: (values) => {
|
show: (values) => {
|
||||||
return ['button', 'catalog', 'embedded', 'menu'].includes(values.type);
|
return ['action', 'catalog', 'embedded', 'menu'].includes(values.type);
|
||||||
},
|
},
|
||||||
triggerFields: ['type'],
|
triggerFields: ['type'],
|
||||||
},
|
},
|
||||||
@@ -277,7 +277,7 @@ const schema: VbenFormSchema[] = [
|
|||||||
},
|
},
|
||||||
dependencies: {
|
dependencies: {
|
||||||
show: (values) => {
|
show: (values) => {
|
||||||
return values.type !== 'button';
|
return values.type !== 'action';
|
||||||
},
|
},
|
||||||
triggerFields: ['type'],
|
triggerFields: ['type'],
|
||||||
},
|
},
|
||||||
@@ -295,7 +295,7 @@ const schema: VbenFormSchema[] = [
|
|||||||
},
|
},
|
||||||
dependencies: {
|
dependencies: {
|
||||||
show: (values) => {
|
show: (values) => {
|
||||||
return values.type !== 'button';
|
return values.type !== 'action';
|
||||||
},
|
},
|
||||||
triggerFields: ['type'],
|
triggerFields: ['type'],
|
||||||
},
|
},
|
||||||
@@ -314,7 +314,7 @@ const schema: VbenFormSchema[] = [
|
|||||||
},
|
},
|
||||||
dependencies: {
|
dependencies: {
|
||||||
show: (values) => {
|
show: (values) => {
|
||||||
return values.type !== 'button';
|
return values.type !== 'action';
|
||||||
},
|
},
|
||||||
triggerFields: ['type'],
|
triggerFields: ['type'],
|
||||||
},
|
},
|
||||||
@@ -325,7 +325,7 @@ const schema: VbenFormSchema[] = [
|
|||||||
component: 'Divider',
|
component: 'Divider',
|
||||||
dependencies: {
|
dependencies: {
|
||||||
show: (values) => {
|
show: (values) => {
|
||||||
return !['button', 'link'].includes(values.type);
|
return !['action', 'link'].includes(values.type);
|
||||||
},
|
},
|
||||||
triggerFields: ['type'],
|
triggerFields: ['type'],
|
||||||
},
|
},
|
||||||
@@ -372,7 +372,7 @@ const schema: VbenFormSchema[] = [
|
|||||||
component: 'Checkbox',
|
component: 'Checkbox',
|
||||||
dependencies: {
|
dependencies: {
|
||||||
show: (values) => {
|
show: (values) => {
|
||||||
return !['button'].includes(values.type);
|
return !['action'].includes(values.type);
|
||||||
},
|
},
|
||||||
triggerFields: ['type'],
|
triggerFields: ['type'],
|
||||||
},
|
},
|
||||||
@@ -402,7 +402,7 @@ const schema: VbenFormSchema[] = [
|
|||||||
component: 'Checkbox',
|
component: 'Checkbox',
|
||||||
dependencies: {
|
dependencies: {
|
||||||
show: (values) => {
|
show: (values) => {
|
||||||
return !['button', 'link'].includes(values.type);
|
return !['action', 'link'].includes(values.type);
|
||||||
},
|
},
|
||||||
triggerFields: ['type'],
|
triggerFields: ['type'],
|
||||||
},
|
},
|
||||||
@@ -417,7 +417,7 @@ const schema: VbenFormSchema[] = [
|
|||||||
component: 'Checkbox',
|
component: 'Checkbox',
|
||||||
dependencies: {
|
dependencies: {
|
||||||
show: (values) => {
|
show: (values) => {
|
||||||
return !['button', 'link'].includes(values.type);
|
return !['action', 'link'].includes(values.type);
|
||||||
},
|
},
|
||||||
triggerFields: ['type'],
|
triggerFields: ['type'],
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user