parent
b145efcaa9
commit
5030e3db57
@ -1,24 +0,0 @@ |
||||
<script type="text/jsx"> |
||||
export default { |
||||
name: "SearchFormItem", |
||||
|
||||
inject: { |
||||
searchForm: { |
||||
default: () => ({width: 'auto'}) |
||||
} |
||||
}, |
||||
|
||||
props: {label: String}, |
||||
|
||||
render() { |
||||
const {width} = this.searchForm |
||||
return ( |
||||
<el-col style={{width}} span={100}> |
||||
<el-form-item label={this.label}> |
||||
{this.$slots.default} |
||||
</el-form-item> |
||||
</el-col> |
||||
) |
||||
} |
||||
} |
||||
</script> |
||||
@ -0,0 +1,21 @@ |
||||
/** |
||||
* @desc el-tree展开折叠控制 |
||||
* @param ref el-tree实例 |
||||
* @param action 'expand' | 'collapse' |
||||
* @param level 展开的节点最大深度,为0时匹配全部节点 |
||||
* @param func 自定义展开的函数,传入一个node,优先使用 |
||||
*/ |
||||
export function expandControl(ref, action = 'expand', level = 1, func) { |
||||
const handler = function () { |
||||
if (typeof func === 'function') { |
||||
return node => func(node) |
||||
} |
||||
|
||||
const expand = action === 'expand' |
||||
const forAll = level === 0 |
||||
|
||||
return node => node.expanded = forAll || node.level <= level ? expand : !expand |
||||
}() |
||||
|
||||
ref.store._getAllNodes().forEach(handler) |
||||
} |
||||
@ -1,15 +0,0 @@ |
||||
import Vue from 'vue' |
||||
import {errorLog} from '@/config' |
||||
|
||||
if (errorLog) { |
||||
Vue.config.errorHandler = function (err, vm, info, a) { |
||||
//忽略image-viewer错误
|
||||
if (err.message === `Cannot read property 'complete' of undefined`) return |
||||
/*store.commit('errorLog/ADD_ERROR_LOG', { |
||||
err, |
||||
info, |
||||
url: window.location.href |
||||
})*/ |
||||
console.error('这是vue捕捉到的异常', err, info) |
||||
} |
||||
} |
||||
Loading…
Reference in new issue