Skip to content

Commit

Permalink
Merge branch 'main' of github.com:mineadmin/MineAdmin-Vue
Browse files Browse the repository at this point in the history
  • Loading branch information
kanyxmo committed Apr 17, 2024
2 parents 0ab8844 + 7c179c1 commit e8f4f03
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/components/ma-form/containerItem/card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
-->
<template>
<a-card
v-if="(typeof props.component?.display == 'undefined' || props.component?.display === true)"
v-if="(typeof props.component?.display == 'undefined' ||
props.component?.display === true) &&
(hasDisplayTrue((props.component?.formList ?? [])) ||
props.component?.forceShow)"
:class="[props.component?.customClass]"
:extra="props.component?.extra"
:bordered="props.component?.bordered"
Expand Down Expand Up @@ -53,8 +56,13 @@ const props = defineProps({ component: Object })
const formModel = inject('formModel')
const getColumnService= inject('getColumnService')
const columns = inject('columns')

const hasDisplayTrue = (list) => {
return list.some(item => item.display === true);
}

const rv = async (ev, value = undefined) => await runEvent(props.component, ev, { formModel, getColumnService, columns }, value)

rv('onCreated')
onMounted(() => rv('onMounted'))
</script>
</script>
2 changes: 1 addition & 1 deletion src/directives/role/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const checkRole = (el, binding) => {
})

if (!isHas && el.parentNode) {
el.parentNode.removeChild(el)
el.parentNode.remove()
}
}
} else {
Expand Down

0 comments on commit e8f4f03

Please sign in to comment.