uview-plus 3.3.48 → 3.3.50

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,21 @@
1
+ ## 3.3.50(2024-12-05)
2
+ fix: 优化popup等对禁止背景滚动机制
3
+
4
+ add: slider在弹窗使用示例
5
+
6
+ fix: card组件类名问题
7
+
8
+ ## 3.3.49(2024-12-02)
9
+ fix: 去除album多余的$u引用
10
+
11
+ fix: 优化图片组件兼容性
12
+
13
+ add: picker组件增加zIndex属性
14
+
15
+ add: text增加是否占满剩余空间属性
16
+
17
+ add: input颜色示例
18
+
1
19
  ## 3.3.48(2024-11-29)
2
20
  add: 文本行数限制样式提高到10行
3
21
 
@@ -119,7 +119,6 @@ export default {
119
119
  imageStyle() {
120
120
  return (index1, index2) => {
121
121
  const { space, rowCount, multipleSize, urls } = this,
122
- { addUnit, addStyle } = uni.$u,
123
122
  rowLen = this.showUrls.length,
124
123
  allLen = this.urls.length
125
124
  const style = {
@@ -18,7 +18,7 @@
18
18
  }"
19
19
  @tap="headClick"
20
20
  >
21
- <view v-if="!$slots.head" class="u-flex u-row-between">
21
+ <view v-if="!$slots.head" class="u-flex u-flex-between">
22
22
  <view class="u-card__head--left u-flex u-line-1" v-if="title">
23
23
  <image
24
24
  :src="thumb"
@@ -20,6 +20,8 @@
20
20
  :lazy-load="lazyLoad"
21
21
  class="u-image__image"
22
22
  :style="{
23
+ width: addUnit(width),
24
+ height: addUnit(height),
23
25
  borderRadius: shape == 'circle' ? '10000px' : addUnit(radius)
24
26
  }"
25
27
  ></image>
@@ -125,17 +127,43 @@
125
127
  transStyle() {
126
128
  let style = {};
127
129
  // 通过调用addUnit()方法,如果有单位,如百分比,px单位等,直接返回,如果是纯粹的数值,则加上rpx单位
130
+ // #ifdef APP-NVUE
128
131
  style.width = addUnit(this.width);
129
132
  style.height = addUnit(this.height);
133
+ // #endif
134
+ // #ifndef APP-NVUE
135
+ if (this.width == '100%') {
136
+ style.width = this.width;
137
+ } else {
138
+ style.width = 'fit-content';
139
+ }
140
+ if (this.height == '100%') {
141
+ style.height = this.height;
142
+ } else {
143
+ style.height = 'fit-content';
144
+ }
145
+ // #endif
130
146
  return style;
131
147
  },
132
148
  wrapStyle() {
133
149
  let style = {};
134
150
  // 通过调用addUnit()方法,如果有单位,如百分比,px单位等,直接返回,如果是纯粹的数值,则加上rpx单位
135
- // style.width = addUnit(this.width);
136
- // style.height = addUnit(this.height);
137
- style.width = '100%';
138
- style.height = '100%';
151
+ // #ifdef APP-NVUE
152
+ style.width = addUnit(this.width);
153
+ style.height = addUnit(this.height);
154
+ // #endif
155
+ // #ifndef APP-NVUE
156
+ if (this.width == '100%') {
157
+ style.width = this.width;
158
+ } else {
159
+ style.width = 'fit-content';
160
+ }
161
+ if (this.height == '100%') {
162
+ style.height = this.height;
163
+ } else {
164
+ style.height = 'fit-content';
165
+ }
166
+ // #endif
139
167
  // 如果是显示圆形,设置一个很多的半径值即可
140
168
  style.borderRadius = this.shape == 'circle' ? '10000px' : addUnit(this.radius)
141
169
  // 如果设置圆角,必须要有hidden,否则可能圆角无效
@@ -5,6 +5,7 @@
5
5
  :duration="duration"
6
6
  :custom-style="overlayStyle"
7
7
  @click="clickHandler"
8
+ @touchmove.stop.prevent="noop"
8
9
  >
9
10
  <slot />
10
11
  </u-transition>
@@ -25,6 +25,7 @@ export default {
25
25
  keyName: 'text',
26
26
  closeOnClickOverlay: false,
27
27
  defaultIndex: [],
28
- immediateChange: true
28
+ immediateChange: true,
29
+ zIndex: 10076,
29
30
  }
30
31
  }
@@ -99,5 +99,10 @@ export const props = defineMixin({
99
99
  type: Boolean,
100
100
  default: false
101
101
  },
102
+ // 层级
103
+ zIndex: {
104
+ type: [String, Number],
105
+ default: () => defProps.picker.zIndex
106
+ },
102
107
  }
103
108
  })
@@ -10,6 +10,7 @@
10
10
  <u-popup
11
11
  :show="show || (hasInput && showByClickInput)"
12
12
  :mode="popupMode"
13
+ :zIndex="zIndex"
13
14
  @close="closeHandler"
14
15
  >
15
16
  <view class="u-picker">
@@ -20,7 +20,7 @@
20
20
  <view
21
21
  class="u-popup__content"
22
22
  :style="[contentStyle]"
23
- @tap.stop="noop"
23
+ @touchmove.stop.prevent="noop"
24
24
  >
25
25
  <u-status-bar v-if="safeAreaInsetTop"></u-status-bar>
26
26
  <slot></slot>
@@ -166,6 +166,10 @@
166
166
  // #ifndef APP-NVUE
167
167
  this.$uGetRect('.u-slider__base').then(rect => {
168
168
  this.sliderRect = rect;
169
+ // console.log('sliderRect', this.sliderRect)
170
+ if (this.sliderRect.width == 0) {
171
+ console.info('如在弹窗等元素中使用,请使用v-if来显示滑块,否则无法计算长度。')
172
+ }
169
173
  this.init()
170
174
  });
171
175
  // #endif
@@ -107,6 +107,11 @@ export const props = defineMixin({
107
107
  wordWrap: {
108
108
  type: String,
109
109
  default: () => defProps.text.wordWrap
110
- }
110
+ },
111
+ // 占满剩余空间
112
+ flex1: {
113
+ type: Boolean,
114
+ default: () => defProps.text.flex1
115
+ }
111
116
  }
112
117
  })
@@ -32,7 +32,8 @@ export default {
32
32
  margin: 0,
33
33
  lineHeight: '',
34
34
  align: 'left',
35
- wordWrap: 'normal'
35
+ wordWrap: 'normal',
36
+ flex1: true
36
37
  }
37
38
 
38
39
  }
@@ -3,10 +3,7 @@
3
3
  class="u-text"
4
4
  :class="[customClass]"
5
5
  v-if="show"
6
- :style="{
7
- margin: margin,
8
- justifyContent: align === 'left' ? 'flex-start' : align === 'center' ? 'center' : 'flex-end'
9
- }"
6
+ :style="wrapStyle"
10
7
  @tap="clickHandler"
11
8
  >
12
9
  <text
@@ -116,6 +113,20 @@ export default {
116
113
  // #endif
117
114
  emits: ['click'],
118
115
  computed: {
116
+ wrapStyle() {
117
+ let style = {
118
+ margin: this.margin,
119
+ justifyContent: this.align === 'left' ? 'flex-start' : this.align === 'center' ? 'center' : 'flex-end'
120
+ }
121
+ // 占满剩余空间
122
+ if (this.flex1) {
123
+ style.flex = 1;
124
+ // #ifndef APP-NVUE
125
+ style.width = '100%';
126
+ // #endif
127
+ }
128
+ return style;
129
+ },
119
130
  valueStyle() {
120
131
  const style = {
121
132
  textDecoration: this.decoration,
@@ -170,10 +181,6 @@ export default {
170
181
  @include flex(row);
171
182
  align-items: center;
172
183
  flex-wrap: nowrap;
173
- flex: 1;
174
- /* #ifndef APP-NVUE */
175
- width: 100%;
176
- /* #endif */
177
184
 
178
185
  &__price {
179
186
  font-size: 14px;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-plus",
3
3
  "name": "uview-plus",
4
4
  "displayName": "uview-plus3.0重磅发布,全面的Vue3鸿蒙移动组件库。",
5
- "version": "3.3.48",
5
+ "version": "3.3.50",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",
@@ -11,7 +11,8 @@
11
11
  "ui",
12
12
  "uni-app",
13
13
  "uni-app",
14
- "ui"
14
+ "ui",
15
+ "可视化设计"
15
16
  ],
16
17
  "main": "index.js",
17
18
  "repository": "https://github.com/ijry/uview-plus",
@@ -53,9 +54,11 @@
53
54
  "vue3": "y"
54
55
  },
55
56
  "App": {
56
- "app-vue": "y",
57
- "app-nvue": "y"
58
- },
57
+ "app-vue": "y",
58
+ "app-nvue": "y",
59
+ "app-harmony": "u",
60
+ "app-uvue": "u"
61
+ },
59
62
  "H5-mobile": {
60
63
  "Safari": "y",
61
64
  "Android Browser": "y",