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

Function transformModel

static/vuejs/vue.js:3253–3262  ·  view source on GitHub ↗
(options, data)

Source from the content-addressed store, hash-verified

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

Callers 1

createComponentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected