uview-plus 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -1,3 +1,5 @@
1
+ ## 3.1.1(2022-08-07)
2
+ 折叠面板在小程序会报'setContentAnimate' of undefined
1
3
  ## 3.1.0(2022-08-07)
2
4
  初步解决App端运行时提示props未定义且白屏问题
3
5
  ## 3.0.17(2022-08-03)
@@ -31,11 +31,14 @@
31
31
  // 由于nvue不支持百分比单位,需要查询宽度来计算每个日期的宽度
32
32
  const dom = uni.requireNativePlugin('dom')
33
33
  // #endif
34
+ import mpMixin from '../../libs/mixin/mpMixin.js';
35
+ import mixin from '../../libs/mixin/mixin.js';
36
+ import defprops from '../../libs/config/props';
34
37
  // import dayjs from '../../libs/util/dayjs.js';
35
38
  import dayjs from 'dayjs'
36
39
  export default {
37
40
  name: 'u-calendar-month',
38
- mixins: [uni.$u.mpMixin, uni.$u.mixin],
41
+ mixins: [mpMixin, mixin],
39
42
  props: {
40
43
  // 是否显示月份背景色
41
44
  showMark: {
@@ -46,7 +46,8 @@
46
46
  <script>
47
47
  import props from './props.js';
48
48
  import mpMixin from '../../libs/mixin/mpMixin.js';
49
- import mixin from '../../libs/mixin/mixin.js';
49
+ import mixin from '../../libs/mixin/mixin.js';
50
+ import { nextTick } from 'vue'
50
51
  // #ifdef APP-NVUE
51
52
  const animation = uni.requireNativePlugin('animation')
52
53
  const dom = uni.requireNativePlugin('dom')
@@ -104,7 +105,7 @@
104
105
  },
105
106
  methods: {
106
107
  // 异步获取内容,或者动态修改了内容时,需要重新初始化
107
- init() {
108
+ async init() {
108
109
  // 初始化数据
109
110
  this.updateParentData()
110
111
  if (!this.parent) {
@@ -127,10 +128,9 @@
127
128
  }
128
129
  this.expanded = (value || []).some(item => item == this.name)
129
130
  }
130
- // 设置组件的展开或收起状态
131
- this.$nextTick(function() {
132
- this.setContentAnimate()
133
- })
131
+ // 设置组件的展开或收起状态
132
+ await nextTick()
133
+ this.setContentAnimate()
134
134
  },
135
135
  updateParentData() {
136
136
  // 此方法在mixin中
package/index.js CHANGED
@@ -68,6 +68,7 @@ const install = (Vue) => {
68
68
  // #ifndef APP-NVUE
69
69
  // 只有vue,挂载到Vue.prototype才有意义,因为nvue中全局Vue.prototype和Vue.mixin是无效的
70
70
  Vue.config.globalProperties.$u = $u
71
+ // 暂时兼容vue2的$nextTick写法
71
72
  Vue.config.globalProperties.$nextTick = (cb) => {
72
73
  cb();
73
74
  }
@@ -1,5 +1,5 @@
1
- // 此版本发布于2022-07-09
2
- const version = '3.0.0'
1
+ // 此版本发布于2022-08-07
2
+ const version = '3.1.0'
3
3
 
4
4
  // 开发环境才提示,生产环境不会提示
5
5
  if (process.env.NODE_ENV === 'development') {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-plus",
3
3
  "name": "uview-plus",
4
4
  "displayName": "uview-plus3.0重磅发布,利剑出鞘,一统江湖",
5
- "version": "3.1.0",
5
+ "version": "3.1.1",
6
6
  "description": "uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",