2022-08-18 10:13:42 +00:00
|
|
|
import { Data } from '../components/index.js'
|
2022-03-26 08:21:44 +00:00
|
|
|
|
|
|
|
export default class Base {
|
|
|
|
|
2022-07-30 20:20:10 +00:00
|
|
|
toString () {
|
2022-08-18 10:13:42 +00:00
|
|
|
return this?.name || ''
|
2022-03-26 08:21:44 +00:00
|
|
|
}
|
|
|
|
|
2022-07-30 20:20:10 +00:00
|
|
|
getData (arrList = '', cfg = {}) {
|
2022-08-18 10:13:42 +00:00
|
|
|
arrList = arrList || this._dataKey || ''
|
2022-07-30 20:20:10 +00:00
|
|
|
return Data.getData(this, arrList, cfg)
|
2022-03-26 08:21:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 获取指定值数据,支持通过
|
2022-07-30 20:20:10 +00:00
|
|
|
getVal (key, defaultValue) {
|
|
|
|
return Data.getVal(this, key, defaultValue)
|
2022-03-26 08:21:44 +00:00
|
|
|
}
|
2022-07-30 20:20:10 +00:00
|
|
|
}
|