MCPcopy Index your code
hub / github.com/TruthHun/BookStack / updateChildComponent

Function updateChildComponent

static/vuejs/vue.js:2178–2231  ·  view source on GitHub ↗
(
  vm,
  propsData,
  listeners,
  parentVnode,
  renderChildren
)

Source from the content-addressed store, hash-verified

2176}
2177
2178function updateChildComponent (
2179 vm,
2180 propsData,
2181 listeners,
2182 parentVnode,
2183 renderChildren
2184) {
2185 // determine whether component has slot children
2186 // we need to do this before overwriting $options._renderChildren
2187 var hasChildren = !!(
2188 renderChildren || // has new static slots
2189 vm.$options._renderChildren || // has old static slots
2190 parentVnode.data.scopedSlots || // has new scoped slots
2191 vm.$scopedSlots !== emptyObject // has old scoped slots
2192 );
2193
2194 vm.$options._parentVnode = parentVnode;
2195 vm.$vnode = parentVnode; // update vm's placeholder node without re-render
2196 if (vm._vnode) { // update child tree's parent
2197 vm._vnode.parent = parentVnode;
2198 }
2199 vm.$options._renderChildren = renderChildren;
2200
2201 // update props
2202 if (propsData && vm.$options.props) {
2203 observerState.shouldConvert = false;
2204 {
2205 observerState.isSettingProps = true;
2206 }
2207 var props = vm._props;
2208 var propKeys = vm.$options._propKeys || [];
2209 for (var i = 0; i < propKeys.length; i++) {
2210 var key = propKeys[i];
2211 props[key] = validateProp(key, vm.$options.props, propsData, vm);
2212 }
2213 observerState.shouldConvert = true;
2214 {
2215 observerState.isSettingProps = false;
2216 }
2217 // keep a copy of raw propsData
2218 vm.$options.propsData = propsData;
2219 }
2220 // update listeners
2221 if (listeners) {
2222 var oldListeners = vm.$options._parentListeners;
2223 vm.$options._parentListeners = listeners;
2224 updateComponentListeners(vm, listeners, oldListeners);
2225 }
2226 // resolve slots + force update if has children
2227 if (hasChildren) {
2228 vm.$slots = resolveSlots(renderChildren, parentVnode.context);
2229 vm.$forceUpdate();
2230 }
2231}
2232
2233function isInInactiveTree (vm) {
2234 while (vm && (vm = vm.$parent)) {

Callers 1

vue.jsFile · 0.70

Calls 3

validatePropFunction · 0.70
updateComponentListenersFunction · 0.70
resolveSlotsFunction · 0.70

Tested by

no test coverage detected