Compare commits
2 Commits
ddf6148d14
...
4c91f0f4f7
Author | SHA1 | Date |
---|---|---|
zestack | 4c91f0f4f7 | 1 year ago |
zestack | 3a5c29fe0d | 1 year ago |
@ -0,0 +1,21 @@ |
||||
import type { CSSProperties } from 'vue' |
||||
import type { ClipBehavior } from '../types' |
||||
|
||||
export function clip(clip: ClipBehavior | undefined): CSSProperties | undefined { |
||||
switch (clip) { |
||||
case 'autoX': |
||||
return { |
||||
overflowX: 'auto', |
||||
overflowY: 'hidden', |
||||
} |
||||
case 'autoY': |
||||
return { |
||||
overflowX: 'hidden', |
||||
overflowY: 'auto', |
||||
} |
||||
default: |
||||
return { |
||||
overflow: clip, |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue