随笔分类 - web
摘要:.maxLen, .maxlen { overflow: hidden; //超出文本隐藏 text-overflow: ellipsis; ///超出部分省略号显示 display: -webkit-box; //弹性盒模型 -webkit-box-orient: vertical; //上下垂直
阅读全文
摘要:html代码: <div class="list-body">这个有滚动条</div> <div class=".mask">这个是遮罩层</div> js代码: $(function () { $(".list-body").scroll(function () { var ls = $(".li
阅读全文
摘要:router.beforeEach((to, from, next) => { //这个是路由切换的时候可以获取到值,当前页面刷新获取不到 console.log(router.app.$store) //undefined } 解决方法:router.js // Vue.use(Router);
阅读全文
摘要:效果图: svg编辑器:https://c.runoob.com/more/svgeditor/ 代码: gender_method() { var chartDom = document.getElementById("main"); var myChart = echarts.init(char
阅读全文
摘要:检查方法: 1、id是否重复 2、没有设置高度 <div id="chart_id" style="width:100%;height:376px"></div> 3、确保dom元素已经挂载到页面中,初始化echart写在mounted中 mounted(){ this.initEchart() }
阅读全文
摘要:myChart.on('click', function (params) { console.log(params.name); }) 根据业务需求判断点击的类型,比如时间轴点击事件,数据轴点击
阅读全文
摘要:myChart.on('timelinechanged', function (timeLineIndex) { var arrIndex = parseInt(timeLineIndex.currentIndex); updateYear(years[arrIndex]); //停止播放 opti
阅读全文
摘要:html代码 <div id="echartsId" style="height:400px;width:1148px" class="svg-wrap"> 暂无数据 </div> js代码 var canvasId = "echartsId"; var a = document.createEle
阅读全文
摘要:这里是全部代码,可以直接运行。js需要自行导入 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> <script src="js/jquery-1.4.4.min.js" type="text/javascr
阅读全文
摘要:@page { size: auto; /* auto is the initial value */ margin: 0mm; /* this affects the margin in the printer settings */ }
阅读全文
摘要:$("#print-div").jqprint({ debug: false, //如果是true则可以显示iframe查看效果(iframe默认高和宽都很小,可以再源码中调大),默认是false importCSS: true, //true表示引进原来的页面的css,默认是true。(如果是tr
阅读全文
摘要:.el-table th.gutter { display: table-cell!important; }
阅读全文
摘要:效果:由于英文不会换行,导致中文换行了 修改后的效果: 解决方法: span标签加上 style="word-break:break-all;"
阅读全文
摘要:效果图: 关键代码: var options = { legend: false, gridLines: { display: false }, // labels: { // style: { // fontSize: "16", // color: "#fff", // }, // }, too
阅读全文
摘要:"plugins": [ "transform-vue-jsx", "transform-runtime", [ "import", { "libraryName": "vant", "style": true } ] ]
阅读全文
摘要:看文档大意了,原来是写在column的属性 sort-orders用来控制点击的顺序 代码参考:
阅读全文
摘要:需求是表头加个图标,保留排序功能 questionIcon(h, { column, $index }) { console.log(h); console.log(column); console.log($index); return h("span", [ h("span", { class:
阅读全文
摘要:var WebpackObfuscator = require('webpack-obfuscator'); pack_conf.plugins = [new WebpackObfuscator({ rotationUnicodeArray: true })] 一开始用uglify,但是效果不理想,
阅读全文