Closed dddpt closed 1 year ago
vue@2
works with vue-schema-based-json-editor@7
, or you will get _cache is undefined
.
Here is vue@2 demo link: https://github.com/plantain-00/schema-based-json-editor/blob/19affa34c3c47d26a6120e649c6f0cc05bc58e9f/packages/vue/demo/index.ts
HI plantain-00,
Thanks for the quick reaction time!
I tried with version vue-schema-based-json-editor@7
and in my example I get the single html comment <!---->
where the <json-editor>
should appear.
I am not familiar with typescript so unable to reproduce the demo. Here is the whole folder for my example: schema-editor-minimal.zip.
If you may look into it, it'd be great!
To install dependencies and run:
npm i
yarn run dev
Your schema seems wrong, If you want object with field numberExample
, it should be:
{
"type": "object",
"properties": {
"numberExample": {
"type": "number",
"title": "A number example",
"description": "a number description example",
"default": 123.4,
"minimum": 10,
"exclusiveMinimum": true,
"maximum": 1000,
"exclusiveMaximum": true
}
}
}
If you want a number, it should be:
{
"type": "number",
"title": "A number example",
"description": "a number description example",
"default": 123.4,
"minimum": 10,
"exclusiveMinimum": true,
"maximum": 1000,
"exclusiveMaximum": true
}
Great, thanks for your answer it's working now! Looking forward to playing around with it ;-)
Hi all!
First thanks for the promising package, I would love to use it but sadly I don't succeed in having the simplest example work. I am new to Vue, so maybe I am doing some newbie error. Let me know, happy to learn!
Version: 8.3.0 (also tested on 7)
package.json
:Code:
App.vue
:main.js
:Expected:
The number example editor appear as in the demo
Actual:
The editor does not appear, with two possible results:
<!---->
where the<json-editor>
should appear,TypeError: _cache is undefined
error stemming from someindexTemplateHtml
JS object, stacktrace shown below.I have not exactly figured out why I don't always get the same result.
Stacktrace:
What's my problem? Did I miss something? is it linked to some weird
ts
tojs
transpilation issue?