Files
certd/packages/ui/certd-client/src/components/vip-button/directive.ts
T

25 lines
686 B
TypeScript
Raw Normal View History

2024-10-05 01:46:25 +08:00
import { notification } from "ant-design-vue";
2025-04-12 23:59:03 +08:00
import { useSettingStore } from "/@/store/settings";
2024-10-05 01:46:25 +08:00
2024-09-05 14:33:45 +08:00
export default {
mounted(el: any, binding: any, vnode: any) {
const { value } = binding;
2024-10-05 01:46:25 +08:00
const settingStore = useSettingStore();
2024-09-05 14:33:45 +08:00
el.className = el.className + " need-plus";
2024-10-05 01:46:25 +08:00
if (!settingStore.isPlus) {
2024-09-05 14:33:45 +08:00
function checkPlus() {
// 事件处理代码
notification.warn({
message: "此为专业版功能,请升级到专业版"
});
}
el.addEventListener("click", function (event: any) {
checkPlus();
});
el.addEventListener("move", function (event: any) {
checkPlus();
});
}
}
};