mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 20:03:26 +08:00
【升级】升级uview框架至2.0.33版本。
This commit is contained in:
@@ -1,73 +1,56 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img alt="logo" src="https://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;">
|
<img alt="logo" src="https://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;">
|
||||||
</p>
|
</p>
|
||||||
<h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView</h3>
|
<h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView 2.0</h3>
|
||||||
<h3 align="center">多平台快速开发的UI框架</h3>
|
<h3 align="center">多平台快速开发的UI框架</h3>
|
||||||
|
|
||||||
|
[](https://github.com/umicro/uView2.0)
|
||||||
|
[](https://github.com/umicro/uView2.0)
|
||||||
|
[](https://github.com/umicro/uView2.0/issues)
|
||||||
|
[](https://uviewui.com)
|
||||||
|
[](https://gitee.com/umicro/uView2.0/releases)
|
||||||
|
[](https://en.wikipedia.org/wiki/MIT_License)
|
||||||
|
|
||||||
## 说明
|
## 说明
|
||||||
|
|
||||||
uView UI,是[uni-app](https://uniapp.dcloud.io/)生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
|
uView UI,是[uni-app](https://uniapp.dcloud.io/)全面兼容nvue的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
|
||||||
|
|
||||||
## 特性
|
## [官方文档:https://uviewui.com](https://uviewui.com)
|
||||||
|
|
||||||
- 兼容安卓,iOS,微信小程序,H5,QQ小程序,百度小程序,支付宝小程序,头条小程序
|
|
||||||
- 60+精选组件,功能丰富,多端兼容,让您快速集成,开箱即用
|
|
||||||
- 众多贴心的JS利器,让您飞镖在手,召之即来,百步穿杨
|
|
||||||
- 众多的常用页面和布局,让您专注逻辑,事半功倍
|
|
||||||
- 详尽的文档支持,现代化的演示效果
|
|
||||||
- 按需引入,精简打包体积
|
|
||||||
|
|
||||||
|
## 预览
|
||||||
|
|
||||||
|
您可以通过**微信**扫码,查看最佳的演示效果。
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<img src="https://uviewui.com/common/weixin_mini_qrcode.png" width="220" height="220" >
|
||||||
|
|
||||||
|
|
||||||
|
## 链接
|
||||||
|
|
||||||
|
- [官方文档](https://www.uviewui.com/)
|
||||||
|
- [更新日志](https://www.uviewui.com/components/changelog.html)
|
||||||
|
- [升级指南](https://www.uviewui.com/components/changeGuide.html)
|
||||||
|
- [关于我们](https://www.uviewui.com/cooperation/about.html)
|
||||||
|
|
||||||
|
## 交流反馈
|
||||||
|
|
||||||
|
欢迎加入我们的QQ群交流反馈:[点此跳转](https://www.uviewui.com/components/addQQGroup.html)
|
||||||
|
|
||||||
|
## 关于PR
|
||||||
|
|
||||||
|
> 我们非常乐意接受各位的优质PR,但在此之前我希望您了解uView2.0是一个需要兼容多个平台的(小程序、h5、ios app、android app)包括nvue页面、vue页面。
|
||||||
|
> 所以希望在您修复bug并提交之前尽可能的去这些平台测试一下兼容性。最好能携带测试截图以方便审核。非常感谢!
|
||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
```bash
|
#### **uni-app插件市场链接** —— [https://ext.dcloud.net.cn/plugin?id=1593](https://ext.dcloud.net.cn/plugin?id=1593)
|
||||||
# npm方式安装,插件市场导入无需执行此命令
|
|
||||||
npm i uview-ui
|
请通过[官网安装文档](https://www.uviewui.com/components/install.html)了解更详细的内容
|
||||||
```
|
|
||||||
|
|
||||||
## 快速上手
|
## 快速上手
|
||||||
|
|
||||||
1. `main.js`引入uView库
|
请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容
|
||||||
```js
|
|
||||||
// main.js
|
|
||||||
import uView from 'uview-ui';
|
|
||||||
Vue.use(uView);
|
|
||||||
```
|
|
||||||
|
|
||||||
2. `App.vue`引入基础样式(注意style标签需声明scss属性支持)
|
|
||||||
```css
|
|
||||||
/* App.vue */
|
|
||||||
<style lang="scss">
|
|
||||||
@import "uview-ui/index.scss";
|
|
||||||
</style>
|
|
||||||
```
|
|
||||||
|
|
||||||
3. `uni.scss`引入全局scss变量文件
|
|
||||||
```css
|
|
||||||
/* uni.scss */
|
|
||||||
@import "uview-ui/theme.scss";
|
|
||||||
```
|
|
||||||
|
|
||||||
4. `pages.json`配置easycom规则(按需引入)
|
|
||||||
|
|
||||||
```js
|
|
||||||
// pages.json
|
|
||||||
{
|
|
||||||
"easycom": {
|
|
||||||
// npm安装的方式不需要前面的"@/",下载安装的方式需要"@/"
|
|
||||||
// npm安装方式
|
|
||||||
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
|
||||||
// 下载安装方式
|
|
||||||
// "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
|
|
||||||
},
|
|
||||||
// 此为本身已有的内容
|
|
||||||
"pages": [
|
|
||||||
// ......
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
请通过[快速上手](https://www.uviewui.com/components/quickstart.html)了解更详细的内容
|
|
||||||
|
|
||||||
## 使用方法
|
## 使用方法
|
||||||
配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。
|
配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。
|
||||||
@@ -78,27 +61,6 @@ Vue.use(uView);
|
|||||||
</template>
|
</template>
|
||||||
```
|
```
|
||||||
|
|
||||||
请通过[快速上手](https://www.uviewui.com/components/quickstart.html)了解更详细的内容
|
|
||||||
|
|
||||||
## 链接
|
|
||||||
|
|
||||||
- [官方文档](https://www.uviewui.com/)
|
|
||||||
- [更新日志](https://www.www.uviewui.com/components/changelog.html)
|
|
||||||
- [升级指南](https://www.uviewui.com/components/changelog.html)
|
|
||||||
- [关于我们](https://www.uviewui.com/cooperation/about.html)
|
|
||||||
|
|
||||||
## 预览
|
|
||||||
|
|
||||||
您可以通过**微信**扫码,查看最佳的演示效果。
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<img src="https://uviewui.com/common/weixin_mini_qrcode.png" width="220" height="220" >
|
|
||||||
|
|
||||||
## 捐赠uView的研发
|
|
||||||
|
|
||||||
uView文档和源码全部开源免费,如果您认为uView帮到了您的开发工作,您可以捐赠uView的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。
|
|
||||||
|
|
||||||
<img src="https://uviewui.com/common/alipay.png" width="220" ><img style="margin-left: 100px;" src="https://uviewui.com/common/wechat.png" width="220" >
|
|
||||||
|
|
||||||
## 版权信息
|
## 版权信息
|
||||||
uView遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uView应用到您的产品中。
|
uView遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uView应用到您的产品中。
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
## 2.0.33(2022-06-17)
|
||||||
|
# uView2.0重磅发布,利剑出鞘,一统江湖
|
||||||
|
|
||||||
|
1. 修复`loadmore`组件`lineColor`类型错误问题
|
||||||
|
2. 修复`u-parse`组件`imgtap`、`linktap`不生效问题
|
||||||
|
## 2.0.32(2022-06-16)
|
||||||
|
# uView2.0重磅发布,利剑出鞘,一统江湖
|
||||||
|
1. `u-loadmore`新增自定义颜色、虚/实线
|
||||||
|
2. 修复`u-swiper-action`组件部分平台不能上下滑动的问题
|
||||||
|
3. 修复`u-list`回弹问题
|
||||||
|
4. 修复`notice-bar`组件动画在低端安卓机可能会抖动的问题
|
||||||
|
5. `u-loading-page`添加控制图标大小的属性`iconSize`
|
||||||
|
6. 修复`u-tooltip`组件`color`参数不生效的问题
|
||||||
|
7. 修复`u--input`组件使用`blur`事件输出为`undefined`的bug
|
||||||
|
8. `u-code-input`组件新增键盘弹起时,是否自动上推页面参数`adjustPosition`
|
||||||
|
9. 修复`image`组件`load`事件无回调对象问题
|
||||||
|
10. 修复`button`组件`loadingSize`设置无效问题
|
||||||
|
10. 其他修复
|
||||||
## 2.0.31(2022-04-19)
|
## 2.0.31(2022-04-19)
|
||||||
# uView2.0重磅发布,利剑出鞘,一统江湖
|
# uView2.0重磅发布,利剑出鞘,一统江湖
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
:customStyle="customStyle"
|
:customStyle="customStyle"
|
||||||
:formatter="formatter"
|
:formatter="formatter"
|
||||||
@focus="$emit('focus')"
|
@focus="$emit('focus')"
|
||||||
@blur="$emit('blur')"
|
@blur="e => $emit('blur', e)"
|
||||||
@keyboardheightchange="$emit('keyboardheightchange')"
|
@keyboardheightchange="$emit('keyboardheightchange')"
|
||||||
@change="e => $emit('change', e)"
|
@change="e => $emit('change', e)"
|
||||||
@input="e => $emit('input', e)"
|
@input="e => $emit('input', e)"
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<template v-if="loading">
|
<template v-if="loading">
|
||||||
<u-loading-icon
|
<u-loading-icon
|
||||||
:mode="loadingMode"
|
:mode="loadingMode"
|
||||||
:size="textSize * 1.15"
|
:size="loadingSize * 1.15"
|
||||||
:color="loadingColor"
|
:color="loadingColor"
|
||||||
></u-loading-icon>
|
></u-loading-icon>
|
||||||
<text
|
<text
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
<template v-if="loading">
|
<template v-if="loading">
|
||||||
<u-loading-icon
|
<u-loading-icon
|
||||||
:mode="loadingMode"
|
:mode="loadingMode"
|
||||||
:size="textSize * 1.15"
|
:size="loadingSize * 1.15"
|
||||||
:color="loadingColor"
|
:color="loadingColor"
|
||||||
></u-loading-icon>
|
></u-loading-icon>
|
||||||
<text
|
<text
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
// 键盘弹起时,是否自动上推页面
|
||||||
|
adjustPosition: {
|
||||||
|
type: Boolean,
|
||||||
|
default: uni.$u.props.codeInput.adjustPosition
|
||||||
|
},
|
||||||
// 最大输入长度
|
// 最大输入长度
|
||||||
maxlength: {
|
maxlength: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
:focus="focus"
|
:focus="focus"
|
||||||
:value="inputValue"
|
:value="inputValue"
|
||||||
:maxlength="maxlength"
|
:maxlength="maxlength"
|
||||||
|
:adjustPosition="adjustPosition"
|
||||||
class="u-code-input__input"
|
class="u-code-input__input"
|
||||||
@input="inputHandler"
|
@input="inputHandler"
|
||||||
:style="{
|
:style="{
|
||||||
|
|||||||
@@ -161,10 +161,10 @@
|
|||||||
this.$emit('error', err)
|
this.$emit('error', err)
|
||||||
},
|
},
|
||||||
// 图片加载完成,标记loading结束
|
// 图片加载完成,标记loading结束
|
||||||
onLoadHandler() {
|
onLoadHandler(event) {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.isError = false
|
this.isError = false
|
||||||
this.$emit('load')
|
this.$emit('load', event)
|
||||||
this.removeBgColor()
|
this.removeBgColor()
|
||||||
// 如果不需要动画效果,就不执行下方代码,同时移除加载时的背景颜色
|
// 如果不需要动画效果,就不执行下方代码,同时移除加载时的背景颜色
|
||||||
// 否则无需fade效果时,png图片依然能看到下方的背景色
|
// 否则无需fade效果时,png图片依然能看到下方的背景色
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default {
|
|||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: uni.$u.props.line.margin
|
default: uni.$u.props.line.margin
|
||||||
},
|
},
|
||||||
// 是否虚线,true-实线,false-虚线
|
// 是否虚线,true-虚线,false-实线
|
||||||
dashed: {
|
dashed: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: uni.$u.props.line.dashed
|
default: uni.$u.props.line.dashed
|
||||||
|
|||||||
@@ -29,9 +29,7 @@
|
|||||||
@scrolltolower="scrolltolower"
|
@scrolltolower="scrolltolower"
|
||||||
@scrolltoupper="scrolltoupper"
|
@scrolltoupper="scrolltoupper"
|
||||||
>
|
>
|
||||||
<view :style="{
|
<view>
|
||||||
paddingTop: `${offset}px`
|
|
||||||
}">
|
|
||||||
<slot />
|
<slot />
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ export default {
|
|||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: uni.$u.props.loadingPage.fontSize
|
default: uni.$u.props.loadingPage.fontSize
|
||||||
},
|
},
|
||||||
|
// 图标大小
|
||||||
|
iconSize: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: uni.$u.props.loadingPage.fontSize
|
||||||
|
},
|
||||||
// 加载中图标的颜色,只能rgb或者十六进制颜色值
|
// 加载中图标的颜色,只能rgb或者十六进制颜色值
|
||||||
loadingColor: {
|
loadingColor: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
@@ -19,11 +19,15 @@
|
|||||||
:src="image"
|
:src="image"
|
||||||
class="u-loading-page__warpper__loading-icon__img"
|
class="u-loading-page__warpper__loading-icon__img"
|
||||||
mode="widthFit"
|
mode="widthFit"
|
||||||
|
:style="{
|
||||||
|
width: $u.addUnit(iconSize),
|
||||||
|
height: $u.addUnit(iconSize)
|
||||||
|
}"
|
||||||
></image>
|
></image>
|
||||||
<u-loading-icon
|
<u-loading-icon
|
||||||
v-else
|
v-else
|
||||||
:mode="loadingMode"
|
:mode="loadingMode"
|
||||||
size="28"
|
:size="$u.addUnit(iconSize)"
|
||||||
:color="loadingColor"
|
:color="loadingColor"
|
||||||
></u-loading-icon>
|
></u-loading-icon>
|
||||||
</view>
|
</view>
|
||||||
@@ -55,6 +59,7 @@ import props from "./props.js";
|
|||||||
* @property {String} bgColor 背景色 (默认 '#ffffff' )
|
* @property {String} bgColor 背景色 (默认 '#ffffff' )
|
||||||
* @property {String} color 文字颜色 (默认 '#C8C8C8' )
|
* @property {String} color 文字颜色 (默认 '#C8C8C8' )
|
||||||
* @property {String | Number} fontSize 文字大小 (默认 19 )
|
* @property {String | Number} fontSize 文字大小 (默认 19 )
|
||||||
|
* @property {String | Number} iconSize 图标大小 (默认 28 )
|
||||||
* @property {String} loadingColor 加载中图标的颜色,只能rgb或者十六进制颜色值 (默认 '#C8C8C8' )
|
* @property {String} loadingColor 加载中图标的颜色,只能rgb或者十六进制颜色值 (默认 '#C8C8C8' )
|
||||||
* @property {Object} customStyle 自定义样式
|
* @property {Object} customStyle 自定义样式
|
||||||
* @example <u-loading mode="circle"></u-loading>
|
* @example <u-loading mode="circle"></u-loading>
|
||||||
|
|||||||
@@ -19,13 +19,17 @@ export default {
|
|||||||
fontSize: {
|
fontSize: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: uni.$u.props.loadmore.fontSize
|
default: uni.$u.props.loadmore.fontSize
|
||||||
|
},
|
||||||
|
// 图标大小
|
||||||
|
iconSize: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: uni.$u.props.loadmore.iconSize
|
||||||
},
|
},
|
||||||
// 字体颜色
|
// 字体颜色
|
||||||
color: {
|
color: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.loadmore.color
|
default: uni.$u.props.loadmore.color
|
||||||
},
|
},
|
||||||
|
|
||||||
// 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆
|
// 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆
|
||||||
loadingIcon: {
|
loadingIcon: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -75,6 +79,16 @@ export default {
|
|||||||
line: {
|
line: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: uni.$u.props.loadmore.line
|
default: uni.$u.props.loadmore.line
|
||||||
|
},
|
||||||
|
// 线条颜色
|
||||||
|
lineColor: {
|
||||||
|
type: String,
|
||||||
|
default: uni.$u.props.loadmore.lineColor
|
||||||
|
},
|
||||||
|
// 是否虚线,true-虚线,false-实线
|
||||||
|
dashed: {
|
||||||
|
type: Boolean,
|
||||||
|
default: uni.$u.props.loadmore.dashed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,9 @@
|
|||||||
>
|
>
|
||||||
<u-line
|
<u-line
|
||||||
length="140rpx"
|
length="140rpx"
|
||||||
color="#E6E8EB"
|
:color="lineColor"
|
||||||
:hairline="false"
|
:hairline="false"
|
||||||
|
:dashed="dashed"
|
||||||
v-if="line"
|
v-if="line"
|
||||||
></u-line>
|
></u-line>
|
||||||
<!-- 加载中和没有更多的状态才显示两边的横线 -->
|
<!-- 加载中和没有更多的状态才显示两边的横线 -->
|
||||||
@@ -28,7 +29,7 @@
|
|||||||
>
|
>
|
||||||
<u-loading-icon
|
<u-loading-icon
|
||||||
:color="iconColor"
|
:color="iconColor"
|
||||||
size="17"
|
:size="iconSize"
|
||||||
:mode="loadingIcon"
|
:mode="loadingIcon"
|
||||||
></u-loading-icon>
|
></u-loading-icon>
|
||||||
</view>
|
</view>
|
||||||
@@ -42,8 +43,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-line
|
<u-line
|
||||||
length="140rpx"
|
length="140rpx"
|
||||||
color="#E6E8EB"
|
:color="lineColor"
|
||||||
:hairline="false"
|
:hairline="false"
|
||||||
|
:dashed="dashed"
|
||||||
v-if="line"
|
v-if="line"
|
||||||
></u-line>
|
></u-line>
|
||||||
</view>
|
</view>
|
||||||
@@ -60,6 +62,7 @@
|
|||||||
* @property {String} bgColor 组件背景颜色,在页面是非白色时会用到(默认 'transparent' )
|
* @property {String} bgColor 组件背景颜色,在页面是非白色时会用到(默认 'transparent' )
|
||||||
* @property {Boolean} icon 加载中时是否显示图标(默认 true )
|
* @property {Boolean} icon 加载中时是否显示图标(默认 true )
|
||||||
* @property {String | Number} fontSize 字体大小(默认 14 )
|
* @property {String | Number} fontSize 字体大小(默认 14 )
|
||||||
|
* @property {String | Number} iconSize 图标大小(默认 17 )
|
||||||
* @property {String} color 字体颜色(默认 '#606266' )
|
* @property {String} color 字体颜色(默认 '#606266' )
|
||||||
* @property {String} loadingIcon 加载图标(默认 'circle' )
|
* @property {String} loadingIcon 加载图标(默认 'circle' )
|
||||||
* @property {String} loadmoreText 加载前的提示语(默认 '加载更多' )
|
* @property {String} loadmoreText 加载前的提示语(默认 '加载更多' )
|
||||||
@@ -67,10 +70,12 @@
|
|||||||
* @property {String} nomoreText 没有更多的提示语(默认 '没有更多了' )
|
* @property {String} nomoreText 没有更多的提示语(默认 '没有更多了' )
|
||||||
* @property {Boolean} isDot 到上一个相邻元素的距离 (默认 false )
|
* @property {Boolean} isDot 到上一个相邻元素的距离 (默认 false )
|
||||||
* @property {String} iconColor 加载中图标的颜色 (默认 '#b7b7b7' )
|
* @property {String} iconColor 加载中图标的颜色 (默认 '#b7b7b7' )
|
||||||
|
* @property {String} lineColor 线条颜色(默认 #E6E8EB )
|
||||||
* @property {String | Number} marginTop 上边距 (默认 10 )
|
* @property {String | Number} marginTop 上边距 (默认 10 )
|
||||||
* @property {String | Number} marginBottom 下边距 (默认 10 )
|
* @property {String | Number} marginBottom 下边距 (默认 10 )
|
||||||
* @property {String | Number} height 高度,单位px (默认 'auto' )
|
* @property {String | Number} height 高度,单位px (默认 'auto' )
|
||||||
* @property {Boolean} line 是否显示左边分割线 (默认 false )
|
* @property {Boolean} line 是否显示左边分割线 (默认 false )
|
||||||
|
* @property {Boolean} dashed // 是否虚线,true-虚线,false-实线 (默认 false )
|
||||||
* @event {Function} loadmore status为loadmore时,点击组件会发出此事件
|
* @event {Function} loadmore status为loadmore时,点击组件会发出此事件
|
||||||
* @example <u-loadmore :status="status" icon-type="iconType" load-text="loadText" />
|
* @example <u-loadmore :status="status" icon-type="iconType" load-text="loadText" />
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ export default {
|
|||||||
// #ifdef H5 || APP-PLUS
|
// #ifdef H5 || APP-PLUS
|
||||||
node.attrs.src = node.attrs.src || node.attrs['data-src']
|
node.attrs.src = node.attrs.src || node.attrs['data-src']
|
||||||
// #endif
|
// #endif
|
||||||
this.root.$emit('imgtap', node.attrs)
|
this.root.$emit('imgTap', node.attrs)
|
||||||
// 自动预览图片
|
// 自动预览图片
|
||||||
if (this.root.previewImg)
|
if (this.root.previewImg)
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
@@ -262,7 +262,7 @@ export default {
|
|||||||
linkTap(e) {
|
linkTap(e) {
|
||||||
var attrs = e.currentTarget ? this.childs[e.currentTarget.dataset.i].attrs : e,
|
var attrs = e.currentTarget ? this.childs[e.currentTarget.dataset.i].attrs : e,
|
||||||
href = attrs.href
|
href = attrs.href
|
||||||
this.root.$emit('linktap', attrs)
|
this.root.$emit('linkTap', attrs)
|
||||||
if (href) {
|
if (href) {
|
||||||
// 跳转锚点
|
// 跳转锚点
|
||||||
if (href[0] == '#')
|
if (href[0] == '#')
|
||||||
@@ -496,4 +496,4 @@ export default {
|
|||||||
height: 225px;
|
height: 225px;
|
||||||
}
|
}
|
||||||
/* #endif */
|
/* #endif */
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -50,11 +50,6 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.picker.confirmColor
|
default: uni.$u.props.picker.confirmColor
|
||||||
},
|
},
|
||||||
// 选择器只有一列时,默认选中项的索引,从0开始
|
|
||||||
singleIndex: {
|
|
||||||
type: [String, Number],
|
|
||||||
default: uni.$u.props.picker.singleIndex
|
|
||||||
},
|
|
||||||
// 每列中可见选项的数量
|
// 每列中可见选项的数量
|
||||||
visibleItemCount: {
|
visibleItemCount: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
|
|||||||
@@ -66,7 +66,6 @@
|
|||||||
* @property {String} confirmText 确认按钮的文字(默认 '确定' )
|
* @property {String} confirmText 确认按钮的文字(默认 '确定' )
|
||||||
* @property {String} cancelColor 取消按钮的颜色(默认 '#909193' )
|
* @property {String} cancelColor 取消按钮的颜色(默认 '#909193' )
|
||||||
* @property {String} confirmColor 确认按钮的颜色(默认 '#3c9cff' )
|
* @property {String} confirmColor 确认按钮的颜色(默认 '#3c9cff' )
|
||||||
* @property {Array} singleIndex 选择器只有一列时,默认选中项的索引,从0开始(默认 0 )
|
|
||||||
* @property {String | Number} visibleItemCount 每列中可见选项的数量(默认 5 )
|
* @property {String | Number} visibleItemCount 每列中可见选项的数量(默认 5 )
|
||||||
* @property {String} keyName 选项对象中,需要展示的属性键名(默认 'text' )
|
* @property {String} keyName 选项对象中,需要展示的属性键名(默认 'text' )
|
||||||
* @property {Boolean} closeOnClickOverlay 是否允许点击遮罩关闭选择器(默认 false )
|
* @property {Boolean} closeOnClickOverlay 是否允许点击遮罩关闭选择器(默认 false )
|
||||||
@@ -161,7 +160,7 @@ export default {
|
|||||||
this.setIndexs(value)
|
this.setIndexs(value)
|
||||||
|
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
// #ifndef MP-WEIXIN
|
// #ifndef MP-WEIXIN || MP-LARK
|
||||||
// 微信小程序不能传递this,会因为循环引用而报错
|
// 微信小程序不能传递this,会因为循环引用而报错
|
||||||
picker: this,
|
picker: this,
|
||||||
// #endif
|
// #endif
|
||||||
|
|||||||
@@ -19,11 +19,17 @@
|
|||||||
class="u-notice__content"
|
class="u-notice__content"
|
||||||
ref="u-notice__content"
|
ref="u-notice__content"
|
||||||
>
|
>
|
||||||
<text
|
<view
|
||||||
ref="u-notice__content__text"
|
ref="u-notice__content__text"
|
||||||
class="u-notice__content__text"
|
class="u-notice__content__text"
|
||||||
:style="[textStyle]"
|
:style="[animationStyle]"
|
||||||
>{{text}}</text>
|
>
|
||||||
|
<text
|
||||||
|
v-for="(item, index) in innerText"
|
||||||
|
:key="index"
|
||||||
|
:style="[textStyle]"
|
||||||
|
>{{item}}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="u-notice__right-icon"
|
class="u-notice__right-icon"
|
||||||
@@ -118,11 +124,28 @@
|
|||||||
textStyle() {
|
textStyle() {
|
||||||
let style = {}
|
let style = {}
|
||||||
style.color = this.color
|
style.color = this.color
|
||||||
style.animationDuration = this.animationDuration
|
|
||||||
style.animationPlayState = this.animationPlayState
|
|
||||||
style.fontSize = uni.$u.addUnit(this.fontSize)
|
style.fontSize = uni.$u.addUnit(this.fontSize)
|
||||||
return style
|
return style
|
||||||
},
|
},
|
||||||
|
animationStyle() {
|
||||||
|
let style = {}
|
||||||
|
style.animationDuration = this.animationDuration
|
||||||
|
style.animationPlayState = this.animationPlayState
|
||||||
|
return style
|
||||||
|
},
|
||||||
|
// 内部对用户传入的数据进一步分割,放到多个text标签循环,否则如果用户传入的字符串很长(100个字符以上)
|
||||||
|
// 放在一个text标签中进行滚动,在低端安卓机上,动画可能会出现抖动现象,需要分割到多个text中可解决此问题
|
||||||
|
innerText() {
|
||||||
|
let result = [],
|
||||||
|
// 每组text标签的字符长度
|
||||||
|
len = 20
|
||||||
|
const textArr = this.text.split('')
|
||||||
|
for (let i = 0; i < textArr.length; i += len) {
|
||||||
|
// 对拆分的后的text进行slice分割,得到的为数组再进行join拼接为字符串
|
||||||
|
result.push(textArr.slice(i, i + len).join(''))
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
@@ -289,6 +312,7 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
animation: u-loop-animation 10s linear infinite both;
|
animation: u-loop-animation 10s linear infinite both;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
@include flex(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
/* #ifndef APP-NVUE || MP-WEIXIN */
|
/* #ifndef APP-NVUE || MP-WEIXIN */
|
||||||
touch-action: none;
|
touch-action: pan-y;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
|
||||||
&__content {
|
&__content {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
:selectable="false"
|
:selectable="false"
|
||||||
@longpress.stop="longpressHandler"
|
@longpress.stop="longpressHandler"
|
||||||
:style="{
|
:style="{
|
||||||
|
color: color,
|
||||||
backgroundColor: bgColor && showTooltip && tooltipTop !== -10000 ? bgColor : 'transparent'
|
backgroundColor: bgColor && showTooltip && tooltipTop !== -10000 ? bgColor : 'transparent'
|
||||||
}"
|
}"
|
||||||
>{{ text }}</text>
|
>{{ text }}</text>
|
||||||
@@ -312,7 +313,6 @@
|
|||||||
/* #endif */
|
/* #endif */
|
||||||
|
|
||||||
&__text {
|
&__text {
|
||||||
color: $u-content-color;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// 此版本发布于2022-04-19
|
// 此版本发布于2022-06-17
|
||||||
const version = '2.0.31'
|
const version = '2.0.33'
|
||||||
|
|
||||||
// 开发环境才提示,生产环境不会提示
|
// 开发环境才提示,生产环境不会提示
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
export default {
|
export default {
|
||||||
// codeInput 组件
|
// codeInput 组件
|
||||||
codeInput: {
|
codeInput: {
|
||||||
|
adjustPosition: true,
|
||||||
maxlength: 6,
|
maxlength: 6,
|
||||||
dot: false,
|
dot: false,
|
||||||
mode: 'box',
|
mode: 'box',
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export default {
|
|||||||
bgColor: '#ffffff',
|
bgColor: '#ffffff',
|
||||||
color: '#C8C8C8',
|
color: '#C8C8C8',
|
||||||
fontSize: 19,
|
fontSize: 19,
|
||||||
|
iconSize: 28,
|
||||||
loadingColor: '#C8C8C8'
|
loadingColor: '#C8C8C8'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export default {
|
|||||||
bgColor: 'transparent',
|
bgColor: 'transparent',
|
||||||
icon: true,
|
icon: true,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
iconSize: 17,
|
||||||
color: '#606266',
|
color: '#606266',
|
||||||
loadingIcon: 'spinner',
|
loadingIcon: 'spinner',
|
||||||
loadmoreText: '加载更多',
|
loadmoreText: '加载更多',
|
||||||
@@ -24,6 +25,8 @@ export default {
|
|||||||
marginTop: 10,
|
marginTop: 10,
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
line: false
|
line: false,
|
||||||
|
lineColor: '#E6E8EB',
|
||||||
|
dashed: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ export default {
|
|||||||
confirmText: '确定',
|
confirmText: '确定',
|
||||||
cancelColor: '#909193',
|
cancelColor: '#909193',
|
||||||
confirmColor: '#3c9cff',
|
confirmColor: '#3c9cff',
|
||||||
singleIndex: 0,
|
|
||||||
visibleItemCount: 5,
|
visibleItemCount: 5,
|
||||||
keyName: 'text',
|
keyName: 'text',
|
||||||
closeOnClickOverlay: false,
|
closeOnClickOverlay: false,
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
return Object.keys(classes)
|
return Object.keys(classes)
|
||||||
// 支付宝,头条小程序无法动态绑定一个数组类名,否则解析出来的结果会带有",",而导致失效
|
// 支付宝,头条小程序无法动态绑定一个数组类名,否则解析出来的结果会带有",",而导致失效
|
||||||
// #ifdef MP-ALIPAY || MP-TOUTIAO
|
// #ifdef MP-ALIPAY || MP-TOUTIAO || MP-LARK
|
||||||
.join(' ')
|
.join(' ')
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,15 +2,20 @@
|
|||||||
"id": "uview-ui",
|
"id": "uview-ui",
|
||||||
"name": "uview-ui",
|
"name": "uview-ui",
|
||||||
"displayName": "uView2.0重磅发布,利剑出鞘,一统江湖",
|
"displayName": "uView2.0重磅发布,利剑出鞘,一统江湖",
|
||||||
"version": "2.0.31",
|
"version": "2.0.33",
|
||||||
"description": "uView UI已完美兼容nvue,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
|
"description": "uView UI已完美兼容nvue,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"uview",
|
"uview",
|
||||||
|
"uview",
|
||||||
"ui",
|
"ui",
|
||||||
"uni-app"
|
"ui",
|
||||||
|
"uni-app",
|
||||||
|
"uni-app",
|
||||||
|
"ui"
|
||||||
],
|
],
|
||||||
"repository": "https://github.com/umicro/uView2.0",
|
"repository": "https://github.com/umicro/uView2.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
"HBuilderX": "^3.1.0"
|
||||||
},
|
},
|
||||||
"dcloudext": {
|
"dcloudext": {
|
||||||
"category": [
|
"category": [
|
||||||
|
|||||||
Reference in New Issue
Block a user