Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
4826ec76
U
uni-app
项目概览
DCloud
/
uni-app
2 个月 前同步成功
通知
716
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4826ec76
编写于
11月 14, 2018
作者:
蓝色的小猫咪
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整抽屉式导航
上级
c2a0f0cd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
78 deletion
+24
-78
examples/hello-uniapp/components/uni-drawer.vue
examples/hello-uniapp/components/uni-drawer.vue
+1
-0
examples/hello-uniapp/pages/template/drawer/drawer.vue
examples/hello-uniapp/pages/template/drawer/drawer.vue
+23
-78
未找到文件。
examples/hello-uniapp/components/uni-drawer.vue
浏览文件 @
4826ec76
...
...
@@ -65,6 +65,7 @@
overflow
:
hidden
;
visibility
:
hidden
;
z-index
:
998
;
height
:
100%
;
}
.uni-drawer
>
.uni-drawer-mask
{
...
...
examples/hello-uniapp/pages/template/drawer/drawer.vue
浏览文件 @
4826ec76
<
template
>
<view>
<view
class=
"header"
>
<view
class=
"input-view"
>
<uni-icon
type=
"search"
size=
"22"
color=
"#666666"
></uni-icon>
<input
confirm-type=
"search"
@
confirm=
"confirm"
class=
"input"
type=
"text"
placeholder=
"输入搜索关键词"
/>
<view
class=
"uni-padding-wrap"
>
<view
class=
"uni-helllo-text"
style=
"margin-top:80upx;"
>
这是抽屉式导航组件使用示例,可以指定菜单左侧或者右侧弹出(仅初始化生效),组件内部可以放置任何内容。
</view>
<!-- #ifdef APP-PLUS -->
<view
class=
"uni-center uni-link uni-common-mt"
@
tap=
"showRightDrawer"
>
点击这里或页面右上角的按钮显示导航菜单。
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view
class=
"
icon"
@
tap=
"showRightDrawer
"
>
<
uni-icon
type=
"bars"
color=
"#666666"
size=
"22"
></uni-ic
on>
<view
class=
"
uni-common-mt uni-btn-v
"
>
<
button
type=
"primary"
@
tap=
"showRightDrawer"
>
弹出导航
</butt
on>
</view>
<!-- #endif -->
</view>
<view
class=
"page-content"
>
这是抽屉式导航组件使用示例,可以指定菜单左侧或者右侧弹出(仅初始化生效),组件内部可以放置任何内容。点击页面右上角的按钮即可显示导航菜单。
</view>
<uni-drawer
:visible=
"rightDrawerVisible"
mode=
"right"
@
close=
"closeRightDrawer"
>
<view
class=
"drawer-content"
>
<view
class=
"title"
>
抽屉式导航
</view>
<view
class=
"text"
>
这是抽屉式导航组件使用示例,你可以在这里放置任何内容。关闭抽屉式导航有多种方式:1.点击本抽屉式导航之外的任意位置;2.点击如下红色按钮;
<view
style=
"padding:30upx;"
>
<view
class=
"uni-title"
>
抽屉式导航
</view>
<view
class=
"uni-helllo-text"
>
这是抽屉式导航组件使用示例,你可以在这里放置任何内容。
<text>
\n关闭抽屉式导航有多种方式:
</text>
<text>
\n1.点击本导航之外的任意位置;
</text>
<text>
\n2.点击如下红色按钮;
</text>
<!-- #ifdef APP-PLUS -->
<text>
3.点击页面右上角的按钮;
</text>
<text>
\n
3.点击页面右上角的按钮;
</text>
<!-- #endif -->
</view>
<button
class=
"button"
type=
"warn"
@
tap=
"closeRightDrawer"
>
关闭抽屉式导航
</button>
<view
class=
"uni-list"
>
<view
class=
"uni-common-mt"
>
<button
class=
"button"
type=
"warn"
@
tap=
"closeRightDrawer"
>
关闭抽屉式导航
</button>
</view>
<view
class=
"uni-list uni-common-mt"
>
<view
class=
"uni-list-cell"
hover-class=
"uni-list-cell-hover"
>
<view
class=
"uni-list-cell-navigate uni-navigate-right"
@
tap=
"item1"
>
Item1
</view>
</view>
<view
class=
"uni-list-cell uni-list-cell-last"
hover-class=
"uni-list-cell-hover"
>
<view
class=
"uni-list-cell-navigate uni-navigate-right"
@
tap=
"item
1
"
>
<view
class=
"uni-list-cell-navigate uni-navigate-right"
@
tap=
"item
2
"
>
Item2
</view>
</view>
...
...
@@ -41,11 +46,9 @@
</uni-drawer>
</view>
</
template
>
<
script
>
import
uniDrawer
from
'
../../../components/uni-drawer.vue
'
;
import
uniIcon
from
'
../../../components/uni-icon.vue
'
;
export
default
{
components
:
{
uniDrawer
,
...
...
@@ -88,63 +91,5 @@
</
script
>
<
style
>
.header
{
display
:
flex
;
flex-direction
:
row
;
padding
:
10px
15px
;
align-items
:
center
;
}
.input-view
{
display
:
flex
;
align-items
:
center
;
flex-direction
:
row
;
background-color
:
#e7e7e7
;
height
:
30px
;
border-radius
:
15px
;
padding
:
0
10px
;
flex
:
1
;
}
.input
{
flex
:
1
;
padding
:
0
5px
;
height
:
24px
;
line-height
:
24px
;
font-size
:
16px
;
}
.icon
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
margin-left
:
10px
;
}
.page-content
{
padding
:
15px
;
font-size
:
16px
;
color
:
#6d6d6d
;
text-indent
:
2em
;
}
.uni-list
{
margin-top
:
15px
;
}
.drawer-content
{
padding
:
15px
;
}
.drawer-content
>
.title
{
font-size
:
18px
;
}
.drawer-content
>
.text
{
font-size
:
15px
;
}
.drawer-content
>
.button
{
font-size
:
14px
;
}
</
style
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录