
vue
<每天一点>
这个作者很懒,什么都没留下…
展开
-
js查找tree数据
// 通过key在树形数据中找到一个数据 getTreeDataByKey(key, keyName, childrenName, treeData) { let result = {} function temp(key, keyName, childrenName, treeData) { treeData.forEach(item => { if (key === item[keyName]) { ...原创 2022-01-18 16:29:25 · 1467 阅读 · 0 评论 -
js去除树中的空children
export function removeEmptyChildren (node) { node.forEach(item => { if ('children' in item && item.children.length === 0) { delete item.children } else if ('children' in item && item.children.length) { removeEmptyC.原创 2022-01-18 10:00:43 · 1149 阅读 · 0 评论 -
js-list转树形数据
import Vue from 'vue'export function dictToTree(dictType, topDigit, interval) { return dataToTree(Vue.options.filters['dictData'](dictType), topDigit, interval, 'name', 'code')}export function dataToTree(data, topDigit, interval, title, value) { .原创 2022-01-18 09:57:23 · 512 阅读 · 0 评论 -
vant下拉单选
<template> <div class="dh-field"> <div class="van-hairline--bottom"> <van-field v-model="resultLabel" v-bind="$attrs" readonly :is-link="$attrs.disabled === undefined" input-align="l.转载 2022-01-18 09:54:02 · 2184 阅读 · 0 评论 -
vant下拉多选
<template> <div class="dh-field "> <div class="van-hairline--bottom"> <van-field v-model="resultLabel" v-bind="$attrs" readonly :is-link="$attrs.disabled === undefined" error-message.转载 2022-01-18 09:51:32 · 2443 阅读 · 2 评论 -
vue中bpmn-js加载后以只读方式显示
<template> <a-modal title="流程图" :visible="visible" width="80%" :confirm-loading="confirmLoading" @ok="handleOk" @cancel="handleCancel" > <div class="canvas" ref="canvas"></div> </a-modal><.原创 2021-08-19 15:54:29 · 1808 阅读 · 3 评论 -
bpmn-js快速上手及汉化
一、效果二、结构三、步骤1、引入依赖包2、入口文件(index.vue)<template> <div> <a @click="$refs.modeler.showDrawer()">流程图设计器</a> <modeler ref="modeler"/> </div></template><script>import modeler from原创 2021-03-29 20:26:26 · 9305 阅读 · 1 评论