From d1a13961649798a7fffa130501933524e2991f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Wed, 1 Feb 2023 16:59:32 +0800 Subject: [PATCH] t --- common/css/base.scss | 35 +++ manifest.json | 8 +- pages.json | 16 +- pages/device/list.vue | 61 ++++ pages/device/new.vue | 25 ++ pages/index/index.vue | 80 +++++- pages/index/mine.vue | 4 +- pages/index/report.vue | 59 ++-- static/add.png | Bin 0 -> 2438 bytes static/add2.png | Bin 0 -> 2451 bytes uni_modules/uni-card/changelog.md | 26 ++ .../uni-card/components/uni-card/uni-card.vue | 270 ++++++++++++++++++ uni_modules/uni-card/package.json | 90 ++++++ uni_modules/uni-card/readme.md | 12 + .../uni-segmented-control/changelog.md | 9 + .../uni-segmented-control.vue | 145 ++++++++++ .../uni-segmented-control/package.json | 87 ++++++ uni_modules/uni-segmented-control/readme.md | 13 + 18 files changed, 889 insertions(+), 51 deletions(-) create mode 100644 pages/device/list.vue create mode 100644 pages/device/new.vue create mode 100644 static/add.png create mode 100644 static/add2.png create mode 100644 uni_modules/uni-card/changelog.md create mode 100644 uni_modules/uni-card/components/uni-card/uni-card.vue create mode 100644 uni_modules/uni-card/package.json create mode 100644 uni_modules/uni-card/readme.md create mode 100644 uni_modules/uni-segmented-control/changelog.md create mode 100644 uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue create mode 100644 uni_modules/uni-segmented-control/package.json create mode 100644 uni_modules/uni-segmented-control/readme.md diff --git a/common/css/base.scss b/common/css/base.scss index 2dc4853..b8ffebd 100644 --- a/common/css/base.scss +++ b/common/css/base.scss @@ -2,6 +2,41 @@ page { background: #f3f4f5; } +// mt0,mr0,mb0,ml0 --> mt100,mr100,mb100,ml100 +@for $i from 0 through 100 { + .mt#{$i} { + margin-top: #{$i}rpx; + } + + .mr#{$i} { + margin-right: #{$i}rpx; + } + + .mb#{$i} { + margin-bottom: #{$i}rpx; + } + + .ml#{$i} { + margin-left: #{$i}rpx; + } + + .pt#{$i} { + padding-top: #{$i}rpx; + } + + .pr#{$i} { + padding-right: #{$i}rpx; + } + + .pb#{$i} { + padding-bottom: #{$i}rpx; + } + + .pl#{$i} { + padding-left: #{$i}rpx; + } + } + .hide-txt { overflow-x: hidden; white-space: nowrap; diff --git a/manifest.json b/manifest.json index 04724c9..d3a4678 100644 --- a/manifest.json +++ b/manifest.json @@ -41,9 +41,13 @@ ] }, /* ios打包配置 */ - "ios" : {}, + "ios" : { + "dSYMs" : false + }, /* SDK配置 */ - "sdkConfigs" : {} + "sdkConfigs" : { + "ad" : {} + } } }, /* 快应用特有相关 */ diff --git a/pages.json b/pages.json index cddeb66..cc34e0b 100644 --- a/pages.json +++ b/pages.json @@ -4,7 +4,7 @@ { "path": "pages/index/index", "style": { - "navigationBarTitleText": "主页" + "navigationBarTitleText": "灿能电力" } }, { @@ -102,6 +102,18 @@ "style": { "navigationBarTitleText": "个人消息" } + }, + { + "path": "pages/device/list", + "style": { + "navigationBarTitleText": "设备列表" + } + }, + { + "path": "pages/device/new", + "style": { + "navigationBarTitleText": "新设备" + } } ], "tabBar": { @@ -116,7 +128,7 @@ "pagePath": "pages/index/index", "iconPath": "static/index.png", "selectedIconPath": "static/index2.png", - "text": "主页" + "text": "首页" }, { "pagePath": "pages/index/report", diff --git a/pages/device/list.vue b/pages/device/list.vue new file mode 100644 index 0000000..92f83dd --- /dev/null +++ b/pages/device/list.vue @@ -0,0 +1,61 @@ + + + \ No newline at end of file diff --git a/pages/device/new.vue b/pages/device/new.vue new file mode 100644 index 0000000..49369ed --- /dev/null +++ b/pages/device/new.vue @@ -0,0 +1,25 @@ + + + \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index ba21c84..098b8b7 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -2,11 +2,49 @@ - - +
+
+
+
38
+
正常设备
+
+
+
5
+
报警设备
+
+
+
3
+
离线设备
+
+
+
+ + + + + + +
@@ -15,10 +53,22 @@ export default { data () { return { - loading: true + loading: false } }, methods: { + send () { + uni.createPushMessage({ + title: '灿能', + content: '灿能推送', + success: function (res) { + console.log('推送成功') + }, + fail: function (res) { + console.log('推送失败') + } + }) + }, jump (url) { uni.navigateTo({ url: url @@ -35,5 +85,29 @@ export default { diff --git a/pages/index/mine.vue b/pages/index/mine.vue index ebac15b..b333c52 100644 --- a/pages/index/mine.vue +++ b/pages/index/mine.vue @@ -9,11 +9,11 @@ - + diff --git a/pages/index/report.vue b/pages/index/report.vue index 02e08e3..f952006 100644 --- a/pages/index/report.vue +++ b/pages/index/report.vue @@ -1,52 +1,27 @@ diff --git a/static/add.png b/static/add.png new file mode 100644 index 0000000000000000000000000000000000000000..6eeee40e9f59efbff80db2be312fc5d38b30a9c4 GIT binary patch literal 2438 zcmeH}ds7ov7{-^(svAad7Y&V=$P!Sdih?6m6iBiVNWcmV1uKFe2=z|5C?p65S8n}Bm6|cqt}Q?hW{G3 z2MHVSpO&3Ivpt7yeKy&H9*#wuHbNUqQo|YBTK#L2@kY-oANZMxGU;_vRfQ(}jbeQ6 z%sFP#oTI9NgK*zv!tUK%h!V0f8LwfYl_?N8k-&ur(F#0@L%D(ft9q)4bAgDsvQDS> z^9bHHUpe_O59P}8PTJ>)ITR#@6Zu-Ww`*oF%AqDmsjc>IQ8}Ee3@#qO5+N2cc>z}; z^3p|dz1`lf>(LA$TUjO7^hN}*=dQ-n9wntiB;22+niR1a#^>LbOElU~qw1K)Mq6W* z1(;Rkd|}tHGL&A|zrRU1?W9M8-pl!xf~Yy~!mf~JyTtNRN&S#`VRz-TgE{W9ceI{kwq~n|J2N@GFBP(EP(^q`UG^EHMxz;RcZiCjP@ zSlxPN22RWl9)&UD%oFr>N|9nUQRB4d6yn=Nqgo1JM^4zX(p+~-0X28$GwPtar*pAO zix;S0b{H{{Z(+QfXjbcfWIPQ^!V1<9_YJ%s}NGIU|O95KvU-f z_q_y1>`D6{FQxc~po?}SuOv2;_9WOW3&=h@>$Kb>{B`7MADSb^gJ~Bm1SlKWXBGhU z3Uiei7xj6;lT$Y376R(`Ru^z=iWL?8E(RAsNz=%ZSANjm@ELtt?J8ed1zd>H3AkPS0tqw&wnwFm()D`r7M_-DG%T zv^|-2Yj+q(+pFGm5WG7(;I9WVB$ySMXI@Hn?-x**=*u2L*gR;-}aYz+Uz_p^VCpLMdzm>r;dJ+ zb=O@JE_&I|bu5vsuaRpWR2Q{Ie^%>sx>o6=pCOF$l3&uU-W_gn$Q~d25Tewo%WTH0 zUvtO*fl;f^QhdG^ z?P{HYjZnFVD?2FUtg3f|hzex#qnwJj$rU$K`&r3&pky{t38Uf4-i~G=#+7YxNvu0T wLCQ3vLjwx%VllN~_kUvm_h@y~6M^u8!Js2cml0i@3LaLFhnp8q?sACy57w6w`~Uy| literal 0 HcmV?d00001 diff --git a/static/add2.png b/static/add2.png new file mode 100644 index 0000000000000000000000000000000000000000..92ae4a7824e4c74b3757dc51ea7dd682cccc869f GIT binary patch literal 2451 zcmeAS@N?(olHy`uVBq!ia0vp^CqS5k4M?tyST_$yF%}28J29*~C-ahlfz#L1#WAEJ z?(HnYB9U+r*LrQy8_^9~dzfv!G>>m!pZvgKGy4%aH%7lRath1lWS!w#aB2GhFY^;JEI1Z~odAhNd+si!0B(7Ic{Kx^Qz{c5%(e zidlN|dkp`7T3S(MeV%>&_vP*RYnnB*g&igs8NC-byZ!n3WeN58?77FEcK>~Me0|-s zSk~P8N(~AJ%ab?nt+41ly?LQ2GoqvlTpRe!9{P*>g>Y2-{ zH($2)Z$2IKHG_pS@BhV*&-WiUxgRa?=)ivUDc=HxhAd z`f&6jhf>q44n+_4(0ui#ippuX1eUaD3%O0;D62cdm89S6HbF=)e}?dp)0-FbI$Evh znhR9Vbqr{R8ZZ$ijKZeS$(wp$U*@ zmBew$@#^hPg}8Z3%~&)acC`qqG|i1(qwwug29W!y&C+p?jWy6!&8u#70{xP}1GHBV zug{)~X?N^3kpg;jPokfI{`o#LmX`~(fZpfOl5hsv3$$L`UAco}m2#VcY{=fZ9FLwx zW;ss~TIV6*sB~lJ(NS-YwAj|;+;lU}X3n#p6+Is_d_M2Jq;g20LuiJ5kKx|A&zrCR zzI@pHRZxl}G*@RCT5{Y8Vfrkg{`>A-@l(H49LX={)N8`FK}#!8t#d+y8b zi;h~Ya^m8*KTjnd-wcwR@BCo5qJjVVbAIn_Vx!h;oLK%n*@u7HsUI>-_jwyDe^r!K zJ^y#9N-(8UVE%nSrZ~qRg0IW=scP40J@1eBGil!=@t4!=c72`xrCze|Y_<3ODWZ1M z{?7Vd-}Yx=L2LfywUtkv*^Ath@-u(o_+x*Bd4}=6jUq3_UO%%x_I;-l%g&#_+Y}Dk zI^oTBe@_SC&l^7lM|0L_fiiN+(T9uQf^+G*yt(#s-q!s%X+6_yDnrwXB~nH1w?9u$ z?n&pqx_|!LcmJ*#%=2nwXyTZ#OKJAw?&FtBe*RkZuhOn!lf7-t<*jU0>(v?*9-60Y zwyn48E&Q}K^-S`dH|6E=Ez@_r`p8klysaM8COG@~qr~Hj^{0Op&s%o+@4F9oc_Z$v zn%k1v5A$SInQzbDGv5NXvKTyF{an^LB{Ts5LCYvI literal 0 HcmV?d00001 diff --git a/uni_modules/uni-card/changelog.md b/uni_modules/uni-card/changelog.md new file mode 100644 index 0000000..c3cd8c4 --- /dev/null +++ b/uni_modules/uni-card/changelog.md @@ -0,0 +1,26 @@ +## 1.3.1(2021-12-20) +- 修复 在vue页面下略缩图显示不正常的bug +## 1.3.0(2021-11-19) +- 重构插槽的用法 ,header 替换为 title +- 新增 actions 插槽 +- 新增 cover 封面图属性和插槽 +- 新增 padding 内容默认内边距离 +- 新增 margin 卡片默认外边距离 +- 新增 spacing 卡片默认内边距 +- 新增 shadow 卡片阴影属性 +- 取消 mode 属性,可使用组合插槽代替 +- 取消 note 属性 ,使用actions插槽代替 +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-card](https://uniapp.dcloud.io/component/uniui/uni-card) +## 1.2.1(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.2.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.8(2021-07-01) +- 优化 图文卡片无图片加载时,提供占位图标 +- 新增 header 插槽,自定义卡片头部( 图文卡片 mode="style" 时,不支持) +- 修复 thumbnail 不存在仍然占位的 bug +## 1.1.7(2021-05-12) +- 新增 组件示例地址 +## 1.1.6(2021-02-04) +- 调整为uni_modules目录规范 diff --git a/uni_modules/uni-card/components/uni-card/uni-card.vue b/uni_modules/uni-card/components/uni-card/uni-card.vue new file mode 100644 index 0000000..045c082 --- /dev/null +++ b/uni_modules/uni-card/components/uni-card/uni-card.vue @@ -0,0 +1,270 @@ + + + + + diff --git a/uni_modules/uni-card/package.json b/uni_modules/uni-card/package.json new file mode 100644 index 0000000..f16224d --- /dev/null +++ b/uni_modules/uni-card/package.json @@ -0,0 +1,90 @@ +{ + "id": "uni-card", + "displayName": "uni-card 卡片", + "version": "1.3.1", + "description": "Card 组件,提供常见的卡片样式。", + "keywords": [ + "uni-ui", + "uniui", + "card", + "", + "卡片" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-icons", + "uni-scss" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/uni_modules/uni-card/readme.md b/uni_modules/uni-card/readme.md new file mode 100644 index 0000000..7434e71 --- /dev/null +++ b/uni_modules/uni-card/readme.md @@ -0,0 +1,12 @@ + + +## Card 卡片 +> **组件名:uni-card** +> 代码块: `uCard` + +卡片视图组件。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-card) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git a/uni_modules/uni-segmented-control/changelog.md b/uni_modules/uni-segmented-control/changelog.md new file mode 100644 index 0000000..9564e5a --- /dev/null +++ b/uni_modules/uni-segmented-control/changelog.md @@ -0,0 +1,9 @@ +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-segmented-control](https://uniapp.dcloud.io/component/uniui/uni-segmented-control) +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.5(2021-05-12) +- 新增 项目示例地址 +## 1.0.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue b/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue new file mode 100644 index 0000000..cdccc8b --- /dev/null +++ b/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue @@ -0,0 +1,145 @@ + + + + + diff --git a/uni_modules/uni-segmented-control/package.json b/uni_modules/uni-segmented-control/package.json new file mode 100644 index 0000000..a40732d --- /dev/null +++ b/uni_modules/uni-segmented-control/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-segmented-control", + "displayName": "uni-segmented-control 分段器", + "version": "1.2.0", + "description": "分段器由至少 2 个分段控件组成,用作不同视图的显示", + "keywords": [ + "uni-ui", + "uniui", + "分段器", + "segement", + "顶部选择" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-segmented-control/readme.md b/uni_modules/uni-segmented-control/readme.md new file mode 100644 index 0000000..3527b03 --- /dev/null +++ b/uni_modules/uni-segmented-control/readme.md @@ -0,0 +1,13 @@ + + +## SegmentedControl 分段器 +> **组件名:uni-segmented-control** +> 代码块: `uSegmentedControl` + + +用作不同视图的显示 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-segmented-control) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + +