Giter VIP home page Giter VIP logo

Comments (12)

thpngj avatar thpngj commented on July 29, 2024 1

多谢大佬提示,我已经给解决了!不知道这么写是否规范,效果是正常了~
WX20230228-103627@2x
@xaboy

from form-create-designer.

Ghjsw avatar Ghjsw commented on July 29, 2024

@xaboy 大佬抽空帮忙瞅瞅

from form-create-designer.

thpngj avatar thpngj commented on July 29, 2024

我也发现了这个问题~但input输入框是正常的,其他的貌似不正常,但预览的时候却是会显示 红色 * 号的,也有验证

from form-create-designer.

thpngj avatar thpngj commented on July 29, 2024

经过分析源码发现了这个问题的原因是 是否必填 开启后,只有点预览的时候才会显示,是因为点击预览后又重新获取了一下rule,而中间的设计区域并不会重新获取rule,所以不会出现 红色的星号,但 如果选择 右栏最下面的 验证,选择成必填后,中间的设计区域 又会出现 红色星号,所以和是不是重新获取rule 无关, 觉得应该是 某处的代码写错导致的, 最后发现 开启必填项后 field 为 formCreate$Required,源码是把前面的 fromCreate给替换成空,变成了 "$Required",输出 rule 后 多了个 "$Required":true 的属性,是不是没有把 "$" 符去掉的原因?文档上面这个必填项是在 effect 对象里面的, 我试着把 "$" 符去掉,直接赋值 貌似不行,忘大佬赐教~!
WX20230227-223802@2x

from form-create-designer.

thpngj avatar thpngj commented on July 29, 2024

@xaboy 大佬看到回一下,让我也有个修改方向~

from form-create-designer.

xaboy avatar xaboy commented on July 29, 2024

这个问题因为没有在 rule 中预定义 required 自定义属性导致的, 因为没有预定义所以当他变化有没有触发事件. 下个版本我优化一下 @thpngj

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

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

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
WX20230404-164855@2x
1680598233836
WX20230404-165142@2x
WX20230404-165240@2x
不知道如何解决这两者的冲突,我现在暂时把 props里面的 makeRequiredRule() 给屏蔽了,使用的时候就用 验证规则 配置的~

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.