Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
952f71ef
提交
952f71ef
authored
7月 05, 2023
作者:
陈楚尹
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 增加降水模块
上级
6d9e5ed5
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
73 行增加
和
18 行删除
+73
-18
index.vue
src/components/CustomPicker/index.vue
+11
-0
Grid.vue
src/components/Layout/Grid.vue
+10
-3
pages.json
src/pages.json
+26
-8
index.vue
src/pages/business/index.vue
+1
-1
rain.vue
src/pages/business/monitor/rain.vue
+16
-0
index.vue
src/pages/home/index.vue
+3
-3
commonFunction.vue
src/pages/home/modules/commonFunction.vue
+0
-2
header.vue
src/pages/home/modules/header.vue
+0
-0
meteService.vue
src/pages/home/modules/meteService.vue
+0
-0
warning.vue
src/pages/home/modules/warning.vue
+0
-0
weather.vue
src/pages/home/modules/weather.vue
+0
-0
Navigation.ts
src/utils/const/Navigation.ts
+4
-0
components.d.ts
types/components.d.ts
+1
-0
unocss.config.ts
unocss.config.ts
+1
-1
没有找到文件。
src/components/CustomPicker/index.vue
0 → 100644
浏览文件 @
952f71ef
<
script
setup
lang=
"ts"
></
script
>
<
template
>
<view
class=
"h-84 lh-10 flex text-28"
>
<fui-icon
name=
"wait"
size=
"45"
/>
<text
class=
"ml-1"
>
时间:
</text>
<text
class=
"text-#1890FF"
>
11月30日09时30分-12月1日09时30分
</text>
</view>
</
template
>
<
style
lang=
"less"
scoped
></
style
>
src/components/Layout/Grid.vue
浏览文件 @
952f71ef
<
script
setup
lang=
"ts"
>
import
{
liveModules
}
from
'/@/utils/const/Navigation'
import
type
{
navItemType
}
from
'/@/utils/const/Navigation'
defineProps
({
...
...
@@ -18,6 +17,9 @@
// }
// const getColor = (type: string) => colors[type]
function
goRoute
(
nav
:
UniApp
.
NavigateToOptions
)
{
uni
.
navigateTo
(
nav
)
}
const
lastString
=
(
string
:
string
)
=>
string
.
charAt
(
string
.
length
-
1
)
...
...
@@ -25,8 +27,13 @@
</
script
>
<
template
>
<fui-grid
:columns=
"4"
class=
"mt-4"
>
<fui-grid-item
v-for=
"(item, index) in dataSouce"
:key=
"index"
:highlight=
"false"
>
<fui-grid
:columns=
"4"
class=
"mt-4 bg-#fff"
:showBorder=
"false"
>
<fui-grid-item
v-for=
"(item, index) in dataSouce"
:key=
"index"
:highlight=
"false"
@
click=
"goRoute(item.navigate)"
>
<view
class=
"fui-grid__cell flex flex-col flex-center"
>
<!--
<image
src=
"/static/uni-logo.png"
class=
"fui-icon w50"
mode=
"widthFix"
/>
-->
<!-- :color="getColor(lastString(item.value))" -->
...
...
src/pages.json
浏览文件 @
952f71ef
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"white"
,
"navigationBarBackgroundColor"
:
"#F8F8F8"
,
"backgroundColor"
:
"#F8F8F8"
,
"pageOrientation"
:
"portrait"
//横屏配置,全局屏幕旋转设置(仅
APP/微信/QQ小程序),支持
auto
/
portrait
/
landscape
},
"pages"
:
[
//
pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/
index
/index"
,
"path"
:
"pages/
home
/index"
,
"style"
:
{
"navigationBarTitleText"
:
"首页"
,
"enablePullDownRefresh"
:
false
,
...
...
@@ -57,6 +63,24 @@
"enableReachBottom"
:
false
}
},
//
降水实况
{
"path"
:
"pages/business/monitor/rain"
,
"style"
:
{
"navigationBarTitleText"
:
"降水监测"
,
"enablePullDownRefresh"
:
false
,
"navigationBarBackgroundColor"
:
"#1890FF"
,
"app-plus"
:
{
"titleNView"
:
{
"buttons"
:
[
{
"type"
:
"share"
}
]
}
}
}
},
//
===
PDF
文件预览
===
{
"path"
:
"pages/common/viewer/pdf"
,
...
...
@@ -109,12 +133,6 @@
"^uni-(.*)"
:
"@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
}
},
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"uni-app"
,
"navigationBarBackgroundColor"
:
"#F8F8F8"
,
"backgroundColor"
:
"#F8F8F8"
},
"resizable"
:
true
,
"tabBar"
:
{
"color"
:
"#7A7E83"
,
...
...
@@ -127,7 +145,7 @@
"spacing"
:
"6px"
,
"list"
:
[
{
"pagePath"
:
"pages/
index
/index"
,
"pagePath"
:
"pages/
home
/index"
,
"iconPath"
:
"static/icons/home.png"
,
"selectedIconPath"
:
"static/icons/homeSelect.png"
,
"text"
:
"首页"
...
...
src/pages/business/index.vue
浏览文件 @
952f71ef
...
...
@@ -19,7 +19,7 @@
<Header
title=
"监测预报"
/>
<!-- 内容 -->
<view
class=
"p-2 pt-3 pb-1"
>
<view
class=
"box-shadow-def p-2 pt-3 b-rd-2 mb-3"
v-for=
"(item, index) in navs"
:key=
"index"
>
<view
class=
"box-shadow-def p-2 pt-3 b-rd-2 mb-3
bg-#fff
"
v-for=
"(item, index) in navs"
:key=
"index"
>
<MenuHeader
:title=
"item.title"
otherTitle=
"展开更多"
/>
<Grid
:dataSouce=
"item.dataSouce"
/>
</view>
...
...
src/pages/business/monitor/rain.vue
0 → 100644
浏览文件 @
952f71ef
<
script
setup
lang=
"ts"
>
onNavigationBarButtonTap
((
e
)
=>
{
if
(
e
.
index
===
0
)
{
uni
.
showToast
({
title
:
'你点了分享按钮'
,
icon
:
'none'
,
})
}
})
</
script
>
<
template
>
<view
class=
"bg"
>
<CustomPicker
/>
</view>
</
template
>
src/pages/
index
/index.vue
→
src/pages/
home
/index.vue
浏览文件 @
952f71ef
...
...
@@ -4,8 +4,6 @@
import
MeteService
from
'./modules/meteService.vue'
import
CommonFunction
from
'./modules/commonFunction.vue'
// const title = ref('Hello World')
onMounted
(()
=>
{
// test API
// API.example.hello.request().then((body) => {
...
...
@@ -18,12 +16,14 @@
// const surprise = () => {
// // #ifdef APP-PLUS
// 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~')
// Message.toast('🥳 surprise ~ ')
// // #endif
// // #ifndef APP-PLUS
...
...
src/pages/
index
/modules/commonFunction.vue
→
src/pages/
home
/modules/commonFunction.vue
浏览文件 @
952f71ef
<
script
lang=
"ts"
></
script
>
<
template
>
<view
class=
"p-2 b-rd-2 box-shadow-def mt-3 bg-#fff"
>
<MenuHeader
title=
"常用功能"
otherTitle=
"自定义"
/>
...
...
src/pages/
index
/modules/header.vue
→
src/pages/
home
/modules/header.vue
浏览文件 @
952f71ef
File moved
src/pages/
index
/modules/meteService.vue
→
src/pages/
home
/modules/meteService.vue
浏览文件 @
952f71ef
File moved
src/pages/
index
/modules/warning.vue
→
src/pages/
home
/modules/warning.vue
浏览文件 @
952f71ef
File moved
src/pages/
index
/modules/weather.vue
→
src/pages/
home
/modules/weather.vue
浏览文件 @
952f71ef
File moved
src/utils/const/Navigation.ts
浏览文件 @
952f71ef
...
...
@@ -2,6 +2,7 @@ export interface navItemType {
label
:
string
value
:
string
code
?:
string
navigate
?:
UniApp
.
NavigateToOptions
}
// 实况监测
...
...
@@ -9,6 +10,9 @@ export const liveModules: navItemType[] = [
{
label
:
'降水监测'
,
value
:
'rain-m'
,
navigate
:
{
url
:
'/pages/business/monitor/rain'
,
},
},
{
label
:
'气温监测'
,
...
...
types/components.d.ts
浏览文件 @
952f71ef
...
...
@@ -10,6 +10,7 @@ export {}
declare
module
'@vue/runtime-core'
{
export
interface
GlobalComponents
{
CacheImage
:
typeof
import
(
'./../src/components/CacheImage/index.vue'
)[
'default'
]
CustomPicker
:
typeof
import
(
'./../src/components/CustomPicker/index.vue'
)[
'default'
]
Empty
:
typeof
import
(
'./../src/components/Empty/index.vue'
)[
'default'
]
FDragItem
:
typeof
import
(
'./../src/components/firstui/fui-drag/f-drag-item.vue'
)[
'default'
]
FIndexListItem
:
typeof
import
(
'./../src/components/firstui/fui-index-list/f-index-list-item.vue'
)[
'default'
]
...
...
unocss.config.ts
浏览文件 @
952f71ef
...
...
@@ -27,7 +27,7 @@ export default defineConfig({
],
shortcuts
:
[
{
bg
:
'bg-[#
f6f7fb
]'
,
bg
:
'bg-[#
F4F5F7
]'
,
'border-base'
:
'border border-[#eee]'
,
'flex-center'
:
'flex justify-center items-center'
,
'text-c0'
:
'text-[#ffffff]'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论