miao-plugin/models/Base.js
2022-08-18 18:13:42 +08:00

19 lines
383 B
JavaScript

import { Data } from '../components/index.js'
export default class Base {
toString () {
return this?.name || ''
}
getData (arrList = '', cfg = {}) {
arrList = arrList || this._dataKey || ''
return Data.getData(this, arrList, cfg)
}
// 获取指定值数据,支持通过
getVal (key, defaultValue) {
return Data.getVal(this, key, defaultValue)
}
}