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

Function transformModel

static/vuejs/vue.runtime.common.js:3249–3258  ·  view source on GitHub ↗
(options, data)

Source from the content-addressed store, hash-verified

3247// transform component v-model info (value and callback) into
3248// prop and event handler respectively.
3249function transformModel (options, data) {
3250 var prop = (options.model && options.model.prop) || 'value';
3251 var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;
3252 var on = data.on || (data.on = {});
3253 if (on[event]) {
3254 on[event] = [data.model.callback].concat(on[event]);
3255 } else {
3256 on[event] = data.model.callback;
3257 }
3258}
3259
3260/* */
3261

Callers 1

createComponentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected