qfw
This commit is contained in:
		
							parent
							
								
									145ff44277
								
							
						
					
					
						commit
						ad671dc37b
					
				@ -142,8 +142,14 @@ const _sfc_main = defineComponent({
 | 
			
		||||
      if (props.type === "number") {
 | 
			
		||||
        onNumberBlur(event);
 | 
			
		||||
      }
 | 
			
		||||
      console.log("\u6DFB\u52A0\uFF0C", new String(props.modelValue).toLocaleString());
 | 
			
		||||
      currentValue.value = new String(props.modelValue).toLocaleString();
 | 
			
		||||
      if (props.qfw) {
 | 
			
		||||
        try {
 | 
			
		||||
          console.log("\u6DFB\u52A0\uFF0C", new Number(props.modelValue).toLocaleString());
 | 
			
		||||
          currentValue.value = new Number(props.modelValue).toLocaleString();
 | 
			
		||||
        } catch {
 | 
			
		||||
          currentValue.value = "\u8F93\u5165\u9519\u8BEF";
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      emit("blur", event);
 | 
			
		||||
    };
 | 
			
		||||
    const onNumberBlur = (event) => {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										10
									
								
								lib/index.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								lib/index.js
									
									
									
									
									
								
							@ -11238,8 +11238,14 @@ const _sfc_main$1v = defineComponent({
 | 
			
		||||
      if (props.type === "number") {
 | 
			
		||||
        onNumberBlur(event);
 | 
			
		||||
      }
 | 
			
		||||
      console.log("\u6DFB\u52A0\uFF0C", new String(props.modelValue).toLocaleString());
 | 
			
		||||
      currentValue.value = new String(props.modelValue).toLocaleString();
 | 
			
		||||
      if (props.qfw) {
 | 
			
		||||
        try {
 | 
			
		||||
          console.log("\u6DFB\u52A0\uFF0C", new Number(props.modelValue).toLocaleString());
 | 
			
		||||
          currentValue.value = new Number(props.modelValue).toLocaleString();
 | 
			
		||||
        } catch {
 | 
			
		||||
          currentValue.value = "\u8F93\u5165\u9519\u8BEF";
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      emit("blur", event);
 | 
			
		||||
    };
 | 
			
		||||
    const onNumberBlur = (event) => {
 | 
			
		||||
 | 
			
		||||
@ -116,8 +116,16 @@ const onBlur = (event: Event) => {
 | 
			
		||||
  if (props.type === "number") {
 | 
			
		||||
    onNumberBlur(event);
 | 
			
		||||
  }
 | 
			
		||||
  console.log("添加,", new String(props.modelValue).toLocaleString())
 | 
			
		||||
  currentValue.value = new String(props.modelValue).toLocaleString()
 | 
			
		||||
  if(props.qfw){
 | 
			
		||||
    try{
 | 
			
		||||
      console.log("添加,", new Number(props.modelValue).toLocaleString())
 | 
			
		||||
      currentValue.value = new Number(props.modelValue).toLocaleString()
 | 
			
		||||
    }catch{
 | 
			
		||||
      currentValue.value = "输入错误"
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
  emit("blur", event);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user