Table 特性 AutoGenerateClass 和 AutoGenerateColumn 优先级疑问 #3762
Answered
by
ArgoZhang
densen2014
asked this question in
Q&A
-
为了少写代码, 我整个类写了 AutoGenerateClass: Searchable = true, 但是某一字段我又不想给Searchable,于是写了AutoGenerateColumn: Searchable = false, 渲染出来这个列还是使用了AutoGenerateClass指定的特性, 应该怎么处理才合理呢?
表格渲染写上
貌似也没用 |
Beta Was this translation helpful? Give feedback.
Answered by
ArgoZhang
Jul 9, 2024
Replies: 3 comments 4 replies
-
@densen2014 我来复现一下 |
Beta Was this translation helpful? Give feedback.
2 replies
-
测试结果
|
Beta Was this translation helpful? Give feedback.
0 replies
-
上一版修改后. 继承 class 标签中设置的参数值, 当source.Sortable为false 并且 dest.Sortable = null , 不设置dest.Sortable = source.Sortable, 最终还是空. 应该为
才对吧 测试代码
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@densen2014 结案总结
只写了
AutoGenerateClassAttribute
以其参数值为准只写了
AutoGenerateColumnAttribute
以其参数值为准写了
AutoGenerateClassAttribute
并且写了AutoGenerateColumnAttribute
合并两者参数值取其默认值的相反值举例
Filterable
其默认值为false
AutoGenerateClassAttribute
设置Filterable="true"
AutoGenerateColumnAttribute
设置Filterable="false"
最终 UI 取值true
AutoGenerateClassAttribute
设置Filterable="false"
AutoGenerateColumnAttribute
设置Filterable="true"
最终 UI 取值true
写了
TableColumn
参数值情况如下最新更新
TableColumn
的Filterable
更改为可为空数据类型,其默认值由原来的false
更改为null
,可由此判断,只要TableColumn
的参数Filterable
值不为空,即以TableColumn
值为最终 UI 值