Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
inscode
NodeJS_639770
提交
9807b7d8
N
NodeJS_639770
项目概览
inscode
/
NodeJS_639770
与 Fork 源项目一致
Fork自
inscode / NodeJS
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
NodeJS_639770
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
9807b7d8
编写于
6月 14, 2024
作者:
View Design
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add Resize
上级
202466e9
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
71 addition
and
20 deletion
+71
-20
components/s/resizable/ResizableHandle.vue
components/s/resizable/ResizableHandle.vue
+23
-0
components/s/resizable/ResizablePanel.js
components/s/resizable/ResizablePanel.js
+2
-0
components/s/resizable/ResizablePanelGroup.vue
components/s/resizable/ResizablePanelGroup.vue
+19
-0
components/s/scroll-area/ScrollArea.vue
components/s/scroll-area/ScrollArea.vue
+0
-0
components/s/scroll-area/ScrollBar.vue
components/s/scroll-area/ScrollBar.vue
+0
-0
pages/mdc.vue
pages/mdc.vue
+27
-20
未找到文件。
components/s/resizable/ResizableHandle.vue
0 → 100644
浏览文件 @
9807b7d8
<
script
setup
lang=
"ts"
>
import
{
SplitterResizeHandle
,
type
SplitterResizeHandleEmits
,
type
SplitterResizeHandleProps
,
useForwardPropsEmits
}
from
'
radix-vue
'
const
props
=
defineProps
<
SplitterResizeHandleProps
&
{
class
?:
HTMLAttributes
[
'
class
'
],
withHandle
?:
boolean
}
>
()
const
emits
=
defineEmits
<
SplitterResizeHandleEmits
>
()
const
delegatedProps
=
computed
(()
=>
{
const
{
class
:
_
,
...
delegated
}
=
props
return
delegated
})
const
forwarded
=
useForwardPropsEmits
(
delegatedProps
,
emits
)
</
script
>
<
template
>
<SplitterResizeHandle
v-bind=
"forwarded"
:class=
"cn('relative flex w-px items-center justify-center bg-gray-200 dark:bg-gray-800 after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 [&[data-orientation=vertical]]:h-px [&[data-orientation=vertical]]:w-full [&[data-orientation=vertical]]:after:left-0 [&[data-orientation=vertical]]:after:h-1 [&[data-orientation=vertical]]:after:w-full [&[data-orientation=vertical]]:after:-translate-y-1/2 [&[data-orientation=vertical]]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90', props.class)"
>
<template
v-if=
"props.withHandle"
>
<div
class=
"z-10 flex h-4 w-3 items-center justify-center rounded bg-gray-200 dark:bg-gray-800"
>
<UIcon
name=
"i-heroicons-ellipsis-vertical-20-solid"
class=
"w-2.5 h-2.5"
/>
</div>
</
template
>
</SplitterResizeHandle>
</template>
components/s/resizable/ResizablePanel.js
0 → 100644
浏览文件 @
9807b7d8
import
{
SplitterPanel
}
from
'
radix-vue
'
export
default
SplitterPanel
\ No newline at end of file
components/s/resizable/ResizablePanelGroup.vue
0 → 100644
浏览文件 @
9807b7d8
<
script
setup
lang=
"ts"
>
import
{
SplitterGroup
,
type
SplitterGroupEmits
,
type
SplitterGroupProps
,
useForwardPropsEmits
}
from
'
radix-vue
'
const
props
=
defineProps
<
SplitterGroupProps
&
{
class
?:
HTMLAttributes
[
'
class
'
]
}
>
()
const
emits
=
defineEmits
<
SplitterGroupEmits
>
()
const
delegatedProps
=
computed
(()
=>
{
const
{
class
:
_
,
...
delegated
}
=
props
return
delegated
})
const
forwarded
=
useForwardPropsEmits
(
delegatedProps
,
emits
)
</
script
>
<
template
>
<SplitterGroup
v-bind=
"forwarded"
:class=
"cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', props.class)"
>
<slot
/>
</SplitterGroup>
</
template
>
components/scroll-area/ScrollArea.vue
→
components/s
/s
croll-area/ScrollArea.vue
浏览文件 @
9807b7d8
文件已移动
components/scroll-area/ScrollBar.vue
→
components/s
/s
croll-area/ScrollBar.vue
浏览文件 @
9807b7d8
文件已移动
pages/mdc.vue
浏览文件 @
9807b7d8
<
template
>
<ScrollArea
class=
"h-72 w-48 rounded-md border"
>
<div
class=
"p-4"
>
<h4
class=
"mb-4 text-sm font-medium leading-none"
>
Tags
</h4>
<div
v-for=
"tag in tags"
:key=
"tag"
>
<div
class=
"text-sm"
>
{{
tag
}}
<SResizablePanelGroup
id=
"demo-group-1"
direction=
"horizontal"
class=
"max-w-md rounded-lg border"
>
<SResizablePanel
id=
"demo-panel-1"
:default-size=
"50"
>
<div
class=
"flex h-[200px] items-center justify-center p-6"
>
<span
class=
"font-semibold"
>
One
</span>
</div>
<UDivider
class=
"my-2"
/>
</SResizablePanel>
<SResizableHandle
id=
"demo-handle-1"
/>
<SResizablePanel
id=
"demo-panel-2"
:default-size=
"50"
>
<SResizablePanelGroup
id=
"demo-group-2"
direction=
"vertical"
>
<SResizablePanel
id=
"demo-panel-3"
:default-size=
"25"
>
<div
class=
"flex h-full items-center justify-center p-6"
>
<span
class=
"font-semibold"
>
Two
</span>
</div>
</SResizablePanel>
<SResizableHandle
id=
"demo-handle-2"
/>
<SResizablePanel
id=
"demo-panel-4"
:default-size=
"75"
>
<div
class=
"flex h-full items-center justify-center p-6"
>
<span
class=
"font-semibold"
>
Three
</span>
</div>
</ScrollArea>
</SResizablePanel>
</SResizablePanelGroup>
</SResizablePanel>
</SResizablePanelGroup>
</
template
>
\ No newline at end of file
<
script
setup
lang=
"ts"
>
const
tags
=
Array
.
from
({
length
:
50
}).
map
(
(
_
,
i
,
a
)
=>
`v1.2.0-beta.
${
a
.
length
-
i
}
`
,
)
</
script
>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录