Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uview-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李晖
uview-ui
Commits
174642f1
Commit
174642f1
authored
Apr 25, 2020
by
PC-20180318CEYD\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进行目录重构,可以将uView放到项目内任意目录
parent
d7ed0a52
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
28 additions
and
29 deletions
+28
-29
main.js
main.js
+0
-1
u-avatar-cropper.vue
uview/components/u-avatar-cropper/u-avatar-cropper.vue
+1
-1
u-grid.vue
uview/components/u-grid/u-grid.vue
+2
-2
u-picker.vue
uview/components/u-picker/u-picker.vue
+3
-3
u-tabs-swiper.vue
uview/components/u-tabs-swiper/u-tabs-swiper.vue
+1
-1
index.js
uview/index.js
+18
-18
index.scss
uview/index.scss
+1
-1
route.js
uview/libs/function/route.js
+1
-1
timeFrom.js
uview/libs/function/timeFrom.js
+1
-1
No files found.
main.js
View file @
174642f1
...
...
@@ -15,7 +15,6 @@ App.mpType = 'app'
Vue
.
prototype
.
vuePrototype
=
'
枣红
'
// 引入全局uView
// Vue.prototype.openShare = true // 是否开启全局分享
import
uView
from
'
@/uview
'
Vue
.
use
(
uView
)
...
...
uview/components/u-avatar-cropper/u-avatar-cropper.vue
View file @
174642f1
...
...
@@ -21,7 +21,7 @@
</
template
>
<
script
>
import
WeCropper
from
'
@/uview/components/u-avatar-cropper
/weCropper.js
'
;
import
WeCropper
from
'
.
/weCropper.js
'
;
export
default
{
props
:
{
// 裁剪矩形框的样式,其中可包含的属性为lineWidth-边框宽度(单位rpx),color: 边框颜色,
...
...
uview/components/u-grid/u-grid.vue
View file @
174642f1
...
...
@@ -79,8 +79,8 @@ export default {
},
async
getGridRect
()
{
let
rect
=
await
this
.
$uGetRect
(
`#
${
this
.
elId
}
`
);
// 小米
手机可能会导致宽度计算问题(特定机型),宫格布局变乱,故在这里减少一
个像素
this
.
width
=
rect
.
width
-
1
;
// 小米
和华为手机可能会导致宽度计算问题(特定机型),宫格布局变乱,故在这里减少两
个像素
this
.
width
=
rect
.
width
-
2
;
}
}
...
...
uview/components/u-picker/u-picker.vue
View file @
174642f1
...
...
@@ -70,9 +70,9 @@
</
template
>
<
script
>
import
provinces
from
'
@/uview
/libs/util/province.js
'
;
import
citys
from
'
@/uview
/libs/util/city.js
'
;
import
areas
from
'
@/uview
/libs/util/area.js
'
;
import
provinces
from
'
../..
/libs/util/province.js
'
;
import
citys
from
'
../..
/libs/util/city.js
'
;
import
areas
from
'
../..
/libs/util/area.js
'
;
/**
* picker picker弹出选择器
...
...
uview/components/u-tabs-swiper/u-tabs-swiper.vue
View file @
174642f1
...
...
@@ -16,7 +16,7 @@
</
template
>
<
script
>
import
colorGradient
from
'
@/uview
/libs/function/colorGradient
'
;
import
colorGradient
from
'
../..
/libs/function/colorGradient
'
;
let
color
=
colorGradient
;
const
{
windowWidth
...
...
uview/index.js
View file @
174642f1
// 引入全局mixin
import
mixin
from
'
@/uview
/libs/mixin/mixin.js
'
import
mixin
from
'
.
/libs/mixin/mixin.js
'
// 引入关于是否mixin集成小程序分享的配置
import
wxshare
from
'
@/uview
/libs/mixin/mpShare.js
'
import
wxshare
from
'
.
/libs/mixin/mpShare.js
'
// 全局挂载引入http相关请求拦截插件
import
http
from
'
@/uview
/libs/request
'
import
http
from
'
.
/libs/request
'
function
wranning
(
str
)
{
// 开发环境进行信息输出,主要是一些报错信息
...
...
@@ -26,61 +26,61 @@ function wranning(str) {
// post类型对象参数转为get类型url参数
import
{
queryParams
}
from
'
@/uview
/libs/function/queryParams.js
'
}
from
'
.
/libs/function/queryParams.js
'
// 路由封装
import
{
route
}
from
'
@/uview
/libs/function/route.js
'
}
from
'
.
/libs/function/route.js
'
// 时间格式化
import
{
timeFormat
}
from
'
@/uview
/libs/function/timeFormat.js
'
}
from
'
.
/libs/function/timeFormat.js
'
// 时间戳格式化,返回多久之前
import
{
timeFrom
}
from
'
@/uview
/libs/function/timeFrom.js
'
}
from
'
.
/libs/function/timeFrom.js
'
// 颜色渐变相关,colorGradient-颜色渐变,hexToRgb-十六进制颜色转rgb颜色,rgbToHex-rgb转十六进制
import
{
colorGradient
,
hexToRgb
,
rgbToHex
}
from
'
@/uview
/libs/function/colorGradient.js
'
}
from
'
.
/libs/function/colorGradient.js
'
// 生成全局唯一guid字符串
import
{
guid
}
from
'
@/uview
/libs/function/guid.js
'
}
from
'
.
/libs/function/guid.js
'
// 主题相关颜色,info|success|warning|primary|default|error,此颜色已在uview.scss中定义,但是为js中也能使用,故也定义一份
import
{
color
}
from
'
@/uview
/libs/function/color.js
'
}
from
'
.
/libs/function/color.js
'
// 根据type获取图标名称
import
{
type2icon
}
from
'
@/uview
/libs/function/type2icon.js
'
}
from
'
.
/libs/function/type2icon.js
'
// 打乱数组的顺序
import
{
randomArray
}
from
'
@/uview
/libs/function/randomArray.js
'
}
from
'
.
/libs/function/randomArray.js
'
// 规则检验
import
test
from
'
@/uview
/libs/function/test.js
'
import
test
from
'
.
/libs/function/test.js
'
// 随机数
import
{
random
}
from
'
@/uview
/libs/function/random.js
'
}
from
'
.
/libs/function/random.js
'
// 去除空格
import
{
trim
}
from
'
@/uview
/libs/function/trim.js
'
}
from
'
.
/libs/function/trim.js
'
// toast提示,对uni.showToast的封装
import
{
toast
}
from
'
@/uview
/libs/function/toast.js
'
}
from
'
.
/libs/function/toast.js
'
// 配置信息
import
config
from
'
@/uview
/libs/config/config.js
'
import
config
from
'
.
/libs/config/config.js
'
// 各个需要fixed的地方的z-index配置文件
import
zIndex
from
'
@/uview
/libs/config/zIndex.js
'
import
zIndex
from
'
.
/libs/config/zIndex.js
'
const
$u
=
{
queryParams
,
...
...
uview/index.scss
View file @
174642f1
/* 颜色定义文件 */
@import
'
@/uview
/libs/css/color.scss'
;
@import
'
.
/libs/css/color.scss'
;
page
{
color
:
$u-main-color
;
...
...
uview/libs/function/route.js
View file @
174642f1
import
{
queryParams
}
from
'
@/uview
/libs/function/queryParams.js
'
;
import
{
queryParams
}
from
'
../..
/libs/function/queryParams.js
'
;
/**
* 路由跳转
* 注意:本方法没有对跳转的回调函数进行封装
...
...
uview/libs/function/timeFrom.js
View file @
174642f1
import
{
timeFormat
}
from
'
@/uview
/libs/function/timeFormat.js
'
;
import
{
timeFormat
}
from
'
../..
/libs/function/timeFormat.js
'
;
module
.
exports
=
{
timeFrom
(
timestamp
=
null
,
format
=
'
yyyy-mm-dd
'
){
if
(
timestamp
==
null
)
timestamp
=
Number
(
new
Date
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment