refactor: format code and remove unused code
This commit is contained in:
parent
83565d319d
commit
65c9cdef88
|
@ -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}>
|
||||
|
|
|
@ -47,6 +47,9 @@ export interface UseClear {
|
|||
}
|
||||
|
||||
export interface UseTextBox {
|
||||
/**
|
||||
* 输入框是否获得焦点
|
||||
*/
|
||||
hasFocusedTextBox: ComputedRef<boolean>;
|
||||
/**
|
||||
* 输入框是否处于只读状态
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue