uview-pro 0.3.12 → 0.3.14

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,28 @@
1
+ ## 0.3.14(2025-11-14)
2
+
3
+ ### ✨ Features | 新功能
4
+
5
+ - **app-harmony:** 更新应用信息并添加鸿蒙签名配置,鸿蒙应用打包差异性编译 ([81a33c1](https://github.com/anyup/uView-Pro/commit/81a33c13a471721848033cc5f7ac1e3b3b30abc6))
6
+ - **u-message-input:** 新增输入框类型prop,支持number,text等模式 ([68a865a](https://github.com/anyup/uView-Pro/commit/68a865a12b7e0b20db458ea403579d28a227aaeb))
7
+
8
+ ### ♻️ Code Refactoring | 代码重构
9
+
10
+ - **components:** 优化 u-icon 和 u-toast 组件样式和结构 ([3cfb01d](https://github.com/anyup/uView-Pro/commit/3cfb01ddb8612e274e1bccd43fca0b5bb4e0a405))
11
+
12
+ ### 👥 Contributors
13
+
14
+ <a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a>
15
+
16
+ ## 0.3.13(2025-11-11)
17
+
18
+ ### 🐛 Bug Fixes | Bug 修复
19
+
20
+ - **u-root-portal:** 修复根节点传送组件运行时报错问题 ([3c24a75](https://github.com/anyup/uView-Pro/commit/3c24a75de00982bbdc1388a413721377de4f1e3d))
21
+
22
+ ### 👥 Contributors
23
+
24
+ <a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a>
25
+
1
26
  ## 0.3.12(2025-11-10)
2
27
 
3
28
  ### 🐛 Bug Fixes | Bug 修复
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <view :style="[customStyle]" class="u-icon" @click="onClick" :class="['u-icon--' + labelPos]">
2
+ <view :style="[customStyle]" class="u-icon" @click="onClick" :class="['u-icon--' + labelPos, customClass]">
3
3
  <image class="u-icon__img" v-if="isImg" :src="name" :mode="imgMode" :style="[imgStyle]" />
4
4
  <text
5
5
  v-else
6
6
  class="u-icon__icon"
7
- :class="customClass"
7
+ :class="iconClass"
8
8
  :style="[iconStyle]"
9
9
  :hover-class="hoverClass"
10
10
  @touchstart="onTouchstart"
@@ -83,7 +83,7 @@ const props = defineProps(IconProps);
83
83
  * 计算图标的类名集合
84
84
  * @returns {string[]}
85
85
  */
86
- const customClass = computed(() => {
86
+ const iconClass = computed(() => {
87
87
  let classes: string[] | string = [];
88
88
  classes.push(props.customPrefix + '-' + props.name);
89
89
  // uView的自定义图标类名为u-iconfont
@@ -1,12 +1,19 @@
1
1
  import type { ExtractPropTypes, PropType } from 'vue';
2
- import type { MessageInputMode } from '../../types/global';
2
+ import type { InputType, MessageInputMode } from '../../types/global';
3
3
  import { getColor } from '../../';
4
+ import { baseProps } from '../common/props';
4
5
 
5
6
  /**
6
7
  * u-message-input 组件 props 类型定义
7
8
  * @description 验证码/短信输入框,支持多种样式
8
9
  */
9
10
  export const MessageInputProps = {
11
+ ...baseProps,
12
+ /** 输入框的类型,textarea,text,number */
13
+ type: {
14
+ type: String as PropType<InputType>,
15
+ default: 'number'
16
+ },
10
17
  /** 最大输入长度 */
11
18
  maxlength: {
12
19
  type: [Number, String] as PropType<number | string>,
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <view class="u-char-box">
2
+ <view class="u-char-box" :class="customClass" :style="$u.toStyle(customStyle)">
3
3
  <view class="u-char-flex">
4
4
  <input
5
5
  :disabled="props.disabledKeyboard"
6
6
  :value="valueModel"
7
- type="number"
7
+ :type="type"
8
8
  :focus="props.focus"
9
9
  :maxlength="props.maxlength"
10
10
  class="u-input"
@@ -86,6 +86,7 @@ export default {
86
86
  <script setup lang="ts">
87
87
  import { ref, computed, watch } from 'vue';
88
88
  import { MessageInputProps } from './types';
89
+ import { $u } from '../../';
89
90
 
90
91
  /**
91
92
  * messageInput 验证码输入框
@@ -18,6 +18,12 @@
18
18
  <!-- #endif -->
19
19
  </template>
20
20
  <script>
21
+ /**
22
+ * rootPortal 根节点传送
23
+ * @description 该组件一般用于使整个子树从页面中脱离出来,类似于在 CSS 中使用 fixed position 的效果。主要用于制作弹窗、弹出层等。
24
+ * @tutorial https://uviewpro.cn/zh/components/rootPortal.html
25
+ * @example <u-root-portal><view class="modal">这是一个全局弹窗</view></u-root-portal>
26
+ */
21
27
  export default {
22
28
  name: 'u-root-portal',
23
29
  options: {
@@ -29,14 +35,7 @@ export default {
29
35
  }
30
36
  };
31
37
  </script>
32
- <script lang="ts" setup>
33
- /**
34
- * rootPortal 根节点传送
35
- * @description 该组件一般用于使整个子树从页面中脱离出来,类似于在 CSS 中使用 fixed position 的效果。主要用于制作弹窗、弹出层等。
36
- * @tutorial https://uviewpro.cn/zh/components/rootPortal.html
37
- * @example <u-root-portal><view class="modal">这是一个全局弹窗</view></u-root-portal>
38
- */
39
- </script>
38
+ <script lang="ts" setup></script>
40
39
 
41
40
  <!-- #ifdef APP-PLUS -->
42
41
  <script module="render" lang="renderjs">
@@ -5,7 +5,13 @@
5
5
  :style="$u.toStyle({ zIndex: uZIndex }, customStyle)"
6
6
  >
7
7
  <view class="u-icon-wrap">
8
- <u-icon v-if="tmpConfig.icon" class="u-icon" :name="iconName" :size="30" :color="tmpConfig.type"></u-icon>
8
+ <u-icon
9
+ v-if="tmpConfig.icon"
10
+ custom-class="u-toast_icon"
11
+ :name="iconName"
12
+ :size="30"
13
+ :color="tmpConfig.type"
14
+ ></u-icon>
9
15
  </view>
10
16
  <text class="u-text">{{ tmpConfig.title }}</text>
11
17
  </view>
@@ -175,8 +181,14 @@ defineExpose<ToastExpose>({
175
181
  opacity: 1;
176
182
  }
177
183
 
178
- .u-icon {
179
- margin-right: 10rpx;
184
+ .u-icon-wrap {
185
+ /* #ifdef H5 */
186
+ padding-top: 6rpx;
187
+ /* #endif */
188
+ }
189
+
190
+ :deep(.u-toast_icon) {
191
+ margin-right: 8rpx;
180
192
  @include vue-flex;
181
193
  align-items: center;
182
194
  line-height: normal;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-pro",
3
3
  "name": "uview-pro",
4
4
  "displayName": "【支持鸿蒙】uView Pro|基于Vue3+TS全面重构的80+精选UI组件库",
5
- "version": "0.3.12",
5
+ "version": "0.3.14",
6
6
  "description": "uView Pro,是全面支持Vue3的uni-app生态框架,80+精选组件已使用TypeScript重构,已全面支持uni-app Vue3.0",
7
7
  "main": "index.ts",
8
8
  "module": "index.ts",