@mixd-id/web-scaffold 0.1.2301231320 → 0.1.2301231322
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.
package/package.json
CHANGED
|
@@ -248,13 +248,11 @@ export default{
|
|
|
248
248
|
|
|
249
249
|
mounted() {
|
|
250
250
|
this.socket.onAny(this.onHooks)
|
|
251
|
-
|
|
252
|
-
window.addEventListener('focus', () => {
|
|
253
|
-
this.load()
|
|
254
|
-
})
|
|
251
|
+
window.addEventListener('focus', this.onFocus)
|
|
255
252
|
},
|
|
256
253
|
|
|
257
254
|
unmounted() {
|
|
255
|
+
window.removeEventListener('focus', this.onFocus)
|
|
258
256
|
this.socket.offAny(this.onHooks)
|
|
259
257
|
},
|
|
260
258
|
|
|
@@ -313,7 +311,7 @@ export default{
|
|
|
313
311
|
},
|
|
314
312
|
|
|
315
313
|
load(){
|
|
316
|
-
this.
|
|
314
|
+
this.socketEmit(`${this.model}.load`, {
|
|
317
315
|
preset: this.preset
|
|
318
316
|
}, (res) => {
|
|
319
317
|
this.items = res.items
|
|
@@ -322,7 +320,7 @@ export default{
|
|
|
322
320
|
},
|
|
323
321
|
|
|
324
322
|
loadNext(){
|
|
325
|
-
this.
|
|
323
|
+
this.socketEmit(`${this.model}.load`, {
|
|
326
324
|
preset: this.preset,
|
|
327
325
|
afterItem: this.items[this.items.length - 1]
|
|
328
326
|
}, (res) => {
|
|
@@ -331,8 +329,12 @@ export default{
|
|
|
331
329
|
})
|
|
332
330
|
},
|
|
333
331
|
|
|
332
|
+
onFocus(){
|
|
333
|
+
this.load()
|
|
334
|
+
},
|
|
335
|
+
|
|
334
336
|
savePreset: throttle(function(preset) {
|
|
335
|
-
this.
|
|
337
|
+
this.socketEmit('user.save-preset', { key:this.model, preset:{
|
|
336
338
|
presetIdx: this.presetIdx,
|
|
337
339
|
presets: this.presets
|
|
338
340
|
}}, (res) => {
|