/*
|
* @Company: hugeInfo
|
* @Author: ldh
|
* @Date: 2022-05-17 11:29:47
|
* @LastEditTime: 2022-05-17 15:00:42
|
* @LastEditors: ldh
|
* @Version: 1.0.0
|
* @Description: sop组件状态集
|
*/
|
class sopStatus {
|
constructor() {
|
this.visible = false;
|
this.type = undefined;
|
this.handleVisible = null;
|
this.handleSetType = null;
|
}
|
|
// sop显隐
|
setVisibleFunc(func) {
|
let that = this;
|
this.handleVisible = (visible) => {
|
that.visible = typeof visible === 'boolean' ? visible : !that.visible;
|
func(that.visible);
|
};
|
}
|
|
// 设置sop的type
|
setDataTypeFunc(func) {
|
let that = this;
|
this.handleSetType = (type) => {
|
that.type = type;
|
func(that.type);
|
};
|
}
|
}
|
|
export default new sopStatus();
|