This commit is contained in:
xiaojunnuo
2024-09-05 14:33:45 +08:00
parent 1dd9a8d4d3
commit ecad7f58c1
13 changed files with 89 additions and 14 deletions
@@ -3,7 +3,7 @@ import PiAccessSelector from "../views/certd/access/access-selector/index.vue";
import PiDnsProviderSelector from "./dns-provider-selector/index.vue";
import PiOutputSelector from "../views/certd/pipeline/pipeline/component/output-selector/index.vue";
import PiEditable from "./editable.vue";
import VipButton from "./vip-button/index.vue";
import vip from "./vip-button/install.js";
import { CheckCircleOutlined, InfoCircleOutlined, UndoOutlined } from "@ant-design/icons-vue";
import CronEditor from "./cron-editor/index.vue";
import { CronLight } from "@vue-js-cron/light";
@@ -15,12 +15,14 @@ export default {
app.component("PiEditable", PiEditable);
app.component("PiOutputSelector", PiOutputSelector);
app.component("PiDnsProviderSelector", PiDnsProviderSelector);
app.component("VipButton", VipButton);
app.component("CronLight", CronLight);
app.component("CronEditor", CronEditor);
app.component("CheckCircleOutlined", CheckCircleOutlined);
app.component("InfoCircleOutlined", InfoCircleOutlined);
app.component("UndoOutlined", UndoOutlined);
app.use(vip);
}
};
@@ -0,0 +1,23 @@
import { message, notification } from "ant-design-vue";
import { useUserStore } from "/@/store/modules/user";
export default {
mounted(el: any, binding: any, vnode: any) {
const { value } = binding;
const userStore = useUserStore();
el.className = el.className + " need-plus";
if (!userStore.isPlus) {
function checkPlus() {
// 事件处理代码
notification.warn({
message: "此为专业版功能,请升级到专业版"
});
}
el.addEventListener("click", function (event: any) {
checkPlus();
});
el.addEventListener("move", function (event: any) {
checkPlus();
});
}
}
};
@@ -0,0 +1,6 @@
import VipButton from "./index.vue";
import plus from "./directive.js";
export default function (app: any) {
app.component("VipButton", VipButton);
app.directive("plus", plus);
}