12 2019 档案
摘要:首先安装 npm install @riophae/vue-treeselect --save 然后在页面中引入 import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-tre
阅读全文
摘要:treeselect 中出现了unknown,没有显示出placeholder treeselect 绑定的值是 form.parentId 当把parentId去掉的时候 就不会出现了 为了后面的方便,修改parentId的值 当parentId的值为 { } [ ] string 的时候都会出现
阅读全文
摘要:如今前端插件越来越多,插件也带有自己的标签和样式,有时候我们可以直接改变样式,但有时候又需要把之前的样式去除掉。 用到Cesium-navigation-es6时 放大缩小的按钮自带了top属性,但是我想把它放在底部需要用到bottom,这个时候去设置bottom无效的。 所以我们可以给该标签设置
阅读全文
摘要:首先安装 html2Canvas 和 jspdf npm i html2canvas -S npm i jspdf -S 然后在vue页面引入 import html2Canvas from 'html2canvas' import JsPDF from 'jspdf' 最后实现: html2Can
阅读全文
摘要:cesium里面没有指南针 需要安装其他的插件: cesium-navigation-es6 npm i cesium-navigation-es6 -S 安装好之后在mainjs里引入 import CesiumNavigation from 'cesium-navigation-es6' 配置一
阅读全文
摘要:computed: { handler() { return new this.Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas) } } 在事件的外面先定义一下 const _this = this (因为在setInputAction
阅读全文
摘要:在settings.json中添加一行 "editor.renderWhitespace": "all"
阅读全文
摘要:1.十六进制换RGB 例: var color = '#69ad52' let r = parseInt(“0px” + color.slice(1, 3)) //105 let g = parseInt(“0px” + color.slice(3, 5)) //173 let b = parseI
阅读全文
摘要:这样一个rgba(1,0,0,1) 如果我们要把它转换成 0-255范围 就是rgb分别乘以255 就是 rgba(255,0,0,255) 0-255转0-1范围 如 rgba(34,56,56,1)转为0-1范围就是 r = 34/255 g = 56/255 b = 56/255 a不参与转换
阅读全文
摘要:之前写了一遍博客关于vue+cesium的搭建,后面是在index.html里通过script引入的,但是后面要用到指南针的时候发现指南针没法引入了 之前的链接: https://www.cnblogs.com/reround/p/11943717.html 后来慢慢调试发现原来是cesium的版本
阅读全文
摘要:修改头部样式: .el-table .el-table__header-wrapper tr th{ background-color: rgb(18, 47, 92)!important; color: rgb(255, 255, 255); } 修改每行样式: .el-table .el-tab
阅读全文
摘要:(假设我们判断1出现的次数) var x = ‘123123123123123’ var a = (x, match(/1/g) | | [] ).length console.log(a) 这个a 打印出来的就是1在x这个字符串中出现的次数 如果要取别的字符串 就把 / 1 / g 这个1 改成你
阅读全文
摘要:点击任何东西控制台都会报错: 也没有提示哪儿出了问题,后来我就代码一块一块的注释,终于找到了原因。 我在项目中用了 el-dropdown ,但是没有用他的el-dropdown-menu 所以才会一直报这个错,只要把el-dropdown-menu加到el-dropdown里就好了
阅读全文