update:修复表格初始化后有筛选条件,data-id从1开始递增的问题 #136
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
若后台保存筛选条件,将筛选条件传回前端,对组件进行初始化时将筛选条件设置进去,则点击编辑筛选条件 --> 添加条件 时li标签上的data-id是从1开始计算的,这样就不是全局唯一了。修改后在表格第一次加载时若已经存在筛选条件,则从该筛选条件数据中id的最大值+1作为新增筛选条件行的li标签的data-id,从而实现已经存在筛选条件时也能全局唯一id,而不是从1开始进行计算。因为maxId默认值是1