随笔分类 - 前端
1
摘要:const str = '你好,世界!'; const length = Array.from(str).reduce((acc, cur) => acc + (cur.charCodeAt(0) > 255 ? 2 : 1), 0); console.log(length); // Output:
阅读全文
摘要:1.设置popper-class 和popper-append-to-body 属性 <el-select v-model="value" placeholder="请选择" popper-class="lioverhide" :popper-append-to-body ="false"> </e
阅读全文
摘要:1.官网地址 http://mozilla.github.io/pdf.js/getting_started/ 2.下载旧版本 3.复制到项目地址中使用<a>标签 <a href="../content/pdfjs-3.4.120-dist/web/viewer.html?file=xxx.pdf"
阅读全文
摘要:<el-dialog title="" :visible.sync="dialogFormVisible"> <div slot="title" class="header-title"> <img src="../../../../images/ico1.png" /> <span class="
阅读全文
摘要:本地引用element-ui和vue <link rel="stylesheet" type="text/css" href="./element.css"> <script src="./js/vue.js"></script> <script src="./js/element.js"></sc
阅读全文
摘要:HTML <el-upload drag :auto-upload="false" :file-list="fileList" :before-remove="beforeRemove" :on-change="handleChange" action="#" class="upload-demo"
阅读全文
摘要:DownLoad() { const that = this; const result = "http://" + window.location.host + "/Upload/" let files = that.DownLoadUrl.split(";") //分号分割的url地址 file
阅读全文
摘要:HTML <a class="btn btn-default" id="enterBtn" disabled style="margin-top:2rem" href="legalnewform.html"> 已知晓,进入法律咨询<span id="countDown" style="float:r
阅读全文
摘要:CSS3新增*=、^=、$=三种匹配方式[{属性 | 属性 {*= | ^= | $=} 值}]: *=表示模糊匹配,[href*="163"]可以匹配href="163.com"、href="mail.163.com"等元素; ^=表示以指定字符开头,[href^="/"]则匹配href="/a/
阅读全文
摘要:Bootstrap4.0中将一些图标被去除了,调整expanderExpandedClass 和expanderCollapsedClass 为Font Awesome的图标。 $.fn.bootstrapTreeTable.defaults = { code: 'code', // 选取记录返回的
阅读全文
摘要:Html <van-field readonly clickable name="datetimePicker" :value="lostDate" label="时间" placeholder="点击选择时间" @click="showPicker = true" /> <van-popup v-
阅读全文
摘要:错误原因 bool类型,我在组件给了fixed = true 正确写法 直接加fixed
阅读全文
摘要:安装 IIS UrlRewrite 在网站的根目录下创建一个 web.config 文件,内容如下: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule n
阅读全文
摘要:问题 解决 文件夹大小写问题,区分大小写即可。
阅读全文
摘要:问题 解决 //依次执行 npm uninstall node-sass npm install node-sass --registry=http://registry.npm.taobao.org //前面执行过可不执行 npm install
阅读全文
摘要:1.获取data-*属性 document.getElementById('id').getAttribute("data-user")//js $('#id').data("user");//jquery 2.设置data-*属性 document.getElementById('id').set
阅读全文
摘要:初始化 $("#id").select2(); Change事件 $("#id").on("select2:select",function(){ var data = $(this).val(); }); 获取值 //多选获取选中keys数组 单选获取值 $("#id").val(); //获取选
阅读全文
摘要:准备 1.框架 .netcore 版本 yishaadmin开源框架 2.模板 本文模板使用adminlte3.0,文档地址https://adminlte.io/docs/3.0/ 3.菜单表关键字段 id 表主键(当前菜单) ParentId 父级ID(父级菜单 为0时为顶级菜单,也可能为内容)
阅读全文
摘要:/* 滚动条美化 */ /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/ ::-webkit-scrollbar { width: 7px; height: 7px; background-color: #f7f7f7; } /*定义滚动条轨道 内阴影+圆角*/ ::-webkit-scr
阅读全文
摘要:问题: 在.netcore中使用pdf.js,pdf中有部分中文无法显示 在浏览器控制台发现有报错 发现在pdf.view.js中url路径异常,没有指向cmaps文件,于是调整了正确的相对路径 再次请求,依旧404。再通过观察其他的js文件的路径,路径没有问题。最后发现是系统没有为我们提供处理的文
阅读全文
1