W
Size: a a a
W
W
W
EM
W
W
D
it('should emit inputted value', async () => {всегда пустой объект
const wrapper = mount(AInput, {
propsData: props,
});
await wrapper.find('input').setValue('Bdfyjd');
const emittedCalls = wrapper.emitted();
console.log(JSON.stringify(emittedCalls));
// expect().toContain({})
});
emittedCalls
GS
it('should emit inputted value', async () => {всегда пустой объект
const wrapper = mount(AInput, {
propsData: props,
});
await wrapper.find('input').setValue('Bdfyjd');
const emittedCalls = wrapper.emitted();
console.log(JSON.stringify(emittedCalls));
// expect().toContain({})
});
emittedCalls
VS
А
W
VS
W
D
<input v-on="listeners" :value="value">
const listeners = {
input: (event: { target: { value: string } }): void => {
emit('input', event.target.value);
},
blur: (event: { target: { value: string } }): void => {
emit('blur', event);
},
focus: (event: { target: { value: string } }): void => {
emit('focus', event);
},
};
W
VS
W
VF
VS