1. 给noticebar组件增加圆角,内边距,为空隐藏等参数

2. 移除divider组件的默认高度,添加上下边距控制参数
3. 移除loadmore组件的默认高度,添加上下边距控制参数
4. 优化navbar自定义导航栏组件在小程序的适配
5. 修复badge组件的size参数无效问题
6. 修复键盘组件在微信小程序上遮罩无效的问题
parent 240accf9
......@@ -26,6 +26,10 @@ import store from '@/store'
let vuexStore = require('@/store/$u.mixin.js')
Vue.mixin(vuexStore)
// 引入uView对小程序分享的mixin封装
let mpShare = require('@/uview/libs/mixin/mpShare.js');
Vue.mixin(mpShare)
const app = new Vue({
store,
...App
......
......@@ -6,7 +6,7 @@
// "current": 0, //当前激活的模式(list 的索引项)
// "list": [{
// "name": "test", //模式名称
// "path": "pages/componentsA/navbar/index", //启动页面,必选
// "path": "pages/componentsA/fullScreen/index", //启动页面,必选
// "query": "id=1&name=2" //启动参数,在页面的-+onLoad函数里面得到
// }]
// },
......@@ -39,6 +39,19 @@
"style": {
"navigationBarTitleText": "模板"
}
},
// fullScreen-压窗屏
{
"path": "uview/components/u-full-screen/u-full-screen",
"style": {
"navigationStyle": "custom",
"app-plus": {
"animationType": "fade-in",
"background": "transparent",
"backgroundColor": "rgba(0,0,0,0)",
"popGesture": "none"
}
}
}
],
"subPackages": [{
......@@ -430,6 +443,13 @@
{
"root": "pages/componentsA",
"pages": [
// fullScreen-压窗屏
{
"path": "fullScreen/index",
"style": {
"navigationBarTitleText": "fullScreen-压窗屏"
}
},
// navbar-自定义导航栏
{
"path": "navbar/index",
......@@ -446,6 +466,13 @@
"navigationBarTitleText": "field-输入框"
}
},
// modal-模态框
{
"path": "modal/index",
"style": {
"navigationBarTitleText": "modal-模态框"
}
},
// indexList索引列表
{
"path": "indexList/index",
......
<template>
<view class="u-demo">
<view class="u-demo-wrap">
<view class="u-demo-title">演示效果</view>
<view class="u-demo-area">
<view class="u-no-demo-here">
通过压窗屏打开的模态框,可以遮盖顶部原生的导航栏和底部tabbar栏。
注意:压窗屏只对APP有效,其他端无效。
</view>
</view>
</view>
<view class="u-config-wrap">
<view class="u-config-title u-border-bottom">
参数配置
</view>
<view class="u-config-item">
<view class="u-item-title">状态</view>
<u-subsection vibrateShort :current="current" :list="['打开', '关闭']" @change="openModal"></u-subsection>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
current: 1
}
},
onShow() {
this.$nextTick(function(){
this.current = 1;
})
},
methods: {
openModal(index) {
// 可以传递参数
if(index == 0) {
this.$u.route("/uview/components/u-full-screen/u-full-screen?id=1");
}
}
}
}
</script>
<style lang="scss" scoped>
.u-demo {}
</style>
<template>
<view class="u-demo">
<view class="u-demo-wrap">
<view class="u-demo-title">演示效果</view>
<view class="u-demo-area">
<u-toast ref="uToast"></u-toast>
<view class="u-no-demo-here">请点击弹出弹窗查看效果</view>
<u-modal v-model="show" :show-cancel-button="true" :show-title="showTitle">
<view class="warp" style="margin: 30rpx;" v-if="content">
<image class="logo" src="https://uviewui.com/common/logo.png" style="width: 220rpx;" mode="widthFix"></image>
</view>
</u-modal>
</view>
</view>
<view class="u-config-wrap">
<view class="u-config-title u-border-bottom">参数配置</view>
<view class="u-config-item">
<view class="u-item-title">状态</view>
<u-subsection vibrateShort :current="current" :list="['显示', '隐藏']" @change="showChange"></u-subsection>
</view>
<view class="u-config-item">
<view class="u-item-title">是否显示标题</view>
<u-subsection vibrateShort current="0" :list="['是', '否']" @change="titleChange"></u-subsection>
</view>
<view class="u-config-item">
<view class="u-item-title">自定义内容</view>
<u-subsection vibrateShort current="1" :list="['是', '否']" @change="contentChange"></u-subsection>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
show: false,
zoom: false,
content: false,
showTitle: true
};
},
computed: {
current() {
return this.show ? 0 : 1;
}
},
methods: {
showChange(index) {
this.show = index == 0 ? true : false;
},
titleChange(index) {
this.showTitle = index == 0 ? true : false;
this.show = true;
},
contentChange(index) {
this.content = index == 0 ? true : false;
this.show = true;
}
}
};
</script>
<style scoped lang="scss">
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.rect {
width: 120px;
height: 120px;
background-color: #fff;
}
.logo {
height: auto;
}
</style>
<template>
<view>
<u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
<u-modal v-model="show" :title-style="{color: 'red'}"></u-modal>
<u-button @click="open">
打开模态框
</u-button>
</view>
</template>
......@@ -8,19 +11,12 @@
export default {
data() {
return {
list: [{
name: '待收货'
}, {
name: '待付款'
}, {
name: '待评价'
}],
current: 0
show: false
}
},
methods: {
change(index) {
this.current = index;
open() {
this.show = true;
}
}
}
......
......@@ -130,6 +130,14 @@ export default [{
path: '/pages/componentsC/popup/index',
icon: 'popup',
title: 'Popup 弹出层',
}, {
path: '/pages/componentsA/modal/index',
icon: 'modal',
title: 'Modal 模态框',
}, {
path: '/pages/componentsA/fullScreen/index',
icon: 'pressingScreen',
title: 'fullScreen 压窗屏',
}]
}, {
groupName: '布局组件',
......
......@@ -106,7 +106,7 @@
await this.getElRect('menu-scroll-view', 'menuHeight');
await this.getElRect('u-tab-item', 'menuItemHeight');
}
// 将菜单菜单活动item垂直居中
// 将菜单活动item垂直居中
this.scrollTop = index * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2;
},
// 获取右边菜单每个item到顶部的距离
......@@ -131,6 +131,7 @@
},
// 右边菜单滚动
async rightScroll(e) {
this.scrollRightTop = e.detail.scrollTop;
if(this.arr.length == 0) {
await this.getMenuItemTop();
}
......
......@@ -19,7 +19,7 @@
<script>
/**
* alertTips 提示
* actionSheet 操作菜单
* @description 本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheetAPI,配置更加灵活,所有平台都表现一致。
* @tutorial https://www.uviewui.com/components/actionSheet.html
* @property {Array<Object>} list 按钮的文字数组,见官方文档示例
......
......@@ -7,18 +7,23 @@
</template>
<script>
let base64Avatar = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAeO0lEQVR4Xu1dCbQcVZn+/+q3kOS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niUiZxERnmNa3UE+caB1/Ae/m+5nTIXw7Y/P6X7G+YRPiAY2UGGbuR6m6IVCYV2xWHwi7MtZSJ9bgvidVz1HOYuZfbIkb47UxpHGzA+AFJ7nrRsYGGgqxngbq92yonJPkPHI2rZtgSjQLMx8SstQT17Gg9imBTHysrYI2gWaIHWQcl33ZSJyIhG9nIhe0ex2cdAOaUc6EdnHzAiTfC8z3xdXyOR21L3dZWiCBETctm3sfr3KMIwTRQSEiWXbOGDxTSdDJCYR+aWI3I1nYGBgtOlMc5CBJkjETn7kkUfm9/b2QsNA0yxn5hcQEZ4kyKCIYNr0KDPff+DAgbuXL19e/1J4Emqc0DpogsTcMa7rVojied540uB3cUcp3U5Eg3hABsMw4BVk0DRN/E5LTAhogsQEZKNsRKRny5Yts8fGxmZ7nje7UCj04VNEKo9hGH34RD7MvNfzPKwT9uIxDGNvuVzeh8/u7u69CxcuxO8PNCpT/715BDRBmsdQ55BhBP4fPW32bt00iqMAAAAASUVORK5CYII=";
/**
* alertTips 提示
* @description 该组件一般的图片裁剪需求场景,尤其适合于头像裁剪方面。
* @tutorial https://www.uviewui.com/components/avatarCropper.html
* @property {String Number} dest-width 输出图片宽度,高等于宽,单位px(默认200)
* @property {String Number} rect-width 裁剪框宽度,高等于宽,单位px(默认200)
* @property {String} file-type 输出的图片类型,如果'png'类型发现裁剪的图片太大,改成"jpg"即可(默认jpg)
* @event {Function} uAvatarCropper 裁剪结束后的事件,通过uni.$on监听
* @example <image class="u-avatar-demo" :src="avatar" mode="aspectFill"></image>
* avatar 头像
* @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。
* @tutorial https://www.uviewui.com/components/avatar.html
* @property {String} bg-color 背景颜色,一般显示文字时用(默认#ffffff)
* @property {String} src 头像路径,如加载失败,将会显示默认头像
* @property {String Number} size 头像尺寸,可以为指定字符串(large, default, mini),或者数值,单位rpx(默认default)
* @property {String} mode 显示类型,见上方说明(默认circle)
* @property {String} text 用文字替代图片,级别优先于src
* @property {String} img-mode 头像图片的裁剪类型,与uni的image组件的mode参数一致,如效果达不到需求,可尝试传widthFix值(默认aspectFill)
* @property {String} index 用户传递的标识符值,如果是列表循环,可穿v-for的index值
* @event {Function} click 头像被点击
* @example <u-avatar :src="src"></u-avatar>
*/
let base64Avatar = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAeO0lEQVR4Xu1dCbQcVZn+/+q3kOSFJYRAlpek69aLGcjoROOGIIogBxdwAxUZBycMLkedGUGRgApHIgzojKM448Iw45kjKG4YDEcZBWUZRg3qUUBeuqreewkJELKQBcLLS9c/52u64lu6X1dVV3fXcv9zKv3y3q27fPd+/d/lv//PpEUjoBGoiwBrbNqHwNatW2eOjo4e7nne4UR0eKFQmC0ih+PB/6ufQkR7mHkPPsvlcuWzt7d39+joaOXngYGB0fbVOt8laYLE3P8bN240u7q6FDOrcrls4ZOILCLC54w4imPmnSLiEJHNzI7neQ4z26Ojo87xxx//eBxl6DyeR0ATpImR4LruC4noFBE5lYhOqJLAaCLLpl9l5meq5HmQme9m5nuLxeJw0xnnNANNkBAd7zjOKhF5BRGdxMyvJaJ5IV7vZNKNRHSXiDzAzP+nlML/tQRAQBNkGpBGRkbMsbGxN1YJ8Uoi6g+AaRqS/FFEfgUNs2fPnjtWrlz5dBoq3Yk6aoJMQr1UKi1i5jcahvEGEQE5Cp3omDaWuU1E7jAMY313d/f6/v7+/W0sO/FFaYJgpWvb8wqFwhs8zwMh8MSymE5870+t4GNEtN7zvDssy1rPzOUUtiHWKueaII7jvI2I3s7M0BZHxopsyjMTERdaRURuVUrdl/LmRK5+7ggCbcHM5xERnpdGRi5fL64nopuVUjfnq9k52ubFDlSVFCDGsXnr6Jja+0cQpUqWTTHlmehsMq9BhoeHzyyXy6sxlUp0T6SrcrtBEmb+qmmaf0hX1cPVNrMEsW37RGb+MBG9OxwkOnUIBJ5j5huI6AbTNEdCvJeapJkjyMjIyPEHDx78CBF9IDW9kP6KP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SxO+lhx9+eM6MGTNWV4kS6pCxXk/39vZWCIMHP6dRQAAQ4tlnn60QIkJoZTT7FuxOWZZ1VxoxCFrnTBPEB+Ghhx7qmzVr1mrP86BRVgQFp1E6X7vgIBLBgLCGwTZy0gTnFdh1Gk+KqHUUkW8y841Kqfui5pGm93JBkHFE6ent7b3QMAzccX5xKzoKBPHJgs92EwfaAGQY/0TUEOPh2S0itxqGcaNpmr9uBW5JzTNXBBnfCa7rniUiZxERnmNa3UE+caB1/Ae/m+5nTIXw7Y/P6X7G+YRPiAY2UGGbuR6m6IVCYV2xWHwi7MtZSJ9bgvidVz1HOYuZfbIkb47UxpHGzA+AFJ7nrRsYGGgqxngbq92yonJPkPHI2rZtgSjQLMx8SstQT17Gg9imBTHysrYI2gWaIHWQcl33ZSJyIhG9nIhe0ex2cdAOaUc6EdnHzAiTfC8z3xdXyOR21L3dZWiCBETctm3sfr3KMIwTRQSEiWXbOGDxTSdDJCYR+aWI3I1nYGBgtOlMc5CBJkjETn7kkUfm9/b2QsNA0yxn5hcQEZ4kyKCIYNr0KDPff+DAgbuXL19e/1J4Emqc0DpogsTcMa7rVojied540uB3cUcp3U5Eg3hABsMw4BVk0DRN/E5LTAhogsQEZKNsRKRny5Yts8fGxmZ7nje7UCj04VNEKo9hGH34RD7MvNfzPKwT9uIxDGNvuVzeh8/u7u69CxcuxO8PNCpT/715BDRBmsdQ55BhBP4fPW32bt00iqMAAAAASUVORK5CYII=";
export default {
name: 'u-avatar',
props: {
// 背景颜色
bgColor: {
......
......@@ -13,8 +13,8 @@
<script>
/**
* alertTips 提示
* @description 该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式
* badge 角标
* @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所
* @tutorial https://www.uviewui.com/components/badge.html
* @property {String Number} count 展示的数字,大于 overflowCount 时显示为 ${overflowCount}+,为0且show-zero为false时隐藏
* @property {Boolean} is-dot 不展示数字,只有一个小点(默认false)
......@@ -30,6 +30,7 @@
* @example <u-badge type="error" count="7"></u-badge>
*/
export default {
name: 'u-badge',
props: {
// primary,warning,success,error,info
type: {
......
......@@ -25,7 +25,7 @@
<script>
/**
* alertTips 提示
* button 按钮
* @description Button 按钮
* @tutorial https://www.uviewui.com/components/button.html
* @property {String} size 按钮的大小
......
......@@ -24,7 +24,7 @@
<script>
/**
* alertTips 提示
* carKeyboard 车牌号键盘
* @description 此为uViw自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3中模式,都有可以打乱按键顺序的选项。
* @tutorial https://www.uviewui.com/components/keyboard.html
* @property {String} mode 键盘类型,见官网基本使用的说明(默认number)
......
......@@ -11,7 +11,7 @@
<script>
/**
* alertTips 提示
* cellGroup 单元格父组件Group
* @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。搭配u-cell-item
* @tutorial https://www.uviewui.com/components/cell.html
* @property {String} title 分组标题
......
......@@ -32,8 +32,8 @@
<script>
/**
* alertTips 提示
* @description 警告提示,展现需要关注的信息。
* cellItem 单元格Item
* @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。搭配u-cell-group使用
* @tutorial https://www.uviewui.com/components/cell.html
* @property {String} title 左侧标题
* @property {String} icon 左侧图标名,只支持uView内置图标,见Icon 图标
......
......@@ -6,7 +6,7 @@
<script>
/**
* alertTips 提示
* checkboxGroup 开关选择器父组件Group
* @description 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便
* @tutorial https://www.uviewui.com/components/checkbox.html
* @property {String Number} max 最多能选中多少个checkbox(默认999)
......@@ -16,6 +16,7 @@
* @example <u-checkbox-group></u-checkbox-group>
*/
export default {
name: 'u-checkbox-group',
props: {
// 最多能选中多少个checkbox
max: {
......
......@@ -11,7 +11,7 @@
<script>
/**
* alertTips 提示
* checkbox 复选框
* @description 该组件需要搭配checkboxGroup组件使用,以便用户进行操作时,获得当前复选框组的选中情况。
* @tutorial https://www.uviewui.com/components/checkbox.html
* @property {String Number} icon-size 图标大小,单位rpx(默认24)
......
......@@ -18,7 +18,7 @@
<script>
/**
* alertTips 提示
* circleProgress 环形进度条
* @description 展示操作或任务的当前进度,比如上传文件,是一个圆形的进度条。注意:此组件的percent值只能动态增加,不能动态减少。
* @tutorial https://www.uviewui.com/components/circleProgress.html
* @property {String Number} percent 圆环进度百分比值,为数值类型,0-100
......
......@@ -11,7 +11,16 @@
</template>
<script>
/**
* col 布局单元格
* @description 通过基础的 12 分栏,迅速简便地创建布局(搭配<u-row>使用)
* @tutorial https://www.uviewui.com/components/layout.html
* @property {String Number} span 栅格占据的列数,总12等分(默认0)
* @property {String Number} offset 分栏左边偏移,计算方式与span相同(默认0)
* @example <u-col span="3"><view class="demo-layout bg-purple"></view></u-col>
*/
export default {
name: "u-col",
props: {
// 占父容器宽度的多少等分,总分为12份
span: {
......
......@@ -22,7 +22,7 @@
<script>
/**
* alertTips 提示
* collapseItem 手风琴Item
* @description 通过折叠面板收纳内容区域(搭配u-collapse使用)
* @tutorial https://www.uviewui.com/components/collapse.html
* @property {String} title 面板标题
......
......@@ -6,7 +6,7 @@
<script>
/**
* alertTips 提示
* collapse 手风琴
* @description 通过折叠面板收纳内容区域
* @tutorial https://www.uviewui.com/components/collapse.html
* @property {Boolean} accordion 是否手风琴模式(默认true)
......
......@@ -53,11 +53,11 @@
<script>
/**
* alertTips 提示
* countDown 倒计时
* @description 该组件一般使用于某个活动的截止时间上,通过数字的变化,给用户明确的时间感受,提示用户进行某一个行为操作。
* @tutorial https://www.uviewui.com/components/countDown.html
* @property {String Number} timestamp 倒计时,单位为秒
* @property {Boolean} autopaly 是否自动开始倒计时,如果为false,需手动调用开始方法。见官网说明(默认true)
* @property {Boolean} autoplay 是否自动开始倒计时,如果为false,需手动调用开始方法。见官网说明(默认true)
* @property {String} separator 分隔符,colon为英文冒号,zh为中文(默认colon)
* @property {String Number} separator-size 分隔符的字体大小,单位rpx(默认30)
* @property {String} separator-color 分隔符的颜色(默认#303133)
......@@ -75,6 +75,7 @@
* @example <u-count-down ref="uCountDown" :timestamp="86400" :autoplay="false"></u-count-down>
*/
export default {
name: 'u-count-down',
props: {
// 倒计时的时间,秒为单位
timestamp: {
......@@ -219,7 +220,16 @@ export default {
seconds <= 0 && this.end();
let [day, hour, minute, second] = [0, 0, 0, 0];
day = Math.floor(seconds / (60 * 60 * 24));
// 判断是否显示“天”参数,如果不显示,将天部分的值,加入到小时中
// hour为给后面计算秒和分等用的(基于显示天的前提下计算)
hour = Math.floor(seconds / (60 * 60)) - day * 24;
// showHour为需要显示的小时
let showHour = null;
if(this.showDays) {
showHour = hour;
} else {
showHour = Math.floor(seconds / (60 * 60));
}
minute = Math.floor(seconds / 60) - hour * 60 - day * 24 * 60;
second = Math.floor(seconds) - day * 24 * 60 * 60 - hour * 60 * 60 - minute * 60;
// 如果小于10,在前面补上一个"0"
......@@ -227,7 +237,7 @@ export default {
minute = minute < 10 ? '0' + minute : minute;
second = second < 10 ? '0' + second : second;
this.d = day;
this.h = hour;
this.h = showHour;
this.i = minute;
this.s = second;
},
......
......@@ -13,7 +13,7 @@
<script>
/**
* alertTips 提示
* countTo 数字滚动
* @description 该组件一般用于需要滚动数字到某一个值的场景,目标要求是一个递增的值。
* @tutorial https://www.uviewui.com/components/countTo.html
* @property {String Number} start-val 开始值
......@@ -25,10 +25,12 @@
* @property {String} separator 千位分隔符,见官网说明
* @property {String} color 字体颜色(默认#303133)
* @property {String Number} font-size 字体大小,单位rpx(默认50)
* @property {Boolean} bold 字体是否加粗(默认false)
* @event {Function} end 数值滚动到目标值时触发
* @example <u-count-to ref="uCountTo" :end-val="endVal" :autoplay="autoplay"></u-count-to>
*/
export default {
name: 'u-count-to',
props: {
// 开始的数值,默认从0增长到某一个数
startVal: {
......
......@@ -16,7 +16,7 @@
<script>
/**
* alertTips 提示
* divider 分割线
* @description 区隔内容的分割线,一般用于页面底部"没有更多"的提示。
* @tutorial https://www.uviewui.com/components/divider.html
* @property {String Number} half-width 文字左或右边线条宽度,数值或百分比,数值时单位为rpx
......@@ -26,10 +26,13 @@
* @property {String} bg-color 整个divider的背景颜色(默认呢#ffffff)
* @property {String Number} height 整个divider的高度,单位rpx(默认40)
* @property {String} type 将线条设置主题色(默认primary)
* @property {String Number} margin-top 与前一个组件的距离,单位rpx(默认0)
* @property {String Number} margin-bottom 与后一个组件的距离,单位rpx(0)
* @event {Function} click divider组件被点击时触发
* @example <u-divider color="#fa3534">长河落日圆</u-divider>
*/
export default {
name: 'u-divider',
props: {
// 单一边divider横线的宽度(数值),单位rpx。或者百分比
halfWidth: {
......@@ -116,6 +119,7 @@ export default {
.u-divider-text {
white-space: nowrap;
padding: 0 16rpx;
display: inline-flex;
}
</style>
......@@ -17,8 +17,9 @@
</template>
<script>
import icon from "./icon.js";
/**
* alertTips 提示
* empty 内容为空
* @description 该组件用于需要加载内容,但是加载的第一页数据就为空,提示一个"没有内容"的场景, 我们精心挑选了十几个场景的图标,方便您使用。
* @tutorial https://www.uviewui.com/components/empty.html
* @property {String} color 文字颜色(默认#c0c4cc)
......@@ -33,7 +34,6 @@
* @event {Function} close 点击关闭按钮时触发
* @example <u-empty text="所谓伊人,在水一方" mode="list"></u-empty>
*/
import icon from "./icon.js";
export default {
name: "u-empty",
props: {
......
<template>
<view class="u-field" :class="{'u-field-border': itemIndex > 0 }">
<view class="u-field-inner" :class="[type == 'textarea' ? 'u-textarea-inner' : '', 'u-label-postion-' + labelPostion]">
<view class="u-field-inner" :class="[type == 'textarea' ? 'u-textarea-inner' : '', 'u-label-postion-' + labelPosition]">
<view class="u-label" :class="[required ? 'u-required' : '']" :style="{
justifyContent: justifyContent,
flex: labelPostion == 'left' ? `0 0 ${labelWidth}rpx` : '1'
flex: labelPosition == 'left' ? `0 0 ${labelWidth}rpx` : '1'
}">
<view class="u-icon-wrap" v-if="icon">
<u-icon size="32" :name="icon" :color="iconColor" class="u-icon"></u-icon>
......@@ -47,8 +47,8 @@
</template>
<script>
/**
* alertTips 提示
/**
* field 输入框
* @description 借助此组件,可以实现表单的输入, 有"text"和"textarea"类型的,此外,借助uView的picker和actionSheet组件可以快速实现上拉菜单,时间,地区选择等, 为表单解决方案的利器。
* @tutorial https://www.uviewui.com/components/field.html
* @property {String} type 输入框的类型(默认text)
......@@ -143,7 +143,7 @@ export default {
default: 'done'
},
// lable的位置,可选为 left-左边,top-上边
labelPostion: {
labelPosition: {
type: String,
default: 'left'
}
......@@ -165,7 +165,7 @@ export default {
let style = {};
style.textAlign = this.inputAlign;
// 判断lable的位置,如果是left的话,让input左边两边有间隙
if(this.labelPostion == 'left') {
if(this.labelPosition == 'left') {
style.margin = `0 8rpx`;
} else {
// 如果lable是top的,input的左边就没必要有间隙了
......@@ -200,7 +200,7 @@ export default {
// label的位置
fieldInnerStyle() {
let style = {};
if(this.labelPostion == 'left') {
if(this.labelPosition == 'left') {
style.flexDirection = 'row';
} else {
style.flexDirection = 'column';
......
<template>
<u-modal v-model="show" :show-cancel-button="true" confirm-text="升级" title="发现新版本" @cancel="cancel" @confirm="confirm">
<view class="u-update-content">
<rich-text :nodes="content"></rich-text>
</view>
</u-modal>
</template>
<script>
export default {
data() {
return {
show: true,
content: `
1. 修复badge组件的size参数无效问题<br>
2. 新增Modal模态框组件<br>
3. 新增压窗屏组件,可以在APP上以弹窗的形式遮盖导航栏和底部tabbar<br>
4. 修复键盘组件在微信小程序上遮罩无效的问题
`,
}
},
onShow() {
this.show = true;
},
methods: {
cancel() {
this.closeModal();
},
confirm() {
this.closeModal();
},
closeModal() {
uni.navigateBack();
}
}
}
</script>
<style scoped lang="scss">
.u-full-content {
background-color: #00C777;
}
.u-update-content {
font-size: 26rpx;
color: $u-content-color;
line-height: 1.7;
padding: 30rpx;
}
</style>
......@@ -4,14 +4,17 @@
<script>
/**
* alertTips 提示
* gap 间隔槽
* @description 该组件一般用于内容块之间的用一个灰色块隔开的场景,方便用户风格统一,减少工作量
* @tutorial https://www.uviewui.com/components/gap.html
* @property {String} bg-color 背景颜色(默认#f3f4f6)
* @property {String Number} height 分割槽高度,单位rpx(默认30)
* @property {String Number} margin-top 与前一个组件的距离,单位rpx(默认0)
* @property {String Number} margin-bottom 与后一个组件的距离,单位rpx(0)
* @example <u-gap height="80" bg-color="#bbb"></u-gap>
*/
export default {
name: "u-gap",
props: {
bgColor: {
type: String,
......@@ -22,18 +25,24 @@ export default {
type: [String, Number],
default: 30
},
margin: {
// 与上一个组件的距离
marginTop: {
type: [String, Number],
default: 0
}
},
// 与下一个组件的距离
marginBottom: {
type: [String, Number],
default: 0
},
},
computed: {
gapStyle() {
return {
backgroundColor: this.bgColor,
height: this.height + 'rpx',
marginTop: this.margin + 'rpx',
marginBttom: this.margin + 'rpx'
marginTop: this.marginTop + 'rpx',
marginBottom: this.marginBottom + 'rpx'
};
}
}
......
......@@ -12,8 +12,8 @@
<script>
/**
* alertTips 提示
* @description 宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式。搭配<u-grid>使用
* gridItem 提示
* @description 宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式。搭配u-grid使用
* @tutorial https://www.uviewui.com/components/grid.html
* @property {String} bg-color 宫格的背景颜色(默认#ffffff)
* @property {String Number} index 点击宫格时,返回的值
......
......@@ -4,7 +4,7 @@
<script>
/**
* alertTips 提示
* grid 宫格布局
* @description 宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式。
* @tutorial https://www.uviewui.com/components/grid.html
* @property {String Number} col 宫格的列数(默认3)
......@@ -14,6 +14,7 @@
* @example <u-grid :col="3" @click="click"></u-grid>
*/
export default {
name: 'u-grid',
props: {
// 分成几列
col: {
......
......@@ -11,7 +11,7 @@
<script>
/**
* alertTips 提示
* icon 图标
* @description 基于字体的图标集,包含了大多数常见场景的图标。
* @tutorial https://www.uviewui.com/components/icon.html
* @property {String} name 图标名称,见示例图标集
......
......@@ -11,7 +11,7 @@
<script>
/**
* alertTips 提示
* indexAnchor 索引列表锚点
* @description 通过折叠面板收纳内容区域,搭配<u-index-anchor>使用
* @tutorial https://www.uviewui.com/components/indexList.html#indexanchor-props
* @property {Boolean} use-slot 是否使用自定义内容的插槽(默认false)
......
......@@ -17,12 +17,21 @@
</template>
<script>
var indexList = function() {
var indexList = [];
var charCodeOfA = 'A'.charCodeAt(0);
for (var i = 0; i < 26; i++) {
indexList.push(String.fromCharCode(charCodeOfA + i));
}
return indexList;
};
/**
* alertTips 提示
* indexList 索引列表
* @description 通过折叠面板收纳内容区域,搭配<u-index-anchor>使用
* @tutorial https://www.uviewui.com/components/indexList.html#indexanchor-props
* @property {Number String} scroll-top 当前滚动高度,自定义组件无法获得滚动条事件,所以依赖接入方传入
* @property {Array[string number]} index-list 索引字符列表,数组(默认A-Z)
* @property {Array} index-list 索引字符列表,数组(默认A-Z)
* @property {Number String} z-index 锚点吸顶时的层级(默认965)
* @property {Boolean} sticky 是否开启锚点自动吸顶(默认true)
* @property {Number String} offset-top 锚点自动吸顶时与顶部的距离(默认0)
......@@ -30,14 +39,6 @@
* @event {Function} select 选中右边索引字符时触发
* @example <u-index-list :scrollTop="scrollTop"></u-index-list>
*/
var indexList = function() {
var indexList = [];
var charCodeOfA = 'A'.charCodeAt(0);
for (var i = 0; i < 26; i++) {
indexList.push(String.fromCharCode(charCodeOfA + i));
}
return indexList;
};
export default {
name: "u-index-list",
props: {
......
......@@ -24,7 +24,7 @@
<script>
/**
* alertTips 提示
* keyboard 键盘
* @description 此为uViw自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3中模式,都有可以打乱按键顺序的选项。
* @tutorial https://www.uviewui.com/components/keyboard.html
* @property {String} mode 键盘类型,见官网基本使用的说明(默认number)
......
......@@ -16,8 +16,10 @@
</template>
<script>
// observer最终赋值的是个对象,不能放到data中,vue会报错(浏览器),也不能在用到的地方let定义,某些安卓也报错……
let observer = {};
/**
* alertTips 提示
* lazyLoad 懒加载
* @description 懒加载使用的场景为:页面有很多图片时,APP会同时加载所有的图片,导致页面卡顿,各个位置的图片出现前后不一致等.
* @tutorial https://www.uviewui.com/components/lazyLoad.html
* @property {String Number} index 用户自定义值,在事件触发时回调,用以区分是哪个图片
......@@ -36,9 +38,8 @@
* @event {Function} error 图片加载失败时触发
* @example <u-lazy-load :image="image" :loading-img="loadingImg" :error-img="errorImg"></u-lazy-load>
*/
// observer最终赋值的是个对象,不能放到data中,vue会报错(浏览器),也不能在用到的地方let定义,某些安卓也报错……
let observer = {};
export default {
name: 'u-lazy-load',
props: {
index: {
type: [Number, String]
......
......@@ -10,7 +10,7 @@
<script>
/**
* alertTips 提示
* lineProgress 线型进度条
* @description 展示操作或任务的当前进度,比如上传文件,是一个线形的进度条。
* @tutorial https://www.uviewui.com/components/lineProgress.html
* @property {String Number} percent 进度条百分比值,为数值类型,0-100
......
......@@ -11,7 +11,7 @@
<script>
/**
* alertTips 提示
* link 超链接
* @description 该组件为超链接组件,在不同平台有不同表现形式:在APP平台会通过plus环境打开内置浏览器,在小程序中把链接复制到粘贴板,同时提示信息,在H5中通过window.open打开链接。
* @tutorial https://www.uviewui.com/components/link.html
* @property {String} color 文字颜色(默认#606266)
......
......@@ -5,7 +5,7 @@
<script>
/**
* alertTips 提示
* loading 加载动画
* @description 警此组件为一个小动画,目前用在uView的loadmore加载更多和switch开关等组件的正在加载状态场景。
* @tutorial https://www.uviewui.com/components/loading.html
* @property {String} mode 模式选择,见官网说明(默认circle)
......
......@@ -17,7 +17,7 @@
<script>
/**
* alertTips 提示
* loadmore 加载更多
* @description 此组件一般用于标识页面底部加载数据时的状态。
* @tutorial https://www.uviewui.com/components/loadMore.html
* @property {String} status 组件状态(默认loadmore)
......@@ -33,7 +33,7 @@
* @example <u-loadmore :status="status" icon-type="iconType" load-text="loadText" />
*/
export default {
name: "loadMore",
name: "u-loadmore",
props: {
//当前页面背景颜色,如果背景为非白色的时候,需要把此值设置为背景的颜色
bgColor: {
......
......@@ -6,7 +6,7 @@
<script>
/**
* alertTips 提示
* mask 遮罩
* @description 创建一个遮罩层,用于强调特定的页面元素,并阻止用户对遮罩下层的内容进行操作,一般用于弹窗场景
* @tutorial https://www.uviewui.com/components/mask.html
* @property {Boolean} show 是否显示遮罩(默认false)
......
......@@ -34,7 +34,7 @@
<script>
/**
* alertTips 提示
* messageInput 验证码输入框
* @description 该组件一般用于验证用户短信验证码的场景,也可以结合uView的键盘组件使用
* @tutorial https://www.uviewui.com/components/messageInput.html
* @property {String Number} maxlength 输入字符个数(默认4)
......@@ -47,11 +47,13 @@
* @property {String Number} font-size 字体大小,单位rpx(默认60)
* @property {String} active-color 当前激活输入框的样式(默认#2979ff)
* @property {String} focus 非激活输入框的样式,文字颜色同此值(默认#606266)
* @property {String | Number} width 输入框宽度,单位rpx,高等于宽(默认80)
* @event {Function} change 输入内容发生改变时触发,具体见官网说明
* @event {Function} finish 输入字符个数达maxlength值时触发,见官网说明
* @example <u-message-input mode="bottomLine"></u-message-input>
*/
export default {
name: "u-message-input",
props: {
// 最大输入长度
maxlength: {
......
<template>
<view>
<u-popup :zoom="zoom" mode="center" :z-index="uZIndex" v-model="value" :length="width" :mask-close-able="false" :border-radius="borderRadius">
<view class="u-model">
<view v-if="showTitle" class="u-model-title u-line-1" :style="[titleStyle]">{{ title }}</view>
<view class="u-model-content">
<slot>
<view class="u-model-content-meeeage" :style="[contentStyle]">{{ content }}</view>
</slot>
</view>
<view class="u-model-footer u-border-top">
<view
v-if="showCancelButton"
:hover-stay-time="100"
hover-class="btn-hover"
class="u-model-footer-button"
type="default"
:style="[cancelBtnStyle]"
@click="confirm"
>
{{cancelText}}
</view>
<view
v-if="showConfirmButton"
:hover-stay-time="100"
hover-class="btn-hover"
class="u-model-footer-button hairline-left"
:style="[confirmBtnStyle]"
@tap="close"
>
{{confirmText}}
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
/**
* modal 模态框
* @description 弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作
* @tutorial https://www.uviewui.com/components/modal.html
* @property {Boolean} value 是否显示模态框
* @property {String | Number} z-index 层级
* @property {String} title 模态框标题(默认"提示")
* @property {String | Number} width 模态框宽度(默认600)
* @property {String} content 模态框内容(默认"内容")
* @property {Boolean} show-title 是否显示标题(默认true)
* @property {Boolean} show-confirm-button 是否显示确认按钮(默认true)
* @property {Boolean} show-cancel-button 是否显示取消按钮(默认false)
* @property {String} confirm-text 确认按钮的文字内容(默认"确认")
* @property {String} cancel-text 取消按钮的文字内容(默认"取消")
* @property {String} cancel-color 取消按钮的颜色(默认"#606266")
* @property {String} confirm-color 确认按钮的文字内容(默认"#2979ff")
* @property {String | Number} border-radius 模态框圆角值,单位rpx(默认16)
* @property {Object} title-style 自定义标题样式,对象形式
* @property {Object} content-style 自定义内容样式,对象形式
* @property {Object} cancel-style 自定义取消按钮样式,对象形式
* @property {Object} confirm-style 自定义确认按钮样式,对象形式
* @property {Boolean} zoom 是否开启缩放模式(默认true)
* @event {Function} confirm 确认按钮被点击
* @event {Function} cancel 取消按钮被点击
* @example <u-modal :src="title" :content="content"></u-modal>
*/
export default {
props: {
name: 'u-modal',
// 是否显示Modal
value: {
type: Boolean,
default: false
},
// 层级z-index
zIndex: {
type: [Number, String],
default: ''
},
// 标题
title: {
type: [String],
default: '提示'
},
// 弹窗宽度,可以是数值(rpx),百分比,auto等
width: {
type: [Number, String],
default: 600
},
// 弹窗内容
content: {
type: String,
default: '内容'
},
// 是否显示标题
showTitle: {
type: Boolean,
default: true
},
// 是否显示确认按钮
showConfirmButton: {
type: Boolean,
default: true
},
// 是否显示取消按钮
showCancelButton: {
type: Boolean,
default: false
},
// 确认文案
confirmText: {
type: String,
default: '确认'
},
// 取消文案
cancelText: {
type: String,
default: '取消'
},
// 确认按钮颜色
confirmColor: {
type: String,
default: '#2979ff'
},
// 取消文字颜色
cancelColor: {
type: String,
default: '#606266'
},
// 圆角值
borderRadius: {
type: [Number, String],
default: 16
},
// 标题的样式
titleStyle: {
type: Object,
default() {
return {}
}
},
// 内容的样式
contentStyle: {
type: Object,
default() {
return {}
}
},
// 取消按钮的样式
cancelStyle: {
type: Object,
default() {
return {}
}
},
// 确定按钮的样式
confirmStyle: {
type: Object,
default() {
return {}
}
},
// 是否开启缩放效果
zoom: {
type: Boolean,
default: true
}
},
computed: {
cancelBtnStyle() {
return Object.assign({color: this.cancelColor}, this.cancelStyle);
},
confirmBtnStyle() {
return Object.assign({color: this.confirmColor}, this.confirmStyle);
},
uZIndex() {
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
}
},
methods: {
confirm() {
this.$emit('confirm');
this.$emit('input', false);
},
close() {
this.$emit('cancel');
this.$emit('input', false);
}
}
};
</script>
<style lang="scss" scoped>
.u-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
visibility: hidden;
}
.btn-hover {
background-color: rgb(230, 230, 230);
}
.u-mask-show {
opacity: 1;
visibility: visible;
}
.u-model {
height: auto;
overflow: hidden;
font-size: 32rpx;
background-color: #fff;
&-title {
padding-top: 48rpx;
font-weight: 500;
text-align: center;
color: $u-main-color;
}
&-content {
&-meeeage {
padding: 48rpx;
font-size: 30rpx;
text-align: center;
color: $u-content-color;
}
}
&-footer {
display: flex;
&-button {
flex: 1;
height: 100rpx;
line-height: 100rpx;
font-size: 32rpx;
box-sizing: border-box;
cursor: pointer;
text-align: center;
border-radius: 4rpx;
}
}
}
</style>
......@@ -27,8 +27,15 @@
</template>
<script>
// 获取系统状态栏的高度
let systemInfo = uni.getSystemInfoSync();
let menuButtonInfo = {};
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
// #ifdef MP
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
// #endif
/**
* alertTips 提示
* navbar 自定义导航栏
* @description 此组件一般用于在特殊情况下,需要自定义导航栏的时候用到,一般建议使用uniapp自带的导航栏。
* @tutorial https://www.uviewui.com/components/navbar.html
* @property {String Number} height 导航栏高度(不包括状态栏高度在内,内部自动加上),注意这里的单位是px(默认44)
......@@ -48,15 +55,8 @@
* @property {Boolean} border-bottom 导航栏底部是否显示下边框,如定义了较深的背景颜色,可取消此值(默认true)
* @example <u-navbar back-text="返回" title="剑未配妥,出门已是江湖"></u-navbar>
*/
// 获取系统状态栏的高度
let systemInfo = uni.getSystemInfoSync();
let menuButtonInfo = {};
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
// #ifdef MP
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
// #endif
export default {
name: "u-navbar",
props: {
// 导航栏高度,单位px,非rpx
height: {
......
......@@ -20,7 +20,7 @@
<script>
/**
* alertTips 提示
* noNetwork 无网络提示
* @description 该组件无需任何配置,引入即可,内部自动处理所有功能和事件。
* @tutorial https://www.uviewui.com/components/noNetwork.html
* @property {String} tips 没有网络时的提示语(默认哎呀,网络信号丢失)
......
......@@ -46,7 +46,7 @@
</template>
<script>
/**
* alertTips 提示
* noticeBar 滚动通知
* @description 该组件用于滚动通告场景,有多种模式可供选择
* @tutorial https://www.uviewui.com/components/noticeBar.html
* @property {Array} list 滚动内容,数组形式,见上方说明
......@@ -64,7 +64,10 @@
* @property {String Number} speed 水平滚动时的滚动速度,即每秒移动多少距离,只对水平衔接方式有效,单位rpx(默认160)
* @property {String Number} font-size 字体大小,单位rpx(默认28)
* @property {Boolean} is-circular mode为horizontal时,指明是否水平衔接滚动(默认true)
* @property {String} play-state 播放状态,paly - 播放,paused - 暂停(默认paly)
* @property {String} play-state 播放状态,play - 播放,paused - 暂停(默认play)
* @property {String Nubmer} border-radius 通知栏圆角(默认为0)
* @property {String Nubmer} padding 内边距,字符串,与普通的内边距css写法一直(默认"18rpx 24rpx")
* @property {Boolean} no-list-hidden 列表为空时,是否显示组件(默认false)
* @property {Boolean} disable-touch 是否禁止通过手动滑动切换通知,只有mode = vertical,或者mode = horizontal且is-circular = false时有效(默认true)
* @event {Function} click 点击通告文字触发,只有mode = vertical,或者mode = horizontal且is-circular = false时有效
* @event {Function} close 点击右侧关闭图标触发
......@@ -73,6 +76,7 @@
* @example <u-notice-bar :more-icon="true" :list="list"></u-notice-bar>
*/
export default {
name: "u-notice-bar",
props: {
// 显示的内容,数组
list: {
......
......@@ -27,7 +27,7 @@
<script>
/**
* alertTips 提示
* numberBox 步进器
* @description 该组件一般用于商城购物选择物品数量的场景。注意:该输入框只能输入大于或等于0的整数,不支持小数输入
* @tutorial https://www.uviewui.com/components/numberBox.html
* @property {Number} value 输入框初始值(默认1)
......
......@@ -70,8 +70,12 @@
</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';
/**
* alertTips 提示
* picker picker弹出选择器
* @description 此选择器有两种弹出模式:一是时间模式,可以配置年,日,月,时,分,秒参数 二是地区模式,可以配置省,市,区参数
* @tutorial https://www.uviewui.com/components/picker.html
* @property {Object} params 需要显示的参数,见官网说明
......@@ -90,10 +94,6 @@
* @event {Function} cancel 点击取消按钮,返回当前选择的值
* @example <u-picker v-model="show" mode="time"></u-picker>
*/
import provinces from '@/uview/libs/util/province.js';
import citys from '@/uview/libs/util/city.js';
import areas from '@/uview/libs/util/area.js';
export default {
name: "u-picker",
props: {
......
......@@ -20,7 +20,7 @@
<script>
/**
* alertTips 提示
* popup 弹窗
* @description 弹出层容器,用于展示弹窗、信息提示等内容,支持上、下、左、右和中部弹出。组件只提供容器,内部内容由用户自定义
* @tutorial https://www.uviewui.com/components/popup.html
* @property {String} mode 弹出方向(默认left)
......
......@@ -6,8 +6,8 @@
<script>
/**
* alertTips 提示
* @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配<u-radio>使用
* radioRroup 单选框父组件
* @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配u-radio使用
* @tutorial https://www.uviewui.com/components/radio.html
* @property {Boolean} disabled 是否禁用所有radio(默认false)
* @property {String} active-color 选中时的颜色,应用到所有子Radio组件(默认#2979ff)
......
......@@ -11,8 +11,8 @@
<script>
/**
* alertTips 提示
* @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配<u-radio-group>使用
* radio 单选框
* @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配u-radio-group使用
* @tutorial https://www.uviewui.com/components/radio.html
* @property {String Number} icon-size 图标大小,单位rpx(默认24)
* @property {String Number} size 组件整体的大小,单位rpx(默认40)
......
......@@ -12,7 +12,7 @@
<script>
/**
* alertTips 提示
* rate 评分
* @description 该组件一般用于满意度调查,星型评分的场景
* @tutorial https://www.uviewui.com/components/rate.html
* @property {String Number} count 最多可选的星星数量(默认5)
......
......@@ -17,7 +17,7 @@
<script>
/**
* alertTips 提示
* readMore 阅读更多
* @description 该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。
* @tutorial https://www.uviewui.com/components/readMore.html
* @property {String Number} show-height 内容超出此高度才会显示展开全文按钮,单位rpx(默认400)
......
......@@ -10,7 +10,17 @@
</template>
<script>
/**
* row 行布局
* @description 通过基础的 12 分栏,迅速简便地创建布局。
* @tutorial https://www.uviewui.com/components/layout.html#row-props
* @property {String Number} gutter 栅格间隔,左右各为此值的一半,单位rpx(默认0)
* @property {String} justify 水平排列方式(微信小程序暂不支持)默认(start(或flex-start))
* @property {String} align 垂直排列方式(默认center)
* @example <u-row gutter="16"></u-row>
*/
export default {
name: "u-row",
props: {
// 给col添加间距,左右边距各占一半
gutter: {
......@@ -35,13 +45,13 @@
},
computed: {
uJustify() {
if(this.justify == 'end' || this.justify == 'start') return 'flex-' + this.justify;
else if(this.justify == 'around' || this.justify == 'between') return 'space-' + this.justify;
if (this.justify == 'end' || this.justify == 'start') return 'flex-' + this.justify;
else if (this.justify == 'around' || this.justify == 'between') return 'space-' + this.justify;
else return this.justify;
},
uAlignItem() {
if(this.align == 'top') return 'flex-start';
if(this.align == 'bottom') return 'flex-end';
if (this.align == 'top') return 'flex-start';
if (this.align == 'bottom') return 'flex-end';
else return this.align;
}
}
......
......@@ -37,7 +37,7 @@
<script>
/**
* alertTips 提示
* search 搜索框
* @description 搜索组件,集成了常见搜索框所需功能,用户可以一键引入,开箱即用。
* @tutorial https://www.uviewui.com/components/search.html
* @property {String} shape 搜索框形状,round-圆形,square-方形(默认round)
......@@ -60,6 +60,7 @@
* @example <u-search placeholder="日照香炉生紫烟" v-model="keyword"></u-search>
*/
export default {
name: "u-search",
props: {
// 搜索框形状,round-圆形,square-方形
shape: {
......
......@@ -20,7 +20,7 @@
<script>
/**
* alertTips 提示
* section 查看更多
* @description 该组件一般用于分类信息有很多,但是限于篇幅只能列出一部分,让用户通过"查看更多"获得更多信息的场景,实际效果见演示。
* @tutorial https://www.uviewui.com/components/section.html
* @property {String} title 左边主标题
......@@ -33,6 +33,7 @@
* @example <u-section title="今日热门" :right="false"></u-section>
*/
export default {
name: "u-section",
props: {
// 标题信息
title: {
......
......@@ -41,7 +41,7 @@
<script>
/**
* alertTips 提示
* skeleton 骨架屏
* @description 骨架屏一般用于页面在请求远程数据尚未完成时,页面用灰色块预显示本来的页面结构,给用户更好的体验。
* @tutorial https://www.uviewui.com/components/skeleton.html
* @property {String} el-color 骨架块状元素的背景颜色(默认#e5e5e5)
......
......@@ -15,7 +15,20 @@
</template>
<script>
/**
* steps 步骤条
* @description 该组件一般用于完成一个任务要分几个步骤,标识目前处于第几步的场景。
* @tutorial https://www.uviewui.com/components/steps.html
* @property {String} mode 设置模式(默认dot)
* @property {Array} list 数轴条数据,数组。具体见上方示例
* @property {String} type type主题(默认primary)
* @property {Number String} current 设置当前处于第几步
* @property {String} active-color 已完成步骤的激活颜色,如设置,type值会失效
* @property {String} un-active-color 未激活的颜色,用于表示未完成步骤的颜色(默认#606266)
* @example <u-steps :list="numList" active-color="#fa3534"></u-steps>
*/
export default {
name: "u-steps",
props: {
// 步骤条的类型,dot|number
mode: {
......
......@@ -18,7 +18,21 @@
</template>
<script>
/**
* sticky 吸顶
* @description 该组件与CSS中position: sticky属性实现的效果一致,当组件达到预设的到顶部距离时, 就会固定在指定位置,组件位置大于预设的顶部距离时,会重新按照正常的布局排列。
* @tutorial https://www.uviewui.com/components/sticky.html
* @property {String Number} offset-top 吸顶时与顶部的距离,单位rpx(默认0)
* @property {String Number} index 自定义标识,用于区分是哪一个组件
* @property {Boolean} enable 是否开启吸顶功能(默认true)
* @property {String} bg-color 组件背景颜色(默认#ffffff)
* @property {String Number} z-index 吸顶时的z-index值(默认970)
* @property {String Number} h5-nav-height 导航栏高度,自定义导航栏时(无导航栏时需设置为0),需要传入此值,单位px(默认44)
* @event {Function} fixed 组件吸顶时触发
* @example <u-sticky offset-top="200"><view>塞下秋来风景异,衡阳雁去无留意</view></u-sticky>
*/
export default {
name: "u-sticky",
props: {
// 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
offsetTop: {
......@@ -66,7 +80,7 @@
this.initObserver();
},
enable(val) {
if(val == false) {
if (val == false) {
this.fixed = false;
this.disconnectObserver('contentObserver');
} else {
......@@ -84,7 +98,7 @@
},
methods: {
initObserver() {
if(!this.enable) return ;
if (!this.enable) return;
// #ifdef H5
this.stickyTop = this.offsetTop != 0 ? uni.upx2px(this.offsetTop) + this.h5NavHeight : this.h5NavHeight;
// #endif
......@@ -111,7 +125,7 @@
top: -this.stickyTop
});
contentObserver.observe('.' + this.elClass, res => {
if (!this.enable) return ;
if (!this.enable) return;
this.setFixed(res.boundingClientRect.top);
});
this.contentObserver = contentObserver;
......@@ -119,7 +133,7 @@
setFixed(top) {
const fixed = top < this.stickyTop;
this.fixed = fixed;
if(fixed) this.$emit('fixed', this.index);
if (fixed) this.$emit('fixed', this.index);
},
disconnectObserver(observerName) {
const observer = this[observerName];
......
<template>
<view class="u-subsection" :style="[subsectionStyle]">
<view
class="u-item u-line-1"
:style="[itemStyle(index)]"
@tap="click(index)"
:class="[noBorderRight(index), 'u-item-' + index]"
v-for="(item, index) in listInfo"
:key="index"
>
<view class="u-item u-line-1" :style="[itemStyle(index)]" @tap="click(index)" :class="[noBorderRight(index), 'u-item-' + index]"
v-for="(item, index) in listInfo" :key="index">
<view :style="[textStyle(index)]" class="u-item-text u-line-1">{{ item.name }}</view>
</view>
<view class="u-item-bg" :style="[itemBarStyle]"></view>
......@@ -15,12 +9,30 @@
</template>
<script>
export default {
/**
* subsection 分段器
* @description 该分段器一般用于用户从几个选项中选择某一个的场景
* @tutorial https://www.uviewui.com/components/subsection.html
* @property {Array} list 选项的数组,形式见上方"基本使用"
* @property {String Number} current 初始化时默认选中的选项索引值(默认0)
* @property {String} active-color 激活时的颜色,mode为subsection时固定为白色(默认#ff9900)
* @property {String} inactive-color 未激活时字体的颜色,mode为subsection时无效(默认#303133)
* @property {String} mode 模式选择,见官网"模式选择"说明(默认button)
* @property {String Number} font-size 字体大小,单位rpx(默认28)
* @property {Boolean} animation 是否开启动画效果,见上方说明(默认true)
* @property {Boolean} bold 激活选项的字体是否加粗(默认true)
* @property {String} bg-color 组件背景颜色,mode为button时有效(默认#eeeeef)
* @property {String} button-color 按钮背景颜色,mode为button时有效(默认#ffffff)
* @event {Function} change 分段器选项发生改变时触发
* @example <u-subsection active-color="#ff9900"></u-subsection>
*/
export default {
name: "u-subsection",
props: {
// tab的数据
list: {
type: Array,
default() {
default () {
return [];
}
},
......@@ -281,18 +293,18 @@ export default {
}
}
}
};
};
</script>
<style lang="scss" scoped>
.u-subsection {
.u-subsection {
display: flex;
align-items: center;
overflow: hidden;
position: relative;
}
}
.u-item {
.u-item {
flex: 1;
text-align: center;
font-size: 26rpx;
......@@ -303,34 +315,34 @@ export default {
color: $u-main-color;
display: inline-flex;
padding: 0 6rpx;
}
}
.u-item-bg {
.u-item-bg {
background-color: $u-type-primary;
position: absolute;
z-index: -1;
}
}
.u-none-border-right {
.u-none-border-right {
border-right: none !important;
}
}
.u-item-first {
.u-item-first {
border-top-left-radius: 8rpx;
border-bottom-left-radius: 8rpx;
}
}
.u-item-last {
.u-item-last {
border-top-right-radius: 8rpx;
border-bottom-right-radius: 8rpx;
}
}
.u-item-text {
.u-item-text {
transition: all 0.35s;
color: $u-main-color;
display: flex;
align-items: center;
position: relative;
z-index: 99;
}
}
</style>
<template>
<movable-area class="u-swipe-action" :style="{backgroundColor: bgColor}">
<movable-view
class="u-swipe-view"
@change="change"
@touchend="touchend"
@touchstart="touchstart"
direction="horizontal"
:disabled="disabled"
:x="moveX"
:style="{
<movable-view class="u-swipe-view" @change="change" @touchend="touchend" @touchstart="touchstart" direction="horizontal"
:disabled="disabled" :x="moveX" :style="{
width: movableViewWidth
}"
>
<view class="u-swipe-content"><slot></slot></view>
<view
class="u-swipe-del"
@tap.stop="del"
:style="{
}">
<view class="u-swipe-content">
<slot></slot>
</view>
<view class="u-swipe-del" @tap.stop="del" :style="{
width: innerBtnWidth + 'px',
backgroundColor: btnBgColor
}"
>
}">
<view class="u-btn-text">{{ btnText }}</view>
</view>
</movable-view>
......@@ -28,7 +18,23 @@
</template>
<script>
export default {
/**
* swipeAction 左滑单元格
* @description 该组件一般用于左滑唤出操作菜单的场景,用的最多的是左滑删除操作。
* @tutorial https://www.uviewui.com/components/swipeAction.html
* @property {String} btn-text 按钮文字(默认“删除”)
* @property {String} btn-bg-color 按钮背景颜色(默认#ff0033)
* @property {String} bg-color 整个组件背景颜色(默认#ffffff)
* @property {String Number} index 标识符,点击时候用于区分点击了哪一个,用v-for循环时的index即可
* @property {String Number} btn-width 按钮宽度,单位rpx(默认180)
* @property {Boolean} disabled 是否禁止某个swipeAction滑动(默认false)
* @event {Function} click 点击组件时触发
* @event {Function} close 组件触发关闭状态时
* @event {Function} open 组件触发打开状态时
* @example <u-swipe-action btn-text="收藏">...</u-swipe-action>
*/
export default {
name: "u-swipe-action",
props: {
// 左边滑动出来按钮的文字
btnText: {
......@@ -70,7 +76,7 @@ export default {
show: {
immediate: true,
handler(nVal, oVal) {
if(nVal) {
if (nVal) {
this.open();
} else {
this.close();
......@@ -117,8 +123,8 @@ export default {
},
// 打开按钮的状态
open() {
if(this.disabled) return ;
this.moveX = - this.btnWidth;
if (this.disabled) return;
this.moveX = -this.btnWidth;
this.status = true;
},
// 用户手指离开movable-view元素,停止触摸
......@@ -129,10 +135,10 @@ export default {
// 这一步很重要,需要先给this.moveX一个变化的随机值,否则因为前后设置的为同一个值
// props单向数据流的原因,导致movable-view元素不会发生变化,切记,详见文档:
// https://uniapp.dcloud.io/use?id=%e5%b8%b8%e8%a7%81%e9%97%ae%e9%a2%98
this.$nextTick(function(){
if(this.status == false) {
this.$nextTick(function() {
if (this.status == false) {
// 关闭状态左滑,产生的x轴位移为负值,也就是说滑动的距离大于按钮的三分之一宽度,自动展开按钮
if(this.scrollX <= -this.innerBtnWidth / 3) {
if (this.scrollX <= -this.innerBtnWidth / 3) {
this.moveX = -this.innerBtnWidth; // 按钮宽度的负值,即为展开状态movable-view元素左滑的距离
this.status = true; // 标志当前为展开状态
this.emitOpenEvent();
......@@ -145,7 +151,7 @@ export default {
}
} else {
// 如果在打开的状态下,右滑动的距离X轴偏移超过按钮的三分之一(负值反过来的三分之二),自动收起按钮
if(this.scrollX > -this.innerBtnWidth * 2 / 3) {
if (this.scrollX > -this.innerBtnWidth * 2 / 3) {
this.moveX = 0;
this.$nextTick(() => {
this.moveX = 101;
......@@ -176,37 +182,38 @@ export default {
})
}
}
}
}
</script>
<style scoped lang="scss">
.u-swipe-action {
.u-swipe-action {
width: auto;
height: initial;
position: relative;
overflow: hidden;
}
}
.u-swipe-view {
.u-swipe-view {
display: flex;
height: initial;
position: relative; /* 这一句很关键,覆盖默认的绝对定位 */
}
position: relative;
/* 这一句很关键,覆盖默认的绝对定位 */
}
.u-swipe-content {
.u-swipe-content {
flex: 1;
}
}
.u-swipe-del {
.u-swipe-del {
position: relative;
font-size: 30rpx;
color: #ffffff;
}
}
.u-btn-text {
.u-btn-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
</style>
<template>
<view class="u-swiper-wrap"
:style="{
<view class="u-swiper-wrap" :style="{
borderRadius: `${borderRadius}rpx`,
}">
<swiper
@change="change"
:current="current"
:interval="interval"
:circular="circular"
:duration="duration"
:autoplay="autoplay"
:previous-margin="effect3d ? effect3dPreviousMargin + 'rpx' : '0'"
:next-margin="effect3d ? effect3dPreviousMargin + 'rpx' : '0'"
<swiper @change="change" :current="current" :interval="interval" :circular="circular" :duration="duration" :autoplay="autoplay"
:previous-margin="effect3d ? effect3dPreviousMargin + 'rpx' : '0'" :next-margin="effect3d ? effect3dPreviousMargin + 'rpx' : '0'"
:style="{
height: height + 'rpx'
}"
>
<swiper-item
class="u-swiper-item"
v-for="(item, index) in list"
:key="index"
@tap="listClick(index)"
>
<view
class="u-list-image-wrap"
:class="[current != index ? 'u-list-scale' : '']"
:style="{
}">
<swiper-item class="u-swiper-item" v-for="(item, index) in list" :key="index" @tap="listClick(index)">
<view class="u-list-image-wrap" :class="[current != index ? 'u-list-scale' : '']" :style="{
borderRadius: `${borderRadius}rpx`,
transform: effect3d && current != index ? 'scaleY(0.9)' : 'scaleY(1)',
margin: effect3d && current != index ? '0 20rpx' : 0
}"
>
}">
<image class="u-swiper-image" :src="item[name]" :mode="imgMode"></image>
<view v-if="title"
class="u-swiper-title u-line-1"
:style="{
<view v-if="title" class="u-swiper-title u-line-1" :style="{
'padding-bottom': titlePaddingBottom
}"
>
}">
{{ item.title }}
</view>
</view>
</swiper-item>
</swiper>
<view
class="u-swiper-indicator"
:style="{
<view class="u-swiper-indicator" :style="{
top: indicatorPos == 'topLeft' || indicatorPos == 'topCenter' || indicatorPos == 'topRight' ? '12rpx' : 'auto',
bottom: indicatorPos == 'bottomLeft' || indicatorPos == 'bottomCenter' || indicatorPos == 'bottomRight' ? '12rpx' : 'auto',
justifyContent: justifyContent,
padding: `0 ${effect3d ? '74rpx' : '24rpx'}`
}"
>
}">
<block v-if="mode == 'rect'">
<view class="u-indicator-item-rect" :class="{ 'u-indicator-item-rect-active': index == current }" v-for="(item, index) in list" :key="index"></view>
<view class="u-indicator-item-rect" :class="{ 'u-indicator-item-rect-active': index == current }" v-for="(item, index) in list"
:key="index"></view>
</block>
<block v-if="mode == 'dot'">
<view class="u-indicator-item-dot" :class="{ 'u-indicator-item-dot-active': index == current }" v-for="(item, index) in list" :key="index"></view>
<view class="u-indicator-item-dot" :class="{ 'u-indicator-item-dot-active': index == current }" v-for="(item, index) in list"
:key="index"></view>
</block>
<block v-if="mode == 'round'">
<view class="u-indicator-item-round" :class="{ 'u-indicator-item-round-active': index == current }" v-for="(item, index) in list" :key="index"></view>
<view class="u-indicator-item-round" :class="{ 'u-indicator-item-round-active': index == current }" v-for="(item, index) in list"
:key="index"></view>
</block>
<block v-if="mode == 'number'">
<view class="u-indicator-item-number">{{ current + 1 }}/{{ list.length }}</view>
......@@ -69,12 +48,33 @@
</template>
<script>
export default {
/**
* swiper 轮播图
* @description 该组件一般用于导航轮播,广告展示等场景,可开箱即用
* @tutorial https://www.uviewui.com/components/swiper.html
* @property {Array} list 轮播图数据,见官网"基本使用"说明
* @property {Boolean} title 是否显示标题文字,需要配合list参数,见官网说明(默认false)
* @property {String} mode 指示器模式,见官网说明(默认round)
* @property {String Number} height 轮播图组件高度,单位rpx(默认250)
* @property {String} indicator-pos 指示器的位置(默认bottomCenter)
* @property {Boolean} effect3d 是否开启3D效果(默认false)
* @property {Boolean} autoplay 是否自动播放(默认true)
* @property {String Number} interval 自动轮播时间间隔,单位ms(默认2500)
* @property {Boolean} circular 是否衔接播放,见官网说明(默认true)
* @property {String Number} border-radius 轮播图圆角值,单位rpx(默认8)
* @property {Object} title-style 自定义标题样式
* @property {String Number} effect3d-previous-margin mode = true模式的情况下,激活项与前后项之间的距离,单位rpx(默认50)
* @property {String} img-mode 图片的裁剪模式,详见image组件裁剪模式(默认aspectFill)
* @event {Function} click 点击轮播图时触发
* @example <u-swiper :list="list" mode="dot" indicator-pos="bottomRight"></u-swiper>
*/
export default {
name: "u-swiper",
props: {
// 轮播图的数据,格式如:[{image: 'xxxx', title: 'xxxx'},{image: 'yyyy', title: 'yyyy'}],其中title字段可选
list: {
type: Array,
default() {
default () {
return [];
}
},
......@@ -86,7 +86,7 @@ export default {
// 用户自定义的指示器的样式
indicator: {
type: Object,
default() {
default () {
return {};
}
},
......@@ -158,16 +158,16 @@ export default {
},
computed: {
justifyContent() {
if(this.indicatorPos == 'topLeft' || this.indicatorPos == 'bottomLeft') return 'flex-start';
if(this.indicatorPos == 'topCenter' || this.indicatorPos == 'bottomCenter') return 'center';
if(this.indicatorPos == 'topRight' || this.indicatorPos == 'bottomRight') return 'flex-end';
if (this.indicatorPos == 'topLeft' || this.indicatorPos == 'bottomLeft') return 'flex-start';
if (this.indicatorPos == 'topCenter' || this.indicatorPos == 'bottomCenter') return 'center';
if (this.indicatorPos == 'topRight' || this.indicatorPos == 'bottomRight') return 'flex-end';
},
titlePaddingBottom() {
let tmp = 0;
if(this.mode == 'none') return '12rpx';
if(['bottomLeft', 'bottomCenter', 'bottomRight'].indexOf(this.indicatorPos) >= 0 && this.mode == 'number') {
if (this.mode == 'none') return '12rpx';
if (['bottomLeft', 'bottomCenter', 'bottomRight'].indexOf(this.indicatorPos) >= 0 && this.mode == 'number') {
tmp = '60rpx';
} else if(['bottomLeft', 'bottomCenter', 'bottomRight'].indexOf(this.indicatorPos) >= 0 && this.mode != 'number') {
} else if (['bottomLeft', 'bottomCenter', 'bottomRight'].indexOf(this.indicatorPos) >= 0 && this.mode != 'number') {
tmp = '40rpx';
} else {
tmp = '12rpx';
......@@ -183,16 +183,16 @@ export default {
this.current = e.detail.current;
}
}
};
};
</script>
<style lang="scss" scoped>
.u-swiper-wrap {
.u-swiper-wrap {
position: relative;
overflow: hidden;
}
}
.u-swiper-image {
.u-swiper-image {
width: 100%;
will-change: transform;
height: 100%;
......@@ -200,69 +200,69 @@ export default {
/* #ifdef H5 */
pointer-events: none;
/* #endif */
}
}
.u-swiper-indicator {
.u-swiper-indicator {
padding: 0 24rpx;
position: absolute;
display: flex;
width: 100%;
z-index: 1;
}
}
.u-indicator-item-rect {
.u-indicator-item-rect {
width: 26rpx;
height: 8rpx;
margin: 0 6rpx;
transition: all 0.5s;
background-color: rgba(0, 0, 0, 0.3);
}
}
.u-indicator-item-rect-active {
.u-indicator-item-rect-active {
background-color: rgba(255, 255, 255, 0.8);
}
}
.u-indicator-item-dot {
.u-indicator-item-dot {
width: 14rpx;
height: 14rpx;
margin: 0 6rpx;
border-radius: 20rpx;
transition: all 0.5s;
background-color: rgba(0, 0, 0, 0.3);
}
}
.u-indicator-item-dot-active {
.u-indicator-item-dot-active {
background-color: rgba(255, 255, 255, 0.8);
}
}
.u-indicator-item-round {
.u-indicator-item-round {
width: 14rpx;
height: 14rpx;
margin: 0 6rpx;
border-radius: 20rpx;
transition: all 0.5s;
background-color: rgba(0, 0, 0, 0.3);
}
}
.u-indicator-item-round-active {
.u-indicator-item-round-active {
width: 34rpx;
background-color: rgba(255, 255, 255, 0.8);
}
}
.u-indicator-item-number {
.u-indicator-item-number {
padding: 6rpx 16rpx;
line-height: 1;
background-color: rgba(0, 0, 0, 0.3);
border-radius: 100rpx;
font-size: 26rpx;
color: rgba(255, 255, 255, 0.8);
}
}
.u-list-scale {
.u-list-scale {
transform-origin: center center;
}
}
.u-list-image-wrap {
.u-list-image-wrap {
width: 100%;
height: 100%;
flex: 1;
......@@ -270,9 +270,9 @@ export default {
overflow: hidden;
box-sizing: content-box;
position: relative;
}
}
.u-swiper-title {
.u-swiper-title {
position: absolute;
background-color: rgba(0, 0, 0, 0.3);
bottom: 0;
......@@ -281,11 +281,11 @@ export default {
font-size: 28rpx;
padding: 12rpx 24rpx;
color: rgba(255, 255, 255, 0.9);
}
}
.u-swiper-item {
.u-swiper-item {
display: flex;
overflow: hidden;
align-items: center;
}
}
</style>
<template>
<view
class="u-switch"
:class="[value == true ? 'u-switch--on' : '', disabled ? 'u-switch--disabled' : '']"
@tap="onClick"
:style="[switchStyle]"
>
<view class="u-switch" :class="[value == true ? 'u-switch--on' : '', disabled ? 'u-switch--disabled' : '']" @tap="onClick"
:style="[switchStyle]">
<view class="u-switch__node node-class">
<u-loading :show="loading" class="u-switch__loading" :size="size * 0.6" :color="loadingColor"/>
<u-loading :show="loading" class="u-switch__loading" :size="size * 0.6" :color="loadingColor" />
</view>
</view>
</template>
<script>
export default {
/**
* switch 开关选择器
* @description 选择开关一般用于只有两个选择,且只能选其一的场景。
* @tutorial https://www.uviewui.com/components/switch.html
* @property {Boolean} loading 是否处于加载中(默认false)
* @property {Boolean} disabled 是否禁用(默认false)
* @property {String Number} size 开关尺寸,单位rpx(默认50)
* @property {String} active-color 打开时的背景色(默认#2979ff)
* @property {Boolean} inactive-color 关闭时的背景色(默认#ffffff)
* @event {Function} change 在switch打开或关闭时触发
* @example <u-switch v-model="checked" active-color="red" inactive-color="#eee"></u-switch>
*/
export default {
name: "u-switch",
props: {
// 是否为加载中状态
loading: {
......@@ -68,17 +77,17 @@ export default {
uni.vibrateShort();
this.$emit('input', !this.value);
// 放到下一个生命周期,因为双向绑定的value修改父组件状态需要时间,且是异步的
this.$nextTick(function(){
this.$nextTick(function() {
this.$emit('change', this.value);
})
}
}
}
};
};
</script>
<style lang="scss" scoped>
.u-switch {
.u-switch {
position: relative;
display: inline-block;
box-sizing: initial;
......@@ -94,9 +103,9 @@ export default {
border-radius: var(--switch-node-size, 1em);
transition: background-color 0.3s;
transition: background-color var(--switch-transition-duration, 0.3s);
}
}
.u-switch__node {
.u-switch__node {
display: flex;
align-items: center;
justify-content: center;
......@@ -121,28 +130,28 @@ export default {
transition: transform var(--switch-transition-duration, 0.3s) cubic-bezier(0.3, 1.05, 0.4, 1.05);
transition: transform var(--switch-transition-duration, 0.3s) cubic-bezier(0.3, 1.05, 0.4, 1.05),
-webkit-transform var(--switch-transition-duration, 0.3s) cubic-bezier(0.3, 1.05, 0.4, 1.05);
}
}
.u-switch__loading {
.u-switch__loading {
display: flex;
align-items: center;
justify-content: center;
}
}
.u-switch--on {
.u-switch--on {
background-color: #1989fa;
background-color: var(--switch-on-background-color, #1989fa);
}
}
.u-switch--on .u-switch__node {
.u-switch--on .u-switch__node {
-webkit-transform: translateX(1em);
transform: translateX(1em);
-webkit-transform: translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)));
transform: translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)));
}
}
.u-switch--disabled {
.u-switch--disabled {
opacity: 0.4;
opacity: var(--switch-disabled-opacity, 0.4);
}
}
</style>
......@@ -5,7 +5,23 @@
</template>
<script>
/**
* table 表格
* @description 表格组件一般用于展示大量结构化数据的场景
* @tutorial https://www.uviewui.com/components/table.html
* @property {String} border-color 表格边框的颜色(默认#e4e7ed)
* @property {String} bg-color 表格的背景颜色(默认#ffffff)
* @property {String} align 单元格的内容对齐方式,作用类似css的text-align(默认center)
* @property {String} padding 单元格的内边距,同css的padding写法(默认10rpx 0)
* @property {String Number} font-size 单元格字体大小,单位rpx(默认28)
* @property {String} color 单元格字体颜色(默认#606266)
* @property {Object} th-style th单元格的样式,对象形式(将th所需参数放在table组件,是为了避免每一个th组件要写一遍)
* @event {Function} click 点击组件时触发
* @event {Function} close 点击关闭按钮时触发
* @example <u-table></u-table>
*/
export default {
name: "u-table",
props: {
borderColor: {
type: String,
......@@ -33,7 +49,7 @@
// th的自定义样式
thStyle: {
type: Object,
default() {
default () {
return {}
}
},
......@@ -50,8 +66,7 @@
};
},
data() {
return {
}
return {}
},
computed: {
tableStyle() {
......
<template>
<view
class="u-tabs"
:style="{
<view class="u-tabs" :style="{
zIndex: zIndex,
background: bgColor
}"
>
}">
<scroll-view scroll-x class="u-scroll-view" :scroll-left="scrollLeft" scroll-with-animation :style="{ zIndex: zIndex + 1 }">
<view class="u-tabs-scroll-box" :class="{'u-tabs-scorll-flex': !isScroll}">
<view
class="u-tabs-item"
:style="{
height: height + 'rpx',
lineHeight: height + 'rpx',
padding: `0 ${gutter / 2}rpx`,
color: tabsInfo.length > 0 ? (tabsInfo[index] ? tabsInfo[index].color : activeColor) : inactiveColor,
fontSize: fontSize + 'rpx',
zIndex: zIndex + 2,
fontWeight: (index == getCurrent && bold) ? 'bold' : 'normal'
}"
v-for="(item, index) in getTabs"
:key="index"
:class="[preId + index]"
@tap="emit(index)"
>
<view class="u-tabs-item" :style="[tabItemStyle(index)]"
v-for="(item, index) in getTabs" :key="index" :class="[preId + index]" @tap="emit(index)">
{{ item[name] || item['name']}}
</view>
<view
class="u-scroll-bar"
:style="{
width: barWidthPx + 'px',
height: barHeight + 'rpx',
borderRadius: '100px',
backgroundColor: activeColor,
left: scrollBarLeft + 'px'
}"
></view>
<view v-if="showBar" class="u-scroll-bar" :style="[tabBarStyle]"></view>
</view>
</scroll-view>
</view>
</template>
<script>
import colorGradient from '@/uview/libs/function/colorGradient';
let color = colorGradient;
const { windowWidth } = uni.getSystemInfoSync();
const preId = 'UEl_';
export default {
import colorGradient from '@/uview/libs/function/colorGradient';
let color = colorGradient;
const {
windowWidth
} = uni.getSystemInfoSync();
const preId = 'UEl_';
/**
* tabsSwiper 全屏选项卡
* @description 该组件内部实现主要依托于uniapp的scroll-view和swiper组件,主要特色是切换过程中,tabsSwiper文字的颜色可以渐变,底部滑块可以 跟随式滑动,活动tab滚动居中等。应用场景可以用于需要左右切换页面,比如商城的订单中心(待收货-待付款-待评价-已退货)等应用场景。
* @tutorial https://www.uviewui.com/components/tabsSwiper.html
* @property {Boolean} is-scroll tabs是否可以左右拖动(默认true)
* @property {Array} list 标签数组,元素为对象,如[{name: '推荐'}]
* @property {String Number} current 指定哪个tab为激活状态(默认0)
* @property {String Number} height 导航栏的高度,单位rpx(默认80)
* @property {String Number} font-size tab文字大小,单位rpx(默认30)
* @property {String Number} swiper-width tabs组件外部swiper的宽度,默认为屏幕宽度,单位rpx(默认750)
* @property {String} active-color 滑块和激活tab文字的颜色(默认#2979ff)
* @property {String} inactive-color tabs文字颜色(默认#303133)
* @property {String Number} bar-width 滑块宽度,单位rpx(默认40)
* @property {String Number} bar-height 滑块高度,单位rpx(默认6)
* @property {Object} bar-style 底部滑块的样式,对象形式
* @property {Object} active-item-style 活动tabs item的样式,对象形式
* @property {Boolean} show-bar 是否显示底部的滑块(默认true)
* @property {String Number} gutter 单个tab标签的左右内边距之和,单位rpx(默认40)
* @property {String} bg-color tabs导航栏的背景颜色(默认#ffffff)
* @property {String} name 组件内部读取的list参数中的属性名,见官网说明(默认name)
* @property {Boolean} bold 激活选项的字体是否加粗(默认true)
* @event {Function} change 点击标签时触发
* @example <u-tabs-swiper ref="tabs" :list="list" :is-scroll="false"></u-tabs-swiper>
*/
export default {
name: "u-tabs-swiper",
props: {
// 导航菜单是否需要滚动,如只有2或者3个的时候,就不需要滚动了,此时使用flex平分tab的宽度
isScroll: {
......@@ -56,7 +58,7 @@ export default {
//需循环的标签列表
list: {
type: Array,
default() {
default () {
return [];
}
},
......@@ -134,6 +136,25 @@ export default {
bold: {
type: Boolean,
default: true
},
// 当前活动tab item的样式
activeItemStyle: {
type: Object,
default() {
return {}
}
},
// 是否显示底部的滑块
showBar: {
type: Boolean,
default: true
},
// 底部滑块的自定义样式
barStyle: {
type: Object,
default() {
return {}
}
}
},
data() {
......@@ -174,6 +195,36 @@ export default {
// 滑块的宽度转为px单位
barWidthPx() {
return uni.upx2px(this.barWidth);
},
// tab的样式
tabItemStyle() {
return (index) => {
let style = {
height: this.height + 'rpx',
lineHeight: this.height + 'rpx',
padding: `0 ${this.gutter / 2}rpx`,
color: this.tabsInfo.length > 0 ? (this.tabsInfo[index] ? this.tabsInfo[index].color : this.activeColor) : this.inactiveColor,
fontSize: this.fontSize + 'rpx',
zIndex: this.zIndex + 2,
fontWeight: (index == this.getCurrent && this.bold) ? 'bold' : 'normal'
};
if(index == this.getCurrent) {
// 给选中的tab item添加外部自定义的样式
style = Object.assign(style, this.activeItemStyle);
}
return style;
}
},
// 底部滑块的样式
tabBarStyle() {
let style = {
width: this.barWidthPx + 'px',
height: this.barHeight + 'rpx',
borderRadius: '100px',
backgroundColor: this.activeColor,
left: this.scrollBarLeft + 'px'
};
return Object.assign(style, this.barStyle);
}
},
watch: {
......@@ -241,8 +292,7 @@ export default {
getQuery(cb) {
try {
let view = uni.createSelectorQuery().in(this).select('.u-tabs');
view.fields(
{
view.fields({
size: true
},
data => {
......@@ -317,88 +367,89 @@ export default {
this.countLine3Dx();
}
}
};
};
</script>
<style scoped lang="scss">
view,
scroll-view {
view,
scroll-view {
box-sizing: border-box;
}
}
.u-tabs {
.u-tabs {
width: 100%;
transition-property: background-color, color;
}
}
::-webkit-scrollbar,
::-webkit-scrollbar,
::-webkit-scrollbar {
::-webkit-scrollbar,
::-webkit-scrollbar,
::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
}
/* #ifdef H5 */
// 通过样式穿透,隐藏H5下,scroll-view下的滚动条
scroll-view /deep/ ::-webkit-scrollbar {
/* #ifdef H5 */
// 通过样式穿透,隐藏H5下,scroll-view下的滚动条
scroll-view /deep/ ::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
/* #endif */
}
/* #endif */
.u-scroll-view {
.u-scroll-view {
width: 100%;
white-space: nowrap;
position: relative;
}
}
.u-tabs-scroll-box {
.u-tabs-scroll-box {
position: relative;
}
}
.u-tabs-scorll-flex {
.u-tabs-scorll-flex {
display: flex;
justify-content: space-between;
}
}
.u-tabs-scorll-flex .u-tabs-item {
.u-tabs-scorll-flex .u-tabs-item {
flex: 1;
}
}
.u-tabs-item {
.u-tabs-item {
position: relative;
display: inline-block;
text-align: center;
transition-property: background-color, color, font-weight;
}
}
.content {
.content {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.boxStyle {
.boxStyle {
pointer-events: none;
position: absolute;
transition-property: all;
}
}
.boxStyle2 {
.boxStyle2 {
pointer-events: none;
position: absolute;
bottom: 0;
transition-property: all;
transform: translateY(-100%);
}
}
.itemBackgroundBox {
.itemBackgroundBox {
pointer-events: none;
position: absolute;
top: 0;
......@@ -407,16 +458,16 @@ scroll-view /deep/ ::-webkit-scrollbar {
flex-direction: row;
justify-content: center;
align-items: center;
}
}
.itemBackground {
.itemBackground {
height: 100%;
width: 100%;
transition-property: all;
}
}
.u-scroll-bar {
.u-scroll-bar {
position: absolute;
bottom: 4rpx;
}
}
</style>
......@@ -4,24 +4,43 @@
}">
<scroll-view scroll-x class="u-scroll-view" :scroll-left="scrollLeft" scroll-with-animation>
<view class="u-scroll-box" :class="{'u-tabs-scorll-flex': !isScroll}">
<view
class="u-tab-item"
:id="'u-tab-item-' + index"
v-for="(item, index) in list"
:key="index"
@tap="clickTab(index)"
:style="[tabItemStyle(index)]"
>
<view class="u-tab-item" :id="'u-tab-item-' + index" v-for="(item, index) in list" :key="index" @tap="clickTab(index)"
:style="[tabItemStyle(index)]">
{{ item[name] || item['name']}}
</view>
<view class="u-tab-bar" :style="[tabBarStyle]"></view>
<view v-if="showBar" class="u-tab-bar" :style="[tabBarStyle]"></view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
/**
* tabs 标签
* @description 该组件,是一个tabs标签组件,在标签多的时候,可以配置为左右滑动,标签少的时候,可以禁止滑动。 该组件的一个特点是配置为滚动模式时,激活的tab会自动移动到组件的中间位置。
* @tutorial https://www.uviewui.com/components/tabs.html
* @property {Boolean} is-scroll tabs是否可以左右拖动(默认true)
* @property {Array} list 标签数组,元素为对象,如[{name: '推荐'}]
* @property {String Number} current 指定哪个tab为激活状态(默认0)
* @property {String Number} height 导航栏的高度,单位rpx(默认80)
* @property {String Number} font-size tab文字大小,单位rpx(默认30)
* @property {String Number} duration 滑块移动一次所需的时间,单位秒(默认0.5)
* @property {String} active-color 滑块和激活tab文字的颜色(默认#2979ff)
* @property {String} inactive-color tabs文字颜色(默认#303133)
* @property {String Number} bar-width 滑块宽度,单位rpx(默认40)
* @property {Object} active-item-style 活动tabs item的样式,对象形式
* @property {Object} bar-style 底部滑块的样式,对象形式
* @property {Boolean} show-bar 是否显示底部的滑块(默认true)
* @property {String Number} bar-height 滑块高度,单位rpx(默认6)
* @property {String Number} gutter 单个tab标签的左右内边距之和,单位rpx(默认40)
* @property {String} bg-color tabs导航栏的背景颜色(默认#ffffff)
* @property {String} name 组件内部读取的list参数中的属性名,见官网说明(默认name)
* @property {Boolean} bold 激活选项的字体是否加粗(默认true)
* @event {Function} change 点击标签时触发
* @example <u-tabs ref="tabs" :list="list" :is-scroll="false"></u-tabs>
*/
export default {
name: "u-tabs",
props: {
// 导航菜单是否需要滚动,如只有2或者3个的时候,就不需要滚动了,此时使用flex平分tab的宽度
isScroll: {
......@@ -31,7 +50,7 @@ export default {
//需循环的标签列表
list: {
type: Array,
default() {
default () {
return [];
}
},
......@@ -94,6 +113,25 @@ export default {
bold: {
type: Boolean,
default: true
},
// 当前活动tab item的样式
activeItemStyle: {
type: Object,
default() {
return {}
}
},
// 是否显示底部的滑块
showBar: {
type: Boolean,
default: true
},
// 底部滑块的自定义样式
barStyle: {
type: Object,
default() {
return {}
}
}
},
data() {
......@@ -101,7 +139,7 @@ export default {
scrollLeft: 0, // 滚动scroll-view的左边滚动距离
tabQueryInfo: [], // 存放对tab菜单查询后的节点信息
componentWidth: 0, // 屏幕宽度,单位为px
scrollBarLeft: 0 ,// 移动bar需要通过translateX()移动的距离
scrollBarLeft: 0, // 移动bar需要通过translateX()移动的距离
parentLeft: 0, // 父元素(tabs组件)到屏幕左边的距离
id: this.$u.guid(), // id值
currentIndex: this.current,
......@@ -130,7 +168,7 @@ export default {
computed: {
// 移动bar的样式
tabBarStyle() {
return {
let style = {
width: this.barWidth + 'rpx',
transform: `translate(${this.scrollBarLeft}px, -100%)`,
'transition-duration': `${this.duration}s`,
......@@ -139,6 +177,8 @@ export default {
// 设置一个很大的值,它会自动取能用的最大值,不用高度的一半,是因为高度可能是单数,会有小数出现
'border-radius': `${this.barHeight / 2}px`
};
Object.assign(style, this.barStyle);
return style;
},
// tab的样式
tabItemStyle() {
......@@ -152,8 +192,10 @@ export default {
};
// 字体加粗
if (index == this.currentIndex && this.bold) style.fontWeight = 'bold';
if(index == this.currentIndex) {
if (index == this.currentIndex) {
style.color = this.activeColor;
// 给选中的tab item添加外部自定义的样式
style = Object.assign(style, this.activeItemStyle);
} else {
style.color = this.inactiveColor;
}
......@@ -219,60 +261,61 @@ export default {
mounted() {
this.init();
}
};
};
</script>
<style lang="scss">
view,
scroll-view {
view,
scroll-view {
box-sizing: border-box;
}
}
::-webkit-scrollbar,
::-webkit-scrollbar,
::-webkit-scrollbar {
::-webkit-scrollbar,
::-webkit-scrollbar,
::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
}
.u-scroll-box {
.u-scroll-box {
position: relative;
}
}
/* #ifdef H5 */
// 通过样式穿透,隐藏H5下,scroll-view下的滚动条
scroll-view /deep/ ::-webkit-scrollbar {
/* #ifdef H5 */
// 通过样式穿透,隐藏H5下,scroll-view下的滚动条
scroll-view /deep/ ::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
/* #endif */
}
.u-scroll-view {
/* #endif */
.u-scroll-view {
width: 100%;
white-space: nowrap;
position: relative;
}
}
.u-tab-item {
.u-tab-item {
position: relative;
display: inline-block;
text-align: center;
transition-property: background-color, color;
}
}
.u-tab-bar {
.u-tab-bar {
position: absolute;
bottom: 0;
}
}
.u-tabs-scorll-flex {
.u-tabs-scorll-flex {
display: flex;
justify-content: space-between;
}
}
</style>
......@@ -14,7 +14,27 @@
</template>
<script>
/**
* tag 提示
* @description 该组件一般用于标记和选择
* @tutorial https://www.uviewui.com/components/tag.html
* @property {String} type 主题类型(默认primary)
* @property {String} size 标签大小(默认default)
* @property {String} shape 标签形状(默认square)
* @property {String} text 标签的文字内容
* @property {String} bg-color 自定义标签的背景颜色
* @property {String} border-color 标签的边框颜色
* @property {String} close-color 关闭按钮的颜色
* @property {String Number} index 点击标签时,会通过click事件返回该值
* @property {String} mode 模式选择,见官网说明(默认light)
* @property {Boolean} closeable 是否可关闭,设置为true,文字右边会出现一个关闭图标(默认false)
* @property {Boolean} show 标签显示与否(默认true)
* @event {Function} click 点击标签触发
* @event {Function} close closeable为true时,点击标签关闭按钮触发
* @example <u-tag text="雪月夜" type="success" />
*/
export default {
name: 'u-tag',
// 是否禁用这个标签,禁用的话,会屏蔽点击事件
props: {
// 标签类型info、primary、success、warning、error
......
......@@ -5,7 +5,15 @@
</template>
<script>
/**
* td td单元格
* @description 表格组件一般用于展示大量结构化数据的场景(搭配u-table使用)
* @tutorial https://www.uviewui.com/components/table.html#td-props
* @property {String Number} width 单元格宽度百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比,单元格宽度默认为均分tr的长度(默认auto)
* @example <u-td>二年级</u-td>
*/
export default {
name: "u-td",
props: {
// 宽度,百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比
width: {
......@@ -30,7 +38,7 @@
computed: {
tdStyle() {
let style = {};
if(this.width != "auto") style.flex = `0 0 ${this.width}`;
if (this.width != "auto") style.flex = `0 0 ${this.width}`;
style.textAlign = this.uTable.align;
style.padding = this.tr.length == 0 ? this.uTable.padding : 0;
style.borderBottom = this.tr.length == 0 ? `solid 1px ${this.uTable.borderColor}` : 0;
......
......@@ -5,7 +5,15 @@
</template>
<script>
/**
* th th单元格
* @description 表格组件一般用于展示大量结构化数据的场景(搭配u-table使用)
* @tutorial https://www.uviewui.com/components/table.html#td-props
* @property {String Number} width 标题单元格宽度百分比或者具体带单位的值,如30%,200rpx等,一般使用百分比,单元格宽度默认为均分tr的长度
* @example 暂无示例
*/
export default {
name: "u-th",
props: {
// 宽度,百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比
width: {
......@@ -22,7 +30,7 @@
computed: {
thStyle() {
let style = {};
if(this.width) style.flex = `0 0 ${this.width}%`;
if (this.width) style.flex = `0 0 ${this.width}%`;
style.textAlign = this.uTable.align;
style.padding = this.uTable.padding;
style.borderBottom = `solid 1px ${this.uTable.borderColor}`;
......
......@@ -11,7 +11,16 @@
</template>
<script>
/**
* timeLineItem 时间轴Item
* @description 时间轴组件一般用于物流信息展示,各种跟时间相关的记录等场景。(搭配u-time-line使用)
* @tutorial https://www.uviewui.com/components/timeLine.html
* @property {String} bg-color 左边节点的背景颜色,一般通过slot内容自定义背景颜色即可(默认#ffffff)
* @property {String Number} node-top 节点左边图标绝对定位的top值,单位rpx
* @example <u-time-line-item node-top="2">...</u-time-line-item>
*/
export default {
name: "u-time-line-item",
props: {
// 节点的背景颜色
bgColor: {
......@@ -34,7 +43,7 @@
let style = {
backgroundColor: this.bgColor,
};
if(this.nodeTop != "") style.top = this.nodeTop + 'rpx';
if (this.nodeTop != "") style.top = this.nodeTop + 'rpx';
return style;
}
}
......
......@@ -5,7 +5,14 @@
</template>
<script>
/**
* timeLine 时间轴
* @description 时间轴组件一般用于物流信息展示,各种跟时间相关的记录等场景。
* @tutorial https://www.uviewui.com/components/timeLine.html
* @example <u-time-line></u-time-line>
*/
export default {
name: "u-time-line",
data() {
return {
......
......@@ -11,7 +11,16 @@
</template>
<script>
/**
* toast 消息提示
* @description 此组件表现形式类似uni的uni.showToastAPI,但也有不同的地方。
* @tutorial https://www.uviewui.com/components/toast.html
* @property {String} z-index toast展示时的z-index值
* @event {Function} show 显示toast,如需一进入页面就显示toast,请在onReady生命周期调用
* @example <u-toast ref="uToast" />
*/
export default {
name: "u-toast",
props: {
// z-index值
zIndex: {
......@@ -40,7 +49,7 @@
// 只有不为none,并且type为error|warning|succes|info时候,才显示图标
if (['error', 'warning', 'success', 'info'].indexOf(this.config.type) >= 0 && this.config.icon) {
let icon = this.$u.type2icon(this.config.type);
return icon ;
return icon;
}
},
uZIndex() {
......@@ -136,7 +145,7 @@
.u-text {
word-break: keep-all;
white-space:nowrap;
white-space: nowrap;
line-height: normal;
}
......
......@@ -6,7 +6,16 @@
</template>
<script>
export default {
/**
* topTips 顶部提示
* @description 该组件一般用于页面顶部向下滑出一个提示,尔后自动收起的场景。
* @tutorial https://www.uviewui.com/components/topTips.html
* @property {String Number} navbar-height 导航栏高度(包含状态栏高度在内),单位PX
* @property {String Number} z-index z-index值(默认975)
* @example <u-top-tips ref="uTips" type="success" duration="1500"></u-top-tips>
*/
export default {
name: "u-top-tips",
props: {
// 导航栏高度,用于提示的初始化
navbarHeight: {
......@@ -55,16 +64,16 @@ export default {
}, this.duration);
}
}
};
};
</script>
<style lang="scss" scoped>
view {
view {
box-sizing: border-box;
}
}
// 顶部弹出类型样式
.u-tips {
// 顶部弹出类型样式
.u-tips {
width: 100%;
position: fixed;
z-index: 1;
......@@ -80,31 +89,31 @@ view {
// 此处为最核心点,translateY(-100%)意味着将其从Y轴隐藏(隐藏到顶部(h5)或者说导航栏(app)下面)
transform: translateY(-100%);
transition: all 0.35s linear;
}
}
.u-tip-show {
.u-tip-show {
transform: translateY(0);
opacity: 1;
z-index: 99;
}
}
.u-primary {
.u-primary {
background: $u-type-primary;
}
}
.u-success {
.u-success {
background: $u-type-success;
}
}
.u-warning {
.u-warning {
background: $u-type-warning;
}
}
.u-error {
.u-error {
background: $u-type-error;
}
}
.u-info {
.u-info {
background: $u-type-info;
}
}
</style>
......@@ -5,7 +5,14 @@
</template>
<script>
/**
* tr 表格行标签
* @description 表格组件一般用于展示大量结构化数据的场景(搭配<u-table>使用)
* @tutorial https://www.uviewui.com/components/table.html
* @example <u-tr></u-tr>
*/
export default {
name: "u-tr",
inject: ['uTable', 'uTd'],
provide() {
return {
......@@ -13,7 +20,7 @@
};
},
created() {
if(this.uTd && this.uTd.tr) {
if (this.uTd && this.uTd.tr) {
this.uTd.tr.push(this);
}
}
......
......@@ -27,8 +27,44 @@
</template>
<script>
/**
* upload 图片上传
* @description 该组件用于上传图片场景
* @tutorial https://www.uviewui.com/components/upload.html
* @property {String} action 服务器上传地址
* @property {String Number} max-count 最大选择图片的数量(默认99)
* @property {Boolean} custom-btn 如果需要自定义选择图片的按钮,设置为true(默认false)
* @property {Boolean} show-progress 是否显示进度条(默认true)
* @property {Boolean} disabled 是否启用(显示/移仓)组件(默认false)
* @property {String} image-mode 预览图片等显示模式,可选值为uni的image的mode属性值(默认aspectFill)
* @property {Object} header 上传携带的头信息,对象形式
* @property {Object} form-data 上传额外携带的参数
* @property {String} name 上传文件的字段名,供后端获取使用(默认file)
* @property {Array<String>} size-type original 原图,compressed 压缩图,默认二者都有(默认['original', 'compressed'])
* @property {Array<String>} source-type 选择图片的来源,album-从相册选图,camera-使用相机,默认二者都有(默认['album', 'camera'])
* @property {Boolean} preview-full-image 是否可以通过uni.previewImage预览已选择的图片(默认true)
* @property {Boolean} multiple 是否开启图片多选,部分安卓机型不支持(默认true)
* @property {Boolean} deletable 是否显示删除图片的按钮(默认true)
* @property {String Number} max-size 选择单个文件的最大大小,单位B(byte),默认不限制(默认Number.MAX_VALUE)
* @property {Array<Object>} file-list 默认显示的图片列表,数组元素为对象,必须提供url属性
* @property {Boolean} upload-text 选择图片按钮的提示文字(默认“选择图片”)
* @property {Boolean} auto-upload 选择完图片是否自动上传,见上方说明(默认true)
* @property {Boolean} show-tips 特殊情况下是否自动提示toast,见上方说明(默认true)
* @property {Boolean} show-upload-list 是否显示组件内部的图片预览(默认true)
* @event {Function} on-oversize 图片大小超出最大允许大小
* @event {Function} on-preview 全屏预览图片时触发
* @event {Function} on-remove 移除图片时触发
* @event {Function} on-success 图片上传成功时触发
* @event {Function} on-change 图片上传后,无论成功或者失败都会触发
* @event {Function} on-error 图片上传失败时触发
* @event {Function} on-progress 图片上传过程中的进度变化过程触发
* @event {Function} on-uploaded 所有图片上传完毕触发
* @event {Function} on-choose-complete 每次选择图片后触发,只是让外部可以得知每次选择后,内部的文件列表
* @example <u-upload :action="action" :file-list="fileList" ></u-upload>
*/
export default {
props: {
name: 'u-upload',
//是否显示组件自带的图片预览功能
showUploadList: {
type: Boolean,
......
......@@ -5,7 +5,21 @@
</template>
<script>
/**
* verificationCode 验证码输入框
* @description 考虑到用户实际发送验证码的场景,可能是一个按钮,也可能是一段文字,提示语各有不同,所以本组件 不提供界面显示,只提供提示语,由用户将提示语嵌入到具体的场景
* @tutorial https://www.uviewui.com/components/verificationCode.html
* @property {Number String} seconds 倒计时所需的秒数(默认60)
* @property {String} start-text 开始前的提示语,见官网说明(默认获取验证码)
* @property {String} change-text 倒计时期间的提示语,必须带有字母"x",见官网说明(默认X秒重新获取)
* @property {String} end-text 倒计结束的提示语,见官网说明(默认重新获取)
* @event {Function} change 倒计时期间,每秒触发一次
* @event {Function} start 开始倒计时触发
* @event {Function} end 结束倒计时触发
* @example <u-verification-code :seconds="seconds" @end="end" @start="start" ref="uCode"
*/
export default {
name: "u-verification-code",
props: {
// 倒计时总秒数
seconds: {
......@@ -47,7 +61,7 @@
// 这里放这句,是为了一开始时就提示,否则要等setInterval的1秒后才会有提示
this.changeEvent(this.changeText.replace(/x|X/, this.secNum));
this.timer = setInterval(() => {
if(--this.secNum) {
if (--this.secNum) {
// 用当前倒计时的秒数替换提示字符串中的"x"字母
this.changeEvent(this.changeText.replace(/x|X/, this.secNum));
} else {
......
<template>
<view class="u-waterfall">
<view id="u-left-cloumn" class="u-cloumn">
<slot name="left" :leftList="leftList"></slot>
<slot name="left" :list="leftList"></slot>
</view>
<view id="u-right-cloumn" class="u-cloumn">
<slot name="right" :rightList="rightList"></slot>
<slot name="right" :list="rightList"></slot>
</view>
</view>
</template>
<script>
/**
* waterfall 瀑布流
* @description 这是一个瀑布流形式的组件,内容分为左右两列,结合uView的懒加载组件效果更佳。相较于某些只是奇偶数左右分别,或者没有利用vue作用域插槽的做法,uView的瀑布流实现了真正的 组件化,搭配LazyLoad 懒加载和loadMore 加载更多组件,让您开箱即用,眼前一亮。
* @tutorial https://www.uviewui.com/components/waterfall.html
* @property {Array} flow-list 用于渲染的数据
* @property {String Number} add-time 单条数据添加到队列的时间间隔,单位ms,见上方注意事项说明(默认200)
* @example <u-waterfall :flowList="flowList"></u-waterfall>
*/
export default {
name: "u-waterfall",
props: {
flowList: {
// 瀑布流数据
......@@ -67,12 +76,12 @@
let item = this.tempList[0];
if (leftRect.height < rightRect.height) {
this.leftList.push(item);
} else if(leftRect.height > rightRect.height) {
} else if (leftRect.height > rightRect.height) {
this.rightList.push(item);
} else {
// 这里是为了保证第一和第二张添加时,左右都能有内容
// 因为添加第一张,实际队列的高度可能还是0,这时需要根据队列元素长度判断下一个该放哪边
if(this.leftList.length <= this.rightList.length) {
if (this.leftList.length <= this.rightList.length) {
this.leftList.push(item);
} else {
this.rightList.push(item);
......
......@@ -96,6 +96,8 @@ const $u = {
wranning,
get: http.get,
post: http.post,
put: http.put,
'delete': http.delete,
hexToRgb,
rgbToHex,
test,
......
// 此版本发布于2020-04-21
let version = '1.0.9';
// 此版本发布于2020-04-25
let version = '1.1.0';
export default {
v: version,
......
......@@ -126,6 +126,33 @@ function rangeLength(value, param) {
return value.length >= param[0] && value.length <= param[1]
}
/**
* 判断是否为空
*/
function empty(value){
switch (typeof value) {
case 'undefined':
return true;
case 'string':
if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
break;
case 'boolean':
if (!value) return true;
break;
case 'number':
if (0 === value || isNaN(value)) return true;
break;
case 'object':
if (null === value || value.length === 0) return true;
for (var i in value) {
return false;
}
return true;
}
return false;
}
export default {
email,
mobile,
......@@ -142,5 +169,6 @@ export default {
enOrNum,
contains,
range,
rangeLength
rangeLength,
empty
}
\ No newline at end of file
......@@ -15,7 +15,7 @@ class Request {
loadingTime: 800, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
timer: null, // 定时器
originalData: false, // 是否在拦截器中返回服务端的原始数据,见文档说明
loadingMask: true, // 展示loading的时候,是否给一个透明的层,防止触摸穿透
loadingMask: true, // 展示loading的时候,是否给一个透明的层,防止触摸穿透
}
// 判断是否http|https开头的URL
......@@ -141,6 +141,26 @@ class Request {
data
})
}
// put请求,不支持支付宝小程序(HX2.6.15)
this.put = (url, data, options = {}) => {
return this.request({
url,
method: 'PUT',
...options,
data
})
}
// delete请求,不支持支付宝和头条小程序(HX2.6.15)
this.delete = (url, data, options = {}) => {
return this.request({
url,
method: 'DELETE',
...options,
data
})
}
}
}
export default new Request
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment