| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- "use strict";
- const common_vendor = require("../../../../common/vendor.js");
- const teacherUrl = "https://software.nju.edu.cn//qinliu/index.html";
- const _sfc_main = {
- __name: "AboutModal",
- props: {
- visible: {
- type: Boolean,
- default: false
- }
- },
- emits: ["update:visible", "close"],
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const showModal = common_vendor.ref(false);
- common_vendor.watch(() => props.visible, async (newVal) => {
- if (newVal) {
- await common_vendor.nextTick$1();
- setTimeout(() => {
- showModal.value = true;
- }, 50);
- } else {
- showModal.value = false;
- }
- });
- const closeModal = () => {
- showModal.value = false;
- setTimeout(() => {
- emit("update:visible", false);
- emit("close");
- }, 300);
- };
- const copyTeacherLink = () => {
- common_vendor.index.setClipboardData({
- data: teacherUrl,
- success: () => {
- common_vendor.index.showToast({
- title: "已复制到剪贴板,请到浏览器中打开",
- icon: "success",
- duration: 2e3
- });
- },
- fail: () => {
- common_vendor.index.showToast({
- title: "复制失败",
- icon: "none"
- });
- }
- });
- };
- return (_ctx, _cache) => {
- return common_vendor.e({
- a: __props.visible
- }, __props.visible ? {
- b: common_vendor.o(closeModal),
- c: common_vendor.o(copyTeacherLink),
- d: showModal.value ? 1 : "",
- e: common_vendor.o(() => {
- }),
- f: showModal.value ? 1 : "",
- g: common_vendor.o(closeModal)
- } : {});
- };
- }
- };
- const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-8dc3a124"]]);
- wx.createComponent(Component);
- //# sourceMappingURL=../../../../../.sourcemap/mp-weixin/pages/components/About/AboutModal/AboutModal.js.map
|