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

按钮文字根据状态改变 #62

Closed
PPPenny opened this issue Mar 24, 2019 · 4 comments
Closed

按钮文字根据状态改变 #62

PPPenny opened this issue Mar 24, 2019 · 4 comments

Comments

@PPPenny
Copy link
Contributor

PPPenny commented Mar 24, 2019

extraButtons,配置项里面,可以设置:text字段接收多种方式吗?比如接收一个方法,执行方法,而不是让方法变成字符串显示在页面上

@2nthony
Copy link
Member

2nthony commented Mar 25, 2019

如果是函数,除了接收当前行的表格数据,还有什么参数建议吗😊

@PPPenny
Copy link
Contributor Author

PPPenny commented Mar 25, 2019

具体情况具体分析吧,参数的话,我写的时候,只用到这一行的数据。
其他的tips:
1:新增、修改和查看用的同一个form。最大的问题就是,当新增和查看的字段不一样的时候。比如:新增和修改的时候,不需要日期,会在生成这个数据的时候直接带上日期。但是查看,就要看到创建时间和更新时间了。
2:新增和修改如何动态的展示。如:选择省市,先选择了省才能选择市,这些约束如何实现。
3:url不填写,就会报个warning,如果数据不是你们要求的格式,我们要转一次才能传过去呀,强迫症,不想看到警告。
4:更新维护哈接口文档吧,感谢大佬。
5:按钮能增加其他属性不?比如类名,因为设计小姐姐并不是按照UI库来的,还有需要些伪类样式来实现。

@2nthony
Copy link
Member

2nthony commented Mar 25, 2019

😇

文笔水平有限请谅解. 这几项提议个人感觉都很好🤔

Hi,根据目前版本的情况,列一些可能不是最优的解决方法: (至于其他功能性的问题需要跟 巨佬们 请示/讨论)

2:假设你的是表单联动问题,此表格组件内使用的表单组件是团队定制版的el-form-renderer

可以参考一下content[].$enableWhen用法

// 大意为 `上下九` 只会在 `province === 'Guangdong'` 时才会可操作
[
  {
    label: '上下九',
    $enableWhen: {
      province: 'Guangdong'
    }
  }
]

5:headerButtonsextraButtons 两者暂不支持其他原生属性,但支持el-button的属性

{
  type: 'primary',
  text: '附加按钮1'
}

@lianghx-319
Copy link
Member

lianghx-319 commented Apr 23, 2019

数据格式是前后端约定好的。建议前端后统一规范

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

3 participants