refactor: format code and remove unused code

This commit is contained in:
Sagi 2022-09-17 19:42:14 +08:00
parent 83565d319d
commit 65c9cdef88
3 changed files with 4 additions and 3 deletions

View File

@ -27,7 +27,6 @@ export default defineComponent({
],
setup(props: ButtonEditProps, context: SetupContext) {
const modelValue = ref(props.modelValue);
const { buttonClass, onClickButton, onMouseEnterButton, onMouseLeaveButton } = useButton(props, context);
const displayText = ref('');
const {
@ -62,8 +61,6 @@ export default defineComponent({
'f-state-focus': hasFocusedTextBox,
}));
const displayClearButton = computed(() => (showClearButton ? '' : 'display: "none";'));
return () => {
return (
<div class="f-cmp-inputgroup" id={props.id}>

View File

@ -47,6 +47,9 @@ export interface UseClear {
}
export interface UseTextBox {
/**
*
*/
hasFocusedTextBox: ComputedRef<boolean>;
/**
*

View File

@ -20,6 +20,7 @@ export function useButton(props: ButtonEditProps, context: SetupContext): UseBut
function onMouseEnterButton($event: MouseEvent) {
context.emit('mouseEnter', $event);
}
function onMouseLeaveButton($event: MouseEvent) {
context.emit('mouseLeaveIcon', $event);
}