vfg-field-sourcecode
A source code field for vue-form-generator
Example
<template>
<vue-form-generator :schema="schema" :model="model"></vue-form-generator>
</template>
<script>
export default {
data() {
return {
model: {
source: `<template></template>`
},
schema: {
fields: [{
type: "sourcecode",
label: "source code",
model: "source"
}]
}
};
}
};
</script>
Installation
npm install vfg-field-sourcecode
vfg-field-sourcecode can be used as a module in both CommonJS and ES modular environments.
When in non-modular environment, vfg-field-sourcecode will register all the components to vue by itself.
ES6
//// You can register a component manually//; ... components: 'field-sourcecode': FieldSourcecode ...; //// or register the whole module with vue//; // Install this libraryVue;
CommonJS
//// You can register a component manually//var Vue = ;var ModuleLibrary = ; var YourComponent = Vue; //// or register the whole module with vue//var Vue = ;var ModuleLibrary = ; // Install this libraryVue;
Browser
<!-- Components are registered globally -->
After that, you can use it with Vue Form Generator:
schema:
Changelog
See the GitHub release history.
Contributing
See CONTRIBUTING.md.