Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议文档写全面点,要不加上备注,实在太难懂了 #68

Open
qidizi opened this issue Mar 13, 2014 · 1 comment
Open

建议文档写全面点,要不加上备注,实在太难懂了 #68

qidizi opened this issue Mar 13, 2014 · 1 comment

Comments

@qidizi
Copy link

qidizi commented Mar 13, 2014

当我看到演示的自动渲染的用法时,以为它们的触发就代码逻辑上简单的看到是控件就绑定上触发事件,然后有问题时会自动在旁边建立提示dom或是使用tip的形态,

然后form就是随意的form,只需要加上autorender就ok了,可是我还是理解错了,

这些文档感觉作者是把用者建立在熟悉了代码的前提下,把继承关系说了一下而已.
不是一个全面的文档.

从代码中看到才明白事件触发是绑定在一些具有默认类名的dom下的控件上如果没有校验事件是不会触发的

 events: {
      'mouseenter .{{attrs.inputClass}}': 'mouseenter',
      'mouseleave .{{attrs.inputClass}}': 'mouseleave',
      'mouseenter .{{attrs.textareaClass}}': 'mouseenter',
      'mouseleave .{{attrs.textareaClass}}': 'mouseleave',
      'focus .{{attrs.itemClass}} input,textarea,select': 'focus',
      'blur .{{attrs.itemClass}} input,textarea,select': 'blur'
    },

    attrs: {
      explainClass: 'ui-form-explain',
      itemClass: 'ui-form-item',
      itemHoverClass: 'ui-form-item-hover',
      itemFocusClass: 'ui-form-item-focus',
      itemErrorClass: 'ui-form-item-error',
      inputClass: 'ui-input',
      textareaClass: 'ui-textarea',

下面是通过data-api的方式来重写绑定类名...

    <form id="test-form" class="ui-formd" data-widget="validator" data-item-class='ui-form-itemd' >

建议文档都在上面明显的写着:请在看文档前把代码看透再使用.

@lifesinger
Copy link
Member

非常感谢建议,我们会持续完善。同时非常欢迎你直接加入进来修改文档,pull request 给我们就好。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants