20260827173205
This commit is contained in:
1 parent
60cacfa8fb
commit
3824af0f12
38 files changed
+2398
-3552
No files matched your search
@@ -71,9 +71,12 @@ const isOpen = computed({
|
||||
},
|
||||
})
|
||||
|
||||
const panelWidth = computed(() =>
|
||||
typeof props.width === 'number' ? `${props.width}px` : props.width,
|
||||
)
|
||||
// number 按 px,纯数字字符串补 px,其余(如 480px / 60%)按 CSS 原样
|
||||
const panelWidth = computed(() => {
|
||||
if (typeof props.width === 'number') return `${props.width}px`
|
||||
const text = String(props.width).trim()
|
||||
return /^\d+(\.\d+)?$/.test(text) ? `${text}px` : text
|
||||
})
|
||||
|
||||
// 面板尺寸:缩放后使用实际宽高(px),否则用 width prop
|
||||
const panelStyle = computed(() => {
|
||||
|
||||
Reference in new issue
Block a user