Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
a2bd8a95
提交
a2bd8a95
authored
4月 23, 2023
作者:
方治民
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 分离 example 页面保持 index 与主分支一致
上级
c23fc2de
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
164 行增加
和
84 行删除
+164
-84
.gitkeep
src/pages/example/.gitkeep
+0
-0
index.vue
src/pages/example/index.vue
+98
-0
index.vue
src/pages/index/index.vue
+61
-81
components.d.ts
types/components.d.ts
+2
-0
env.d.ts
types/env.d.ts
+3
-3
没有找到文件。
src/pages/example/.gitkeep
deleted
100644 → 0
浏览文件 @
c23fc2de
src/pages/example/index.vue
0 → 100644
浏览文件 @
a2bd8a95
<
script
setup
lang=
"ts"
>
// @unocss-include
const
data
=
reactive
({
items
:
[
{
name
:
'Mapbox 地图示例'
,
icon
:
'emojione-globe-showing-europe-africa'
,
page
:
'/pages/example/mapbox/index'
,
},
{
name
:
'LinkedList 大列表示例'
,
icon
:
'emojione-letter-z'
,
page
:
`/pages/example/linkedlist/index?multiple=true`
,
},
// #ifdef APP-PLUS
{
name
:
'LinkedList 大列表示例 - NVUE'
,
icon
:
'emojione-letter-z'
,
page
:
`/pages/example/linkedlist-nvue/index?multiple=true`
,
},
// #endif
],
})
function
goto
(
url
:
string
)
{
uni
.
navigateTo
({
url
})
}
</
script
>
<
template
>
<view
class=
"fui-wrap"
>
<scroll-view
class=
"fui-scroll__box"
scroll-y
:style=
"
{ height: '100%' }">
<view
class=
"fui-list__view"
>
<fui-list-cell
arrow
:bottomBorder=
"false"
radius=
"16rpx"
marginTop=
"24"
v-for=
"(item, idx) in data.items"
:key=
"idx"
@
click=
"goto(item.page)"
>
<view
class=
"fui-list__item fui-align__center"
>
<Icon
:class=
"[`icon-$
{item.icon}`]" size="48" />
<text>
{{
item
.
name
}}
</text>
</view>
</fui-list-cell>
</view>
</scroll-view>
</view>
</
template
>
<
style
lang=
"less"
>
page
{
height
:
100%
;
}
.fui-swiper__box
,
.fui-swiper__item
,
.fui-scroll__box
{
width
:
100%
;
}
.fui-list__view
{
width
:
100%
;
min-height
:
101%
;
padding
:
8
rpx
32
rpx
32
rpx
;
box-sizing
:
border-box
;
}
.fui-list__item
{
width
:
100%
;
height
:
112
rpx
;
}
.fui-list__item
text
{
padding-left
:
24
rpx
;
padding-right
:
12
rpx
;
flex-shrink
:
0
;
}
.fui-item__icon-box
{
width
:
48
rpx
;
height
:
48
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin
:
50
rpx
0
30
rpx
;
}
.fui-item__icon
,
.fui-vip__icon
{
width
:
48
rpx
;
height
:
48
rpx
;
display
:
block
;
flex-shrink
:
0
;
}
</
style
>
src/pages/index/index.vue
浏览文件 @
a2bd8a95
<
script
setup
lang=
"ts"
>
// @unocss-include
const
data
=
reactive
({
items
:
[
{
name
:
'Mapbox 地图示例'
,
icon
:
'emojione-globe-showing-europe-africa'
,
page
:
'/pages/example/mapbox/index'
,
},
{
name
:
'LinkedList 大列表示例'
,
icon
:
'emojione-letter-z'
,
page
:
`/pages/example/linkedlist/index?multiple=true`
,
},
import
dayjs
from
'dayjs'
import
{
checkUpgrade
}
from
'@/utils/upgrade'
import
{
useRuntime
}
from
'@/hooks/app/useRuntime'
const
{
app
}
=
useRuntime
()
const
year
=
ref
(
dayjs
().
year
())
const
title
=
ref
(
'Hello World'
)
const
version
=
computed
(()
=>
app
.
value
.
version
)
function
surprise
()
{
// #ifdef APP-PLUS
{
name
:
'LinkedList 大列表示例 - NVUE'
,
icon
:
'emojione-letter-z'
,
page
:
`/pages/example/linkedlist-nvue/index?multiple=true`
,
},
const
orientation
=
plus
.
navigator
.
getOrientation
()
if
(
orientation
===
0
)
{
plus
.
screen
.
lockOrientation
(
'landscape-primary'
)
}
else
if
(
orientation
===
90
)
{
plus
.
screen
.
lockOrientation
(
'portrait-primary'
)
}
Message
.
toast
(
'🥳 surprise~'
)
// #endif
],
})
function
goto
(
url
:
string
)
{
uni
.
navigateTo
({
url
})
// #ifndef APP-PLUS
Message
.
toast
(
`在手机上运行点击有惊喜~ ╰(*°▽°*)╯`
)
// #endif
}
</
script
>
<
template
>
<view
class=
"fui-wrap"
>
<scroll-view
class=
"fui-scroll__box"
scroll-y
:style=
"
{ height: '100%' }">
<view
class=
"fui-list__view"
>
<fui-list-cell
arrow
:padding=
"[0, '32rpx']"
:bottomBorder=
"false"
radius=
"16rpx"
marginTop=
"24"
v-for=
"(item, idx) in data.items"
:key=
"idx"
@
click=
"goto(item.page)"
>
<view
class=
"fui-list__item fui-align__center"
>
<Icon
:class=
"[`icon-$
{item.icon}`]" size="48" />
<text>
{{
item
.
name
}}
</text>
</view>
</fui-list-cell>
</view>
</scroll-view>
</view>
</
template
>
<
style
lang=
"less"
>
page
{
height
:
100%
;
const
animate
=
ref
()
function
handUp
()
{
if
(
animate
.
value
)
{
return
}
.fui-swiper__box
,
.fui-swiper__item
,
.fui-scroll__box
{
width
:
100%
;
Message
.
toast
(
'👋🏻'
)
animate
.
value
=
'animate-swing'
setTimeout
(()
=>
(
animate
.
value
=
null
),
1500
)
}
</
script
>
.fui-list__view
{
width
:
100%
;
min-height
:
101%
;
padding
:
8
rpx
32
rpx
32
rpx
;
box-sizing
:
border-box
;
}
<
template
>
<view
class=
"content flex-center flex-col"
>
<fui-avatar
src=
"/static/logo.png"
radius=
"14"
size=
"large"
background=
"transparent"
class=
"!mb-5"
@
click=
"surprise"
/>
<view
class=
"flex-center flex-col mb-5"
>
<text
class=
"title"
>
{{
title
}}
</text>
<text
class=
"title"
>
{{
$t
(
'app.hello'
)
}}
</text>
<Icon
icon=
"emojione:grinning-face"
size=
"48"
class=
"mt-3"
/>
.fui-list__item
{
width
:
100%
;
height
:
112
rpx
;
}
<fui-divider
class=
"mt-5"
/>
<uni-icons
type=
"hand-up"
size=
"30"
class=
"mt-3"
:class=
"[animate]"
@
click=
"handUp"
/>
</view>
<fui-footer
isFixed
>
<template
#
text
>
<view
v-if=
"version"
@
click=
"checkUpgrade(true)"
>
V
{{
version
}}
</view>
<view
class=
"mt-1"
>
壹润科技 版权所有
</view>
<view
class=
"mt-1"
>
Copyright © 2021-
{{
year
}}
Yiring. All Ringhts Reserved
</view>
</
template
>
</fui-footer>
</view>
</template>
.fui-list__item
text
{
padding-left
:
24
rpx
;
padding-right
:
12
rpx
;
flex-shrink
:
0
;
<
style
lang=
"less"
scoped
>
.content
{
height
:
calc
(
100vh
-
100
rpx
);
}
.fui-item__icon-box
{
width
:
48
rpx
;
height
:
48
rpx
;
.title
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin
:
50
rpx
0
30
rpx
;
}
.fui-item__icon
,
.fui-vip__icon
{
width
:
48
rpx
;
height
:
48
rpx
;
display
:
block
;
flex-shrink
:
0
;
font-size
:
36
rpx
;
color
:
#8f8f94
;
}
</
style
>
types/components.d.ts
浏览文件 @
a2bd8a95
...
...
@@ -124,10 +124,12 @@ declare module '@vue/runtime-core' {
FuiTopPopup
:
typeof
import
(
'./../src/components/firstui/fui-top-popup/fui-top-popup.vue'
)[
'default'
]
FuiUpload
:
typeof
import
(
'./../src/components/firstui/fui-upload/fui-upload.vue'
)[
'default'
]
FuiUploadVideo
:
typeof
import
(
'./../src/components/firstui/fui-upload-video/fui-upload-video.vue'
)[
'default'
]
FuiVirtualIndexList
:
typeof
import
(
'./../src/components/firstui/fui-virtual-index-list/fui-virtual-index-list.vue'
)[
'default'
]
FuiVtabs
:
typeof
import
(
'./../src/components/firstui/fui-vtabs/fui-vtabs.vue'
)[
'default'
]
FuiVtabsContent
:
typeof
import
(
'./../src/components/firstui/fui-vtabs-content/fui-vtabs-content.vue'
)[
'default'
]
FuiWaterfall
:
typeof
import
(
'./../src/components/firstui/fui-waterfall/fui-waterfall.vue'
)[
'default'
]
FuiWaterfallItem
:
typeof
import
(
'./../src/components/firstui/fui-waterfall-item/fui-waterfall-item.vue'
)[
'default'
]
FVirtualIndexListItem
:
typeof
import
(
'./../src/components/firstui/fui-virtual-index-list/f-virtual-index-list-item.vue'
)[
'default'
]
Icon
:
typeof
import
(
'./../src/components/Icon/index.vue'
)[
'default'
]
RouterLink
:
typeof
import
(
'vue-router'
)[
'RouterLink'
]
RouterView
:
typeof
import
(
'vue-router'
)[
'RouterView'
]
...
...
types/env.d.ts
浏览文件 @
a2bd8a95
/// <reference types="vite/client" />
declare
module
'*.vue'
{
import
{
D
efineComponent
}
from
'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const
component
:
DefineComponent
<
{},
{},
any
>
import
{
d
efineComponent
}
from
'vue'
const
component
:
ReturnType
<
typeof
defineComponent
>
export
default
component
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论