Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
2a0d2f60
U
uni-app
项目概览
DCloud
/
uni-app
2 个月 前同步成功
通知
717
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,发现更多精彩内容 >>
提交
2a0d2f60
编写于
7月 13, 2018
作者:
H
hulinNeil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新部分示例
上级
486452f2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
55 addition
and
17 deletion
+55
-17
examples/hello-uniapp/App.vue
examples/hello-uniapp/App.vue
+33
-6
examples/hello-uniapp/common/uni.css
examples/hello-uniapp/common/uni.css
+14
-3
examples/hello-uniapp/pages/API/download-file/index.vue
examples/hello-uniapp/pages/API/download-file/index.vue
+1
-1
examples/hello-uniapp/pages/component/image/index.vue
examples/hello-uniapp/pages/component/image/index.vue
+1
-1
examples/hello-uniapp/pages/template/list-with-badges/index.vue
...es/hello-uniapp/pages/template/list-with-badges/index.vue
+6
-6
examples/hello-uniapp/static/uni@2x.png
examples/hello-uniapp/static/uni@2x.png
+0
-0
未找到文件。
examples/hello-uniapp/App.vue
浏览文件 @
2a0d2f60
<
script
>
export
default
{
onLaunch
:
function
()
{
console
.
log
(
'
App Launch
'
);
//#ifdef APP-PLUS
/* 5+环境锁定屏幕方向 */
plus
.
screen
.
unlockOrientation
();
//解除锁定
plus
.
screen
.
lockOrientation
(
'
portrait-primary
'
);
//锁定
/* 5+环境升级提示 */
var
server
=
"
http://uni-app.dcloud.io/update
"
;
//检查更新地址
var
req
=
{
//升级检测数据
"
appid
"
:
plus
.
runtime
.
appid
,
"
version
"
:
plus
.
runtime
.
version
,
"
imei
"
:
plus
.
device
.
imei
};
uni
.
request
({
url
:
server
,
data
:
req
,
success
:
(
res
)
=>
{
console
.
log
(
"
success
"
,
res
);
if
(
res
.
statusCode
==
200
&&
res
.
data
.
isUpdate
)
{
let
openUrl
=
plus
.
os
.
name
===
'
iOS
'
?
res
.
data
.
iOS
:
res
.
data
.
Android
;
uni
.
showModal
({
//提醒用户更新
title
:
'
更新提示
'
,
content
:
'
是否选择更新
'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
plus
.
runtime
.
openURL
(
openUrl
);
}
}
})
}
}
})
//#endif
},
onShow
:
function
()
{
...
...
@@ -40,7 +66,6 @@
form
{
width
:
100%
;
}
/* page */
.container
{
...
...
@@ -170,16 +195,18 @@
padding-left
:
0
;
padding-right
:
0
;
}
/* example */
.index-hd
{
padding
:
90
rpx
;
.index-hd
{
padding
:
90
rpx
;
text-align
:
center
;
}
.index-logo
{
.index-logo
{
width
:
140
rpx
;
height
:
140
rpx
;
}
.btn-area
{
margin-top
:
60
rpx
;
box-sizing
:
border-box
;
...
...
examples/hello-uniapp/common/uni.css
浏览文件 @
2a0d2f60
...
...
@@ -350,14 +350,24 @@
}
.uni-list-cell-divider
{
background
:
#fafafa
;
position
:
relative
;
display
:
flex
;
color
:
#999
;
background-color
:
#f
afafa
;
padding
:
1
5
rpx
20
rpx
;
background-color
:
#f
7f7f7
;
padding
:
1
0
rpx
20
rpx
;
}
.uni-list-cell-divider
:before
{
position
:
absolute
;
right
:
0
;
top
:
0
;
left
:
0
rpx
;
height
:
1px
;
content
:
''
;
-webkit-transform
:
scaleY
(
.5
);
transform
:
scaleY
(
.5
);
background-color
:
#c8c7cc
;
}
.uni-list-cell-divider
:after
{
position
:
absolute
;
right
:
0
;
...
...
@@ -372,6 +382,7 @@
.uni-list-cell-navigate
{
padding
:
22
rpx
30
rpx
;
line-height
:
48
rpx
;
position
:
relative
;
display
:
flex
;
box-sizing
:
border-box
;
...
...
examples/hello-uniapp/pages/API/download-file/index.vue
浏览文件 @
2a0d2f60
...
...
@@ -34,7 +34,7 @@
downloadImage
:
function
()
{
var
self
=
this
uni
.
downloadFile
({
url
:
"
https://img-cdn-qiniu.dcloud.net.cn/
newpage
/images/uni@2x.png
"
,
url
:
"
https://img-cdn-qiniu.dcloud.net.cn/
uniapp
/images/uni@2x.png
"
,
success
:
function
(
res
)
{
console
.
log
(
'
downloadFile success, res is
'
,
res
)
self
.
imageSrc
=
res
.
tempFilePath
...
...
examples/hello-uniapp/pages/component/image/index.vue
浏览文件 @
2a0d2f60
...
...
@@ -11,7 +11,7 @@
<view
class=
"page-section page-section-gap"
>
<view
class=
"page-section-title"
>
Internet Image
</view>
<view
class=
"page-section-ctn"
>
<image
class=
"image"
src=
"http
://img-cdn-qiniu.dcloud.net.cn/newpage
/images/uni@2x.png"
/>
<image
class=
"image"
src=
"http
s://img-cdn-qiniu.dcloud.net.cn/uniapp
/images/uni@2x.png"
/>
</view>
</view>
</view>
...
...
examples/hello-uniapp/pages/template/list-with-badges/index.vue
浏览文件 @
2a0d2f60
...
...
@@ -4,35 +4,35 @@
<view
class=
"uni-card"
>
<view
class=
"uni-list"
>
<view
class=
"uni-list-cell-divider"
>
左
侧带箭头
右
侧带箭头
</view>
<view
class=
"uni-list-cell"
hover-class=
"uni-list-cell-hover"
>
<view
class=
"uni-list-cell-navigate uni-navigate-right"
>
Item1
</view>
</view>
<view
class=
"uni-list-cell"
hover-class=
"uni-list-cell-hover"
>
<view
class=
"uni-list-cell
uni-list-cell-last
"
hover-class=
"uni-list-cell-hover"
>
<view
class=
"uni-list-cell-navigate uni-navigate-right"
>
Item2
</view>
</view>
<view
class=
"uni-list-cell-divider"
>
左
侧带数字角标
右
侧带数字角标
</view>
<view
class=
"uni-list-cell"
hover-class=
"uni-list-cell-hover"
>
<view
class=
"uni-list-cell-navigate"
>
Item2
<text
class=
"uni-badge uni-badge-
success"
>
1
23
</text>
<text
class=
"uni-badge uni-badge-
danger"
>
23
</text>
</view>
</view>
<view
class=
"uni-list-cell"
hover-class=
"uni-list-cell-hover"
>
<view
class=
"uni-list-cell
uni-list-cell-last
"
hover-class=
"uni-list-cell-hover"
>
<view
class=
"uni-list-cell-navigate"
>
Item1
<text
class=
"uni-badge uni-badge-success"
>
123
</text>
</view>
</view>
<view
class=
"uni-list-cell-divider"
>
左
侧带数字角标+箭头
右
侧带数字角标+箭头
</view>
<view
class=
"uni-list-cell"
hover-class=
"uni-list-cell-hover"
>
<view
class=
"uni-list-cell-navigate uni-navigate-right"
>
...
...
examples/hello-uniapp/static/uni@2x.png
查看替换文件 @
486452f2
浏览文件 @
2a0d2f60
989 字节
|
W:
|
H:
4.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录