mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:43:26 +08:00
# 2022-03-15
### 1.4.0 开源社区版: 【优化】首页标题默认设置为空,防止数据加载缓慢导致显示空的情况。#I4XM14 ### 0.2.9 专业版: 【升级】升级uniapp前端框架到UView2.0.29版本。修复一些组件的细节bug,详情查询uviewui更新文档。 【优化】首页标题默认设置为空,防止数据加载缓慢导致显示空的情况。#I4XM14 【修复】修复BaseRepository中有SqlWith.NoLock使用Where错误的BUG。#I4XKFW
This commit is contained in:
@@ -102,7 +102,7 @@
|
||||
"quickapp" : {},
|
||||
/* 快应用特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx11d95cdaee6058f6",
|
||||
"appid" : "wx6fc139d4de0b470f",
|
||||
"setting" : {
|
||||
"urlCheck" : true,
|
||||
"postcss" : true,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<!--无网络组件-->
|
||||
<u-no-network></u-no-network>
|
||||
<!--头部组件-->
|
||||
<u-navbar leftIcon="search" :title="appTitle" safeAreaInsetTop fixed placeholder @leftClick="goSearch"></u-navbar>
|
||||
<u-navbar leftIcon="search" :title="homeTitle" safeAreaInsetTop fixed placeholder @leftClick="goSearch"></u-navbar>
|
||||
|
||||
<!--首页模块化组合组件-->
|
||||
<coreshop-page :coreshopdata="pageData"></coreshop-page>
|
||||
@@ -55,6 +55,7 @@
|
||||
copy: false,
|
||||
shareUrl: '/pages/share/jump/jump',
|
||||
modalShow: true,
|
||||
homeTitle: '',
|
||||
};
|
||||
},
|
||||
updated() {
|
||||
@@ -82,7 +83,8 @@
|
||||
}
|
||||
},
|
||||
appTitle() {
|
||||
return this.$store.state.config.shopName;
|
||||
this.homeTitle = this.$store.state.config.shopName;
|
||||
return this.homeTitle;
|
||||
},
|
||||
// 获取店铺联系人手机号
|
||||
shopMobile() {
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
## 2.0.29(2022-03-13)
|
||||
# uView2.0重磅发布,利剑出鞘,一统江湖
|
||||
|
||||
1. 修复`u--text`组件设置`decoration`属性未生效的问题
|
||||
2. 修复`u-datetime-picker`使用`formatter`后返回值不正确
|
||||
3. 修复`u-datetime-picker` `intercept` 可能为undefined
|
||||
4. 修复已设置单位 uni..config.unit = 'rpx'时,线型指示器 `transform` 的位置翻倍,导致指示器超出宽度
|
||||
5. 修复mixin中bem方法生成的类名在支付宝和字节小程序中失效
|
||||
6. 修复默认值传值为空的时候,打开`u-datetime-picker`报错,不能选中第一列时间的bug
|
||||
7. 修复`u-datetime-picker`使用`formatter`后返回值不正确
|
||||
8. 修复`u-image`组件`loading`无效果的问题
|
||||
9. 修复`config.unit`属性设为`rpx`时,导航栏占用高度不足导致塌陷的问题
|
||||
10. 修复`u-datetime-picker`组件`itemHeight`无效问题
|
||||
11. 其他修复
|
||||
## 2.0.28(2022-02-22)
|
||||
# uView2.0重磅发布,利剑出鞘,一统江湖
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
:block="block"
|
||||
:lines="lines"
|
||||
:color="color"
|
||||
:decoration="decoration"
|
||||
:size="size"
|
||||
:iconStyle="iconStyle"
|
||||
:margin="margin"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
:closeOnClickOverlay="closeOnClickOverlay"
|
||||
:columns="columns"
|
||||
:title="title"
|
||||
:itemHeight="itemHeight"
|
||||
:defaultIndex="innerDefaultIndex"
|
||||
:cancelText="cancelText"
|
||||
:confirmText="confirmText"
|
||||
@@ -74,7 +75,7 @@
|
||||
watch: {
|
||||
show(newValue, oldValue) {
|
||||
if (newValue) {
|
||||
this.updateColumnValue(this.value)
|
||||
this.updateColumnValue(this.innerValue)
|
||||
}
|
||||
},
|
||||
propsChange() {
|
||||
@@ -117,18 +118,34 @@
|
||||
})
|
||||
this.$emit('input', this.innerValue)
|
||||
},
|
||||
//用正则截取输出值,当出现多组数字时,抛出错误
|
||||
intercept(e,type){
|
||||
let judge = e.match(/\d+/g)
|
||||
//判断是否掺杂数字
|
||||
if(judge.length>1){
|
||||
uni.$u.error("请勿在过滤或格式化函数时添加数字")
|
||||
return 0
|
||||
}else if(type&&judge[0].length==4){//判断是否是年份
|
||||
return judge[0]
|
||||
}else if(judge[0].length>2){
|
||||
uni.$u.error("请勿在过滤或格式化函数时添加数字")
|
||||
return 0
|
||||
}else{
|
||||
return judge[0]
|
||||
}
|
||||
},
|
||||
// 列发生变化时触发
|
||||
change(e) {
|
||||
const { indexs, values } = e
|
||||
let selectValue = ''
|
||||
if(this.mode === 'time') {
|
||||
// 根据value各列索引,从各列数组中,取出当前时间的选中值
|
||||
selectValue = `${values[0][indexs[0]]}:${values[1][indexs[1]]}`
|
||||
selectValue = `${this.intercept(values[0][indexs[0]])}:${this.intercept(values[1][indexs[1]])}`
|
||||
} else {
|
||||
// 将选择的值转为数值,比如'03'转为数值的3,'2019'转为数值的2019
|
||||
const year = parseInt(values[0][indexs[0]])
|
||||
const month = parseInt(values[1][indexs[1]])
|
||||
let date = parseInt(values[2] ? values[2][indexs[2]] : 1)
|
||||
const year = parseInt(this.intercept(values[0][indexs[0]],'year'))
|
||||
const month = parseInt(this.intercept(values[1][indexs[1]]))
|
||||
let date = parseInt(values[2] ? this.intercept(values[2][indexs[2]]) : 1)
|
||||
let hour = 0, minute = 0
|
||||
// 此月份的最大天数
|
||||
const maxDate = dayjs(`${year}-${month}-${date}`).daysInMonth()
|
||||
@@ -139,8 +156,8 @@
|
||||
// 不允许超过maxDate值
|
||||
date = Math.min(maxDate, date)
|
||||
if (this.mode === 'datetime') {
|
||||
hour = parseInt(values[3][indexs[3]])
|
||||
minute = parseInt(values[4][indexs[4]])
|
||||
hour = parseInt(this.intercept(values[3][indexs[3]]))
|
||||
minute = parseInt(this.intercept(values[4][indexs[4]]))
|
||||
}
|
||||
// 转为时间模式
|
||||
selectValue = Number(new Date(year, month - 1, date, hour, minute))
|
||||
|
||||
@@ -119,8 +119,8 @@
|
||||
this.isError = true
|
||||
|
||||
} else {
|
||||
this.isError = false
|
||||
this.loading = false
|
||||
this.isError = false;
|
||||
this.loading = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
class="u-navbar__placeholder"
|
||||
v-if="fixed && placeholder"
|
||||
:style="{
|
||||
height: $u.addUnit($u.getPx(height) + $u.sys().statusBarHeight),
|
||||
height: $u.addUnit($u.getPx(height) + $u.sys().statusBarHeight,'px'),
|
||||
}"
|
||||
></view>
|
||||
<view :class="[fixed && 'u-navbar--fixed']">
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
* @property {Boolean} disabled 是否启用输入框(默认 false )
|
||||
* @property {String} borderColor 边框颜色,配置了颜色,才会有边框 (默认 'transparent' )
|
||||
* @property {String} searchIconColor 搜索图标的颜色,默认同输入框字体颜色 (默认 '#909399' )
|
||||
* @property {Number | String} searchIconSize 搜索图标的字体,默认26
|
||||
* @property {Number | String} searchIconSize 搜索图标的字体,默认22
|
||||
* @property {String} color 输入框字体颜色(默认 '#606266' )
|
||||
* @property {String} placeholderColor placeholder的颜色(默认 '#909399' )
|
||||
* @property {String} searchIcon 输入框左边的图标,可以为uView图标名称或图片路径 (默认 'search' )
|
||||
|
||||
@@ -69,8 +69,9 @@ export default {
|
||||
// 如果在打开状态下,进行点击的话,直接关闭单元格
|
||||
return this.moveCellByAnimation('close') && this.unbindBindingX()
|
||||
}
|
||||
e.stopPropagation && e.stopPropagation()
|
||||
e.preventDefault && e.preventDefault()
|
||||
// 特殊情况下,e可能不为一个对象
|
||||
e?.stopPropagation && e.stopPropagation()
|
||||
e?.preventDefault && e.preventDefault()
|
||||
this.moving = true
|
||||
// 获取元素ref
|
||||
const content = this.getContentRef()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
lineStyle() {
|
||||
let style = {}
|
||||
style.width = uni.$u.addUnit(this.lineWidth)
|
||||
style.transform = `translateX(${ this.current * this.lineWidth }px)`
|
||||
style.transform = `translateX(${ uni.$u.addUnit(this.current * this.lineWidth) })`
|
||||
style.backgroundColor = this.indicatorActiveColor
|
||||
return style
|
||||
},
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
<view
|
||||
class="u-tabs__wrapper__nav"
|
||||
ref="u-tabs__wrapper__nav"
|
||||
:style="[{
|
||||
flex: scrollable ? 0 : 1
|
||||
}]"
|
||||
>
|
||||
<view
|
||||
class="u-tabs__wrapper__nav__item"
|
||||
@@ -24,7 +21,7 @@
|
||||
:key="index"
|
||||
@tap="clickHandler(item, index)"
|
||||
:ref="`u-tabs__wrapper__nav__item-${index}`"
|
||||
:style="[$u.addStyle(itemStyle)]"
|
||||
:style="[$u.addStyle(itemStyle), {flex: scrollable ? '' : 1}]"
|
||||
:class="[`u-tabs__wrapper__nav__item-${index}`, item.disabled && 'u-tabs__wrapper__nav__item--disabled']"
|
||||
>
|
||||
<text
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// 此版本发布于2022-02-22
|
||||
const version = '2.0.28'
|
||||
// 此版本发布于2022-03-13
|
||||
const version = '2.0.29'
|
||||
|
||||
// 开发环境才提示,生产环境不会提示
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
|
||||
@@ -232,7 +232,8 @@ function promise(value) {
|
||||
* @param {Object} value
|
||||
*/
|
||||
function image(value) {
|
||||
const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i
|
||||
// 由于有很多图片链接并不是.jpg等结尾,而是带有很多get参数,故不能采用判断扩展名的形式,只能简单的判断是否为http开头
|
||||
const IMAGE_REGEXP = /^http/i
|
||||
return IMAGE_REGEXP.test(value)
|
||||
}
|
||||
|
||||
|
||||
@@ -31,33 +31,33 @@ module.exports = {
|
||||
created() {
|
||||
// 组件当中,只有created声明周期,为了能在组件使用,故也在created中将方法挂载到$u
|
||||
this.$u.getRect = this.$uGetRect
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
// 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
|
||||
// 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
|
||||
// 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
|
||||
$u() {
|
||||
// #ifndef APP-NVUE
|
||||
// 在非nvue端,移除props,http,mixin等对象,避免在小程序setData时数据过大影响性能
|
||||
return uni.$u.deepMerge(uni.$u, {
|
||||
props: undefined,
|
||||
http: undefined,
|
||||
mixin: undefined
|
||||
})
|
||||
// #endif
|
||||
// #ifdef APP-NVUE
|
||||
return uni.$u
|
||||
// #endif
|
||||
},
|
||||
// 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
|
||||
$u() {
|
||||
// #ifndef APP-NVUE
|
||||
// 在非nvue端,移除props,http,mixin等对象,避免在小程序setData时数据过大影响性能
|
||||
return uni.$u.deepMerge(uni.$u, {
|
||||
props: undefined,
|
||||
http: undefined,
|
||||
mixin: undefined
|
||||
})
|
||||
// #endif
|
||||
// #ifdef APP-NVUE
|
||||
return uni.$u
|
||||
// #endif
|
||||
},
|
||||
/**
|
||||
* 生成bem规则类名
|
||||
* 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
|
||||
* 故采用如下折中做法,最后返回的是数组,类似['a', 'b', 'c']的形式
|
||||
* @param {String} name 组件名称
|
||||
* @param {Array} fixed 一直会存在的类名
|
||||
* @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
|
||||
* @return Array
|
||||
*/
|
||||
* 生成bem规则类名
|
||||
* 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
|
||||
* 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
|
||||
* @param {String} name 组件名称
|
||||
* @param {Array} fixed 一直会存在的类名
|
||||
* @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
|
||||
* @returns {Array|string}
|
||||
*/
|
||||
bem() {
|
||||
return function (name, fixed, change) {
|
||||
// 类名前缀
|
||||
@@ -76,6 +76,10 @@ module.exports = {
|
||||
})
|
||||
}
|
||||
return Object.keys(classes)
|
||||
// 支付宝,头条小程序无法动态绑定一个数组类名,否则解析出来的结果会带有",",而导致失效
|
||||
// #ifdef MP-ALIPAY || MP-TOUTIAO
|
||||
.join(' ')
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"id": "uview-ui",
|
||||
"name": "uview-ui",
|
||||
"displayName": "uView2.0重磅发布,利剑出鞘,一统江湖",
|
||||
"version": "2.0.28",
|
||||
"version": "2.0.29",
|
||||
"description": "uView UI已完美兼容nvue,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
|
||||
"keywords": [
|
||||
"uview",
|
||||
|
||||
Reference in New Issue
Block a user