chore: prefer arrow function shorthand

This commit is contained in:
chenjiahan
2021-03-02 17:45:12 +08:00
parent 2fd0d54da1
commit a0addef294
42 changed files with 98 additions and 249 deletions
+2 -6
View File
@@ -125,9 +125,7 @@ export default createComponent({
});
};
const toggle = (value: boolean) => {
emit('update:show', value);
};
const toggle = (value: boolean) => emit('update:show', value);
const onClickWrapper = () => {
if (props.trigger === 'click') {
@@ -152,9 +150,7 @@ export default createComponent({
}
};
const onClickAway = () => {
toggle(false);
};
const onClickAway = () => toggle(false);
const renderAction = (action: PopoverAction, index: number) => {
const { icon, text, color, disabled, className } = action;