MCPcopy Create free account
hub / github.com/TruthHun/BookStack / genData

Function genData

static/vuejs/vue.esm.js:8621–8692  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

8619}
8620
8621function genData (el) {
8622 var data = '{';
8623
8624 // directives first.
8625 // directives may mutate the el's other properties before they are generated.
8626 var dirs = genDirectives(el);
8627 if (dirs) { data += dirs + ','; }
8628
8629 // key
8630 if (el.key) {
8631 data += "key:" + (el.key) + ",";
8632 }
8633 // ref
8634 if (el.ref) {
8635 data += "ref:" + (el.ref) + ",";
8636 }
8637 if (el.refInFor) {
8638 data += "refInFor:true,";
8639 }
8640 // pre
8641 if (el.pre) {
8642 data += "pre:true,";
8643 }
8644 // record original tag name for components using "is" attribute
8645 if (el.component) {
8646 data += "tag:\"" + (el.tag) + "\",";
8647 }
8648 // module data generation functions
8649 for (var i = 0; i < dataGenFns.length; i++) {
8650 data += dataGenFns[i](el);
8651 }
8652 // attributes
8653 if (el.attrs) {
8654 data += "attrs:{" + (genProps(el.attrs)) + "},";
8655 }
8656 // DOM props
8657 if (el.props) {
8658 data += "domProps:{" + (genProps(el.props)) + "},";
8659 }
8660 // event handlers
8661 if (el.events) {
8662 data += (genHandlers(el.events)) + ",";
8663 }
8664 if (el.nativeEvents) {
8665 data += (genHandlers(el.nativeEvents, true)) + ",";
8666 }
8667 // slot target
8668 if (el.slotTarget) {
8669 data += "slot:" + (el.slotTarget) + ",";
8670 }
8671 // scoped slots
8672 if (el.scopedSlots) {
8673 data += (genScopedSlots(el.scopedSlots)) + ",";
8674 }
8675 // component v-model
8676 if (el.model) {
8677 data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
8678 }

Callers 2

genElementFunction · 0.70
genComponentFunction · 0.70

Calls 5

genDirectivesFunction · 0.70
genPropsFunction · 0.70
genHandlersFunction · 0.70
genScopedSlotsFunction · 0.70
genInlineTemplateFunction · 0.70

Tested by

no test coverage detected