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

Function updateChildComponent

static/vuejs/vue.runtime.esm.js:2168–2221  ·  view source on GitHub ↗
(
  vm,
  propsData,
  listeners,
  parentVnode,
  renderChildren
)

Source from the content-addressed store, hash-verified

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

Callers 1

vue.runtime.esm.jsFile · 0.70

Calls 3

validatePropFunction · 0.70
updateComponentListenersFunction · 0.70
resolveSlotsFunction · 0.70

Tested by

no test coverage detected