Files
certd/packages/ui/certd-client/src/plugin/directive/comm-show.ts
2025-09-01 15:52:14 +08:00

13 lines
371 B
TypeScript

import { useSettingStore } from "/@/store/settings";
export default {
mounted(el: any, binding: any, vnode: any) {
const settingStore = useSettingStore();
const isComm = settingStore.isComm;
const { value } = binding;
if ((value === false && isComm) || (value === true && !isComm)) {
el.parentNode && el.parentNode.removeChild(el);
}
},
};