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

Function transformModel

static/vuejs/vue.esm.js:3251–3260  ·  view source on GitHub ↗
(options, data)

Source from the content-addressed store, hash-verified

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

Callers 1

createComponentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected