0.1.5 • Published 7 months ago

@sourcedigital/jsonforms-vue2-quasar-v1 v0.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

JSON Forms - Vue.js 2 + Quasar v1 renderers

This is the JSON Forms Vue 2 Quasar v1 renderers package which provides a Quasar based renderer set for JSON Forms Vue 2.

Please note that JSON Forms dropped support for Vue 2, and their version 3.1.0 is the last version that supports Vue 2. Also, as JSON Forms uses the Composition API you need to use at least Vue 2.7.

Quick start

Install JSON Forms Core, Vue 2 and Quasar v1 Renderers.

npm i --save @jsonforms/core@3.1.0 @jsonforms/vue2@3.1.0 @sourcedigital/jsonforms-vue2-quasar-v1

Also add the packages to the transpile dependencies in the quasar.conf.js file:

module.exports = {
    transpileDependencies: ['@jsonforms/core', '@jsonforms/vue2', '@sourcedigital/jsonforms-vue2-quasar-v1']
}

Use the json-forms component for each form you want to render and hand over the renderer set.

<script>
import { JsonForms } from '@jsonforms/vue2';
import { quasarRenderers } from '@sourcedigital/jsonforms-vue2-quasar-v1'';

const renderers = [
  ...quasarRenderers,
  // here you can add custom renderers
];

export default defineComponent({
  name: 'app',
  components: {
    JsonForms,
  },
  data() {
    return {
      renderers: Object.freeze(renderers),
      data,
      schema,
      uischema,
    };
  },
  methods: {
    onChange(event) {
      this.data = event.data;
    },
  },
});
</script>

<template>
  <json-forms
    :data="data"
    :schema="schema"
    :uischema="uischema"
    :renderers="renderers"
    @change="onChange"
  />
</template>
0.1.5

7 months ago

0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago