UNPKG

@turbox3d/design-engine

Version:

Large-scale design application engine library

50 lines 2.73 kB
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; import _createClass from "@babel/runtime/helpers/esm/createClass"; import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import _typeof from "@babel/runtime/helpers/esm/typeof"; function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; import { Domain, reactor, mutation } from '@turbox3d/reactivity'; /** 应用环境变量 */ var EAppEnv; (function (EAppEnv) { /** 定制商品素材主插件 */ EAppEnv["CUSTOMIZE_PRODUCTS"] = "customize-products"; /** 定制铝合金门窗自由绘制插件 */ EAppEnv["CUSTOMIZE_DOOR_WINDOW"] = "customize-door-window"; })(EAppEnv || (EAppEnv = {})); var AppEnvironmentManager = /*#__PURE__*/function (_Domain) { function AppEnvironmentManager() { var _this; _classCallCheck(this, AppEnvironmentManager); _this = _callSuper(this, AppEnvironmentManager, arguments); /** 当前应用环境变量 */ _this.appEnv = ''; return _this; } /** 切换应用环境 */ _inherits(AppEnvironmentManager, _Domain); return _createClass(AppEnvironmentManager, [{ key: "switchAppEnv", value: function switchAppEnv(appEnvId) { this.appEnv = appEnvId; } }]); }(Domain); __decorate([reactor()], AppEnvironmentManager.prototype, "appEnv", void 0); __decorate([mutation('切换应用环境', true)], AppEnvironmentManager.prototype, "switchAppEnv", null); /** 应用环境管理器 */ var EnvSystem = { EAppEnv: EAppEnv, AppEnvMgr: new AppEnvironmentManager() }; export default EnvSystem;