uview-pro 0.3.5 → 0.3.6

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.
Files changed (40) hide show
  1. package/changelog.md +22 -0
  2. package/components/u-calendar/types.ts +3 -2
  3. package/components/u-calendar/u-calendar.vue +2 -2
  4. package/components/u-checkbox-group/types.ts +2 -1
  5. package/components/u-checkbox-group/u-checkbox-group.vue +1 -1
  6. package/components/u-city-select/u-city-select.vue +2 -2
  7. package/components/u-dropdown/types.ts +3 -2
  8. package/components/u-dropdown/u-dropdown.vue +1 -1
  9. package/components/u-index-anchor/u-index-anchor.vue +1 -1
  10. package/components/u-index-list/types.ts +2 -1
  11. package/components/u-index-list/u-index-list.vue +1 -1
  12. package/components/u-link/types.ts +2 -1
  13. package/components/u-message-input/types.ts +3 -2
  14. package/components/u-message-input/u-message-input.vue +1 -1
  15. package/components/u-modal/types.ts +3 -2
  16. package/components/u-modal/u-modal.vue +1 -1
  17. package/components/u-picker/types.ts +8 -2
  18. package/components/u-picker/u-picker.vue +276 -126
  19. package/components/u-radio/u-radio.vue +2 -2
  20. package/components/u-radio-group/types.ts +2 -1
  21. package/components/u-radio-group/u-radio-group.vue +1 -1
  22. package/components/u-read-more/types.ts +2 -1
  23. package/components/u-read-more/u-read-more.vue +1 -1
  24. package/components/u-select/types.ts +5 -2
  25. package/components/u-select/u-select.vue +56 -18
  26. package/components/u-slider/types.ts +3 -2
  27. package/components/u-slider/u-slider.vue +2 -2
  28. package/components/u-step/types.ts +29 -0
  29. package/components/u-step/u-step.vue +264 -0
  30. package/components/u-steps/types.ts +3 -2
  31. package/components/u-steps/u-steps.vue +17 -106
  32. package/components/u-switch/types.ts +2 -1
  33. package/components/u-switch/u-switch.vue +2 -2
  34. package/components/u-tabs/types.ts +3 -2
  35. package/components/u-tabs/u-tabs.vue +1 -1
  36. package/components/u-tabs-swiper/types.ts +3 -2
  37. package/components/u-tabs-swiper/u-tabs-swiper.vue +1 -1
  38. package/package.json +1 -1
  39. package/types/components.d.ts +1 -0
  40. package/types/global.d.ts +2 -0
@@ -42,7 +42,7 @@ import { SwitchProps } from './types';
42
42
  * @property {Boolean} loading 是否处于加载中(默认false)
43
43
  * @property {Boolean} disabled 是否禁用(默认false)
44
44
  * @property {String|Number} size 开关尺寸,单位rpx(默认50)
45
- * @property {String} active-color 打开时的背景色(默认#2979ff
45
+ * @property {String} active-color 打开时的背景色(默认主题色primary
46
46
  * @property {String} inactive-color 关闭时的背景色(默认#ffffff)
47
47
  * @property {Boolean|Number|String} active-value 打开选择器时通过change事件发出的值(默认true)
48
48
  * @property {Boolean|Number|String} inactive-value 关闭选择器时通过change事件发出的值(默认false)
@@ -137,7 +137,7 @@ function onClick() {
137
137
  }
138
138
 
139
139
  .u-switch--on {
140
- background-color: #1989fa;
140
+ background-color: $u-type-primary;
141
141
  }
142
142
 
143
143
  .u-switch--on .u-switch__node {
@@ -1,6 +1,7 @@
1
1
  import type { ExtractPropTypes, PropType } from 'vue';
2
2
  import type { TabsItem } from '../../types/global';
3
3
  import { baseProps } from '../common/props';
4
+ import { $u } from '../../';
4
5
 
5
6
  /**
6
7
  * TabsProps tabs标签 props 类型定义
@@ -21,9 +22,9 @@ export const TabsProps = {
21
22
  /** 过渡动画时长, 单位s */
22
23
  duration: { type: [String, Number] as PropType<number | string>, default: 0.5 },
23
24
  /** 选中项的主题颜色 */
24
- activeColor: { type: String, default: '#2979ff' },
25
+ activeColor: { type: String, default: $u.color.primary },
25
26
  /** 未选中项的颜色 */
26
- inactiveColor: { type: String, default: '#303133' },
27
+ inactiveColor: { type: String, default: $u.color.mainColor },
27
28
  /** 菜单底部移动的bar的宽度,单位rpx */
28
29
  barWidth: { type: [String, Number] as PropType<number | string>, default: 40 },
29
30
  /** 移动bar的高度 */
@@ -50,7 +50,7 @@ import { TabsProps } from './types';
50
50
  * @property {String|Number} height 导航栏的高度,单位rpx(默认80)
51
51
  * @property {String|Number} font-size tab文字大小,单位rpx(默认30)
52
52
  * @property {String|Number} duration 滑块移动一次所需的时间,单位秒(默认0.5)
53
- * @property {String} active-color 滑块和激活tab文字的颜色(默认#2979ff
53
+ * @property {String} active-color 滑块和激活tab文字的颜色(默认主题色primary
54
54
  * @property {String} inactive-color tabs文字颜色(默认#303133)
55
55
  * @property {String|Number} bar-width 滑块宽度,单位rpx(默认40)
56
56
  * @property {Object} active-item-style 活动tabs item的样式,对象形式
@@ -1,6 +1,7 @@
1
1
  import type { ExtractPropTypes, PropType } from 'vue';
2
2
  import type { TabsSwiperAutoCenterMode, TabsSwiperListItem } from '../../types/global';
3
3
  import { baseProps } from '../common/props';
4
+ import { $u } from '../../';
4
5
 
5
6
  /**
6
7
  * TabsSwiperProps 全屏选项卡 props 类型定义
@@ -21,9 +22,9 @@ export const TabsSwiperProps = {
21
22
  /** tabs组件外部swiper的宽度,单位rpx */
22
23
  swiperWidth: { type: [String, Number] as PropType<number | string>, default: 750 },
23
24
  /** 滑块和激活tab文字的颜色 */
24
- activeColor: { type: String, default: '#2979ff' },
25
+ activeColor: { type: String, default: $u.color.primary },
25
26
  /** tabs文字颜色 */
26
- inactiveColor: { type: String, default: '#303133' },
27
+ inactiveColor: { type: String, default: $u.color.mainColor },
27
28
  /** 滑块宽度,单位rpx */
28
29
  barWidth: { type: [Number, String] as PropType<number | string>, default: 40 },
29
30
  /** 滑块高度,单位rpx */
@@ -54,7 +54,7 @@ import { $u } from '../..';
54
54
  * @property {String|Number} height 导航栏的高度,单位rpx(默认80)
55
55
  * @property {String|Number} font-size tab文字大小,单位rpx(默认30)
56
56
  * @property {String|Number} swiper-width tabs组件外部swiper的宽度,默认为屏幕宽度,单位rpx(默认750)
57
- * @property {String} active-color 滑块和激活tab文字的颜色(默认#2979ff
57
+ * @property {String} active-color 滑块和激活tab文字的颜色(默认主题色primary
58
58
  * @property {String} inactive-color tabs文字颜色(默认#303133)
59
59
  * @property {String|Number} bar-width 滑块宽度,单位rpx(默认40)
60
60
  * @property {String|Number} bar-height 滑块高度,单位rpx(默认6)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-pro",
3
3
  "name": "uview-pro",
4
4
  "displayName": "【Vue3重构版】uView Pro|基于Vue3+TS全面重构的70+精选UI组件库",
5
- "version": "0.3.5",
5
+ "version": "0.3.6",
6
6
  "description": "uView Pro,是全面支持Vue3的uni-app生态框架,70+精选组件已使用TypeScript重构,已全面支持uni-app Vue3.0",
7
7
  "main": "index.ts",
8
8
  "module": "index.ts",
@@ -68,6 +68,7 @@ declare module 'vue' {
68
68
  uSelect: (typeof import('../components/u-select/u-select.vue'))['default'];
69
69
  uSkeleton: (typeof import('../components/u-skeleton/u-skeleton.vue'))['default'];
70
70
  uSlider: (typeof import('../components/u-slider/u-slider.vue'))['default'];
71
+ uStep: (typeof import('../components/u-steps/u-step.vue'))['default'];
71
72
  uSteps: (typeof import('../components/u-steps/u-steps.vue'))['default'];
72
73
  uSticky: (typeof import('../components/u-sticky/u-sticky.vue'))['default'];
73
74
  uSubsection: (typeof import('../components/u-subsection/u-subsection.vue'))['default'];
package/types/global.d.ts CHANGED
@@ -233,6 +233,8 @@ export type SelectListItem = {
233
233
  // Step 组件 mode
234
234
  export type StepsListItem = {
235
235
  name: string;
236
+ icon?: string;
237
+ desc?: string;
236
238
  [key: string]: any;
237
239
  };
238
240
  // Step 组件 mode