vue树形展示插件和一维码插件

1.vue2-org-tree

2.样式修改:

css 复制代码
.org-tree-container {
  height: 100%;
}
.horizontal .org-tree-node-children {
  padding-left: 70px !important;
}
.horizontal .org-tree-node-children::before {
  width: 70px !important;
}
.org-tree-node-label-inner {
  cursor: pointer;
}

3.一维码生成

javascript 复制代码
  barcode(item, index) {
      let barCode = item;
      let name = "#barcode" + index;
      let flag = true;
      if (index == 19) {
        flag = false;
      }
      JsBarcode(name, item, {
        format: "CODE128", //选择要使用的条形码类型
        text: barCode, //显示文本
        displayValue: flag, //是否在条形码下方显示文字
        textPosition: "bottom", //设置文本的垂直位置
        margin: 10, //设置条形码周围的空白边距
        height: 70,
        width: 1.3,
        textMargin: 10,
        fontSize: 22,
      });
    },

4.使用this.$refs.barcode1.innerHTML = "";清空打印值

相关推荐
余人于RenYu32 分钟前
Claude + Figma MCP
前端·ui·ai·figma
杨艺韬3 小时前
vite内核解析-第2章 架构总览
前端·vite
我是伪码农4 小时前
外卖餐具智能推荐
linux·服务器·前端
qq_283720054 小时前
Python Celery + FastAPI + Vue 全栈异步任务实战
vue.js·python·fastapi
2401_885885044 小时前
营销推广短信接口集成:结合营销策略实现的API接口动态变量填充方案
前端·python
小李子呢02114 小时前
前端八股性能优化(2)---回流(重排)和重绘
前端·javascript
程序员buddha5 小时前
深入理解ES6 Promise
前端·ecmascript·es6
吴声子夜歌5 小时前
ES6——Module详解
前端·ecmascript·es6
剪刀石头布啊5 小时前
原生form发起表单干了啥
前端
剪刀石头布啊5 小时前
表单校验场景,如何实现页面滚动到报错位置
前端