网站首页 包含标签 VUE 的所有文章

  • Element UI隐藏table滚动条

    当table内容列过多时,可通过height属性设置table高度以固定table高度、固定表头,使table内容可以滚动现在需要去除滚动条 CSS /deep/.el-table__body-wrapper { &::-webkit-scrollbar { // 整个滚动条 width: 0; // 纵向滚动条的宽度 background: rgba(213,215,220,0.3); border: none; height: 0; } &::-webkit-scrollbar-track { // 滚动条轨道 border: none; } }...

    2023-01-10 303
  • vue实现打印及导出

    安装命令: npm i vue-to-pdf --save npm i vue-easy-printer --save 绑定事件 <div id="exportPdf" ref="exportPdf"> </div> <input type="button" @click="printPdf">打印</input> <input type="button" @click="savePdf" >导出(pdf)</input> savePdf(){ this.$PDFSave(this.$refs.exportPdf, "我的文件"); }, printPdf(){ this.$easyPrint(\'exportPdf\',"我的文件",\'portrait\'); } 另外一个打印安装 npm install vue-print-nb --save 全局注册 import Print from 'vue-print-nb' Vue.use(Print); 使用 用v-print指定需要打印的div容器,本次叫printTest。最好使用行内样式,使用组件库部分样式可能不能生成。 <div id="printTest" > <p>锄禾日当午</p>       <p>汗滴禾下土 </p>       <p>谁知盘中餐</p>       <p>粒粒皆辛苦</p>     </div>     <button v-print="'#printTest'">打印</button> 不打印区域 <div class="no-print">不要打印我</div>  ...

    2023-01-06 330

联系我们

在线咨询:点击这里给我发消息

QQ交流群:KirinBlog

工作日:8:00-23:00,节假日休息

扫码关注