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

Function genData

static/vuejs/vue.common.js:8623–8694  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

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

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