前端
Wu.vue.js
前端小菜鸟
展开
-
html5的video标签怎么避免出现黑边吗?
html5的video标签怎么避免出现黑边吗video标签加上style="width= 100%; height=100%; object-fit: fill" 完美解决原创 2020-10-09 10:42:46 · 2587 阅读 · 3 评论 -
3D立体的图表展示效果
1.建议使用Highcharts2.引入的文件 <script src="http://cdn.hcharts.cn/jquery/jquery-1.8.3.min.js"></script> <script src="http://code.highcharts.com.cn/highcharts/8.2.0/highcharts.js"></script> <script src="http://code.highcharts.c原创 2020-09-12 14:59:59 · 638 阅读 · 0 评论 -
常见的Vue技巧分享(1)
1.require.context()1.场景:如页面需要导入多个组件,原始写法:import titleCom from '@/components/home/titleCom'import bannerCom from '@/components/home/bannerCom'import cellCom from '@/components/home/cellCom'components:{titleCom,bannerCom,cellCom}2.这样就写了大量重复的代码,利用 requ原创 2020-08-20 10:35:06 · 153 阅读 · 0 评论 -
vue的上传和下载文件功能
一、需要安装三个依赖: npm install -S file-saver xlsx npm install -D script-loader二 创建Blob.js和 Export2Excel.js如图:(内容自己百度)三全部代码:<template> <div class="demo"> <el-button @click="outExe">下载</el-button> <input原创 2020-08-17 22:22:34 · 995 阅读 · 0 评论 -
在vue的使用中,出现Cannot assign to read only property 报错
原因:webpack可以使用require和export ,但是不能混合使用import 和module.exports,所以发生了:Cannot assign to read only property ‘exports’ of object '#Object’的报错,而且还会导致页面不能正确编译;解决方法:根目录下的.babelrc文件配置:{ "presets": [ ["env", { "modules": false, "targets": {原创 2020-08-17 16:52:11 · 3602 阅读 · 0 评论 -
vue 项目打包时样式及背景图片路径找不到
vue项目打包后,文件找得到,但是引用的字体及背景图片找不到;方法:更改 build/utils.js 文件中 ExtractTextPlugin 插件的options 配置:if (options.extract) { return ExtractTextPlugin.extract({ use: loaders, publicPath: '../../', // 注意配置这一部分,根据目录结构自由调整 fallback: 'vue-style-loader原创 2020-08-13 22:52:36 · 342 阅读 · 1 评论 -
Vue 组件间的样式污染
1.多个组件的样式会互相影响原因:组件天生隔离,可是在 Vue 当中,运行的载体还是浏览器,所有的样式类还是会通过原创 2020-08-11 00:59:06 · 1461 阅读 · 0 评论 -
前端特效集合第一篇:阴影波纹效果,类似动态svg图;
css3的animation属性实现:html: <span></span>css: span { display: block; width: 100px; height: 100px; margin: 160px auto; animation: ripple 0.6s linear infinite; border-ra原创 2020-08-06 23:46:39 · 310 阅读 · 0 评论 -
css文本的两端对齐和
1.文本两端对齐; text-align: justify; text-justify: distribute-all-lines; /*ie6-8*/ text-align-last: justify; /* ie9*/ -moz-text-align-last: justify; /*ff*/ -webkit-text-align-last: j原创 2020-08-06 23:26:22 · 155 阅读 · 0 评论 -
vue如何自定义获取当前时间和联合监听
1.自定义获取当前时间 created() { var _this = this; //声明一个变量指向Vue实例this,保证作用域一致 this.timer = setInterval(function() { let yy = new Date().getFullYear(); let mm = new Date().getMonth()+1; let dd = new Date().getDat原创 2020-08-05 22:34:55 · 1522 阅读 · 1 评论 -
css3的一些运用
1.div(正方形)沿着Y轴的偏转24度,形成侧边24度的效果: transform-style: preserve-3d; /* 设置盒子按3D空间显示 */ transform: perspective(800px) rotateX(0deg); /* 旋转变换的时候不设置初始值,容易出现跳边的bug,perspective(800px),这里的800px是经验值,效果最好*/ transition: all 0.1s ease; transform: per原创 2020-08-04 22:27:16 · 101 阅读 · 0 评论 -
对elementUI的表格和分页的一些总结
对elementUI的表格和分页的一些总结1.对el-table-column,只能使用min-width,width无效;2.去除底部的边框:el-table__row > td { border: none;}.el-table::before { height: 0px;}data中定义的数据: tableData: [], //table数据 total: 0, //总数据量 pagesize: 10, //每页10条 currentPage: 1,原创 2020-08-03 23:20:37 · 504 阅读 · 2 评论