form-create icon indicating copy to clipboard operation
form-create copied to clipboard

Cannot read properties of null

Open michelveloso opened this issue 3 years ago • 3 comments

Hi,

I cloned the "next" branch from the last commit: https://github.com/xaboy/form-create/commit/0d301463e3b6cf287b310bba70c794fd1aa5b418 and then I ran:

yarn install lerna bootstrap

And finally: yarn dev:ele

But I got a error when the project open in the browser:

image

image

Can you help me to solve this?

Regards

michelveloso avatar Sep 10 '22 18:09 michelveloso

Thanks for the feedback, what is the Vue version you are using? @michelveloso

xaboy avatar Sep 12 '22 14:09 xaboy

@xaboy this is my version:

"vue": "^3.2.38", "vite": "^3.0.9",

michelveloso avatar Sep 12 '22 15:09 michelveloso

If the component is not mounted globally, this needs to be declared in the setup @michelveloso

<template>
  <Fc :rule="rule"></Fc>
</template>
<script setup>
//Import form-create
import formCreate from "@form-create/element-ui";
//Get the formCreate component
const Fc = formCreate.$form();
const rule = [
  {
    type:'input',
    field:'goods_name',
    title:'商品名称',
    value:'form-create'
  },
];
</script>

xaboy avatar Sep 13 '22 01:09 xaboy