Every line of 'vue script import' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
89 addModule: function addModule(vuet, path) { 90 vuet[NAME][path] = []; 91 if (!util.isObject(vuet.getModule(path).route)) { 92 vuet.getModule(path).route = {}; 93 } 94 },
8 function $import(location, cb, component) { 9 return System.import('./containers/' + component) // eslint-disable-line 10 .then(module => cb(null, module.default)) 11 .catch(err => console.error('Dynamic page loading failed', err)); // eslint-disable-line 12 }
105 function extractFromVueScript(script_block) { 106 const lang = script_block.lang !== null ? script_block.lang : "js"; 107 const scriptKind = lang === "ts" ? ts.ScriptKind.TS : ts.ScriptKind.JS; 108 109 gettext_parser.parseString(script_block.content, undefined, { 110 scriptKind, 111 }); 112 }
101 var getVueScript = function getVueScript(js, html) { 102 var scripts = js.split(/export\s+default/); 103 var scriptStrOrg = "(function() {".concat(scripts[0], " ; return ").concat(scripts[1], "})()"); 104 var scriptStr = window.Babel ? window.Babel.transform(scriptStrOrg, { 105 presets: ['es2015'] 106 }).code : scriptStrOrg; 107 var scriptObj = [eval][0](scriptStr); 108 scriptObj.template = html; 109 return scriptObj; 110 };
14 function createApp(script, defaults) { 15 if (defaults.options.vue && defaults.options.vue.mixins) { 16 if (defaults.options.vue.mixins.length > 0) { 17 for (let mixin of defaults.options.vue.mixins) { 18 Vue.mixin(mixin); 19 } 20 } 21 } 22 23 return new Vue(script); 24 }
10 function install(Vue, options) { 11 Vue.component("uib-pagination", { 12 data, 13 props, 14 watch, 15 methods, 16 template, 17 computed, 18 directives 19 }); 20 }
3 export function install(Vue, options) { 4 options = options || {} 5 6 Vue.component('medium', { 7 template: '<div></div>', 8 9 props: ['value'], 10 11 data: () => ({ 12 localValue: '', 13 }), 14 15 mounted: function() { 16 this.localValue = this.value 17 18 new MediumEditor(this.$el, Object.assign({ 19 placeholder: { 20 text: this.value ? '' : 'Type your text', 21 }, 22 }, options)) 23 }, 24 25 methods: { 26 updateValue: function(event) { 27 this.$emit('input', event.target.innerHTML) 28 }, 29 }, 30 }) 31 }
9 dependencies() { 10 let dependencies = ['vue-template-compiler']; 11 12 if (Config.extractVueStyles && Config.globalVueStyles) { 13 dependencies.push('sass-resources-loader'); 14 } 15 16 return dependencies; 17 }
45 return function install(Vue, data) { 46 var store = new Vue(Store); 47 48 store.data = data; 49 50 Object.defineProperties(Vue.prototype, { 51 $store: { 52 get () { 53 store.__ctx = this; 54 55 return store; 56 } 57 } 58 }); 59 }
7 export function install(Vue) { 8 if (install.installed) return; 9 install.installed = true; 10 components.forEach((component) => { 11 Vue.component(component.name, component); 12 }); 13 }