mirror of
https://github.com/certd/certd.git
synced 2026-05-15 04:27:31 +08:00
chore:
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user