papayaui 0.3.2 → 0.3.4

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 (110) hide show
  1. package/components/badge/props.ts +2 -1
  2. package/components/bottom-popup/props.ts +3 -1
  3. package/components/button/props.ts +3 -1
  4. package/components/calendar/props.ts +5 -1
  5. package/components/cascader/props.ts +5 -1
  6. package/components/cell/cell.scss +6 -6
  7. package/components/cell/props.ts +3 -1
  8. package/components/cell-group/props.ts +2 -1
  9. package/components/checkbox/props.ts +3 -1
  10. package/components/checkbox-btns/checkbox-btns.scss +4 -0
  11. package/components/checkbox-btns/checkbox-btns.vue +2 -0
  12. package/components/checkbox-btns/props.ts +10 -1
  13. package/components/checkbox-group/props.ts +3 -1
  14. package/components/circle/circle.vue +1 -1
  15. package/components/circle/props.ts +2 -1
  16. package/components/collapse/props.ts +3 -1
  17. package/components/collapse-item/props.ts +2 -1
  18. package/components/container/props.ts +2 -1
  19. package/components/count-down/props.ts +3 -1
  20. package/components/count-to/props.ts +3 -1
  21. package/components/date-picker/props.ts +3 -1
  22. package/components/dialog/props.ts +3 -1
  23. package/components/empty/props.ts +2 -1
  24. package/components/env-view/props.ts +3 -1
  25. package/components/field/props.ts +3 -1
  26. package/components/form/props.ts +3 -1
  27. package/components/form-item/form-item.vue +2 -2
  28. package/components/form-item/props.ts +4 -2
  29. package/components/icon/props.ts +3 -1
  30. package/components/image/props.ts +3 -1
  31. package/components/index-anchor/props.ts +2 -1
  32. package/components/index-bar/props.ts +2 -1
  33. package/components/input/props.ts +3 -1
  34. package/components/input-number/props.ts +3 -1
  35. package/components/list/props.ts +2 -1
  36. package/components/list-item/props.ts +3 -1
  37. package/components/loading-icon/props.ts +2 -1
  38. package/components/loadmore/props.ts +3 -1
  39. package/components/menu/menu.vue +1 -1
  40. package/components/menu/props.ts +2 -1
  41. package/components/menu-item/props.ts +3 -1
  42. package/components/nav-bar/nav-bar.vue +6 -5
  43. package/components/nav-bar/props.ts +3 -1
  44. package/components/notice-bar/props.ts +3 -1
  45. package/components/overlay/props.ts +3 -1
  46. package/components/picker-popup/picker-popup.vue +3 -2
  47. package/components/picker-popup/props.ts +8 -1
  48. package/components/picker-view/props.ts +3 -1
  49. package/components/popover/props.ts +3 -1
  50. package/components/popup/popup.vue +1 -1
  51. package/components/popup/props.ts +3 -1
  52. package/components/radio/props.ts +3 -1
  53. package/components/radio-group/props.ts +3 -1
  54. package/components/search/props.ts +3 -1
  55. package/components/section/props.ts +3 -1
  56. package/components/segmented/props.ts +3 -1
  57. package/components/segmented/segmented.vue +1 -1
  58. package/components/sidebar/props.ts +3 -1
  59. package/components/sidebar-item/props.ts +3 -1
  60. package/components/sidebar-item/sidebar-item.scss +3 -2
  61. package/components/skeleton/props.ts +2 -1
  62. package/components/slider/props.ts +3 -1
  63. package/components/sort-label/props.ts +3 -1
  64. package/components/steps/props.ts +3 -1
  65. package/components/sticky/props.ts +2 -1
  66. package/components/swipe-cell/props.ts +3 -1
  67. package/components/switch/props.ts +3 -1
  68. package/components/switch/switch.vue +1 -1
  69. package/components/tab-pane/props.ts +2 -1
  70. package/components/tabbar/props.ts +3 -1
  71. package/components/tabbar-item/props.ts +2 -1
  72. package/components/tabs/props.ts +3 -1
  73. package/components/tag/props.ts +3 -1
  74. package/components/textarea/props.ts +8 -1
  75. package/components/textarea/textarea.scss +21 -7
  76. package/components/textarea/textarea.vue +43 -27
  77. package/components/tooltip/props.ts +2 -1
  78. package/components/transition/props.ts +3 -1
  79. package/components/uploader/props.ts +3 -1
  80. package/components/watermark/props.ts +2 -1
  81. package/components/watermark/watermark.vue +1 -1
  82. package/core/index.ts +1 -0
  83. package/core/useModel/index.test.ts +130 -0
  84. package/core/useModel/index.ts +40 -0
  85. package/core/useSelect/index.test.ts +280 -0
  86. package/core/useSelect/index.ts +123 -31
  87. package/coverage/base.css +224 -0
  88. package/coverage/block-navigation.js +87 -0
  89. package/coverage/clover.xml +859 -0
  90. package/coverage/core/useSelect/index.html +116 -0
  91. package/coverage/core/useSelect/index.ts.html +649 -0
  92. package/coverage/coverage-final.json +9 -0
  93. package/coverage/favicon.png +0 -0
  94. package/coverage/index.html +131 -0
  95. package/coverage/prettify.css +1 -0
  96. package/coverage/prettify.js +2 -0
  97. package/coverage/sort-arrow-sprite.png +0 -0
  98. package/coverage/sorter.js +210 -0
  99. package/coverage/utils/common.ts.html +382 -0
  100. package/coverage/utils/cos.ts.html +1030 -0
  101. package/coverage/utils/format.ts.html +121 -0
  102. package/coverage/utils/function.ts.html +307 -0
  103. package/coverage/utils/index.html +206 -0
  104. package/coverage/utils/index.ts.html +103 -0
  105. package/coverage/utils/lang.ts.html +328 -0
  106. package/coverage/utils/object.ts.html +229 -0
  107. package/package.json +3 -3
  108. package/utils/common.ts +15 -1
  109. package/vitest.config.ts +14 -0
  110. package/vitest.setup.ts +8 -0
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ExtractPropTypes, PropType } from 'vue'
1
+ import type { CSSProperties, ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
 
3
3
  export const badgeProps = {
4
4
  /**
@@ -46,3 +46,4 @@ export const badgeProps = {
46
46
  }
47
47
 
48
48
  export type BadgeProps = ExtractPropTypes<typeof badgeProps>
49
+ export type BadgePropsPublic = ExtractPublicPropTypes<typeof badgeProps>
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'
2
2
  import { pick } from '../../utils'
3
3
  import { popupEmits, popupProps } from '../popup/props'
4
4
 
@@ -49,4 +49,6 @@ export const bottomPopupEmits = {
49
49
  }
50
50
 
51
51
  export type BottomPopupProps = ExtractPropTypes<typeof bottomPopupProps>
52
+ export type BottomPopupPropsPublic = ExtractPublicPropTypes<typeof bottomPopupProps>
53
+
52
54
  export type BottomPopupEmits = typeof bottomPopupEmits
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ExtractPropTypes, PropType } from 'vue'
1
+ import type { CSSProperties, ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
 
3
3
  export const buttonProps = {
4
4
  /**
@@ -142,4 +142,6 @@ export const buttonEmits = {
142
142
  }
143
143
 
144
144
  export type ButtonProps = ExtractPropTypes<typeof buttonProps>
145
+ export type ButtonPropsPublic = ExtractPublicPropTypes<typeof buttonProps>
146
+
145
147
  export type ButtonEmits = typeof buttonEmits
@@ -1,5 +1,5 @@
1
1
  import type { Dayjs } from 'dayjs'
2
- import type { ExtractPropTypes, PropType } from 'vue'
2
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
3
3
  import type { DayItem, FirstDayOfWeekType } from '../../core/useCalendar'
4
4
  import { isArray, isDate, isObject, pick } from '../../utils'
5
5
  import { popupEmits, popupProps } from '../popup/props'
@@ -169,6 +169,10 @@ export const calendarEmits = {
169
169
  }
170
170
 
171
171
  export type CalendarProps = ExtractPropTypes<typeof calendarProps>
172
+ export type CalendarPropsPublic = ExtractPublicPropTypes<typeof calendarProps>
173
+
172
174
  export type CalendarWrapperProps = ExtractPropTypes<typeof calendarWrapperProps>
175
+ export type CalendarWrapperPropsPublic = ExtractPublicPropTypes<typeof calendarWrapperProps>
176
+
173
177
  export type CalendarEmits = typeof calendarEmits
174
178
  export type CalendarWrapperEmits = typeof calendarWrapperEmits
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ExtractPropTypes, PropType } from 'vue'
1
+ import type { CSSProperties, ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import type { TreeNode, UseTreeFieldNames } from '../../core/useTree'
3
3
  import { defaultFieldNames } from '../../core/useTree'
4
4
  import { isArray, isObject } from '../../utils'
@@ -162,7 +162,11 @@ export const cascaderSearchViewEmits = {
162
162
  }
163
163
 
164
164
  export type CascaderProps = ExtractPropTypes<typeof cascaderProps>
165
+ export type CascaderPropsPublic = ExtractPublicPropTypes<typeof cascaderProps>
166
+
165
167
  export type CascaderEmits = typeof cascaderEmits
166
168
 
167
169
  export type CascaderSearchViewProps = ExtractPropTypes<typeof cascaderSearchViewProps>
170
+ export type CascaderSearchViewPropsPublic = ExtractPublicPropTypes<typeof cascaderSearchViewProps>
171
+
168
172
  export type CascaderSearchViewEmits = typeof cascaderSearchViewEmits
@@ -60,8 +60,8 @@
60
60
 
61
61
  &__error-message {
62
62
  color: _var(color-error);
63
- font-size: 12px;
64
- text-align: left;
63
+ font-size: _var(cell-error-message-font-size, 12px);
64
+ text-align: _var(cell-error-message-text-align, left);
65
65
  }
66
66
 
67
67
  &--hover {
@@ -74,9 +74,9 @@
74
74
 
75
75
  &--required::before {
76
76
  position: absolute;
77
- left: 8px;
78
- color: #ee0a24;
79
- font-size: 14px;
77
+ left: _var(cell-required-left, 8px);
78
+ color: _var(cell-required-color, #ee0a24);
79
+ font-size: _var(cell-required-font-size, 14px);
80
80
  content: '*';
81
81
  }
82
82
 
@@ -88,7 +88,7 @@
88
88
  right: _var(cell-padding-x, $padding-x);
89
89
  bottom: 0;
90
90
  left: _var(cell-padding-x, $padding-x);
91
- border-bottom: 1px solid #ebedf0;
91
+ border-bottom: 1px solid _var(cell-border-bottom-color, #ebedf0);
92
92
  -webkit-transform: scaleY(0.5);
93
93
  transform: scaleY(0.5);
94
94
  }
@@ -1,5 +1,5 @@
1
1
  import { getGlobalOptions } from '../../utils/config'
2
- import type { ExtractPropTypes, PropType } from 'vue'
2
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
3
3
  import { getCurrentInstance } from 'vue'
4
4
 
5
5
  export const cellProps = {
@@ -93,4 +93,6 @@ export const cellEmits = {
93
93
  }
94
94
 
95
95
  export type CellProps = ExtractPropTypes<typeof cellProps>
96
+ export type CellPropsPublic = ExtractPublicPropTypes<typeof cellProps>
97
+
96
98
  export type CellEmits = typeof cellEmits
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'
2
2
 
3
3
  export const cellGroupProps = {
4
4
  /**
@@ -8,3 +8,4 @@ export const cellGroupProps = {
8
8
  }
9
9
 
10
10
  export type CellGroupProps = ExtractPropTypes<typeof cellGroupProps>
11
+ export type CellGroupPropsPublic = ExtractPublicPropTypes<typeof cellGroupProps>
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ExtractPropTypes, PropType } from 'vue'
1
+ import type { CSSProperties, ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import { isBoolean, isUndefined } from '../../utils'
3
3
 
4
4
  export const checkboxProps = {
@@ -60,4 +60,6 @@ export const checkboxEmits = {
60
60
  export type CheckboxValue = string | number | boolean
61
61
 
62
62
  export type CheckboxProps = ExtractPropTypes<typeof checkboxProps>
63
+ export type CheckboxPropsPublic = ExtractPublicPropTypes<typeof checkboxProps>
64
+
63
65
  export type CheckboxEmits = typeof checkboxEmits
@@ -14,5 +14,9 @@
14
14
  background-color: _var(checkbox-btns-active-background, rgba(0, 156, 93, 0.1)) !important;
15
15
  border-color: _var(checkbox-btns-active-border-color, _var(color-primary)) !important;
16
16
  }
17
+ &.disabled {
18
+ opacity: _var(checkbox-btns-disabled-opacity, 0.8);
19
+ cursor: not-allowed;
20
+ }
17
21
  }
18
22
  }
@@ -11,6 +11,7 @@
11
11
  ns.b('button'),
12
12
  {
13
13
  active: typeof modelValue !== 'undefined' ? isSelected(item[valueKey]) : false,
14
+ disabled: disabled,
14
15
  },
15
16
  ]"
16
17
  :style="
@@ -57,6 +58,7 @@ const {
57
58
  })
58
59
 
59
60
  const onSelect = (item: CheckboxItem, index: number) => {
61
+ if (props.disabled) return
60
62
  _onSelect(item[valueKey.value])
61
63
  emit('update:modelValue', selectedValues.value)
62
64
  emit('change', selectedItems.value, index)
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import { isNumber } from '../../utils'
3
3
 
4
4
  export type CheckboxItem = any
@@ -72,6 +72,13 @@ export const checkboxButtonsProps = {
72
72
  type: Boolean,
73
73
  default: true,
74
74
  },
75
+ /**
76
+ * 是否禁用
77
+ */
78
+ disabled: {
79
+ type: Boolean,
80
+ default: false,
81
+ },
75
82
  }
76
83
 
77
84
  export const checkboxButtonsEmits = {
@@ -80,4 +87,6 @@ export const checkboxButtonsEmits = {
80
87
  }
81
88
 
82
89
  export type CheckboxButtonsProps = ExtractPropTypes<typeof checkboxButtonsProps>
90
+ export type CheckboxButtonsPropsPublic = ExtractPublicPropTypes<typeof checkboxButtonsProps>
91
+
83
92
  export type CheckboxButtonsEmits = typeof checkboxButtonsEmits
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import type { CheckboxValue } from '../checkbox/props'
3
3
  import { isArray, isString } from '../../utils'
4
4
 
@@ -37,4 +37,6 @@ export const checkboxGroupEmits = {
37
37
  }
38
38
 
39
39
  export type CheckboxGroupProps = ExtractPropTypes<typeof checkboxGroupProps>
40
+ export type CheckboxGroupPropsPublic = ExtractPublicPropTypes<typeof checkboxGroupProps>
41
+
40
42
  export type CheckboxGroupEmits = typeof checkboxGroupEmits
@@ -55,7 +55,7 @@ watch(
55
55
  )
56
56
 
57
57
  const initMP = () => {
58
- const ratio = uni.getSystemInfoSync().pixelRatio
58
+ const ratio = uni.getWindowInfo().pixelRatio
59
59
  const query = uni.createSelectorQuery()
60
60
  query
61
61
  .in(instance)
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'
2
2
 
3
3
  export const circleProps = {
4
4
  /**
@@ -57,3 +57,4 @@ export const circleProps = {
57
57
  }
58
58
 
59
59
  export type CircleProps = ExtractPropTypes<typeof circleProps>
60
+ export type CirclePropsPublic = ExtractPublicPropTypes<typeof circleProps>
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType, Ref } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType, Ref } from 'vue'
2
2
  import { isUndefined } from '../../utils'
3
3
  import type { CollapseItemInstance, CollapseItemValue } from '../collapse-item/props'
4
4
 
@@ -28,6 +28,8 @@ export const collapseEmits = {
28
28
  }
29
29
 
30
30
  export type CollapseProps = ExtractPropTypes<typeof collapseProps>
31
+ export type CollapsePropsPublic = ExtractPublicPropTypes<typeof collapseProps>
32
+
31
33
  export type CollapseEmits = typeof collapseEmits
32
34
 
33
35
  export type CollapseExpose = {
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType, Ref } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType, Ref } from 'vue'
2
2
 
3
3
  export const collapseItemProps = {
4
4
  /**
@@ -50,6 +50,7 @@ export const collapseItemProps = {
50
50
  export type CollapseItemValue = string | number
51
51
 
52
52
  export type CollapseItemProps = ExtractPropTypes<typeof collapseItemProps>
53
+ export type CollapseItemPropsPublic = ExtractPublicPropTypes<typeof collapseItemProps>
53
54
 
54
55
  export interface CollapseItemInstance {
55
56
  /** 唯一标识符 */
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'
2
2
  import { watermarkProps } from '../watermark/props'
3
3
 
4
4
  export const containerProps = {
@@ -56,3 +56,4 @@ export const containerProps = {
56
56
  }
57
57
 
58
58
  export type ContainerProps = ExtractPropTypes<typeof containerProps>
59
+ export type ContainerPropsPublic = ExtractPublicPropTypes<typeof containerProps>
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'
2
2
  import { isObject } from '../../utils'
3
3
 
4
4
  export type CountDownDuration = {
@@ -50,4 +50,6 @@ export const countDownEmits = {
50
50
  }
51
51
 
52
52
  export type CountDownProps = ExtractPropTypes<typeof countDownProps>
53
+ export type CountDownPropsPublic = ExtractPublicPropTypes<typeof countDownProps>
54
+
53
55
  export type CountDownEmits = typeof countDownEmits
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType, CSSProperties } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType, CSSProperties } from 'vue'
2
2
  import { isNumber, isObject } from '../../utils'
3
3
 
4
4
  export const countToProps = {
@@ -62,4 +62,6 @@ export const countToEmits = {
62
62
  }
63
63
 
64
64
  export type CountToProps = ExtractPropTypes<typeof countToProps>
65
+ export type CountToPropsPublic = ExtractPublicPropTypes<typeof countToProps>
66
+
65
67
  export type CountToEmits = typeof countToEmits
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import type {
3
3
  DatePickerColumnType,
4
4
  DatePickerFilter,
@@ -101,4 +101,6 @@ export const datePickerEmits = {
101
101
  export type ColumnItem = string | Record<string, any>
102
102
 
103
103
  export type DatePickerProps = ExtractPropTypes<typeof datePickerProps>
104
+ export type DatePickerPropsPublic = ExtractPublicPropTypes<typeof datePickerProps>
105
+
104
106
  export type DatePickerEmits = typeof datePickerEmits
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import { pick } from '../../utils'
3
3
  import { popupEmits, popupProps } from '../popup'
4
4
 
@@ -74,4 +74,6 @@ export const dialogEmits = {
74
74
  }
75
75
 
76
76
  export type DialogProps = ExtractPropTypes<typeof dialogProps>
77
+ export type DialogPropsPublic = ExtractPublicPropTypes<typeof dialogProps>
78
+
77
79
  export type DialogEmits = typeof dialogEmits
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
 
3
3
  export const emptyProps = {
4
4
  /**
@@ -18,3 +18,4 @@ export const emptyProps = {
18
18
  }
19
19
 
20
20
  export type EmptyProps = ExtractPropTypes<typeof emptyProps>
21
+ export type EmptyPropsPublic = ExtractPublicPropTypes<typeof emptyProps>
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import { isString } from '../../utils'
3
3
 
4
4
  export const envViewProps = {
@@ -22,4 +22,6 @@ export interface EnvListItem {
22
22
  }
23
23
 
24
24
  export type EnvViewProps = ExtractPropTypes<typeof envViewProps>
25
+ export type EnvViewPropsPublic = ExtractPublicPropTypes<typeof envViewProps>
26
+
25
27
  export type EnvViewEmits = typeof envViewEmits
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import type { EventDetail } from '../../types'
3
3
  import { isObject, isString, pick } from '../../utils'
4
4
  import { cellProps } from '../cell/props'
@@ -119,4 +119,6 @@ export const fieldEmits = {
119
119
  }
120
120
 
121
121
  export type FieldProps = ExtractPropTypes<typeof fieldProps>
122
+ export type FieldPropsPublic = ExtractPublicPropTypes<typeof fieldProps>
123
+
122
124
  export type FieldEmits = typeof fieldEmits
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import type { FormRules } from '../../core/useForm'
3
3
 
4
4
  export const formProps = {
@@ -23,4 +23,6 @@ export const formEmits = {
23
23
  }
24
24
 
25
25
  export type FormProps = ExtractPropTypes<typeof formProps>
26
+ export type FormPropsPublic = ExtractPublicPropTypes<typeof formProps>
27
+
26
28
  export type FormEmits = typeof formEmits
@@ -24,12 +24,12 @@ import type { ComponentInternalInstance, Ref } from 'vue'
24
24
  import { getCurrentInstance, inject, ref } from 'vue'
25
25
  import { defaultNamespace } from '../../core'
26
26
  import Cell from '../cell/cell.vue'
27
- import type { FormItemProps } from './props'
27
+ import type { FormItemPropsPublic } from './props'
28
28
  import { formItemEmits, formItemProps } from './props'
29
29
 
30
30
  export interface FormItemInstance extends Omit<ComponentInternalInstance, 'props'> {
31
31
  errorMessage: Ref<string>
32
- props: FormItemProps
32
+ props: FormItemPropsPublic
33
33
  }
34
34
 
35
35
  defineProps(formItemProps)
@@ -1,10 +1,10 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import type { FormRuleItem } from '../../core/useForm'
3
3
  import { pick } from '../../utils'
4
4
  import { cellProps } from '../cell'
5
5
 
6
6
  export const formItemProps = {
7
- ...pick(cellProps, ['titleWidth', 'suffix']),
7
+ ...pick(cellProps, ['titleWidth', 'suffix', 'value']),
8
8
  /**
9
9
  * 校验对应的字段名
10
10
  */
@@ -28,4 +28,6 @@ export const formItemEmits = {
28
28
  }
29
29
 
30
30
  export type FormItemProps = ExtractPropTypes<typeof formItemProps>
31
+ export type FormItemPropsPublic = ExtractPublicPropTypes<typeof formItemProps>
32
+
31
33
  export type FormItemEmits = typeof formItemEmits
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ExtractPropTypes, PropType } from 'vue'
1
+ import type { CSSProperties, ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import { isObject } from '../../utils'
3
3
 
4
4
  export const iconProps = {
@@ -37,4 +37,6 @@ export const iconEmits = {
37
37
  }
38
38
 
39
39
  export type IconProps = ExtractPropTypes<typeof iconProps>
40
+ export type IconPropsPublic = ExtractPublicPropTypes<typeof iconProps>
41
+
40
42
  export type IconEmits = typeof iconEmits
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'
2
2
 
3
3
  export const imageProps = {
4
4
  /**
@@ -46,4 +46,6 @@ export const imageEmits = {
46
46
  }
47
47
 
48
48
  export type ImageProps = ExtractPropTypes<typeof imageProps>
49
+ export type ImagePropsPublic = ExtractPublicPropTypes<typeof imageProps>
50
+
49
51
  export type ImageEmits = typeof imageEmits
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'
2
2
 
3
3
  export const indexAnchorProps = {
4
4
  /**
@@ -11,3 +11,4 @@ export const indexAnchorProps = {
11
11
  }
12
12
 
13
13
  export type IndexAnchorProps = ExtractPropTypes<typeof indexAnchorProps>
14
+ export type IndexAnchorPropsPublic = ExtractPublicPropTypes<typeof indexAnchorProps>
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
 
3
3
  export const indexBarProps = {
4
4
  /**
@@ -32,3 +32,4 @@ export const indexBarProps = {
32
32
  }
33
33
 
34
34
  export type IndexBarProps = ExtractPropTypes<typeof indexBarProps>
35
+ export type IndexBarPropsPublic = ExtractPublicPropTypes<typeof indexBarProps>
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import { isString } from '../../utils'
3
3
  import { cellProps } from '../cell'
4
4
 
@@ -121,4 +121,6 @@ export const inputEmits = {
121
121
  }
122
122
 
123
123
  export type InputProps = ExtractPropTypes<typeof inputProps>
124
+ export type InputPropsPublic = ExtractPublicPropTypes<typeof inputProps>
125
+
124
126
  export type InputEmits = typeof inputEmits
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import type { InputNumberValue } from '../../core/useInputNumber'
3
3
  import type { EventDetail } from '../../types'
4
4
  import { isObject } from '../../utils'
@@ -120,4 +120,6 @@ export const inputNumberEmits = {
120
120
  }
121
121
 
122
122
  export type InputNumberProps = ExtractPropTypes<typeof inputNumberProps>
123
+ export type InputNumberPropsPublic = ExtractPublicPropTypes<typeof inputNumberProps>
124
+
123
125
  export type InputNumberEmits = typeof inputNumberEmits
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import type { LoadStatus } from '../loadmore/props'
3
3
 
4
4
  export const listProps = {
@@ -16,3 +16,4 @@ export const listProps = {
16
16
  }
17
17
 
18
18
  export type ListProps = ExtractPropTypes<typeof listProps>
19
+ export type ListPropsPublic = ExtractPublicPropTypes<typeof listProps>
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, CSSProperties, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, CSSProperties, PropType } from 'vue'
2
2
 
3
3
  export const listItemProps = {
4
4
  /**
@@ -34,4 +34,6 @@ export const listItemEmits = {
34
34
  }
35
35
 
36
36
  export type ListItemProps = ExtractPropTypes<typeof listItemProps>
37
+ export type ListItemPropsPublic = ExtractPublicPropTypes<typeof listItemProps>
38
+
37
39
  export type ListItemEmits = typeof listItemEmits
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ExtractPropTypes, PropType } from 'vue'
1
+ import type { CSSProperties, ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
 
3
3
  export const loadingIconProps = {
4
4
  /**
@@ -12,3 +12,4 @@ export const loadingIconProps = {
12
12
  }
13
13
 
14
14
  export type LoadingIconProps = ExtractPropTypes<typeof loadingIconProps>
15
+ export type LoadingIconPropsPublic = ExtractPublicPropTypes<typeof loadingIconProps>
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ExtractPropTypes, PropType } from 'vue'
1
+ import type { CSSProperties, ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import type { LoadStatusEnum } from '../../core'
3
3
  import { defaultNamespace } from '../../core/useNamespace'
4
4
 
@@ -55,4 +55,6 @@ export const loadMoreEmits = {
55
55
  export type LoadStatus = Record<LoadStatusEnum, string>
56
56
 
57
57
  export type LoadMoreProps = ExtractPropTypes<typeof loadMoreProps>
58
+ export type LoadMorePropsPublic = ExtractPublicPropTypes<typeof loadMoreProps>
59
+
58
60
  export type LoadMoreEmits = typeof loadMoreEmits
@@ -34,7 +34,7 @@ const ns = useNamespace('menu')
34
34
 
35
35
  const props = defineProps(menuProps)
36
36
 
37
- const systemInfo = uni.getSystemInfoSync()
37
+ const systemInfo = uni.getWindowInfo()
38
38
  const instance = getCurrentInstance()
39
39
 
40
40
  const children = ref<MenuItemInstance[]>([])
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import { pick } from '../../utils'
3
3
  import { transitionProps } from '../transition/props'
4
4
  import { popupProps } from '../popup/props'
@@ -29,3 +29,4 @@ export const menuProps = {
29
29
  }
30
30
 
31
31
  export type MenuProps = ExtractPropTypes<typeof menuProps>
32
+ export type MenuPropsPublic = ExtractPublicPropTypes<typeof menuProps>
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import { isNumber, isString } from '../../utils'
3
3
 
4
4
  export const menuItemProps = {
@@ -50,4 +50,6 @@ export interface MenuItemOption {
50
50
  export type MenuItemOptionValue = number | string
51
51
 
52
52
  export type MenuItemProps = ExtractPropTypes<typeof menuItemProps>
53
+ export type MenuItemPropsPublic = ExtractPublicPropTypes<typeof menuItemProps>
54
+
53
55
  export type MenuItemEmits = typeof menuItemEmits
@@ -4,7 +4,7 @@
4
4
  ns.b(),
5
5
  ns.m(theme),
6
6
  ns.is('single', leftMenu.length === 1),
7
- ns.is('development', systemInfo.platform === 'devtools'),
7
+ ns.is('development', deviceInfo.platform === 'devtools'),
8
8
  ]"
9
9
  :style="{ backgroundColor: bgColor, paddingTop: getUnitValue(statusBarHeight, 'px') }"
10
10
  >
@@ -32,13 +32,14 @@
32
32
 
33
33
  <script lang="ts" setup>
34
34
  import type { CSSProperties } from 'vue'
35
- import { computed, defineProps } from 'vue'
35
+ import { computed } from 'vue'
36
36
  import useNamespace from '../../core/useNamespace'
37
37
  import { getUnitValue } from '../../utils'
38
38
  import IconComponent from '../icon/icon.vue'
39
39
  import { navBarEmits, navBarProps } from './props'
40
40
 
41
- const systemInfo = uni.getSystemInfoSync()
41
+ const windowInfo = uni.getWindowInfo()
42
+ const deviceInfo = uni.getDeviceInfo()
42
43
  let menuButtonInfo: UniApp.GetMenuButtonBoundingClientRectRes = {
43
44
  top: 0,
44
45
  left: 0,
@@ -57,11 +58,11 @@ const props = defineProps(navBarProps)
57
58
  const emit = defineEmits(navBarEmits)
58
59
 
59
60
  const statusBarHeight = computed(() => {
60
- return props.safeAreaInsetTop ? (systemInfo.statusBarHeight as number) : 0
61
+ return props.safeAreaInsetTop ? (windowInfo.statusBarHeight as number) : 0
61
62
  })
62
63
 
63
64
  const contentHeight = computed(() => {
64
- return systemInfo.platform === 'ios' ? 44 : 48
65
+ return deviceInfo.platform === 'ios' ? 44 : 48
65
66
  })
66
67
 
67
68
  const capsuleMenuStyle = computed<CSSProperties>(() => {
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'
2
2
  import { isNumber } from '../../utils'
3
3
 
4
4
  export const navBarProps = {
@@ -43,4 +43,6 @@ export const navBarEmits = {
43
43
  }
44
44
 
45
45
  export type NavBarProps = ExtractPropTypes<typeof navBarProps>
46
+ export type NavBarPropsPublic = ExtractPublicPropTypes<typeof navBarProps>
47
+
46
48
  export type NavBarEmits = typeof navBarEmits