@wyfex/ivue 0.4.0 → 0.6.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.
@@ -0,0 +1,86 @@
1
+ import type { PropType } from 'vue'
2
+ import type { RenderConfig } from '@/types'
3
+
4
+ /**
5
+ * 组件props
6
+ */
7
+ export default {
8
+ /**
9
+ * 双向绑定数据源
10
+ */
11
+ modelValue: {
12
+ type: [String, Number, Array],
13
+ default: ''
14
+ },
15
+ /**
16
+ * 是否使用渲染器 默认否
17
+ */
18
+ useRender: {
19
+ type: [Boolean, Object] as PropType<boolean | RenderConfig>,
20
+ default: false
21
+ },
22
+ /**
23
+ * 显示类型
24
+ */
25
+ type: {
26
+ type: String,
27
+ default: 'date',
28
+ validator: (val: string) =>
29
+ [
30
+ 'year',
31
+ 'years',
32
+ 'month',
33
+ 'months',
34
+ 'date',
35
+ 'dates',
36
+ 'datetime',
37
+ 'week',
38
+ 'datetimerange',
39
+ 'daterange',
40
+ 'monthrange',
41
+ 'yearrange'
42
+ ].includes(val)
43
+ },
44
+ /**
45
+ * 范围选择时开始日期的占位内容
46
+ */
47
+ startPlaceholder: {
48
+ type: String,
49
+ default: '开始日期'
50
+ },
51
+ /**
52
+ * 范围选择时结束日期的占位内容
53
+ */
54
+ endPlaceholder: {
55
+ type: String,
56
+ default: '结束日期'
57
+ },
58
+ /**
59
+ * 选择范围时的分隔符
60
+ */
61
+ rangeSeparator: {
62
+ type: String,
63
+ default: '至'
64
+ },
65
+ /**
66
+ * 显示在输入框中的格式
67
+ */
68
+ format: {
69
+ type: String,
70
+ default: undefined // 默认undefined 通过dateFormatComputed进行默认赋值
71
+ },
72
+ /**
73
+ * value-format
74
+ */
75
+ valueFormat: {
76
+ type: String,
77
+ default: undefined // 默认undefined 通过dateFormatComputed进行默认赋值
78
+ },
79
+ /**
80
+ * placeholder 默认请选择
81
+ */
82
+ placeholder: {
83
+ type: String,
84
+ default: '请选择'
85
+ }
86
+ }
@@ -0,0 +1,15 @@
1
+ import type { ExtractPropTypes } from 'vue'
2
+ import componentProps from './props'
3
+
4
+ /**
5
+ * props类型
6
+ */
7
+ export type Props = ExtractPropTypes<typeof componentProps>
8
+
9
+ /**
10
+ * emits接口
11
+ */
12
+ export interface Emits {
13
+ // 更新value值
14
+ (e: 'update:modelValue', value: string | number | any[]): void
15
+ }
@@ -68,7 +68,7 @@ export default {
68
68
  */
69
69
  useTitleCenterWithBg: {
70
70
  type: Boolean,
71
- default: true
71
+ default: false
72
72
  },
73
73
  /**
74
74
  * 标签包裹类名
@@ -0,0 +1,92 @@
1
+ import type { PropType } from 'vue'
2
+ import type { RenderConfig } from '@/types'
3
+
4
+ /**
5
+ * 组件props
6
+ */
7
+ export default {
8
+ /**
9
+ * 双向绑定数据源
10
+ */
11
+ modelValue: {
12
+ type: [String, Number],
13
+ default: ''
14
+ },
15
+ /**
16
+ * el-input组件的宽度
17
+ */
18
+ width: {
19
+ type: String,
20
+ default: '100%'
21
+ },
22
+ /**
23
+ * placeholder
24
+ */
25
+ placeholder: {
26
+ type: String,
27
+ default: '请输入'
28
+ },
29
+ /**
30
+ * 是否可清空 默认是
31
+ */
32
+ clearable: {
33
+ type: Boolean,
34
+ default: true
35
+ },
36
+ /**
37
+ * 是否使用渲染器 默认否
38
+ */
39
+ useRender: {
40
+ type: [Boolean, Object] as PropType<boolean | RenderConfig>,
41
+ default: false
42
+ },
43
+ /**
44
+ * el-input头部插槽内容
45
+ */
46
+ prefixContent: {
47
+ type: [String, Object],
48
+ default: ''
49
+ },
50
+ /**
51
+ * el-input尾部插槽内容
52
+ */
53
+ suffixContent: {
54
+ type: [String, Object],
55
+ default: ''
56
+ },
57
+ /**
58
+ * el-input前置插槽内容
59
+ */
60
+ prependContent: {
61
+ type: [String, Object],
62
+ default: ''
63
+ },
64
+ /**
65
+ * el-input后置插槽内容
66
+ */
67
+ appendContent: {
68
+ type: [String, Object],
69
+ default: ''
70
+ },
71
+ /**
72
+ * 单位 显示在el-input的右外部
73
+ */
74
+ unit: {
75
+ type: [String, Object],
76
+ default: ''
77
+ },
78
+ /**
79
+ * 控制是否能被用户缩放 仅type=textare生效
80
+ */
81
+ resize: {
82
+ type: String,
83
+ default: 'none'
84
+ },
85
+ /**
86
+ * 输入框行数 仅type=textare生效
87
+ */
88
+ rows: {
89
+ type: Number,
90
+ default: 6
91
+ }
92
+ }
@@ -0,0 +1,15 @@
1
+ import type { ExtractPropTypes } from 'vue'
2
+ import componentProps from './props'
3
+
4
+ /**
5
+ * props类型
6
+ */
7
+ export type Props = ExtractPropTypes<typeof componentProps>
8
+
9
+ /**
10
+ * emits接口
11
+ */
12
+ export interface Emits {
13
+ // 更新value值
14
+ (e: 'update:modelValue', value: string): void
15
+ }