This commit is contained in:
Theluyuan 2022-12-12 10:09:42 +08:00
parent 23f2e2ff67
commit 077ae6f534
4 changed files with 65 additions and 50 deletions

View File

@ -127,7 +127,12 @@ const _sfc_main = defineComponent({
watch(() => props.type, () => {
type.value = props.type;
});
const input = ref();
watch(() => props.modelValue, () => {
if (!input.value.hasFocus() && props.qfw) {
currentValue.value = formatMoney(props.modelValue.toString());
return;
}
currentValue.value = String(props.modelValue == null ? "" : props.modelValue);
});
const onInput = function(event) {

View File

@ -11223,7 +11223,12 @@ const _sfc_main$1v = defineComponent({
watch(() => props.type, () => {
type4.value = props.type;
});
const input = ref();
watch(() => props.modelValue, () => {
if (!input.value.hasFocus() && props.qfw) {
currentValue.value = formatMoney(props.modelValue.toString());
return;
}
currentValue.value = String(props.modelValue == null ? "" : props.modelValue);
});
const onInput = function(event) {

View File

@ -95,10 +95,15 @@ watch(
type.value = props.type;
}
);
const input:any = ref<Element>()
watch(
() => props.modelValue,
() => {
if(!input.value.hasFocus() && props.qfw){
currentValue.value = formatMoney(props.modelValue.toString());
return
}
currentValue.value = String(
props.modelValue == null ? "" : props.modelValue
);

File diff suppressed because one or more lines are too long