Skip to content

Conversation

fit2bot
Copy link
Contributor

@fit2bot fit2bot commented Apr 29, 2025

fix: Show actions column by default in list view

@fit2bot fit2bot requested a review from a team April 29, 2025 08:36
@w940853815 w940853815 merged commit 5b62735 into dev Apr 29, 2025
3 of 4 checks passed
@@ -79,7 +79,6 @@ export default {
width: '200px'
},
actions: {
prop: 'id',
formatterArgs: {
canUpdate: this.$hasPerm('orgs.change_organization'),
canDelete: function({ row }) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The major difference between the current code and the reference (with knowledge cut-off on September 1, 2021) is that the actions object in the exported module has been updated from { prop: 'id', formatterArgs: { canUpdate } } to { prop: 'name' }. Additionally, there is a bug fix where it now calls the parent object's method instead of directly referencing methods within the props object inside an action.

As for potential optimizations, consider:

  • Remove unnecessary imports if not necessary.
  • Use ES6 class syntax instead of arrow functions when they're more readable, like you had done earlier in some parts.
  • In cases where no custom validation is required, use default validators provided by Vue.js components which might have already optimized logic. For instance, this.$validator.isurl("") or similar could be used for URL input, rather than using raw regexes here.

Remember, these changes should depend on specific project requirements, so do additional validations and testing before applying them across the entire application.

@w940853815 w940853815 deleted the pr@dev@fix_org_actions_show branch April 29, 2025 08:36
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants