一些最近写的内容

51 阅读1分钟
  1. template v-for 拼接逗号
<template slot="col-roleName" slot-scope="scope">
     <span  v-for="(item, index) in scope.row.roles" :key="item">
        {{item.roleName}}<span v-if="index != (item.length - 1)">,</span>
      </span>
 </template>
  1. Reflect.ownKeys和Object.keys的区别 Reflect.ownKeys返回所有的属性不管是不是可枚举 Object.keys返回可枚举的属性
  2. 修改el-tree选中节点的背景色和字体颜色
>>>.el-tree
    .is-current
      >.el-tree-node__content
        background-color #E9F6FE !important
        color #409eff
  1. 英文换行
 word-wrap: break-word;
 word-break: break-all;

5.vue预览pdf vue-pdf.js 插件

image.png 6.vue拖拽组件实现拖动排序vue-draggable