mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-16 12:57:15 +08:00
refactor: 更换 ESLint 配置为 @antfu/eslint-config
This commit is contained in:
@@ -9,22 +9,22 @@ import type { CSSProperties } from 'vue'
|
||||
|
||||
defineOptions({ name: 'GiFlexibleBox' })
|
||||
|
||||
interface Props {
|
||||
modelValue: boolean
|
||||
direction: 'left' | 'right'
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
modelValue: false,
|
||||
direction: 'right'
|
||||
})
|
||||
|
||||
interface Props {
|
||||
modelValue: boolean
|
||||
direction: 'left' | 'right'
|
||||
}
|
||||
|
||||
const BoxRef = ref<HTMLElement | null>()
|
||||
|
||||
const style = computed(() => {
|
||||
const obj: CSSProperties = {}
|
||||
obj[`margin-${props.direction}`] =
|
||||
!props.modelValue && BoxRef.value && BoxRef.value.clientWidth ? `-${BoxRef.value.clientWidth}px` : 0
|
||||
obj[`margin-${props.direction}`]
|
||||
= !props.modelValue && BoxRef.value && BoxRef.value.clientWidth ? `-${BoxRef.value.clientWidth}px` : 0
|
||||
return obj
|
||||
})
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user