This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<template>
<div>Demo 更改Table显示</div>
</template>
<script>
export default {
name: 'index',
inject: ['currentComponent', 'refresh'],
data() {
return {};
},
mounted() {
this.hasPermission();
methods: {
hasPermission() {
let allComponents = this.currentComponent();
allComponents.forEach((item) => {
if (item.name === 'Table') {
item.hidden = false;
}
});
console.log(allComponents);
/**
* 第一种方法:直接调用refresh方法刷新页面
*/
// this.refresh();
};
</script>
<style lang="less" scoped></style>