[英]How to hide grid action button from "sw-entity-listing" listing in shopware 6?
如何从 shopware 6 中的“sw-entity-listing”列表中隐藏网格操作按钮(编辑、删除)?
If you want to hide the whole actions column you can do this with the prop showActions
.如果你想隐藏整个动作列,你可以使用道具
showActions
来做到这showActions
。 This would be the most simple way.这将是最简单的方法。
<sw-entity-listing
:showActions="false">
</sw-entity-listing>
If you only want to hide the "edit" or "delete" button and not the whole actions column you can override the slots delete-action
or detail-action
with an empty tag or something else:如果您只想隐藏“编辑”或“删除”按钮而不是整个操作列,您可以使用空标签或其他内容覆盖插槽
delete-action
或detail-action
:
<sw-entity-listing>
<template #delete-action>
My content
</template>
</sw-entity-listing>
<sw-entity-listing>
<template #delete-action>
<span></span> <!-- No action here -->
</template>
</sw-entity-listing>
The sw-entity-lising
component is an extension of the sw-data-grid
component. sw-entity-lising
组件是sw-data-grid
组件的扩展。 So in general you can use all props from sw-data-grid
as well.所以通常你也可以使用
sw-data-grid
所有道具。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.