nav tabs on admin dashboard
This commit is contained in:
28
node_modules/vue-hot-reload-api/dist/index.js
generated
vendored
28
node_modules/vue-hot-reload-api/dist/index.js
generated
vendored
@@ -167,10 +167,16 @@ exports.rerender = tryWrap(function (id, options) {
|
||||
if (Array.isArray(instance.$options.cached)) {
|
||||
instance.$options.cached = []
|
||||
}
|
||||
|
||||
// post 2.5.4: v-once trees are cached on instance._staticTrees.
|
||||
// Pure static trees are cached on the staticRenderFns array
|
||||
// (both already reset above)
|
||||
|
||||
// 2.6: temporarily mark rendered scoped slots as unstable so that
|
||||
// child components can be forced to update
|
||||
var restore = patchScopedSlots(instance)
|
||||
instance.$forceUpdate()
|
||||
instance.$nextTick(restore)
|
||||
})
|
||||
} else {
|
||||
// functional or no instance created yet
|
||||
@@ -241,3 +247,25 @@ exports.reload = tryWrap(function (id, options) {
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// 2.6 optimizes template-compiled scoped slots and skips updates if child
|
||||
// only uses scoped slots. We need to patch the scoped slots resolving helper
|
||||
// to temporarily mark all scoped slots as unstable in order to force child
|
||||
// updates.
|
||||
function patchScopedSlots (instance) {
|
||||
if (!instance._u) { return }
|
||||
// https://github.com/vuejs/vue/blob/dev/src/core/instance/render-helpers/resolve-scoped-slots.js
|
||||
var original = instance._u
|
||||
instance._u = function (slots) {
|
||||
try {
|
||||
// 2.6.4 ~ 2.6.6
|
||||
return original(slots, true)
|
||||
} catch (e) {
|
||||
// 2.5 / >= 2.6.7
|
||||
return original(slots, null, true)
|
||||
}
|
||||
}
|
||||
return function () {
|
||||
instance._u = original
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user