参考官方 文档 阻止事件冒泡 从 catch:tap="xx" 改为 @tap.native.stop="xx" 应用 <view class="parent" @click="parentFun"> <view @click.native.stop="testFun()"> 内容 </view> </view> 这样,点击“内容”就执行了testFun方法,不会向上发…
参考官方 文档 阻止事件冒泡 从 catch:tap="xx" 改为 @tap.native.stop="xx" 应用 <view class="parent" @click="parentFun"> <view @click.native.stop="testFun()"> 内容 </view> </view> 这样,点击“内容”就执行了testFun方法,不会向上发…
依赖 pnpm add html2canvas # html转换canvas pnpm add vue-qr # 二维码生成 pnpm add file-saver # 图片下载 实现 <template> <div id="vue-qr-con" ref="vueQrRef"> <vue-qr :logoSrc="logo" :size="size" :text="value" /&g…
安装依赖 import * as XLSX from 'xlsx'; import FileSaver from "file-saver"; 表格需要添加id="multipleTable" <el-button type="primary" @click="exportFun">导出</el-button> <el-table id="multipleTable" :data="tableDat…
方法一 设置electron_mirror 1-> pnpm: pnpm config set electron_mirror " https://npm.taobao.org/mirrors/electron/ " npm: npm config set electron_mirror " https://npm.taobao.org/mirrors/electron/ " 2-> pnpm install electron npm…
创建项目时 添加:ng new <name> --skip-tests 创建项目后 在 angular.json中,添加"skipTests": true "schematics": { "@schematics/angular:component": { "style": "scss", "skipTests": true }, "@schematics/angular:c…
使用:post请求,xxx.com/proxyImg/proxyFile 文件名称是file nginx配置 location ^~ /proxyImg/ { add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; # 注意 这里需要添加所有的header,不然前端还会报错提示header不允许, !!!注意根据错误添加 add_header Access-Cont…
问题 使用uni-app制作h5,在h5中加载了微信的js-sdk,发现调用wx.miniProgram.navigateTo 方法显示undefined 解决 在项目的App.vue中动态加载js 代码如下 onLaunch() { this.getLoadJs(); }, methods: { getLoadJs() { if ( Utils.determineTheEnvironment() === Constant.miniProgramEnvironment.alipay ) { Logs.info("支…
const Utils = { /** * 加载js * @param src */ loadScript(src) { return new Promise((resolve, reject) => { const script = document.createElement("script"), head = document.getElementsByTagName("head")[0]; script.type = "text/javascript&…
// 小程序环境 const Constant = { miniProgramEnvironment: { alipay: "alipay", qq: "qq", weixin: "weixin", toutiao: "toutiao", baidu: "baidu", quickapp: "quickapp", other: "other", } }, /** * 小程序判断…
问题 默认的根路径是/,比如/ => /livekitweb, 通过域名的二级目录,例如:aaa.com/livekitweb 解决方案 这要修改配置文件,首先打开next.config.js,修改以下属性:assetPrefix, basePath, distDir,详情查看下面代码: const nextConfig = { assetPrefix: "/livekitweb", //加前缀 basePath: "/livekitweb", // 编译文件的输出目录…