jsbox-cview 1.5.21 → 1.5.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -194,7 +194,24 @@ export class SplitViewController extends BaseController {
194
194
  props: {
195
195
  id: props.id,
196
196
  bgcolor: props.bgcolor
197
- }, layout, events
197
+ },
198
+ layout,
199
+ events: {
200
+ ...events,
201
+ didAppear: sender => {
202
+ if (this._sideBarShown) {
203
+ this._secondaryController.appear();
204
+ } else {
205
+ this._primaryController.appear();
206
+ }
207
+ events?.didAppear?.(this);
208
+ },
209
+ didDisappear: () => {
210
+ this._primaryController.disappear();
211
+ this._secondaryController.disappear();
212
+ events?.didDisappear?.(this);
213
+ }
214
+ }
198
215
  });
199
216
  this._sideBarShown = false;
200
217
  this._canShowSidebar = true;
@@ -137,7 +137,23 @@ class SplitViewController extends base_controller_1.BaseController {
137
137
  props: {
138
138
  id: props.id,
139
139
  bgcolor: props.bgcolor
140
- }, layout, events
140
+ },
141
+ layout,
142
+ events: Object.assign(Object.assign({}, events), { didAppear: sender => {
143
+ var _a;
144
+ if (this._sideBarShown) {
145
+ this._secondaryController.appear();
146
+ }
147
+ else {
148
+ this._primaryController.appear();
149
+ }
150
+ (_a = events === null || events === void 0 ? void 0 : events.didAppear) === null || _a === void 0 ? void 0 : _a.call(events, this);
151
+ }, didDisappear: () => {
152
+ var _a;
153
+ this._primaryController.disappear();
154
+ this._secondaryController.disappear();
155
+ (_a = events === null || events === void 0 ? void 0 : events.didDisappear) === null || _a === void 0 ? void 0 : _a.call(events, this);
156
+ } })
141
157
  });
142
158
  this._sideBarShown = false;
143
159
  this._canShowSidebar = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsbox-cview",
3
- "version": "1.5.21",
3
+ "version": "1.5.22",
4
4
  "description": "为 JSBox 设计的微型框架",
5
5
  "repository": {
6
6
  "type": "git",