m2-webui
Version:
The package is provided web components and utilities based on vue and element-ui.
21 lines (19 loc) • 367 B
JavaScript
import { DataType } from 'm2-core'
export default {
props: {
layout: {
type: Array,
default: () => []
}
},
computed: {
empty() {
return DataType.isEmptyArray(this.layout)
}
},
methods: {
has(key, layout = 'layout') {
return this[layout] && this[layout].some(item => item === key)
}
}
}