chore: install prettier

This commit is contained in:
Viet An
2026-05-04 15:22:27 +07:00
parent 93d29ca7d8
commit bd58e2b847
267 changed files with 22950 additions and 13581 deletions

View File

@@ -1,37 +1,43 @@
<template>
<div class="control has-icons-left">
<input :class="`input ${error? 'is-danger' : ''} ${disabled? 'has-text-black' : ''}`" type="text"
:placeholder="placeholder || ''" v-model="value" @keyup="doCheck" :disabled="disabled || false">
<span class="icon is-left">
<SvgIcon v-bind="{name: 'email.svg', type: 'gray', size: 21}"></SvgIcon>
</span>
</div>
<div class="control has-icons-left">
<input
:class="`input ${error ? 'is-danger' : ''} ${disabled ? 'has-text-black' : ''}`"
type="text"
:placeholder="placeholder || ''"
v-model="value"
@keyup="doCheck"
:disabled="disabled || false"
/>
<span class="icon is-left">
<SvgIcon v-bind="{ name: 'email.svg', type: 'gray', size: 21 }"></SvgIcon>
</span>
</div>
</template>
<script>
export default {
props: ['record', 'attr', 'placeholder', 'disabled'],
props: ["record", "attr", "placeholder", "disabled"],
data() {
return {
value: this.record[this.attr]? this.$copy(this.record[this.attr]) : undefined,
error: undefined
}
value: this.record[this.attr] ? this.$copy(this.record[this.attr]) : undefined,
error: undefined,
};
},
watch: {
record: function(newVal) {
this.value = this.record[this.attr]? this.$copy(this.record[this.attr]) : undefined
}
record: function (newVal) {
this.value = this.record[this.attr] ? this.$copy(this.record[this.attr]) : undefined;
},
},
methods: {
doCheck() {
if(this.$empty(this.value)) {
this.value = undefined
this.error = false
return this.$emit('email', null)
if (this.$empty(this.value)) {
this.value = undefined;
this.error = false;
return this.$emit("email", null);
}
let check = this.$errEmail(this.value)
this.error = check? true : false
this.$emit('email', this.value)
}
}
}
</script>
let check = this.$errEmail(this.value);
this.error = check ? true : false;
this.$emit("email", this.value);
},
},
};
</script>