Giter VIP home page Giter VIP logo

Comments (10)

rayle2 avatar rayle2 commented on July 29, 2024

同样问题

from form-create-designer.

thpngj avatar thpngj commented on July 29, 2024

@xaboy 编辑数据的 Struct 组件的确有问题;

  1. 第一次写入数据后点 确定也保存了,但第二次打开后什么不都改,再点确定就会提示格式错误,只好把内容全部删掉,重新来一次;
    1. 自定义组件,想用这个 Struct 编辑器 来编辑 on 属性,就写了很简单的 alert(123)点确定后 再次打开编辑器,这个编辑器把我写的内容全都改了~ 我自己写的 alert(123) 都不知道弄哪儿了~!
      WX20230317-165103@2x
      WX20230317-165130@2x

from form-create-designer.

xaboy avatar xaboy commented on July 29, 2024

那个版本 @thpngj

from form-create-designer.

thpngj avatar thpngj commented on July 29, 2024

@xaboy vue2 ,vue3 都有相同的问题,你有空可以看一下 文档上面的示例~http://form-create.com/v3/designer

from form-create-designer.

xaboy avatar xaboy commented on July 29, 2024

请问这个问题如何复现, 这边测试了下,没有复现 @thpngj

from form-create-designer.

thpngj avatar thpngj commented on July 29, 2024

WX20230317-174227@2x
随便找个组件,然后点击 联动数据 - 编辑数据,把数据输入后点确定,正常,然后再次点击 联动数据 - 编辑数据 ,什么都不改动,就点击确定 就会提示 格式错误
WX20230317-174252@2x

这个问题一直都会有~

第二个问题是: 我自定义一个按钮组件,想编辑 这个组件的 on 属性,需要用到这个 Struct 组件 编辑器,但我 编辑好数据之后,点击确定保存后 ,再次点击编辑, 弹出编辑框后,显示的内容却不是 我之前输入的内容 … 这一块儿也不知道该如何处理~
@xaboy

from form-create-designer.

thpngj avatar thpngj commented on July 29, 2024

@xaboy 格式有误的问题找到原因了,编辑框确定后对数据进行了转换(toJson),把格式给转换错了, 但目前即不知道如何解决;
WX20230317-232634@2x
WX20230317-233207@2x

第二个问题的原因也找到了,但不知道该如何解决,我在编辑框内输入的 { click:function(a){} } 转换成了一堆不认识的代码是因为,我在 组件的属性上开启了事件注入inject:true ,所以点击确定保存后 经过 toJson 转换成了一堆并不是我写入的内容
WX20230317-234905@2x
WX20230317-235122@2x
以上两个问题 应该都是 代码编辑框保存 toJSON 转换的问题~

from form-create-designer.

thpngj avatar thpngj commented on July 29, 2024

@xaboy 以上两个问题已经解决, 第1个: 编辑后 第一次可以正常保存, 然后再打开,就会提示出错,的确是 tojson 转换的问题,所以 在编辑框内输入的 function 方法 或是 对象 不要用 es6 那种简写,老老实实 正常 es5 老写法, 然后就是 点击确定保存 的时候 先让 err 的状态为 false ,之后再去做 验证 是否正确,因为 没有详细去找如何 监听编辑框的 change事件,所以 暂时 改了 点击保存的 验证 , 第2个问题:自定义 on 属性, 是看到 _control 属性(数据联动)的启发, 我也弄了个 _on 事件, 之后再处理 相关 rule 赋值问题~ 折腾了个通宵 加一上午 ,汗~

from form-create-designer.

xaboy avatar xaboy commented on July 29, 2024

感谢反馈 @thpngj

  1. tojson和err状态的问题,下个版本修复.
  2. 第二个用_on来配置这个思路是正确的, 实现后欢迎PR

from form-create-designer.

xaboy avatar xaboy commented on July 29, 2024

1.0.10版本已修复 @thpngj

from form-create-designer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.