Commit c185e800 authored by wlxuqu's avatar wlxuqu

1. 【新增】添加.editorconfig

2. 【新增】icon组件的lable新增在图标左边和上放的参数lebel-pos=left | top
3. 【优化】empty组件图标改由字体图标提供,详见文档说明
4. 【优化】avatar头像组件二次加载图片时无效的问题
5. 【优化】image组件图片加载完成时移除背景色,避免png图片能看到底色
6. 【优化】优化line线条组件的length参数单位问题
7. 【修复】由于deepClone导致null结果为{}而导致http的loading无效的问题
parent a5c163a2
......@@ -2,7 +2,7 @@
"name" : "uView",
"appid" : "__UNI__60F4B81",
"description" : "多平台快速开发的UI框架",
"versionName" : "1.4.1",
"versionName" : "1.4.3",
"versionCode" : "100",
"transformPx" : false,
"app-plus" : {
......
......@@ -2,14 +2,14 @@
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [{
"name": "test", //模式名称
"path": "pages/componentsC/test/index", //启动页面,必选
"query": "id=1&name=2" //启动参数,在页面的onLoad函数里面得到
}]
},
// "condition": { //模式配置,仅开发期间生效
// "current": 0, //当前激活的模式(list 的索引项)
// "list": [{
// "name": "test", //模式名称
// "path": "pages/componentsC/test/index", //启动页面,必选
// "query": "id=1&name=2" //启动参数,在页面的onLoad函数里面得到
// }]
// },
"pages": [
// 演示-组件
{
......
......@@ -4,19 +4,19 @@
<view class="u-demo-title">演示效果</view>
<view class="u-demo-area">
<u-row gutter="20" :justify="justify">
<u-col :span="span" :offset="offset">
<u-col :span="span" :offset="offset" @click="click">
<view class="demo-layout bg-purple-dark">
</view>
</u-col>
<u-col :span="span" :offset="offset">
<view class="demo-layout bg-purple-dark">
</view>
</u-col>
<u-col :span="span" :offset="offset">
<view class="demo-layout bg-purple-dark">
</view>
</u-col>
</u-row>
......@@ -125,7 +125,7 @@
.bg-purple-dark {
background: #99a9bf;
}
// H5中,电脑端文档演示时,可能会导致演示块挤出边界,特别处理。
// 真实使用环境不会产生此问题
/* #ifdef H5 */
......
......@@ -5,11 +5,9 @@
<u-icon name="red-packet"></u-icon>
<text class="u-padding-left-10">发送1.00元红包</text>
</u-button>
</view>
</view>
<u-keyboard
default="778"
default=""
ref="uKeyboard"
mode="number"
:mask="true"
......@@ -19,8 +17,7 @@
:safe-area-inset-bottom="true"
:tooltip="false"
@change="onChange"
@backspace="onBackspace"
>
@backspace="onBackspace">
<view>
<view class="u-text-center u-padding-20 money">
<text>1.00</text>
......@@ -36,6 +33,7 @@
:dot-fill="true"
v-model="password"
:disabled-keyboard="true"
@finish="finish"
></u-message-input>
</view>
<view class="u-text-center u-padding-top-10 u-padding-bottom-20 tips">支付键盘</view>
......@@ -53,7 +51,7 @@
}
},
onLoad() {
console.log(this.$u.config.v)
},
methods: {
onChange(val){
......@@ -87,6 +85,9 @@
showPop(flag = true){
this.password = '';
this.show = flag;
},
finish(){
console.log(11111)
}
}
}
......@@ -109,4 +110,4 @@
.tips{
color:$u-tips-color;
}
</style>
</style>
\ No newline at end of file
<template>
<view>
<u-navbar title="" :border-bottom="false">
<u-navbar :is-back="false" title=" " :border-bottom="false">
<view class="u-flex u-row-right" style="width: 100%;">
<view class="camera u-flex u-row-center">
<u-icon name="camera-fill" color="#000000" size="48"></u-icon>
......@@ -23,20 +23,26 @@
</view>
</view>
<u-cell-group class="u-m-t-20">
<u-cell-item icon="rmb-circle" title="支付"></u-cell-item>
</u-cell-group>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="rmb-circle" title="支付"></u-cell-item>
</u-cell-group>
</view>
<u-cell-group class="u-m-t-20">
<u-cell-item icon="star" title="收藏"></u-cell-item>
<u-cell-item icon="photo" title="相册"></u-cell-item>
<u-cell-item icon="coupon" title="卡券"></u-cell-item>
<u-cell-item icon="heart" title="关注"></u-cell-item>
</u-cell-group>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="star" title="收藏"></u-cell-item>
<u-cell-item icon="photo" title="相册"></u-cell-item>
<u-cell-item icon="coupon" title="卡券"></u-cell-item>
<u-cell-item icon="heart" title="关注"></u-cell-item>
</u-cell-group>
</view>
<u-cell-group class="u-m-t-20">
<u-cell-item icon="setting" title="设置"></u-cell-item>
</u-cell-group>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="setting" title="设置"></u-cell-item>
</u-cell-group>
</view>
</view>
</template>
......@@ -44,7 +50,8 @@
export default {
data() {
return {
pic:'https://uviewui.com/common/logo.png'
pic:'https://uviewui.com/common/logo.png',
show:true
}
},
onLoad() {
......@@ -59,7 +66,6 @@
<style lang="scss">
page{
background-color: #ededed;
min-height: 100vh;
}
.camera{
......
......@@ -72,7 +72,8 @@
data() {
return {
error: false,
avatar: this.src, // 头像的地址,因为如果加载错误,需要赋值为默认图片,props值无法修改,所以需要一个中间值
// 头像的地址,因为如果加载错误,需要赋值为默认图片,props值无法修改,所以需要一个中间值
avatar: this.src ? this.src : base64Avatar,
}
},
watch: {
......
......@@ -4,7 +4,9 @@
]" :style="{
padding: `0 ${Number(gutter)/2 + 'rpx'}`,
marginLeft: 100 / 12 * offset + '%',
flex: `0 0 ${100 / 12 * span}%`
flex: `0 0 ${100 / 12 * span}%`,
alignItems: uAlignItem,
justifyContent: uJustify
}">
<slot></slot>
</view>
......@@ -32,8 +34,30 @@
type: [Number, String],
default: 0
},
// 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`)
justify: {
type: String,
default: 'start'
},
// 垂直对齐方式,可选值为top、center、bottom
align: {
type: String,
default: 'center'
}
},
inject: ['gutter'],
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;
else return this.justify;
},
uAlignItem() {
if (this.align == 'top') return 'flex-start';
if (this.align == 'bottom') return 'flex-end';
else return this.align;
}
},
}
</script>
......
This diff is collapsed.
......@@ -2,16 +2,17 @@
<view class="u-empty" v-if="show" :style="{
marginTop: marginTop + 'rpx'
}">
<image class="u-image" :src="src ? src : icons[mode].image" mode="widthFix" :style="{
width: imgWidth + 'rpx',
height: imgHeight == 'auto' ? 'auto' : imgHeight + 'rpx'
}"></image>
<text :style="{
color: color,
fontSize: fontSize + 'rpx',
}">
{{text ? text : icons[mode].text}}
</text>
<u-icon
:name="src ? src : 'empty-' + mode"
:custom-style="iconStyle"
:label="text ? text : icons[mode]"
label-pos="bottom"
:label-color="color"
:label-size="fontSize"
:size="iconSize"
:color="iconColor"
margin-top="14"
></u-icon>
<view class="u-slot-wrap">
<slot name="bottom"></slot>
</view>
......@@ -19,7 +20,6 @@
</template>
<script>
import icon from "./icon.js";
/**
* empty 内容为空
* @description 该组件用于需要加载内容,但是加载的第一页数据就为空,提示一个"没有内容"的场景, 我们精心挑选了十几个场景的图标,方便您使用。
......@@ -55,6 +55,16 @@
type: String,
default: '#c0c4cc'
},
// 图标的颜色
iconColor: {
type: String,
default: '#c0c4cc'
},
// 图标的大小
iconSize: {
type: [String, Number],
default: 120
},
// 文字大小,单位rpx
fontSize: {
type: [String, Number],
......@@ -68,7 +78,7 @@
// 图标宽度,单位rpx
imgWidth: {
type: [String, Number],
default: 240
default: 120
},
// 图标高度,单位rpx
imgHeight: {
......@@ -84,19 +94,84 @@
marginTop: {
type: [String, Number],
default: 0
},
iconStyle: {
type: Object,
default() {
return {}
}
}
},
data() {
return {
icons: icon
icons: {
car: '购物车为空',
page: '页面不存在',
search: '没有搜索结果',
address: '没有收货地址',
wifi: '没有WiFi',
order: '订单为空',
coupon: '没有优惠券',
favor: '暂无收藏',
permission: '无权限',
history: '无历史记录',
news: '无新闻列表',
message: '消息列表为空',
list: '列表为空',
data: '数据为空'
},
// icons: [{
// icon: 'car',
// text: '购物车为空'
// },{
// icon: 'page',
// text: '页面不存在'
// },{
// icon: 'search',
// text: '没有搜索结果'
// },{
// icon: 'address',
// text: '没有收货地址'
// },{
// icon: 'wifi',
// text: '没有WiFi'
// },{
// icon: 'order',
// text: '订单为空'
// },{
// icon: 'coupon',
// text: '没有优惠券'
// },{
// icon: 'favor',
// text: '暂无收藏'
// },{
// icon: 'permission',
// text: '无权限'
// },{
// icon: 'history',
// text: '无历史记录'
// },{
// icon: 'news',
// text: '无新闻列表'
// },{
// icon: 'message',
// text: '消息列表为空'
// },{
// icon: 'list',
// text: '列表为空'
// },{
// icon: 'data',
// text: '数据为空'
// }],
}
}
}
</script>
<style lang="scss" scoped>
<style scoped lang="scss">
@import "../../libs/css/style.components.scss";
.u-empty {
display: flex;
flex-direction: column;
......
<template>
<view class="u-row" :style="{
alignItems: uAlignItem,
justifyContent: uJustify
}">
alignItems: uAlignItem,
justifyContent: uJustify
}"
@tap.stop.prevent="click"
>
<slot />
</view>
</template>
......@@ -52,13 +54,18 @@
if (this.align == 'bottom') return 'flex-end';
else return this.align;
}
},
methods: {
click() {
this.$emit('click');
}
}
}
</script>
<style lang="scss">
@import "../../libs/css/style.components.scss";
.u-row {
// 由于微信小程序编译后奇怪的页面结构,只能使用float布局实现,flex无法实现
/* #ifndef MP-WEIXIN */
......
This diff is collapsed.
// 此版本发布于2020-06-28
let version = '1.4.1';
// 此版本发布于2020-07-01
let version = '1.4.3';
export default {
v: version,
......
......@@ -96,7 +96,7 @@
}
// 定义flex等分
@for $i from 1 through 12 {
@for $i from 0 through 12 {
.u-flex-#{$i} {
flex: $i;
}
......
{
"name": "uview-ui",
"version": "1.4.1",
"version": "1.4.3",
"description": "uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
"main": "index.js",
"keywords": ["uview", "uView", "uni-app", "uni-app ui", "uniapp", "uviewui", "uview ui", "uviewUI", "uViewui", "uViewUI", "uView UI", "uni ui", "uni UI", "uniapp ui", "ui", "UI框架", "uniapp ui框架", "uniapp UI"],
......
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