mirror of https://github.com/requarks/wiki
parent
d02b4a3591
commit
1d8285fb6a
@ -0,0 +1,28 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible Node.js debug attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"name": "Attach (Inspector Protocol)",
|
||||
"port": 9229,
|
||||
"protocol": "inspector"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Program",
|
||||
"program": "${workspaceRoot}\\server.js"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"name": "Attach to Port",
|
||||
"address": "localhost",
|
||||
"port": 9222
|
||||
}
|
||||
]
|
||||
}
|
@ -1,9 +1,39 @@
|
||||
'use strict'
|
||||
|
||||
import $ from 'jquery'
|
||||
import Vue from 'vue'
|
||||
import _ from 'lodash'
|
||||
|
||||
module.exports = (alerts, socket) => {
|
||||
if ($('#page-type-all').length) {
|
||||
|
||||
let vueAllPages = new Vue({ // eslint-disable-line no-unused-vars
|
||||
el: '#page-type-all',
|
||||
data: {
|
||||
tree: []
|
||||
},
|
||||
methods: {
|
||||
fetch: function (basePath) {
|
||||
let self = this
|
||||
$('#notifload').addClass('active')
|
||||
Vue.nextTick(() => {
|
||||
socket.emit('treeFetch', { basePath }, (data) => {
|
||||
if (self.tree.length > 0) {
|
||||
let curTree = _.last(self.tree)
|
||||
curTree.hasChildren = true
|
||||
_.find(curTree.pages, { _id: basePath }).isActive = true
|
||||
}
|
||||
self.tree.push({
|
||||
hasChildren: false,
|
||||
pages: data
|
||||
})
|
||||
$('#notifload').removeClass('active')
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
this.fetch('')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue