flame-plus 0.1.8 → 0.1.9
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/package.json +1 -1
- package/packages/components/base/flmButton/flmButton.vue +29 -0
- package/packages/components/base/flmCascader/flmCascader.vue +39 -0
- package/packages/components/base/flmCheckbox/flmCheckbox.vue +34 -0
- package/packages/components/base/flmCheckbox/flmCheckboxGroup.vue +71 -0
- package/packages/components/base/flmColorPicker/flmColorPicker.vue +34 -0
- package/packages/components/base/flmDatePicker/flmDatePicker.vue +47 -0
- package/packages/components/base/flmDialog/flmDialog.vue +39 -0
- package/packages/components/base/flmInput/flmInput.vue +38 -0
- package/packages/components/base/flmInputNumber/flmInputNumber.vue +36 -0
- package/packages/components/base/flmPagination/flmPagination.vue +37 -0
- package/packages/components/base/flmRadio/flmRadio.vue +64 -0
- package/packages/components/base/flmRate/flmRate.vue +34 -0
- package/packages/components/base/flmRead/flmRead.vue +18 -0
- package/packages/components/base/flmSelect/flmSelect.vue +74 -0
- package/packages/components/base/flmSlider/flmSlider.vue +35 -0
- package/packages/components/base/flmSwitch/flmSwitch.vue +29 -0
- package/packages/components/base/flmTimePicker/flmTimePicker.vue +37 -0
- package/packages/components/base/flmTimeSelect/flmTimeSelect.vue +36 -0
- package/packages/components/base/flmTransfer/flmTransfer.vue +42 -0
- package/packages/components/complex/flmForm/flmForm.vue +223 -0
- package/packages/components/complex/flmSearch/flmSearch.vue +148 -0
- package/packages/components/complex/flmTable/flmTable.vue +90 -0
- package/packages/components/complex/flmToolbar/flmToolbar.vue +55 -0
- package/packages/components/index.ts +29 -0
- package/packages/components/page/flmReportPage/flmReportPage.vue +690 -0
- package/packages/index.ts +8 -0
- package/packages/model/flmComponentConfig/base/flmButton.ts +50 -0
- package/packages/model/flmComponentConfig/base/flmCascader.ts +77 -0
- package/packages/model/flmComponentConfig/base/flmCheckbox.ts +51 -0
- package/packages/model/flmComponentConfig/base/flmColorPicker.ts +30 -0
- package/packages/model/flmComponentConfig/base/flmDatePicker.ts +73 -0
- package/packages/model/flmComponentConfig/base/flmDialog.ts +49 -0
- package/packages/model/flmComponentConfig/base/flmInput.ts +57 -0
- package/packages/model/flmComponentConfig/base/flmInputNumber.ts +37 -0
- package/packages/model/flmComponentConfig/base/flmPagination.ts +38 -0
- package/packages/model/flmComponentConfig/base/flmRadio.ts +42 -0
- package/packages/model/flmComponentConfig/base/flmRate.ts +49 -0
- package/packages/model/flmComponentConfig/base/flmRead.ts +6 -0
- package/packages/model/flmComponentConfig/base/flmSelect.ts +104 -0
- package/packages/model/flmComponentConfig/base/flmSlider.ts +51 -0
- package/packages/model/flmComponentConfig/base/flmSwitch.ts +37 -0
- package/packages/model/flmComponentConfig/base/flmTimePicker.ts +61 -0
- package/packages/model/flmComponentConfig/base/flmTimeSelect.ts +44 -0
- package/packages/model/flmComponentConfig/index.ts +30 -0
- package/packages/model/flmComponentConfig/public.ts +293 -0
- package/packages/utils/filterConfig.ts +39 -0
- package/packages/utils/index.ts +2 -0
- package/packages/utils/isValidKey.ts +13 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ElementSize } from '@/model/flmComponentConfig'
|
|
2
|
+
|
|
3
|
+
/** @button 按钮 */
|
|
4
|
+
|
|
5
|
+
// 按钮类型
|
|
6
|
+
export enum ButtonType {
|
|
7
|
+
'primary' = 'primary',
|
|
8
|
+
'success' = 'success',
|
|
9
|
+
'warning' = 'warning',
|
|
10
|
+
'danger' = 'danger',
|
|
11
|
+
'info' = 'info',
|
|
12
|
+
'text' = 'text',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// 按钮原生type
|
|
16
|
+
export enum ButtonNativeType {
|
|
17
|
+
'button' = 'button',
|
|
18
|
+
'submit' = 'submit',
|
|
19
|
+
'reset' = 'reset',
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 按钮设置(https://element-plus.gitee.io/zh-CN/component/button.html)
|
|
23
|
+
export interface ButtonConfig {
|
|
24
|
+
// 默认属性
|
|
25
|
+
'size'?: ElementSize
|
|
26
|
+
'type'?: ButtonType
|
|
27
|
+
'plain'?: boolean
|
|
28
|
+
'round'?: boolean
|
|
29
|
+
'circle'?: boolean
|
|
30
|
+
'loading'?: boolean
|
|
31
|
+
'loading-icon'?: string
|
|
32
|
+
'disabled'?: boolean
|
|
33
|
+
'icon'?: string
|
|
34
|
+
'autofocus'?: boolean
|
|
35
|
+
'native-type'?: ButtonNativeType
|
|
36
|
+
'auto-insert-space'?: boolean
|
|
37
|
+
// 自定义属性
|
|
38
|
+
'text'?: string // 按钮文字
|
|
39
|
+
}
|
|
40
|
+
// 按钮默认设置
|
|
41
|
+
export const buttonDefaultConfig: ButtonConfig = {
|
|
42
|
+
'plain': false,
|
|
43
|
+
'round': false,
|
|
44
|
+
'circle': false,
|
|
45
|
+
'loading': false,
|
|
46
|
+
'loading-icon': 'Loading',
|
|
47
|
+
'disabled': false,
|
|
48
|
+
'autofocus': false,
|
|
49
|
+
'native-type': ButtonNativeType['button'],
|
|
50
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ElementSize } from '@/model/flmComponentConfig'
|
|
2
|
+
|
|
3
|
+
/** @cascader 级联选择器 */
|
|
4
|
+
|
|
5
|
+
// 标签类型
|
|
6
|
+
export enum CascaderTagType {
|
|
7
|
+
'success' = 'success',
|
|
8
|
+
'info' = 'info',
|
|
9
|
+
'warning' = 'warning',
|
|
10
|
+
'danger' = 'danger',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// 次级菜单的展开方式
|
|
14
|
+
export enum CascaderPropsExpandTrigger {
|
|
15
|
+
'click' = 'click',
|
|
16
|
+
'hover' = 'hover',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 级联选择器props
|
|
20
|
+
export interface CascaderProps {
|
|
21
|
+
'expandTrigger'?: CascaderPropsExpandTrigger
|
|
22
|
+
'multiple'?: boolean
|
|
23
|
+
'checkStrictly'?: boolean
|
|
24
|
+
'emitPath'?: boolean
|
|
25
|
+
'lazy'?: boolean
|
|
26
|
+
'lazyLoad'?: Function
|
|
27
|
+
'value'?: string
|
|
28
|
+
'label'?: string
|
|
29
|
+
'children'?: string
|
|
30
|
+
'disabled'?: string
|
|
31
|
+
'leaf'?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// 级联选择器设置(https://element-plus.gitee.io/zh-CN/component/cascader.html)
|
|
35
|
+
export interface CascaderConfig {
|
|
36
|
+
// 默认属性
|
|
37
|
+
'model-value'?: any
|
|
38
|
+
'options'?: Array<any>
|
|
39
|
+
'props'?: CascaderProps
|
|
40
|
+
'size'?: ElementSize
|
|
41
|
+
'placeholder'?: string
|
|
42
|
+
'disabled'?: boolean
|
|
43
|
+
'clearable'?: boolean
|
|
44
|
+
'show-all-levels'?: boolean
|
|
45
|
+
'collapse-tags'?: boolean
|
|
46
|
+
'collapse-tags-tooltip'?: boolean
|
|
47
|
+
'separator'?: string
|
|
48
|
+
'filterable'?: boolean
|
|
49
|
+
'filter-method'?: Function
|
|
50
|
+
'debounce'?: number
|
|
51
|
+
'before-filter'?: Function
|
|
52
|
+
'popper-class'?: string
|
|
53
|
+
'teleported'?: boolean
|
|
54
|
+
'tag-type'?: CascaderTagType
|
|
55
|
+
}
|
|
56
|
+
// 级联选择器默认事件
|
|
57
|
+
export interface CascaderDefaultEvent {
|
|
58
|
+
'onChange': (value: CascaderConfig['model-value']) => void,
|
|
59
|
+
'onExpandChange': (event: any) => void,
|
|
60
|
+
'onBlur': (event: any) => void,
|
|
61
|
+
'onFocus': (event: any) => void,
|
|
62
|
+
'onVisibleChange': (event: boolean) => void,
|
|
63
|
+
'onRemoveTag': (event: any) => void
|
|
64
|
+
}
|
|
65
|
+
// 级联选择器默认设置
|
|
66
|
+
export const cascaderDefaultConfig: CascaderConfig = {
|
|
67
|
+
'placeholder': '请选择',
|
|
68
|
+
'disabled': false,
|
|
69
|
+
'clearable': false,
|
|
70
|
+
'show-all-levels': true,
|
|
71
|
+
'collapse-tags': false,
|
|
72
|
+
'collapse-tags-tooltip': false,
|
|
73
|
+
'separator': '/',
|
|
74
|
+
'debounce': 300,
|
|
75
|
+
'teleported': true,
|
|
76
|
+
'tag-type': CascaderTagType['info'],
|
|
77
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ElementSize } from '@/model/flmComponentConfig'
|
|
2
|
+
|
|
3
|
+
/** @checkboxGroup 多选框 */
|
|
4
|
+
// 多选框设置(https://element-plus.org/zh-CN/component/checkbox.html)
|
|
5
|
+
export interface CheckboxConfig {
|
|
6
|
+
// 默认属性
|
|
7
|
+
'model-value'?: string | number | boolean
|
|
8
|
+
'label'?: string | number | boolean | object
|
|
9
|
+
'true-label'?: string | number
|
|
10
|
+
'false-label'?: string | number
|
|
11
|
+
'disabled'?: boolean
|
|
12
|
+
'border'?: boolean
|
|
13
|
+
'size'?: ElementSize
|
|
14
|
+
'name'?: string
|
|
15
|
+
'checked'?: boolean
|
|
16
|
+
'indeterminate'?: boolean
|
|
17
|
+
}
|
|
18
|
+
//多选框默认事件
|
|
19
|
+
export interface CheckboxDefaultEvent {
|
|
20
|
+
'onChange': (value: CheckboxConfig['model-value']) => void
|
|
21
|
+
}
|
|
22
|
+
// 多选框默认设置
|
|
23
|
+
export const checkboxDefaultConfig: CheckboxConfig = {
|
|
24
|
+
'disabled': false,
|
|
25
|
+
'border': false,
|
|
26
|
+
'checked': false,
|
|
27
|
+
'indeterminate': false,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// 多选框组设置
|
|
31
|
+
export interface CheckboxGroupConfig {
|
|
32
|
+
// 默认属性
|
|
33
|
+
'model-value'?: Array<CheckboxConfig['model-value']>
|
|
34
|
+
'size'?: ElementSize
|
|
35
|
+
'disabled'?: boolean
|
|
36
|
+
'min'?: number
|
|
37
|
+
'max'?: number
|
|
38
|
+
'text-color'?: string
|
|
39
|
+
'fill'?: string
|
|
40
|
+
// 自定义属性
|
|
41
|
+
'hasCheckAll'?: boolean // 有全选按钮
|
|
42
|
+
'checkAllConfig'?: CheckboxConfig // 权限值
|
|
43
|
+
'items'?: Array<CheckboxConfig> // 选项组
|
|
44
|
+
}
|
|
45
|
+
// 多选框组默认设置
|
|
46
|
+
export const checkboxGroupDefaultConfig: CheckboxGroupConfig = {
|
|
47
|
+
'model-value': [],
|
|
48
|
+
'disabled': false,
|
|
49
|
+
'text-color': '#FFFFFF',
|
|
50
|
+
'fill': '#409EFF',
|
|
51
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ElementSize } from '@/model/flmComponentConfig'
|
|
2
|
+
|
|
3
|
+
/** @colorPicker 颜色选择器 */
|
|
4
|
+
// 颜色格式
|
|
5
|
+
export enum ColorFormat {
|
|
6
|
+
'hsl' = 'hsl',
|
|
7
|
+
'hsv' = 'hsv',
|
|
8
|
+
'hex' = 'hex',
|
|
9
|
+
'rgb' = 'rgb',
|
|
10
|
+
}
|
|
11
|
+
// 颜色选择器设置(https://element-plus.gitee.io/zh-CN/component/color-picker.html)
|
|
12
|
+
export interface ColorPickerConfig {
|
|
13
|
+
// 默认属性
|
|
14
|
+
'model-value'?: string
|
|
15
|
+
'disabled'?: boolean
|
|
16
|
+
'size'?: ElementSize
|
|
17
|
+
'show-alpha'?: boolean
|
|
18
|
+
'color-format'?: ColorFormat
|
|
19
|
+
'popper-class'?: string
|
|
20
|
+
'predefine'?: Array<string>
|
|
21
|
+
}
|
|
22
|
+
// 颜色选择器默认事件
|
|
23
|
+
export interface ColorPickerDefaultEvent {
|
|
24
|
+
onChange: (value: ColorPickerConfig['model-value']) => void
|
|
25
|
+
}
|
|
26
|
+
// 颜色选择器默认设置
|
|
27
|
+
export const colorPickerDefaultConfig: ColorPickerConfig = {
|
|
28
|
+
'disabled': false,
|
|
29
|
+
'show-alpha': false,
|
|
30
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ElementSize, ElementIcons } from '@/model/flmComponentConfig'
|
|
2
|
+
|
|
3
|
+
/** @datePicker 日期选择器 */
|
|
4
|
+
|
|
5
|
+
// 显示类型
|
|
6
|
+
export enum DateType {
|
|
7
|
+
'year' = 'year',
|
|
8
|
+
'month' = 'month',
|
|
9
|
+
'date' = 'date',
|
|
10
|
+
'dates' = 'dates',
|
|
11
|
+
'datetime' = 'datetime',
|
|
12
|
+
'week' = 'week',
|
|
13
|
+
'datetimerange' = 'datetimerange',
|
|
14
|
+
'daterange' = 'daterange',
|
|
15
|
+
'monthrange' = 'monthrange',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 日期选择器设置(https://element-plus.gitee.io/zh-CN/component/date-picker.html)
|
|
19
|
+
export interface DatePickerConfig {
|
|
20
|
+
// 默认属性
|
|
21
|
+
'model-value'?: Date | Array<Date>
|
|
22
|
+
'readonly'?: boolean
|
|
23
|
+
'disabled'?: boolean
|
|
24
|
+
'size'?: ElementSize
|
|
25
|
+
'editable'?: boolean
|
|
26
|
+
'clearable'?: boolean
|
|
27
|
+
'placeholder'?: string
|
|
28
|
+
'start-placeholder'?: string
|
|
29
|
+
'end-placeholder'?: string
|
|
30
|
+
'type'?: DateType
|
|
31
|
+
'format'?: string
|
|
32
|
+
'popper-class'?: string
|
|
33
|
+
'range-separator'?: string
|
|
34
|
+
'default-value'?: Date
|
|
35
|
+
'default-time'?: Array<Date>
|
|
36
|
+
'value-format'?: string
|
|
37
|
+
'id'?: string | Array<string>
|
|
38
|
+
'name'?: string
|
|
39
|
+
'unlink-panels'?: boolean
|
|
40
|
+
'prefix-icon'?: string
|
|
41
|
+
'clear-icon'?: ElementIcons
|
|
42
|
+
'validate-event'?: boolean
|
|
43
|
+
'disabled-date'?: Function
|
|
44
|
+
'shortcuts'?: Array<{ text: string, value: Date | Function }>
|
|
45
|
+
'cell-class-name'?: Function
|
|
46
|
+
'teleported'?: boolean
|
|
47
|
+
}
|
|
48
|
+
// 日期选择器默认事件
|
|
49
|
+
export interface DatePickerDefaultEvent {
|
|
50
|
+
'onUpdate:modelValue': (value: DatePickerConfig['model-value']) => void, // v-model 不用改不了值
|
|
51
|
+
// onChange: (value: DatePickerConfig['model-value']) => {},
|
|
52
|
+
'onBlur': (event: any) => void,
|
|
53
|
+
'onFocus': (event: any) => void,
|
|
54
|
+
'onCalendarChange': (event: Array<Date>) => void,
|
|
55
|
+
'onPanelChange': (date: any, mode: any, view: any) => void,
|
|
56
|
+
'onVisibleChange': (event: boolean) => void,
|
|
57
|
+
}
|
|
58
|
+
// 日期选择器默认设置
|
|
59
|
+
export const datePickerDefaultConfig: DatePickerConfig = {
|
|
60
|
+
'readonly': false,
|
|
61
|
+
'disabled': false,
|
|
62
|
+
'size': ElementSize['default'],
|
|
63
|
+
'editable': true,
|
|
64
|
+
'clearable': true,
|
|
65
|
+
'type': DateType['date'],
|
|
66
|
+
'format': 'YYYY-MM-DD',
|
|
67
|
+
'range-separator': '-',
|
|
68
|
+
'unlink-panels': false,
|
|
69
|
+
'prefix-icon': 'Date',
|
|
70
|
+
'clear-icon': ElementIcons['CircleClose'],
|
|
71
|
+
'validate-event': true,
|
|
72
|
+
'teleported': true,
|
|
73
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** @dialog 弹窗 */
|
|
2
|
+
// 弹窗设置(https://element-plus.gitee.io/zh-CN/component/dialog.html)
|
|
3
|
+
export interface DialogConfig {
|
|
4
|
+
// 默认属性
|
|
5
|
+
'model-value'?: boolean
|
|
6
|
+
'title'?: string
|
|
7
|
+
'width'?: string | number
|
|
8
|
+
'fullscreen'?: false
|
|
9
|
+
'top'?: string
|
|
10
|
+
'modal'?: boolean
|
|
11
|
+
'append-to-body'?: boolean
|
|
12
|
+
'lock-scroll'?: boolean
|
|
13
|
+
'custom-class'?: string
|
|
14
|
+
'open-delay'?: number
|
|
15
|
+
'close-delay'?: number
|
|
16
|
+
'close-on-click-modal'?: boolean
|
|
17
|
+
'close-on-press-escape'?: boolean
|
|
18
|
+
'show-close'?: boolean
|
|
19
|
+
'before-close'?: Function
|
|
20
|
+
'draggable'?: boolean
|
|
21
|
+
'center'?: boolean
|
|
22
|
+
'destroy-on-close'?: boolean
|
|
23
|
+
}
|
|
24
|
+
// 日期选择器默认事件
|
|
25
|
+
export interface DialogDefaultEvent {
|
|
26
|
+
'onOpen': () => void,
|
|
27
|
+
'onOpened': () => void,
|
|
28
|
+
'onClose': () => void,
|
|
29
|
+
'onClosed': () => void,
|
|
30
|
+
'onOpenAutoFocus': () => void,
|
|
31
|
+
'onCloseAutoFocus': () => void,
|
|
32
|
+
}
|
|
33
|
+
// 弹窗默认设置
|
|
34
|
+
export const dialogDefaultConfig: DialogConfig = {
|
|
35
|
+
'width': '50%',
|
|
36
|
+
'fullscreen': false,
|
|
37
|
+
'top': '15vh',
|
|
38
|
+
'modal': true,
|
|
39
|
+
'append-to-body': false,
|
|
40
|
+
'lock-scroll': true,
|
|
41
|
+
'open-delay': 0,
|
|
42
|
+
'close-delay': 0,
|
|
43
|
+
'close-on-click-modal': true,
|
|
44
|
+
'close-on-press-escape': true,
|
|
45
|
+
'show-close': true,
|
|
46
|
+
'draggable': false,
|
|
47
|
+
'center': false,
|
|
48
|
+
'destroy-on-close': false,
|
|
49
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ElementSize } from '@/model/flmComponentConfig'
|
|
2
|
+
|
|
3
|
+
/** @input 输入框 */
|
|
4
|
+
// 输入框设置(https://element-plus.gitee.io/zh-CN/component/input.html)
|
|
5
|
+
export interface InputConfig {
|
|
6
|
+
// 默认属性
|
|
7
|
+
'type'?: 'text' | 'textarea'
|
|
8
|
+
'modelValue'?: string | number
|
|
9
|
+
'maxlength'?: string | number
|
|
10
|
+
'minlength'?: string | number
|
|
11
|
+
'show-word-limit'?: boolean
|
|
12
|
+
'placeholder'?: string
|
|
13
|
+
'clearable'?: boolean
|
|
14
|
+
'show-password'?: boolean
|
|
15
|
+
'disabled'?: boolean
|
|
16
|
+
'size'?: ElementSize
|
|
17
|
+
'prefix-icon'?: string
|
|
18
|
+
'suffix-icon'?: string
|
|
19
|
+
'rows'?: number
|
|
20
|
+
'autosize'?: boolean | { minRows: number, maxRows: number }
|
|
21
|
+
'autocomplete'?: string
|
|
22
|
+
'name'?: string
|
|
23
|
+
'readonly'?: boolean
|
|
24
|
+
'max'?: any
|
|
25
|
+
'min'?: any
|
|
26
|
+
'step'?: any
|
|
27
|
+
'resize'?: 'none' | 'both' | 'horizontal' | 'vertical'
|
|
28
|
+
'autofocus'?: boolean
|
|
29
|
+
'form'?: string
|
|
30
|
+
'label'?: string
|
|
31
|
+
'tabindex'?: string | number
|
|
32
|
+
'validate-event'?: boolean
|
|
33
|
+
'input-style'?: object
|
|
34
|
+
}
|
|
35
|
+
// 输入框默认事件
|
|
36
|
+
export interface InputDefaultEvent {
|
|
37
|
+
'onBlur': () => void,
|
|
38
|
+
'onFocus': () => void,
|
|
39
|
+
'onChange': (value: InputConfig['modelValue']) => void,
|
|
40
|
+
'onInput': (value: InputConfig['modelValue']) => void,
|
|
41
|
+
'onClear': () => void,
|
|
42
|
+
}
|
|
43
|
+
// 输入框默认设置
|
|
44
|
+
export const inputDefaultConfig: InputConfig = {
|
|
45
|
+
'type': 'text',
|
|
46
|
+
'show-word-limit': false,
|
|
47
|
+
'clearable': false,
|
|
48
|
+
'show-password': false,
|
|
49
|
+
'disabled': false,
|
|
50
|
+
'rows': 2,
|
|
51
|
+
'autosize': false,
|
|
52
|
+
'autocomplete': 'off',
|
|
53
|
+
'readonly': false,
|
|
54
|
+
'autofocus': false,
|
|
55
|
+
'validate-event': true,
|
|
56
|
+
'input-style': {},
|
|
57
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ElementSize } from '@/model/flmComponentConfig'
|
|
2
|
+
|
|
3
|
+
/** @inputNumber 数字输入框 */
|
|
4
|
+
// 数字输入框设置(https://element-plus.gitee.io/zh-CN/component/input-number.html)
|
|
5
|
+
export interface InputNumberConfig {
|
|
6
|
+
// 默认属性
|
|
7
|
+
'model-value'?: number | undefined
|
|
8
|
+
'min'?: number
|
|
9
|
+
'max'?: number
|
|
10
|
+
'step'?: number
|
|
11
|
+
'step-strictly'?: boolean
|
|
12
|
+
'precision'?: number
|
|
13
|
+
'size'?: ElementSize
|
|
14
|
+
'disabled'?: boolean
|
|
15
|
+
'controls'?: boolean
|
|
16
|
+
'controls-position'?: string
|
|
17
|
+
'name'?: string
|
|
18
|
+
'label'?: string
|
|
19
|
+
'placeholder'?: string
|
|
20
|
+
'value-on-clear'?: string | number | null
|
|
21
|
+
}
|
|
22
|
+
// 数字输入框默认事件
|
|
23
|
+
export interface InputNumberDefaultEvent {
|
|
24
|
+
onChange: (value: InputNumberConfig['model-value']) => void
|
|
25
|
+
onBlur: () => void
|
|
26
|
+
onFocus: () => void
|
|
27
|
+
}
|
|
28
|
+
// 数字输入框默认设置
|
|
29
|
+
export const inputNumberDefaultConfig: InputNumberConfig = {
|
|
30
|
+
'min': -Infinity,
|
|
31
|
+
'max': Infinity,
|
|
32
|
+
'step': 1,
|
|
33
|
+
'step-strictly': false,
|
|
34
|
+
'size': ElementSize['default'],
|
|
35
|
+
'disabled': false,
|
|
36
|
+
'controls': true
|
|
37
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** @pagination 分页 */
|
|
2
|
+
// 分页设置(https://element-plus.gitee.io/zh-CN/component/pagination.html)
|
|
3
|
+
export interface PaginationConfig {
|
|
4
|
+
'small'?: boolean
|
|
5
|
+
'background'?: boolean
|
|
6
|
+
'page-size'?: number
|
|
7
|
+
'default-page-size'?: number
|
|
8
|
+
'total'?: number
|
|
9
|
+
'page-count'?: number
|
|
10
|
+
'pager-count'?: number
|
|
11
|
+
'current-page'?: number
|
|
12
|
+
'default-current-page'?: number
|
|
13
|
+
'layout'?: string
|
|
14
|
+
'page-sizes'?: Array<number>
|
|
15
|
+
'popper-class'?: string
|
|
16
|
+
'prev-text'?: string
|
|
17
|
+
'next-text'?: string
|
|
18
|
+
'disabled'?: boolean
|
|
19
|
+
'hide-on-single-page'?: boolean
|
|
20
|
+
}
|
|
21
|
+
// 分页默认事件
|
|
22
|
+
export interface PaginationDefaultEvent {
|
|
23
|
+
'onSizeChange': (pageSize: number) => void,
|
|
24
|
+
'onCurrentChange': (current: number) => void,
|
|
25
|
+
'onPrevClick': (current: number) => void,
|
|
26
|
+
'onNextClick': (current: number) => void
|
|
27
|
+
}
|
|
28
|
+
// 分页默认设置
|
|
29
|
+
export const paginationDefaultConfig: PaginationConfig = {
|
|
30
|
+
'small': false,
|
|
31
|
+
'background': false,
|
|
32
|
+
'page-size': 10,
|
|
33
|
+
'pager-count': 7,
|
|
34
|
+
'current-page': 1,
|
|
35
|
+
'layout': 'prev, pager, next, jumper, ->, total',
|
|
36
|
+
'page-sizes': [10, 20, 30, 40, 50, 100],
|
|
37
|
+
'disabled': false,
|
|
38
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ElementSize } from '@/model/flmComponentConfig'
|
|
2
|
+
|
|
3
|
+
/** @radio 单选框 */
|
|
4
|
+
// 单选框设置(https://element-plus.gitee.io/zh-CN/component/radio.html)
|
|
5
|
+
export interface RadioConfig {
|
|
6
|
+
// 默认属性
|
|
7
|
+
'model-value'?: string | number | boolean
|
|
8
|
+
'label'?: string | number | boolean
|
|
9
|
+
'disabled'?: boolean
|
|
10
|
+
'border'?: boolean
|
|
11
|
+
'size'?: ElementSize
|
|
12
|
+
'name'?: string
|
|
13
|
+
}
|
|
14
|
+
// 单选框组
|
|
15
|
+
export interface RadioGroupConfig {
|
|
16
|
+
// 默认属性
|
|
17
|
+
'model-value'?: string | number | boolean
|
|
18
|
+
'size'?: ElementSize
|
|
19
|
+
'disabled'?: boolean
|
|
20
|
+
'text-color'?: string
|
|
21
|
+
'fill'?: string
|
|
22
|
+
// 自定义属性
|
|
23
|
+
'useButton'?: boolean
|
|
24
|
+
'radios'?: Array<RadioConfig>
|
|
25
|
+
}
|
|
26
|
+
// 单选框默认事件
|
|
27
|
+
export interface RadioGroupDefaultEvent {
|
|
28
|
+
onChange: (value: RadioConfig['model-value']) => void
|
|
29
|
+
}
|
|
30
|
+
// 单选框默认设置
|
|
31
|
+
export const radioDefaultConfig: RadioConfig = {
|
|
32
|
+
'disabled': false,
|
|
33
|
+
'border': false
|
|
34
|
+
}
|
|
35
|
+
// 单选框组默认设置
|
|
36
|
+
export const radioGroupDefaultConfig: RadioGroupConfig = {
|
|
37
|
+
// 默认属性
|
|
38
|
+
'size': ElementSize['default'],
|
|
39
|
+
'disabled': false,
|
|
40
|
+
'text-color': '#FFF',
|
|
41
|
+
'fill': '#409EFF',
|
|
42
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ElementSize, ElementIcons } from '@/model/flmComponentConfig'
|
|
2
|
+
|
|
3
|
+
/** @rate 评分 */
|
|
4
|
+
// 评分设置(https://element-plus.gitee.io/zh-CN/component/rate.html)
|
|
5
|
+
export interface RateConfig {
|
|
6
|
+
// 默认属性
|
|
7
|
+
'model-value'?: number
|
|
8
|
+
'max'?: number
|
|
9
|
+
'size'?: ElementSize
|
|
10
|
+
'disabled'?: boolean
|
|
11
|
+
'allow-half'?: boolean
|
|
12
|
+
'low-threshold'?: number
|
|
13
|
+
'high-threshold'?: number
|
|
14
|
+
'colors'?: Array<string> | object
|
|
15
|
+
'void-color'?: string
|
|
16
|
+
'disabled-void-color'?: string
|
|
17
|
+
'icons'?: Array<ElementIcons> | object
|
|
18
|
+
'void-icon'?: ElementIcons
|
|
19
|
+
'disabled-void-icon'?: ElementIcons
|
|
20
|
+
'show-text'?: boolean
|
|
21
|
+
'show-score'?: boolean
|
|
22
|
+
'text-color'?: string
|
|
23
|
+
'texts'?: Array<string>
|
|
24
|
+
'score-template'?: string
|
|
25
|
+
}
|
|
26
|
+
// 评分默认事件
|
|
27
|
+
export interface RateDefaultEvent {
|
|
28
|
+
onChange: (value: RateConfig['model-value']) => void
|
|
29
|
+
}
|
|
30
|
+
// 评分默认设置
|
|
31
|
+
export const rateDefaultConfig: RateConfig = {
|
|
32
|
+
'model-value': 0,
|
|
33
|
+
'max': 5,
|
|
34
|
+
'size': ElementSize['default'],
|
|
35
|
+
'disabled': false,
|
|
36
|
+
'allow-half': false,
|
|
37
|
+
'low-threshold': 2,
|
|
38
|
+
'high-threshold': 4,
|
|
39
|
+
'colors': ['#F7BA2A', '#F7BA2A', '#F7BA2A'],
|
|
40
|
+
'void-color': '#C6D1DE',
|
|
41
|
+
'disabled-void-color': '#EFF2F7',
|
|
42
|
+
'icons': [ElementIcons['StarFilled'], ElementIcons['StarFilled'], ElementIcons['StarFilled']],
|
|
43
|
+
'void-icon': ElementIcons['Star'],
|
|
44
|
+
'disabled-void-icon': ElementIcons['StarFilled'],
|
|
45
|
+
'show-text': false,
|
|
46
|
+
'show-score': false,
|
|
47
|
+
'text-color': '#1F2D3D',
|
|
48
|
+
'texts': ['Extremely bad', 'Disappointed', 'Fair', 'Satisfied', 'Surprise'],
|
|
49
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ElementSize } from '@/model/flmComponentConfig'
|
|
2
|
+
|
|
3
|
+
/** @select 选择器 */
|
|
4
|
+
|
|
5
|
+
// 标签类型
|
|
6
|
+
export enum SelectTagType {
|
|
7
|
+
'success' = 'success',
|
|
8
|
+
'info' = 'info',
|
|
9
|
+
'warning' = 'warning',
|
|
10
|
+
'danger' = 'danger',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// 选择器设置(https://element-plus.gitee.io/zh-CN/component/select.html)
|
|
14
|
+
export interface SelectConfig {
|
|
15
|
+
// 默认属性
|
|
16
|
+
'model-value'?: string | number | boolean | object
|
|
17
|
+
'multiple'?: boolean
|
|
18
|
+
'disabled'?: boolean
|
|
19
|
+
'value-key'?: string
|
|
20
|
+
'size'?: ElementSize
|
|
21
|
+
'clearable'?: boolean
|
|
22
|
+
'collapse-tags'?: boolean
|
|
23
|
+
'collapse-tags-tooltip'?: boolean
|
|
24
|
+
'multiple-limit'?: number
|
|
25
|
+
'name'?: string
|
|
26
|
+
'effect'?: 'dark' | 'light'
|
|
27
|
+
'autocomplete'?: string
|
|
28
|
+
'placeholder'?: string
|
|
29
|
+
'filterable'?: boolean
|
|
30
|
+
'allow-create'?: boolean
|
|
31
|
+
'filter-method'?: Function
|
|
32
|
+
'remote'?: boolean
|
|
33
|
+
'remote-method'?: Function
|
|
34
|
+
'loading'?: boolean
|
|
35
|
+
'loading-text'?: string
|
|
36
|
+
'no-match-text'?: string
|
|
37
|
+
'no-data-text'?: string
|
|
38
|
+
'popper-class'?: string
|
|
39
|
+
'reserve-keyword'?: boolean
|
|
40
|
+
'default-first-option'?: boolean
|
|
41
|
+
'popper-append-to-body'?: boolean
|
|
42
|
+
'teleported'?: boolean
|
|
43
|
+
'persistent'?: boolean
|
|
44
|
+
'automatic-dropdown'?: boolean
|
|
45
|
+
'clear-icon'?: string
|
|
46
|
+
'fit-input-width'?: boolean
|
|
47
|
+
'suffix-icon'?: string
|
|
48
|
+
'tag-type'?: SelectTagType
|
|
49
|
+
// 自定义属性
|
|
50
|
+
'hasGroup'?: boolean // 是否有分组,分组使用分组选项,没有分组使用普通选项
|
|
51
|
+
'groups'?: Array<OptionGroupConfig> // 分组选项
|
|
52
|
+
'options'?: Array<OptionConfig> // 选项
|
|
53
|
+
}
|
|
54
|
+
export interface SelectDefaultEvent {
|
|
55
|
+
onChange: (value: SelectConfig['model-value']) => void,
|
|
56
|
+
onVisibleChange: (showOption: boolean) => void,
|
|
57
|
+
onRemoveTag: (tagValue: SelectConfig['model-value']) => void,
|
|
58
|
+
onClear: () => void,
|
|
59
|
+
onBlur: () => void,
|
|
60
|
+
onFocus: () => void,
|
|
61
|
+
}
|
|
62
|
+
// 选择器分组选项设置
|
|
63
|
+
export interface OptionGroupConfig {
|
|
64
|
+
'label'?: string
|
|
65
|
+
'disabled'?: boolean
|
|
66
|
+
'options'?: Array<OptionConfig>
|
|
67
|
+
}
|
|
68
|
+
// 选择器选项设置
|
|
69
|
+
export interface OptionConfig {
|
|
70
|
+
'value'?: string | number | boolean | object
|
|
71
|
+
'label'?: string | number
|
|
72
|
+
'disabled'?: boolean
|
|
73
|
+
}
|
|
74
|
+
// 选择器默认设置
|
|
75
|
+
export const selectDefaultConfig: SelectConfig = {
|
|
76
|
+
'multiple': false,
|
|
77
|
+
'disabled': false,
|
|
78
|
+
'value-key': 'value',
|
|
79
|
+
'size': ElementSize['default'],
|
|
80
|
+
'clearable': false,
|
|
81
|
+
'collapse-tags': false,
|
|
82
|
+
'collapse-tags-tooltip': false,
|
|
83
|
+
'multiple-limit': 0,
|
|
84
|
+
'effect': 'light',
|
|
85
|
+
'autocomplete': 'off',
|
|
86
|
+
'placeholder': '请选择',
|
|
87
|
+
'filterable': false,
|
|
88
|
+
'allow-create': false,
|
|
89
|
+
'remote': false,
|
|
90
|
+
'loading': false,
|
|
91
|
+
'loading-text': '加载中',
|
|
92
|
+
'no-match-text': '没有匹配的数据',
|
|
93
|
+
'no-data-text': '无数据',
|
|
94
|
+
'reserve-keyword': true,
|
|
95
|
+
'default-first-option': false,
|
|
96
|
+
'popper-append-to-body': true,
|
|
97
|
+
'teleported': true,
|
|
98
|
+
'persistent': true,
|
|
99
|
+
'automatic-dropdown': false,
|
|
100
|
+
'clear-icon': 'CircleClose',
|
|
101
|
+
'fit-input-width': false,
|
|
102
|
+
'suffix-icon': 'ArrowUp',
|
|
103
|
+
'tag-type': SelectTagType['info'],
|
|
104
|
+
}
|