为什么要清空选中列表?
This commit is contained in:
		
							parent
							
								
									27e4a48bd6
								
							
						
					
					
						commit
						05e5b84c5c
					
				@ -733,7 +733,6 @@ const _sfc_main = defineComponent({
 | 
			
		||||
    const slot = useSlots();
 | 
			
		||||
    slot.default && slot.default();
 | 
			
		||||
    const tableRef = ref();
 | 
			
		||||
    const s = "";
 | 
			
		||||
    const allChecked = ref(false);
 | 
			
		||||
    const hasChecked = ref(false);
 | 
			
		||||
    const tableDataSource = ref([...props.dataSource]);
 | 
			
		||||
@ -840,8 +839,6 @@ const _sfc_main = defineComponent({
 | 
			
		||||
    });
 | 
			
		||||
    watch(() => props.dataSource, () => {
 | 
			
		||||
      tableDataSource.value = [...props.dataSource];
 | 
			
		||||
      tableSelectedKeys.value = [];
 | 
			
		||||
      tableSelectedKey.value = s;
 | 
			
		||||
    }, { deep: true });
 | 
			
		||||
    const changeAll = (isChecked) => {
 | 
			
		||||
      if (isChecked) {
 | 
			
		||||
 | 
			
		||||
@ -19151,7 +19151,6 @@ const _sfc_main$D = defineComponent({
 | 
			
		||||
    const slot = useSlots();
 | 
			
		||||
    slot.default && slot.default();
 | 
			
		||||
    const tableRef = ref();
 | 
			
		||||
    const s = "";
 | 
			
		||||
    const allChecked = ref(false);
 | 
			
		||||
    const hasChecked = ref(false);
 | 
			
		||||
    const tableDataSource = ref([...props.dataSource]);
 | 
			
		||||
@ -19258,8 +19257,6 @@ const _sfc_main$D = defineComponent({
 | 
			
		||||
    });
 | 
			
		||||
    watch(() => props.dataSource, () => {
 | 
			
		||||
      tableDataSource.value = [...props.dataSource];
 | 
			
		||||
      tableSelectedKeys.value = [];
 | 
			
		||||
      tableSelectedKey.value = s;
 | 
			
		||||
    }, { deep: true });
 | 
			
		||||
    const changeAll = (isChecked) => {
 | 
			
		||||
      if (isChecked) {
 | 
			
		||||
 | 
			
		||||
@ -264,8 +264,9 @@ watch(
 | 
			
		||||
  () => props.dataSource,
 | 
			
		||||
  () => {
 | 
			
		||||
    tableDataSource.value = [...props.dataSource];
 | 
			
		||||
    tableSelectedKeys.value = [];
 | 
			
		||||
    tableSelectedKey.value = s;
 | 
			
		||||
    // 为什么修改数据就要把选中清空? 我要清空不会自己清吗?
 | 
			
		||||
    // tableSelectedKeys.value = [];
 | 
			
		||||
    // tableSelectedKey.value = s;
 | 
			
		||||
  },
 | 
			
		||||
  { deep: true }
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user