| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -36,22 +36,25 @@ const Group = { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  }, | 
					 | 
					 | 
					 | 
					  }, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  watch: { | 
					 | 
					 | 
					 | 
					  watch: { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    'values': function (newVal, oldVal) { | 
					 | 
					 | 
					 | 
					    'values': function (value) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      // 此条件是为解决单选时,触发两次chang事件问题 | 
					 | 
					 | 
					 | 
					      this.$emit('change', value) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      if (!(newVal.length === 1 && oldVal.length === 1 && newVal[0] === oldVal[0])) { | 
					 | 
					 | 
					 | 
					      // // 此条件是为解决单选时,触发两次chang事件问题 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.$emit('change', this.values) | 
					 | 
					 | 
					 | 
					      // if (!(newVal.length === 1 && oldVal.length === 1 && newVal[0] === oldVal[0])) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      } | 
					 | 
					 | 
					 | 
					      //   this.$emit('change', this.values) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      // } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  }, | 
					 | 
					 | 
					 | 
					  }, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  methods: { | 
					 | 
					 | 
					 | 
					  methods: { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    handleChange (option) { | 
					 | 
					 | 
					 | 
					    handleChange (option) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      if (!option.checked) { | 
					 | 
					 | 
					 | 
					      if (!option.checked) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.values = this.values.filter(item => item !== option.value) | 
					 | 
					 | 
					 | 
					        if (this.values.indexOf(option.value) > -1) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					          this.values = this.values.filter(item => item != option.value) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      } else { | 
					 | 
					 | 
					 | 
					      } else { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (!this.multiple) { | 
					 | 
					 | 
					 | 
					        if (!this.multiple) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          this.values = [option.value] | 
					 | 
					 | 
					 | 
					          this.values = [option.value] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          this.options.forEach(item => { | 
					 | 
					 | 
					 | 
					          this.options.forEach(item => { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (item.value !== option.value) { | 
					 | 
					 | 
					 | 
					            if (item.value != option.value) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					              item.sChecked = false | 
					 | 
					 | 
					 | 
					              item.sChecked = false | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          }) | 
					 | 
					 | 
					 | 
					          }) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -92,7 +95,7 @@ export default { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  }, | 
					 | 
					 | 
					 | 
					  }, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  data () { | 
					 | 
					 | 
					 | 
					  data () { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return { | 
					 | 
					 | 
					 | 
					    return { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      sChecked: this.checked | 
					 | 
					 | 
					 | 
					      sChecked: this.initChecked() | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  }, | 
					 | 
					 | 
					 | 
					  }, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  inject: ['groupContext'], | 
					 | 
					 | 
					 | 
					  inject: ['groupContext'], | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -118,7 +121,19 @@ export default { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  }, | 
					 | 
					 | 
					 | 
					  }, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  methods: { | 
					 | 
					 | 
					 | 
					  methods: { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    toggle () { | 
					 | 
					 | 
					 | 
					    toggle () { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      this.sChecked = !this.sChecked | 
					 | 
					 | 
					 | 
					      if (this.groupContext.multiple || !this.sChecked) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        this.sChecked = !this.sChecked | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    }, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    initChecked() { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      let groupContext = this.groupContext | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      if (!groupContext) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        return this.checked | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      }else if (groupContext.multiple) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        return groupContext.defaultValues.indexOf(this.value) > -1 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      } else { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        return groupContext.defaultValues[0] == this.value | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  } | 
					 | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |