@polyv/vue-components 1.0.1 → 1.1.0

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 (145) hide show
  1. package/index.es.js +4453 -2279
  2. package/package.json +5 -4
  3. package/src/components/basic-countdown/use-basic-countdown.d.ts +27 -7
  4. package/src/components/{normal-button/normal-button.vue.d.ts → button/button.vue.d.ts} +6 -14
  5. package/src/components/button/index.d.ts +3 -0
  6. package/src/components/button/type.d.ts +50 -0
  7. package/src/components/{normal-button/use-normal-button.d.ts → button/use-button.d.ts} +33 -11
  8. package/src/components/carousel/index.d.ts +3 -0
  9. package/src/components/category-select/category-select-item.vue.d.ts +22 -0
  10. package/src/components/category-select/category-select.vue.d.ts +21 -0
  11. package/src/components/category-select/index.d.ts +3 -0
  12. package/src/components/category-select/use-category-select.d.ts +25 -0
  13. package/src/components/dropdown/dropdown-item.vue.d.ts +31 -0
  14. package/src/components/dropdown/dropdown-menu.vue.d.ts +17 -0
  15. package/src/components/dropdown/dropdown.vue.d.ts +61 -0
  16. package/src/components/dropdown/index.d.ts +4 -0
  17. package/src/components/dropdown/use-dropdown.d.ts +70 -0
  18. package/src/components/empty/empty.vue.d.ts +14 -0
  19. package/src/components/empty/index.d.ts +2 -0
  20. package/src/components/empty/use-empty.d.ts +14 -0
  21. package/src/components/exports.d.ts +8 -1
  22. package/src/components/form/{form-area-picker/form-area-picker.vue.d.ts → area-picker/area-picker.vue.d.ts} +7 -7
  23. package/src/components/form/area-picker/index.d.ts +2 -0
  24. package/src/components/form/{form-area-picker/use-form-area-picker.d.ts → area-picker/use-area-picker.d.ts} +26 -13
  25. package/src/components/form/checkbox/index.d.ts +4 -0
  26. package/src/components/form/{form-checkbox/use-form-checkbox.d.ts → checkbox/use-checkbox.d.ts} +47 -12
  27. package/src/components/form/form-item/use-form-item.d.ts +30 -9
  28. package/src/components/form/form-submit-button/form-submit-button.vue.d.ts +13 -13
  29. package/src/components/form/form-submit-button/use-form-submit-button.d.ts +12 -5
  30. package/src/components/form/form-wrap/form-wrap.vue.d.ts +2 -0
  31. package/src/components/form/form-wrap/use-form-wrap.d.ts +48 -9
  32. package/src/components/form/hooks/use-form-common.d.ts +13 -2
  33. package/src/components/form/index.d.ts +5 -5
  34. package/src/components/form/input/index.d.ts +2 -0
  35. package/src/components/form/{form-input/form-input.vue.d.ts → input/input.vue.d.ts} +19 -22
  36. package/src/components/form/{form-input/use-form-input.d.ts → input/use-input.d.ts} +89 -21
  37. package/src/components/form/protocol/index.d.ts +2 -0
  38. package/src/components/form/{form-protocol/use-form-protocol.d.ts → protocol/use-protocol.d.ts} +9 -5
  39. package/src/components/form/radio/index.d.ts +4 -0
  40. package/src/components/form/{form-radio/form-radio.vue.d.ts → radio/radio.vue.d.ts} +0 -6
  41. package/src/components/form/radio/use-radio.d.ts +41 -0
  42. package/src/components/form/types/index.d.ts +12 -3
  43. package/src/components/icons/icons/{info-round-filled → check-round-fill}/index.d.ts +1 -1
  44. package/src/components/icons/icons/close-round/index.d.ts +6 -0
  45. package/src/components/icons/icons/copy/index.d.ts +6 -0
  46. package/src/components/icons/icons/down-file/index.d.ts +6 -0
  47. package/src/components/icons/icons/down-load/index.d.ts +6 -0
  48. package/src/components/icons/icons/info-round-fill/index.d.ts +6 -0
  49. package/src/components/icons/icons/loading/index.d.ts +6 -0
  50. package/src/components/icons/icons/search/index.d.ts +6 -0
  51. package/src/components/icons/icons/triangle-down/index.d.ts +6 -0
  52. package/src/components/icons/icons/triangle-up/index.d.ts +6 -0
  53. package/src/components/icons/icons/warning-round-fill/index.d.ts +6 -0
  54. package/src/components/icons/icons/zoom-in/index.d.ts +6 -0
  55. package/src/components/icons/icons/zoom-out/index.d.ts +6 -0
  56. package/src/components/icons/map.d.ts +13 -1
  57. package/src/components/loading/directive.d.ts +16 -0
  58. package/src/components/loading/hook.d.ts +9 -0
  59. package/src/components/loading/index.d.ts +6 -0
  60. package/src/components/loading/loading-circle.vue.d.ts +2 -0
  61. package/src/components/loading/loading.vue.d.ts +30 -0
  62. package/src/components/loading/service.d.ts +11 -0
  63. package/src/components/loading/types.d.ts +24 -0
  64. package/src/components/loading/use-loading-component.d.ts +29 -0
  65. package/src/components/normal-pendant/index.d.ts +1 -0
  66. package/src/components/normal-pendant/normal-pendant.vue.d.ts +1 -8
  67. package/src/components/normal-pendant/use-normal-pendant.d.ts +36 -0
  68. package/src/components/popup/hooks/popup-props.d.ts +129 -37
  69. package/src/components/popup/hooks/use-popup-back.d.ts +1 -1
  70. package/src/components/popup/hooks/use-popup-config.d.ts +3 -0
  71. package/src/components/popup/hooks/use-popup-height.d.ts +1 -1
  72. package/src/components/popup/hooks/use-popup-scroll.d.ts +1 -0
  73. package/src/components/popup/hooks/use-popup-visible.d.ts +1 -0
  74. package/src/components/popup/popup.vue.d.ts +20 -15
  75. package/src/components/resize-box/index.d.ts +3 -0
  76. package/src/components/resize-box/resize-box.vue.d.ts +97 -0
  77. package/src/components/resize-box/type.d.ts +34 -0
  78. package/src/components/resize-box/use-resize-box.d.ts +105 -0
  79. package/src/components/reward-receive/entrance/reward-receive.vue.d.ts +4 -7
  80. package/src/components/reward-receive/hooks/use-reward-receive.d.ts +8 -3
  81. package/src/components/reward-receive/index.d.ts +1 -0
  82. package/src/components/switch/index.d.ts +2 -0
  83. package/src/components/switch/switch.vue.d.ts +51 -0
  84. package/src/components/switch/use-switch.d.ts +66 -0
  85. package/src/hooks/business/use-config-provider/index.d.ts +18 -5
  86. package/src/hooks/business/use-request/index.d.ts +56 -0
  87. package/src/hooks/business/use-resize-oss-image/index.d.ts +5 -0
  88. package/src/hooks/business/use-skin-color/index.d.ts +44 -0
  89. package/src/hooks/components/use-action-sheet/types.d.ts +27 -5
  90. package/src/hooks/components/use-image-preview/index.d.ts +12 -0
  91. package/src/hooks/components/use-message-box/_component/message-box-element.vue.d.ts +46 -11
  92. package/src/hooks/components/use-message-box/_component/use-message-box-element.d.ts +135 -3
  93. package/src/hooks/components/use-message-box/index.d.ts +3 -0
  94. package/src/hooks/components/use-message-box/types.d.ts +50 -8
  95. package/src/hooks/components/use-popper/_popper-type.d.ts +8 -4
  96. package/src/hooks/components/use-popper/index.d.ts +2 -2
  97. package/src/hooks/components/use-toast/_component/toast-element.vue.d.ts +32 -5
  98. package/src/hooks/components/use-toast/_component/use-toast-element.d.ts +37 -6
  99. package/src/hooks/components/use-toast/hook.d.ts +11 -0
  100. package/src/hooks/components/use-toast/index.d.ts +3 -10
  101. package/src/hooks/components/use-toast/types.d.ts +8 -2
  102. package/src/hooks/exports.d.ts +10 -1
  103. package/src/hooks/interactive/use-hover/index.d.ts +8 -0
  104. package/src/hooks/interactive/use-outside/index.d.ts +24 -0
  105. package/src/hooks/interactive/use-screen-orientation/index.d.ts +2 -2
  106. package/src/hooks/pagination/use-scroll-pagintaion/index.d.ts +1 -0
  107. package/src/hooks/platform/weixin/load-wx-sdk.d.ts +9 -0
  108. package/src/hooks/platform/weixin/use-weixin-mini-program.d.ts +6 -0
  109. package/src/hooks/platform/weixin/use-weixin-sdk.d.ts +14 -0
  110. package/src/hooks/plugin/use-resize-observer/index.d.ts +1 -1
  111. package/src/hooks/tools/use-browser/index.d.ts +8 -0
  112. package/src/hooks/tools/use-download/index.d.ts +6 -0
  113. package/src/hooks/tools/use-event-listener/index.d.ts +1 -1
  114. package/src/hooks/tools/use-set-interval/index.d.ts +1 -0
  115. package/src/hooks/tools/use-set-timeout/index.d.ts +1 -0
  116. package/src/hooks/tools/use-simple-visible/index.d.ts +28 -7
  117. package/src/hooks/vue/use-storage-ref/index.d.ts +3 -0
  118. package/src/hooks/vue/use-vue/index.d.ts +15 -0
  119. package/src/lang/common/en.json.d.ts +5 -1
  120. package/src/lang/common/ja.json.d.ts +5 -1
  121. package/src/lang/common/ko.json.d.ts +5 -1
  122. package/src/lang/common/ru.json.d.ts +5 -1
  123. package/src/lang/common/zh-CN.json.d.ts +5 -1
  124. package/src/lang/common/zh-TW.json.d.ts +5 -1
  125. package/src/lang/internal/index.d.ts +4 -0
  126. package/src/plugins/polyv-ui/mobile-import.d.ts +1 -0
  127. package/src/vue-utils/emit-utils.d.ts +3 -1
  128. package/src/vue-utils/props-utils.d.ts +1 -3
  129. package/styles/animation.scss +0 -9
  130. package/styles/mixins.scss +8 -6
  131. package/styles/skin-color.scss +64 -0
  132. package/src/components/form/form-area-picker/index.d.ts +0 -2
  133. package/src/components/form/form-checkbox/index.d.ts +0 -4
  134. package/src/components/form/form-input/index.d.ts +0 -2
  135. package/src/components/form/form-protocol/index.d.ts +0 -2
  136. package/src/components/form/form-radio/index.d.ts +0 -3
  137. package/src/components/normal-button/index.d.ts +0 -3
  138. package/src/components/normal-button/type.d.ts +0 -28
  139. package/src/hooks/interactive/use-click-outside/index.d.ts +0 -14
  140. package/src/components/form/{form-checkbox/form-checkbox-group.vue.d.ts → checkbox/checkbox-group.vue.d.ts} +0 -0
  141. package/src/components/form/{form-checkbox/form-checkbox.vue.d.ts → checkbox/checkbox.vue.d.ts} +4 -4
  142. /package/src/components/form/{form-checkbox → checkbox}/type.d.ts +0 -0
  143. /package/src/components/form/{form-protocol/form-protocol.vue.d.ts → protocol/protocol.vue.d.ts} +0 -0
  144. /package/src/components/form/{form-radio/form-radio-group.vue.d.ts → radio/radio-group.vue.d.ts} +0 -0
  145. /package/src/components/form/{form-radio → radio}/type.d.ts +0 -0
@@ -1,40 +1,53 @@
1
1
  import { AreaPickerComponent } from '../../../plugins/polyv-ui/types';
2
2
  import { VueEmit, VueProps } from '../../../vue-utils';
3
3
  import { ComputedRef } from 'vue';
4
- export declare const formAreaPickerProps: () => {
5
- /** 绑定值 */
4
+ export declare const areaPickerProps: () => {
5
+ /**
6
+ * 绑定值,支持 v-model
7
+ * @propType string[]
8
+ */
6
9
  value: import('vue-types').VueTypeValidableDef<string[], import('vue-types/dist/types').ValidatorFunction<string[]>> & {
7
10
  default: () => string[];
8
11
  };
9
- areaPickerText: import('vue-types').VueTypeValidableDef<string[], import('vue-types/dist/types').ValidatorFunction<string[]>> & {
10
- default: () => string[];
11
- };
12
- /** 占位文本 */
12
+ /**
13
+ * 占位文本
14
+ */
13
15
  placeholder: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
14
16
  default: string;
15
17
  };
18
+ /**
19
+ * 是否禁用
20
+ * @default false
21
+ */
22
+ disabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
23
+ default: boolean;
24
+ };
16
25
  size: import('vue-types').VueTypeValidableDef<import('..').FormSize, import('vue-types/dist/types').ValidatorFunction<import('..').FormSize>>;
17
26
  validateForm: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
18
27
  default: boolean;
19
28
  };
20
29
  };
21
- export declare const formAreaPickerEmit: () => {
22
- /** 选择器文本变化 */
30
+ export declare const areaPickerEmit: () => {
31
+ /**
32
+ * 选择器文本变化
33
+ * @cbName 选择的文本
34
+ * @cbType string[]
35
+ */
23
36
  'picker-text-change': import('../../../vue-utils').EmitFuncType<string[]>;
24
37
  };
25
- export interface FormAreaPickerInstance {
38
+ export interface AreaPickerInstance {
26
39
  /** 是否已选择完成 */
27
40
  isFinish: ComputedRef<boolean>;
28
41
  }
29
- export declare const useFormAreaPicker: (options: {
42
+ export declare const useAreaPicker: (options: {
30
43
  AreaPicker: AreaPickerComponent;
31
- props: VueProps<typeof formAreaPickerProps>;
32
- emit: VueEmit<typeof formAreaPickerEmit>;
44
+ props: VueProps<typeof areaPickerProps>;
45
+ emit: VueEmit<typeof areaPickerEmit>;
33
46
  }) => {
34
47
  innerValue: import('vue').Ref<string[]>;
35
48
  isFinish: ComputedRef<boolean>;
36
49
  innerIsFinish: ComputedRef<boolean>;
37
- instance: FormAreaPickerInstance;
50
+ instance: AreaPickerInstance;
38
51
  inputValue: ComputedRef<string>;
39
52
  inputPlaceholder: ComputedRef<string>;
40
53
  refreshKey: import('vue').Ref<number>;
@@ -0,0 +1,4 @@
1
+ export { default as PwcCheckbox } from './checkbox.vue';
2
+ export { default as PwcCheckboxGroup } from './checkbox-group.vue';
3
+ export * from './type';
4
+ export * from './use-checkbox';
@@ -1,37 +1,72 @@
1
1
  import { VueEmit, VueProps } from '../../../vue-utils';
2
- export declare const formCheckboxProps: () => {
3
- /** 使用圆形样式 */
4
- circle: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
5
- default: boolean;
2
+ export declare const checkboxGroupProps: () => {
3
+ /**
4
+ * 复选框组绑定值,支持 v-model
5
+ * @propType FormCheckboxValue[]
6
+ */
7
+ value: import('vue-types').VueTypeValidableDef<any[], import('vue-types/dist/types').ValidatorFunction<any[]>> & {
8
+ default: () => any[];
6
9
  };
7
- /** 是否选中,支持.sync */
10
+ };
11
+ export declare const checkboxProps: () => {
12
+ /**
13
+ * 是否选中,支持.sync
14
+ * @default false
15
+ */
8
16
  checked: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
9
17
  default: boolean;
10
18
  };
19
+ /**
20
+ * 使用圆形样式
21
+ * @default false
22
+ */
23
+ circle: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
24
+ default: boolean;
25
+ };
26
+ /**
27
+ * 复选框值
28
+ * @propType FormCheckboxValue
29
+ */
11
30
  value: import('vue-types').VueTypeDef<any>;
31
+ /**
32
+ * 复选框标签
33
+ */
12
34
  label: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
13
35
  default: string;
14
36
  };
15
- /** 是否显示背景色 */
37
+ /**
38
+ * 是否显示背景色
39
+ * @default false
40
+ */
16
41
  showBackground: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
17
42
  default: boolean;
18
43
  };
19
- /** 是否禁用 */
44
+ /**
45
+ * 是否禁用
46
+ * @default false
47
+ */
20
48
  disabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
21
49
  default: boolean;
22
50
  };
23
- /** 显示前缀 */
51
+ /**
52
+ * 是否显示复选框前缀
53
+ * @default true
54
+ */
24
55
  showPrefix: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
25
56
  default: boolean;
26
57
  };
27
58
  };
28
- export declare const formCheckboxEmits: () => {
59
+ export declare const checkboxEmits: () => {
60
+ /**
61
+ * 复选框切换
62
+ * @cbName 开关值
63
+ */
29
64
  change: import('../../../vue-utils').EmitFuncType<boolean>;
30
65
  "update:checked": import('../../../vue-utils').EmitFuncType<boolean>;
31
66
  };
32
- export declare const useFormCheckbox: (options: {
33
- props: VueProps<typeof formCheckboxProps>;
34
- emit: VueEmit<typeof formCheckboxEmits>;
67
+ export declare const useCheckbox: (options: {
68
+ props: VueProps<typeof checkboxProps>;
69
+ emit: VueEmit<typeof checkboxEmits>;
35
70
  }) => {
36
71
  isChecked: import('vue').ComputedRef<boolean>;
37
72
  onClickCheckbox: () => void;
@@ -2,25 +2,46 @@ import { VueProps } from '../../../vue-utils';
2
2
  import { ComputedRef, InjectionKey } from 'vue';
3
3
  import { FormValidateOptions } from '../types';
4
4
  export declare const formItemProps: () => {
5
- /** 该节点属于表单数据中的哪个字段 */
5
+ /**
6
+ * 表单字段
7
+ */
6
8
  formField: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>>;
7
- /** 节点标签 */
9
+ /**
10
+ * 节点标签
11
+ */
8
12
  label: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>>;
9
- /** 表单标题宽度 */
13
+ /**
14
+ * 表单标题宽度
15
+ */
10
16
  labelWidth: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
11
- /** 表单标题高度 */
17
+ /**
18
+ * 表单标题高度
19
+ */
12
20
  labelHeight: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
13
- /** 表单输入框内容宽度 */
21
+ /**
22
+ * 表单输入框内容宽度
23
+ */
14
24
  contentWidth: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
15
- /** 是否显示异常信息 */
25
+ /**
26
+ * 是否显示异常信息
27
+ * @default true
28
+ */
16
29
  showErrorMessage: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
17
30
  default: boolean;
18
31
  };
19
- /** 节点异常信息 */
32
+ /**
33
+ * 节点异常信息
34
+ */
20
35
  errorMessage: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>>;
21
- /** label 模式 */
36
+ /**
37
+ * label 模式
38
+ * @propType FormItemLabelModel
39
+ */
22
40
  labelModel: import('vue-types').VueTypeDef<"header" | "inline">;
23
- /** 是否显示必填星号 */
41
+ /**
42
+ * 是否显示必填星号
43
+ * @default false
44
+ */
24
45
  required: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
25
46
  default: boolean;
26
47
  };
@@ -5,14 +5,14 @@ declare const _default: import('vue').DefineComponent<{
5
5
  debounceSubmit: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
6
6
  default: boolean;
7
7
  };
8
- type: import('vue-types').VueTypeValidableDef<import('../../normal-button').ButtonType, import('vue-types/dist/types').ValidatorFunction<import('../../normal-button').ButtonType>> & {
9
- default: import('../../normal-button').ButtonType;
8
+ type: import('vue-types').VueTypeValidableDef<import('../../button').ButtonType, import('vue-types/dist/types').ValidatorFunction<import('../../button').ButtonType>> & {
9
+ default: import('../../button').ButtonType;
10
10
  };
11
11
  disabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
12
12
  default: boolean;
13
13
  };
14
- size: import('vue-types').VueTypeValidableDef<import('../../normal-button').ButtonSize, import('vue-types/dist/types').ValidatorFunction<import('../../normal-button').ButtonSize>> & {
15
- default: import('../../normal-button').ButtonSize;
14
+ size: import('vue-types').VueTypeValidableDef<import('../../button').ButtonSize, import('vue-types/dist/types').ValidatorFunction<import('../../button').ButtonSize>> & {
15
+ default: import('../../button').ButtonSize;
16
16
  };
17
17
  outline: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
18
18
  default: boolean;
@@ -30,14 +30,14 @@ declare const _default: import('vue').DefineComponent<{
30
30
  debounceSubmit: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
31
31
  default: boolean;
32
32
  };
33
- type: import('vue-types').VueTypeValidableDef<import('../../normal-button').ButtonType, import('vue-types/dist/types').ValidatorFunction<import('../../normal-button').ButtonType>> & {
34
- default: import('../../normal-button').ButtonType;
33
+ type: import('vue-types').VueTypeValidableDef<import('../../button').ButtonType, import('vue-types/dist/types').ValidatorFunction<import('../../button').ButtonType>> & {
34
+ default: import('../../button').ButtonType;
35
35
  };
36
36
  disabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
37
37
  default: boolean;
38
38
  };
39
- size: import('vue-types').VueTypeValidableDef<import('../../normal-button').ButtonSize, import('vue-types/dist/types').ValidatorFunction<import('../../normal-button').ButtonSize>> & {
40
- default: import('../../normal-button').ButtonSize;
39
+ size: import('vue-types').VueTypeValidableDef<import('../../button').ButtonSize, import('vue-types/dist/types').ValidatorFunction<import('../../button').ButtonSize>> & {
40
+ default: import('../../button').ButtonSize;
41
41
  };
42
42
  outline: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
43
43
  default: boolean;
@@ -49,13 +49,13 @@ declare const _default: import('vue').DefineComponent<{
49
49
  default: boolean;
50
50
  };
51
51
  }>>, {
52
- type: import('../../normal-button').ButtonType;
52
+ type: import('../../button').ButtonType;
53
53
  text: string;
54
- square: boolean;
55
- block: boolean;
56
- size: import('../../normal-button').ButtonSize;
57
- outline: boolean;
58
54
  disabled: boolean;
55
+ size: import('../../button').ButtonSize;
56
+ outline: boolean;
57
+ block: boolean;
58
+ square: boolean;
59
59
  debounceSubmit: boolean;
60
60
  }>;
61
61
  export default _default;
@@ -1,20 +1,27 @@
1
1
  import { VueProps } from '../../../vue-utils';
2
2
  export declare const formSubmitButtonProps: () => {
3
+ /**
4
+ * 按钮文本
5
+ * @default '提交'
6
+ */
3
7
  text: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
4
8
  default: string;
5
9
  };
6
- /** 防抖提交,默认:false */
10
+ /**
11
+ * 防抖提交
12
+ * @default false
13
+ */
7
14
  debounceSubmit: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
8
15
  default: boolean;
9
16
  };
10
- type: import('vue-types').VueTypeValidableDef<import('../../normal-button').ButtonType, import('vue-types/dist/types').ValidatorFunction<import('../../normal-button').ButtonType>> & {
11
- default: import('../../normal-button').ButtonType;
17
+ type: import('vue-types').VueTypeValidableDef<import('../../button').ButtonType, import('vue-types/dist/types').ValidatorFunction<import('../../button').ButtonType>> & {
18
+ default: import('../../button').ButtonType;
12
19
  };
13
20
  disabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
14
21
  default: boolean;
15
22
  };
16
- size: import('vue-types').VueTypeValidableDef<import('../../normal-button').ButtonSize, import('vue-types/dist/types').ValidatorFunction<import('../../normal-button').ButtonSize>> & {
17
- default: import('../../normal-button').ButtonSize;
23
+ size: import('vue-types').VueTypeValidableDef<import('../../button').ButtonSize, import('vue-types/dist/types').ValidatorFunction<import('../../button').ButtonSize>> & {
24
+ default: import('../../button').ButtonSize;
18
25
  };
19
26
  outline: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
20
27
  default: boolean;
@@ -30,6 +30,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
30
30
  debug: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
31
31
  default: boolean;
32
32
  };
33
+ size: import('vue-types').VueTypeValidableDef<import('..').FormSize, import('vue-types/dist/types').ValidatorFunction<import('..').FormSize>>;
33
34
  }, {
34
35
  validateCurrentForm: (validateOptions?: import('..').FormValidateOptions) => Promise<void>;
35
36
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -57,6 +58,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
57
58
  debug: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
58
59
  default: boolean;
59
60
  };
61
+ size: import('vue-types').VueTypeValidableDef<import('..').FormSize, import('vue-types/dist/types').ValidatorFunction<import('..').FormSize>>;
60
62
  }>>, {
61
63
  formData: {
62
64
  [key: string]: any;
@@ -2,9 +2,13 @@ import { UniversalParams } from '../../../interface';
2
2
  import { ValidatorRules } from '../../../plugins/async-validator';
3
3
  import { VueEmit, VueProps } from '../../../vue-utils';
4
4
  import { ComputedRef, InjectionKey, Ref } from 'vue';
5
- import { FormValidateOptions } from '../types';
5
+ import { FormSize, FormValidateOptions } from '../types';
6
6
  export declare const formWrapProps: () => {
7
- /** 绑定的表单对象 */
7
+ /**
8
+ * 绑定的表单对象
9
+ * @propType UniversalParams
10
+ * @default {}
11
+ */
8
12
  formData: import('vue-types').VueTypeValidableDef<{
9
13
  [key: string]: any;
10
14
  }, import('vue-types/dist/types').ValidatorFunction<{
@@ -14,33 +18,68 @@ export declare const formWrapProps: () => {
14
18
  [key: string]: any;
15
19
  };
16
20
  };
17
- /** 验证规则 */
21
+ /**
22
+ * 验证规则
23
+ * @propType ValidatorRules
24
+ * @default {}
25
+ */
18
26
  formRules: import('vue-types').VueTypeValidableDef<ValidatorRules, import('vue-types/dist/types').ValidatorFunction<ValidatorRules>> & {
19
27
  default: () => ValidatorRules;
20
28
  };
21
- /** 表单标题宽度 */
29
+ /**
30
+ * 表单标题宽度
31
+ * @default 0
32
+ */
22
33
  labelWidth: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
23
- /** 表单标题高度 */
34
+ /**
35
+ * 表单标题高度
36
+ * @default 0
37
+ */
24
38
  labelHeight: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
25
- /** 表单输入框内容宽度 */
39
+ /**
40
+ * 表单输入框内容宽度
41
+ * @default 0
42
+ */
26
43
  contentWidth: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
27
- /** 表单提交方法 */
44
+ /**
45
+ * 表单提交方法
46
+ * @propType (formData: UniversalParams) => Promise<void>
47
+ * @default () => {}
48
+ */
28
49
  submitAction: import('vue-types').VueTypeValidableDef<(...args: any[]) => any, import('vue-types/dist/types').ValidatorFunction<(...args: any[]) => any>>;
29
- /** label 模式,默认:inline */
50
+ /**
51
+ * label 模式
52
+ * @propType FormItemLabelModel
53
+ * @default header
54
+ */
30
55
  labelModel: import('vue-types').VueTypeDef<"header" | "inline"> & {
31
56
  default: "header" | "inline";
32
57
  };
33
- /** 是否开启 debug 打印,默认:false */
58
+ /**
59
+ * 是否开启 debug 打印
60
+ * @default false
61
+ */
34
62
  debug: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
35
63
  default: boolean;
36
64
  };
65
+ /**
66
+ * 表单尺寸
67
+ */
68
+ size: import('vue-types').VueTypeValidableDef<FormSize, import('vue-types/dist/types').ValidatorFunction<FormSize>>;
37
69
  };
38
70
  export declare const formWrapEmits: () => {
71
+ /**
72
+ * 表单提交事件
73
+ * @cbName 表单数据
74
+ * @cbType UniversalParams
75
+ */
39
76
  'submit-form': import('../../../vue-utils').EmitFuncType<UniversalParams>;
40
77
  };
41
78
  export type FormWrapProps = VueProps<typeof formWrapProps>;
42
79
  /** <form-wrap> 注入类型 */
43
80
  export interface FormWrapInjectData {
81
+ /** 表单尺寸 */
82
+ size: ComputedRef<FormSize | undefined>;
44
83
  /** 是否正在提交 */
45
84
  isSubmiting: Ref<boolean>;
46
85
  /** debug */
@@ -1,9 +1,15 @@
1
1
  import { VueProps } from '../../../vue-utils';
2
2
  import { FormSize } from '../types';
3
3
  export declare const formCommonProps: () => {
4
- /** 尺寸 */
4
+ /**
5
+ * 尺寸
6
+ * @default FormSize.Default
7
+ */
5
8
  size: import('vue-types').VueTypeValidableDef<FormSize, import('vue-types/dist/types').ValidatorFunction<FormSize>>;
6
- /** 是否进行表单验证 */
9
+ /**
10
+ * 是否进行表单验证
11
+ * @default true
12
+ */
7
13
  validateForm: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
8
14
  default: boolean;
9
15
  };
@@ -14,6 +20,11 @@ export declare const useFormCommon: (options: {
14
20
  }) => {
15
21
  commonClassNames: import('vue').ComputedRef<string[]>;
16
22
  };
23
+ export declare const useFormSize: (options: {
24
+ props: VueProps<typeof formCommonProps>;
25
+ }) => {
26
+ size: import('vue').ComputedRef<FormSize | undefined>;
27
+ };
17
28
  /** 表单组件下的验证状态 hook */
18
29
  export declare const useFormCommonValidate: (options: {
19
30
  props: VueProps<typeof formCommonProps>;
@@ -1,9 +1,9 @@
1
- export * from './form-area-picker';
2
- export * from './form-checkbox';
3
- export * from './form-input';
1
+ export * from './area-picker';
2
+ export * from './checkbox';
4
3
  export * from './form-item';
5
- export * from './form-protocol';
6
- export * from './form-radio';
7
4
  export * from './form-submit-button';
8
5
  export * from './form-wrap';
6
+ export * from './input';
7
+ export * from './protocol';
8
+ export * from './radio';
9
9
  export * from './types';
@@ -0,0 +1,2 @@
1
+ export { default as PwcInput } from './input.vue';
2
+ export * from './use-input';
@@ -1,18 +1,6 @@
1
- declare function __VLS_template(): {
2
- attrs: Partial<{}>;
3
- slots: {
4
- prefix?(_: {}): any;
5
- suffix?(_: {}): any;
6
- };
7
- refs: {
8
- inputRef: HTMLTextAreaElement;
9
- };
10
- rootEl: HTMLDivElement;
11
- };
12
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
- declare const __VLS_component: import('vue').DefineComponent<{
14
- value: import('vue-types').VueTypeDef<import('./use-form-input').InputValueType> & {
15
- default: import('./use-form-input').InputValueType;
1
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
2
+ value: import('vue-types').VueTypeDef<import('./use-input').InputValueType> & {
3
+ default: import('./use-input').InputValueType;
16
4
  };
17
5
  readonly: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
18
6
  default: boolean;
@@ -32,6 +20,9 @@ declare const __VLS_component: import('vue').DefineComponent<{
32
20
  showWordLimit: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
33
21
  default: boolean;
34
22
  };
23
+ prefixText: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
24
+ default: string;
25
+ };
35
26
  suffixText: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
36
27
  default: string;
37
28
  };
@@ -53,12 +44,12 @@ declare const __VLS_component: import('vue').DefineComponent<{
53
44
  focusInput(): void;
54
45
  blurInput(): void;
55
46
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
56
- blur: (arg: import('./use-form-input').InputValueType) => void;
57
- focus: (arg: import('./use-form-input').InputValueType) => void;
58
- enter: (arg: import('./use-form-input').InputValueType) => void;
47
+ focus: (arg: import('./use-input').InputValueType) => void;
48
+ blur: (arg: import('./use-input').InputValueType) => void;
49
+ enter: (arg: import('./use-input').InputValueType) => void;
59
50
  }, string, Readonly<import('vue').ExtractPropTypes<{
60
- value: import('vue-types').VueTypeDef<import('./use-form-input').InputValueType> & {
61
- default: import('./use-form-input').InputValueType;
51
+ value: import('vue-types').VueTypeDef<import('./use-input').InputValueType> & {
52
+ default: import('./use-input').InputValueType;
62
53
  };
63
54
  readonly: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
64
55
  default: boolean;
@@ -78,6 +69,9 @@ declare const __VLS_component: import('vue').DefineComponent<{
78
69
  showWordLimit: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
79
70
  default: boolean;
80
71
  };
72
+ prefixText: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
73
+ default: string;
74
+ };
81
75
  suffixText: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
82
76
  default: string;
83
77
  };
@@ -95,7 +89,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
95
89
  default: boolean;
96
90
  };
97
91
  }>>, {
98
- value: import('./use-form-input').InputValueType;
92
+ value: import('./use-input').InputValueType;
99
93
  type: string;
100
94
  disabled: boolean;
101
95
  validateForm: boolean;
@@ -103,12 +97,15 @@ declare const __VLS_component: import('vue').DefineComponent<{
103
97
  placeholder: string;
104
98
  maxlength: number;
105
99
  showWordLimit: boolean;
100
+ prefixText: string;
106
101
  suffixText: string;
107
102
  clearabled: boolean;
108
103
  useTextarea: boolean;
109
104
  rows: number;
105
+ }>, {
106
+ prefix?(_: {}): any;
107
+ suffix?(_: {}): any;
110
108
  }>;
111
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
112
109
  export default _default;
113
110
  type __VLS_WithTemplateSlots<T, S> = T & {
114
111
  new (): {