Commit e09a797d05a7b19fb675b774f08a887f972d7a81

Authored by cn.shperry
Committed by GitHub
1 parent 8a7d9bcd

types: 缩减 setup script 警告 & 修复表格列设置组件中部分方法参数类型错误. (#1980)

Co-authored-by: 舒培培 <622292@ky-tech.com.cn>
.vscode/settings.json
... ... @@ -135,5 +135,8 @@
135 135 "sider",
136 136 "pnpm",
137 137 "antd"
138   - ]
  138 + ],
  139 + "vetur.format.scriptInitialIndent": true,
  140 + "vetur.format.styleInitialIndent": true,
  141 + "vetur.validation.script": false
139 142 }
... ...
src/components/Table/src/components/settings/ColumnSetting.vue
... ... @@ -111,6 +111,7 @@
111 111 computed,
112 112 } from 'vue';
113 113 import { Tooltip, Popover, Checkbox, Divider } from 'ant-design-vue';
  114 + import type { CheckboxChangeEvent } from 'ant-design-vue/lib/checkbox/interface';
114 115 import { SettingOutlined, DragOutlined } from '@ant-design/icons-vue';
115 116 import { Icon } from '/@/components/Icon';
116 117 import { ScrollContainer } from '/@/components/Container';
... ... @@ -243,7 +244,7 @@
243 244 }
244 245  
245 246 // checkAll change
246   - function onCheckAllChange(e: ChangeEvent) {
  247 + function onCheckAllChange(e: CheckboxChangeEvent) {
247 248 const checkList = plainOptions.value.map((item) => item.value);
248 249 if (e.target.checked) {
249 250 state.checkedList = checkList;
... ... @@ -330,14 +331,14 @@
330 331 }
331 332  
332 333 // Control whether the serial number column is displayed
333   - function handleIndexCheckChange(e: ChangeEvent) {
  334 + function handleIndexCheckChange(e: CheckboxChangeEvent) {
334 335 table.setProps({
335 336 showIndexColumn: e.target.checked,
336 337 });
337 338 }
338 339  
339 340 // Control whether the check box is displayed
340   - function handleSelectCheckChange(e: ChangeEvent) {
  341 + function handleSelectCheckChange(e: CheckboxChangeEvent) {
341 342 table.setProps({
342 343 rowSelection: e.target.checked ? defaultRowSelection : undefined,
343 344 });
... ...