v1.0
This commit is contained in:
7
uni_modules/uv-loading-page/changelog.md
Normal file
7
uni_modules/uv-loading-page/changelog.md
Normal file
@ -0,0 +1,7 @@
|
||||
## 1.0.2(2023-07-02)
|
||||
uv-loading-page 由于弹出层uv-transition的修改,组件内部做了相应的修改,参数不变。
|
||||
## 1.0.1(2023-05-16)
|
||||
1. 优化组件依赖,修改后无需全局引入,组件导入即可使用
|
||||
2. 优化部分功能
|
||||
## 1.0.0(2023-05-10)
|
||||
uv-loading-page 加载页
|
@ -0,0 +1,50 @@
|
||||
export default {
|
||||
props: {
|
||||
// 提示内容
|
||||
loadingText: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
// 文字上方用于替换loading动画的图片
|
||||
image: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// 加载动画的模式,circle-圆形,spinner-花朵形,semicircle-半圆形
|
||||
loadingMode: {
|
||||
type: String,
|
||||
default: 'circle'
|
||||
},
|
||||
// 是否加载中
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 背景色
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: '#fff'
|
||||
},
|
||||
// 文字颜色
|
||||
color: {
|
||||
type: String,
|
||||
default: '#C8C8C8'
|
||||
},
|
||||
// 文字大小
|
||||
fontSize: {
|
||||
type: [String, Number],
|
||||
default: 18
|
||||
},
|
||||
// 图标大小
|
||||
iconSize: {
|
||||
type: [String, Number],
|
||||
default: 28
|
||||
},
|
||||
// 加载中图标的颜色,只能rgb或者十六进制颜色值
|
||||
loadingColor: {
|
||||
type: String,
|
||||
default: '#C8C8C8'
|
||||
},
|
||||
...uni.$uv?.props?.loadingPage
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<uv-transition
|
||||
:show="loading"
|
||||
:custom-style="{
|
||||
position: 'fixed',
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
zIndex: 999,
|
||||
backgroundColor: bgColor,
|
||||
display: 'flex'
|
||||
}"
|
||||
>
|
||||
<view class="uv-loading-page">
|
||||
<view class="uv-loading-page__warpper">
|
||||
<view class="uv-loading-page__warpper__loading-icon">
|
||||
<image
|
||||
v-if="image"
|
||||
:src="image"
|
||||
class="uv-loading-page__warpper__loading-icon__img"
|
||||
mode="widthFit"
|
||||
:style="{
|
||||
width: $uv.addUnit(iconSize),
|
||||
height: $uv.addUnit(iconSize)
|
||||
}"
|
||||
></image>
|
||||
<uv-loading-icon
|
||||
v-else
|
||||
:mode="loadingMode"
|
||||
:size="$uv.addUnit(iconSize)"
|
||||
:color="loadingColor"
|
||||
></uv-loading-icon>
|
||||
</view>
|
||||
<slot>
|
||||
<text
|
||||
class="uv-loading-page__warpper__text"
|
||||
:style="{
|
||||
fontSize: $uv.addUnit(fontSize),
|
||||
color: color,
|
||||
}"
|
||||
>{{ loadingText }}</text>
|
||||
</slot>
|
||||
</view>
|
||||
</view>
|
||||
</uv-transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
|
||||
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
|
||||
import props from "./props.js";
|
||||
/**
|
||||
* loadingPage 加载动画
|
||||
* @description 警此组件为一个小动画,目前用在uvui的loadmore加载更多和switch开关等组件的正在加载状态场景。
|
||||
* @tutorial https://www.uvui.cn/components/loading.html
|
||||
* @property {String | Number} loadingText 提示内容 (默认 '正在加载' )
|
||||
* @property {String} image 文字上方用于替换loading动画的图片
|
||||
* @property {String} loadingMode 加载动画的模式,circle-圆形,spinner-花朵形,semicircle-半圆形 (默认 'circle' )
|
||||
* @property {Boolean} loading 是否加载中 (默认 false )
|
||||
* @property {String} bgColor 背景色 (默认 '#ffffff' )
|
||||
* @property {String} color 文字颜色 (默认 '#C8C8C8' )
|
||||
* @property {String | Number} fontSize 文字大小 (默认 19 )
|
||||
* @property {String | Number} iconSize 图标大小 (默认 28 )
|
||||
* @property {String} loadingColor 加载中图标的颜色,只能rgb或者十六进制颜色值 (默认 '#C8C8C8' )
|
||||
* @example <uv-loading mode="circle"></uv-loading>
|
||||
*/
|
||||
export default {
|
||||
name: "uv-loading-page",
|
||||
mixins: [mpMixin, mixin, props]
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/uni_modules/uv-ui-tools/libs/css/components.scss';
|
||||
$text-color: rgb(200, 200, 200) !default;
|
||||
$text-size: 19px !default;
|
||||
$uv-loading-icon-margin-bottom: 10px !default;
|
||||
|
||||
.uv-loading-page {
|
||||
@include flex(column);
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&__warpper {
|
||||
margin-top: -150px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
/* #ifndef APP-NVUE */
|
||||
color: $text-color;
|
||||
font-size: $text-size;
|
||||
/* #endif */
|
||||
@include flex(column);
|
||||
|
||||
&__loading-icon {
|
||||
margin-bottom: $uv-loading-icon-margin-bottom;
|
||||
|
||||
&__img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
&__text {
|
||||
font-size: $text-size;
|
||||
color: $text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
89
uni_modules/uv-loading-page/package.json
Normal file
89
uni_modules/uv-loading-page/package.json
Normal file
@ -0,0 +1,89 @@
|
||||
{
|
||||
"id": "uv-loading-page",
|
||||
"displayName": "uv-loading-page 加载页 全面兼容小程序、nvue、vue2、vue3等多端",
|
||||
"version": "1.0.2",
|
||||
"description": "uv-loading-page 该组件是一个页面级的加载效果,可以在页面初始化数据等场景使用,与骨架屏有相似之处。",
|
||||
"keywords": [
|
||||
"uv-loading-page",
|
||||
"uvui",
|
||||
"uv-ui",
|
||||
"page",
|
||||
"loading"
|
||||
],
|
||||
"repository": "",
|
||||
"engines": {
|
||||
"HBuilderX": "^3.1.0"
|
||||
},
|
||||
"dcloudext": {
|
||||
"type": "component-vue",
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "插件不采集任何数据",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": ""
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [
|
||||
"uv-ui-tools",
|
||||
"uv-transition",
|
||||
"uv-loading-icon"
|
||||
],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y"
|
||||
},
|
||||
"client": {
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
},
|
||||
"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",
|
||||
"飞书": "u",
|
||||
"京东": "u"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "u",
|
||||
"联盟": "u"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
uni_modules/uv-loading-page/readme.md
Normal file
11
uni_modules/uv-loading-page/readme.md
Normal file
@ -0,0 +1,11 @@
|
||||
## LoadingPage 加载页
|
||||
|
||||
> **组件名:uv-loading-page**
|
||||
|
||||
该组件是一个页面级的加载效果,可以在页面初始化数据等场景使用,与骨架屏有相似之处。
|
||||
|
||||
### <a href="https://www.uvui.cn/components/loadingPage.html" target="_blank">查看文档</a>
|
||||
|
||||
### [完整示例项目下载 | 关注更多组件](https://ext.dcloud.net.cn/plugin?name=uv-ui)
|
||||
|
||||
#### 如使用过程中有任何问题,或者您对uv-ui有一些好的建议,欢迎加入 uv-ui 交流群:<a href="https://ext.dcloud.net.cn/plugin?id=12287" target="_blank">uv-ui</a>、<a href="https://www.uvui.cn/components/addQQGroup.html" target="_blank">官方QQ群</a>
|
Reference in New Issue
Block a user