@qynpm/ui 1.0.23 → 1.0.25
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/README.md +194 -20
- package/dist/index.cjs +16 -6
- package/dist/index.mjs +51 -34
- package/dist/qy-action-bar/index.cjs +1 -1
- package/dist/qy-action-bar/index.mjs +1 -1
- package/dist/qy-button/index.cjs +1 -1
- package/dist/qy-button/index.mjs +1 -1
- package/dist/qy-checkbox/index.cjs +1 -1
- package/dist/qy-checkbox/index.mjs +4 -3
- package/dist/qy-checkbox-group/index.cjs +1 -0
- package/dist/qy-checkbox-group/index.mjs +7 -0
- package/dist/qy-date-picker/index.cjs +1 -1
- package/dist/qy-date-picker/index.mjs +4 -3
- package/dist/qy-dialog/index.cjs +1 -1
- package/dist/qy-dialog/index.mjs +2 -2
- package/dist/qy-dropdown/index.cjs +1 -1
- package/dist/qy-dropdown/index.mjs +1 -1
- package/dist/qy-file-picker/index.cjs +1 -0
- package/dist/qy-file-picker/index.mjs +7 -0
- package/dist/qy-form-section/index.cjs +1 -1
- package/dist/qy-form-section/index.mjs +1 -1
- package/dist/qy-image/index.cjs +1 -1
- package/dist/qy-image/index.mjs +1 -1
- package/dist/qy-image-upload/index.cjs +1 -1
- package/dist/qy-image-upload/index.mjs +1 -1
- package/dist/qy-input/index.cjs +2 -2
- package/dist/qy-input/index.mjs +6 -3
- package/dist/qy-input-number/index.cjs +1 -1
- package/dist/qy-input-number/index.mjs +5 -3
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +2 -2
- package/dist/qy-menu-actions/index.cjs +1 -1
- package/dist/qy-menu-actions/index.mjs +1 -1
- package/dist/qy-money-input/index.cjs +1 -1
- package/dist/qy-money-input/index.mjs +2 -2
- package/dist/qy-popover/index.cjs +2 -0
- package/dist/qy-popover/index.mjs +8 -0
- package/dist/qy-radio/index.cjs +1 -0
- package/dist/qy-radio/index.mjs +7 -0
- package/dist/qy-radio-group/index.cjs +1 -1
- package/dist/qy-radio-group/index.mjs +5 -2
- package/dist/qy-record-quote-search/index.cjs +1 -1
- package/dist/qy-record-quote-search/index.mjs +1 -1
- package/dist/qy-remark-image/index.cjs +1 -1
- package/dist/qy-remark-image/index.mjs +2 -2
- package/dist/qy-remote-select/index.cjs +1 -1
- package/dist/qy-remote-select/index.mjs +1 -1
- package/dist/qy-search-input/index.cjs +1 -1
- package/dist/qy-search-input/index.mjs +2 -2
- package/dist/qy-select/index.cjs +1 -1
- package/dist/qy-select/index.mjs +4 -3
- package/dist/qy-selection-dialog/index.cjs +1 -1
- package/dist/qy-selection-dialog/index.mjs +1 -1
- package/dist/qy-switch/index.cjs +1 -0
- package/dist/qy-switch/index.mjs +7 -0
- package/dist/qy-table-column-settings/index.cjs +1 -1
- package/dist/qy-table-column-settings/index.mjs +1 -1
- package/dist/qy-tag/index.cjs +1 -0
- package/dist/qy-tag/index.mjs +7 -0
- package/dist/qy-tooltip/index.cjs +2 -0
- package/dist/qy-tooltip/index.mjs +8 -0
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +1 -1
- package/dist/shared/index-528z_q7d.cjs +1 -0
- package/dist/shared/index-9v7CIwzO.cjs +1 -0
- package/dist/shared/{index-D7lMppIb.mjs → index-B7uyWUhS.mjs} +63 -63
- package/dist/shared/index-BTPk2zzq.cjs +1 -0
- package/dist/shared/index-BcCZMWAj.cjs +1 -0
- package/dist/shared/index-C1YwUATr.cjs +1 -0
- package/dist/shared/index-C6jcSQSF.mjs +129 -0
- package/dist/shared/index-CbCpXtYr.mjs +68 -0
- package/dist/shared/index-Cl5cuyVG.mjs +54 -0
- package/dist/shared/index-CuusBxhR.cjs +1 -0
- package/dist/shared/{index-BXlQSIWX.mjs → index-DZroPZ8B.mjs} +8 -8
- package/dist/shared/{index-DyK6vf5h.cjs → index-DmhpD4Cp.cjs} +1 -1
- package/dist/shared/index-DrJuMzr1.mjs +90 -0
- package/dist/shared/index-Du2IqeCI.mjs +149 -0
- package/dist/shared/{index-ZLoAI88M.mjs → index-DvQdcj7u.mjs} +1327 -1389
- package/dist/shared/index-EGnVOaC9.cjs +1 -0
- package/dist/shared/index-QQkDJv3q.cjs +1 -0
- package/dist/shared/index-R5B1rjXo.mjs +225 -0
- package/dist/shared/index-yf2Ijz_G.mjs +72 -0
- package/dist/shared/index-zJN0M-bx.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-C3F8M9sD.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CKZHI_y-.mjs +106 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CsKjCWIN.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-N12Nn2uu.mjs +61 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BZQLyvw8.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BtbAft4t.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CJhIFeBC.mjs +166 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DSur831A.mjs +68 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DVqGYfD9.mjs +132 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Dm1r1WBK.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Q2gFF0PP.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-aqtfjdVm.mjs +140 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-ztD-It-2.mjs +121 -0
- package/index.d.ts +145 -7
- package/package.json +43 -1
- package/qy-autocomplete/index.d.ts +5 -5
- package/qy-checkbox/index.d.ts +45 -5
- package/qy-checkbox-group/index.d.ts +48 -0
- package/qy-date-picker/index.d.ts +137 -2
- package/qy-file-picker/index.d.ts +49 -0
- package/qy-image/index.d.ts +28 -28
- package/qy-image-preview/index.d.ts +20 -20
- package/qy-input/index.d.ts +46 -1
- package/qy-input-number/index.d.ts +41 -1
- package/qy-menu-actions/index.d.ts +29 -29
- package/qy-popover/index.d.ts +63 -0
- package/qy-radio/index.d.ts +44 -0
- package/qy-radio-group/index.d.ts +57 -9
- package/qy-select/index.d.ts +64 -2
- package/qy-switch/index.d.ts +46 -0
- package/qy-table-column-settings/index.d.ts +18 -18
- package/qy-tag/index.d.ts +44 -0
- package/qy-tooltip/index.d.ts +54 -0
- package/qy-tree-select/index.d.ts +5 -5
- package/dist/shared/index-B3U7dqMt.cjs +0 -1
- package/dist/shared/index-BbpD7hM0.cjs +0 -1
- package/dist/shared/index-D3l7tLgw.cjs +0 -1
- package/dist/shared/index-NCpeoBUZ.mjs +0 -153
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BJakDlgd.mjs +0 -70
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CelW13DE.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DA1Nh7U1.mjs +0 -130
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DEpXmMj5.mjs +0 -162
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DNEVwqm7.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DfKTEci_.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-gTkP1LWg.mjs +0 -61
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-svvSFv2K.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-B_A4Nq6v.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DKFiK2fQ.mjs +0 -152
- /package/dist/shared/{index-CagHZ25z.mjs → index-BYLXkIxS.mjs} +0 -0
- /package/dist/shared/{index-CRZsiNVW.cjs → index-C1p86ezL.cjs} +0 -0
- /package/dist/shared/{index-BO5aWk3f.cjs → index-ClUqUsAv.cjs} +0 -0
- /package/dist/shared/{index-CSxCewXP.mjs → index-Cy_Glkc-.mjs} +0 -0
package/qy-input/index.d.ts
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
|
+
import type { InputAutoSize, InputProps, InputType } from 'element-plus'
|
|
1
2
|
import type { DefineComponent, Plugin } from 'vue'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
export type QyInputValue = string
|
|
5
|
+
export type QyInputModelValue = string | number | null | undefined
|
|
6
|
+
export type QyInputType = InputType
|
|
7
|
+
export type QyInputSize = 'small' | 'default' | 'large'
|
|
8
|
+
export type QyInputTrimMode = 'none' | 'blur' | 'change'
|
|
4
9
|
|
|
10
|
+
export interface QyInputProps
|
|
11
|
+
extends Omit<InputProps, 'modelValue' | 'type' | 'size' | 'autosize'> {
|
|
12
|
+
modelValue?: QyInputModelValue
|
|
13
|
+
type?: QyInputType
|
|
14
|
+
size?: QyInputSize
|
|
15
|
+
autosize?: InputAutoSize
|
|
16
|
+
removeSpace?: boolean
|
|
17
|
+
trimMode?: QyInputTrimMode
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type QyInputEmits = {
|
|
21
|
+
'update:modelValue': (value: QyInputValue) => void
|
|
22
|
+
input: (value: QyInputValue) => void
|
|
23
|
+
change: (value: QyInputValue) => void
|
|
24
|
+
focus: (event: FocusEvent) => void
|
|
25
|
+
blur: (event: FocusEvent) => void
|
|
26
|
+
clear: () => void
|
|
27
|
+
enter: (event: KeyboardEvent) => void
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface QyInputExposed {
|
|
31
|
+
focus(): void
|
|
32
|
+
blur(): void
|
|
33
|
+
select(): void
|
|
34
|
+
clear(): void
|
|
35
|
+
resizeTextarea(): void
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare const QyInput: DefineComponent<
|
|
39
|
+
QyInputProps,
|
|
40
|
+
QyInputExposed,
|
|
41
|
+
{},
|
|
42
|
+
{},
|
|
43
|
+
{},
|
|
44
|
+
{},
|
|
45
|
+
{},
|
|
46
|
+
QyInputEmits
|
|
47
|
+
> & Plugin
|
|
48
|
+
|
|
49
|
+
export { QyInput }
|
|
5
50
|
export default QyInput
|
|
@@ -1,5 +1,45 @@
|
|
|
1
|
+
import type { InputNumberProps } from 'element-plus'
|
|
1
2
|
import type { DefineComponent, Plugin } from 'vue'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
export type QyInputNumberValue = number | null | undefined
|
|
5
|
+
export type QyInputNumberClearValue = 'min' | 'max' | number | null
|
|
6
|
+
export type QyInputNumberControlsPosition = '' | 'right'
|
|
7
|
+
export type QyInputNumberSize = 'small' | 'default' | 'large'
|
|
4
8
|
|
|
9
|
+
export interface QyInputNumberProps
|
|
10
|
+
extends Omit<
|
|
11
|
+
InputNumberProps,
|
|
12
|
+
'modelValue' | 'valueOnClear' | 'controlsPosition' | 'size'
|
|
13
|
+
> {
|
|
14
|
+
modelValue?: QyInputNumberValue
|
|
15
|
+
valueOnClear?: QyInputNumberClearValue
|
|
16
|
+
controlsPosition?: QyInputNumberControlsPosition
|
|
17
|
+
size?: QyInputNumberSize
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type QyInputNumberEmits = {
|
|
21
|
+
'update:modelValue': (value: QyInputNumberValue) => void
|
|
22
|
+
input: (value: QyInputNumberValue) => void
|
|
23
|
+
change: (currentValue: QyInputNumberValue, oldValue: QyInputNumberValue) => void
|
|
24
|
+
focus: (event: FocusEvent) => void
|
|
25
|
+
blur: (event: FocusEvent) => void
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface QyInputNumberExposed {
|
|
29
|
+
focus(): void
|
|
30
|
+
blur(): void
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare const QyInputNumber: DefineComponent<
|
|
34
|
+
QyInputNumberProps,
|
|
35
|
+
QyInputNumberExposed,
|
|
36
|
+
{},
|
|
37
|
+
{},
|
|
38
|
+
{},
|
|
39
|
+
{},
|
|
40
|
+
{},
|
|
41
|
+
QyInputNumberEmits
|
|
42
|
+
> & Plugin
|
|
43
|
+
|
|
44
|
+
export { QyInputNumber }
|
|
5
45
|
export default QyInputNumber
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import type { DefineComponent, Plugin } from 'vue'
|
|
2
|
-
|
|
3
|
-
export type QyMenuActionType =
|
|
4
|
-
| 'default'
|
|
5
|
-
| 'primary'
|
|
6
|
-
| 'success'
|
|
7
|
-
| 'warning'
|
|
8
|
-
| 'danger'
|
|
9
|
-
|
|
10
|
-
export interface QyMenuActionContext<Row = Record<string, unknown>> {
|
|
11
|
-
row?: Row
|
|
12
|
-
rowIndex?: number
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface QyMenuAction<Row = Record<string, unknown>> {
|
|
16
|
-
key: string
|
|
17
|
-
label: string
|
|
18
|
-
type?: QyMenuActionType
|
|
19
|
-
disabled?: boolean | ((context: QyMenuActionContext<Row>) => boolean)
|
|
20
|
-
hidden?: boolean | ((context: QyMenuActionContext<Row>) => boolean)
|
|
21
|
-
loading?: boolean | ((context: QyMenuActionContext<Row>) => boolean)
|
|
22
|
-
confirm?: boolean | string
|
|
23
|
-
meta?: Record<string, unknown>
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare const QyMenuActions: DefineComponent<any, any, any> & Plugin
|
|
27
|
-
|
|
28
|
-
export { QyMenuActions }
|
|
29
|
-
export default QyMenuActions
|
|
1
|
+
import type { DefineComponent, Plugin } from 'vue'
|
|
2
|
+
|
|
3
|
+
export type QyMenuActionType =
|
|
4
|
+
| 'default'
|
|
5
|
+
| 'primary'
|
|
6
|
+
| 'success'
|
|
7
|
+
| 'warning'
|
|
8
|
+
| 'danger'
|
|
9
|
+
|
|
10
|
+
export interface QyMenuActionContext<Row = Record<string, unknown>> {
|
|
11
|
+
row?: Row
|
|
12
|
+
rowIndex?: number
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface QyMenuAction<Row = Record<string, unknown>> {
|
|
16
|
+
key: string
|
|
17
|
+
label: string
|
|
18
|
+
type?: QyMenuActionType
|
|
19
|
+
disabled?: boolean | ((context: QyMenuActionContext<Row>) => boolean)
|
|
20
|
+
hidden?: boolean | ((context: QyMenuActionContext<Row>) => boolean)
|
|
21
|
+
loading?: boolean | ((context: QyMenuActionContext<Row>) => boolean)
|
|
22
|
+
confirm?: boolean | string
|
|
23
|
+
meta?: Record<string, unknown>
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare const QyMenuActions: DefineComponent<any, any, any> & Plugin
|
|
27
|
+
|
|
28
|
+
export { QyMenuActions }
|
|
29
|
+
export default QyMenuActions
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ComponentOptionsMixin,
|
|
3
|
+
DefineComponent,
|
|
4
|
+
Plugin
|
|
5
|
+
} from 'vue'
|
|
6
|
+
|
|
7
|
+
export type QyPopoverTrigger = 'click' | 'hover' | 'focus' | 'contextmenu'
|
|
8
|
+
export type QyPopoverPlacement =
|
|
9
|
+
| 'top'
|
|
10
|
+
| 'top-start'
|
|
11
|
+
| 'top-end'
|
|
12
|
+
| 'bottom'
|
|
13
|
+
| 'bottom-start'
|
|
14
|
+
| 'bottom-end'
|
|
15
|
+
| 'left'
|
|
16
|
+
| 'left-start'
|
|
17
|
+
| 'left-end'
|
|
18
|
+
| 'right'
|
|
19
|
+
| 'right-start'
|
|
20
|
+
| 'right-end'
|
|
21
|
+
| 'auto'
|
|
22
|
+
| 'auto-start'
|
|
23
|
+
| 'auto-end'
|
|
24
|
+
export type QyPopoverEffect = 'light' | 'dark'
|
|
25
|
+
|
|
26
|
+
export interface QyPopoverProps {
|
|
27
|
+
trigger?: QyPopoverTrigger
|
|
28
|
+
placement?: QyPopoverPlacement
|
|
29
|
+
effect?: QyPopoverEffect
|
|
30
|
+
width?: number | string
|
|
31
|
+
offset?: number
|
|
32
|
+
showDelay?: number
|
|
33
|
+
hideDelay?: number
|
|
34
|
+
showArrow?: boolean
|
|
35
|
+
disabled?: boolean
|
|
36
|
+
open?: boolean
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type QyPopoverEmits = {
|
|
40
|
+
'update:open': (value: boolean) => void
|
|
41
|
+
'open-change': (value: boolean) => void
|
|
42
|
+
open: () => void
|
|
43
|
+
close: () => void
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface QyPopoverExposed {
|
|
47
|
+
close: () => void
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare const QyPopover: DefineComponent<
|
|
51
|
+
QyPopoverProps,
|
|
52
|
+
QyPopoverExposed,
|
|
53
|
+
{},
|
|
54
|
+
{},
|
|
55
|
+
{},
|
|
56
|
+
ComponentOptionsMixin,
|
|
57
|
+
ComponentOptionsMixin,
|
|
58
|
+
QyPopoverEmits
|
|
59
|
+
> &
|
|
60
|
+
Plugin
|
|
61
|
+
|
|
62
|
+
export { QyPopover }
|
|
63
|
+
export default QyPopover
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ComponentOptionsMixin,
|
|
3
|
+
DefineComponent,
|
|
4
|
+
Plugin
|
|
5
|
+
} from 'vue'
|
|
6
|
+
|
|
7
|
+
export type QyRadioValue = boolean | string | number
|
|
8
|
+
export type QyRadioSize = 'small' | 'default' | 'large'
|
|
9
|
+
|
|
10
|
+
export interface QyRadioProps {
|
|
11
|
+
modelValue?: QyRadioValue
|
|
12
|
+
value?: QyRadioValue
|
|
13
|
+
label?: string
|
|
14
|
+
disabled?: boolean
|
|
15
|
+
size?: QyRadioSize
|
|
16
|
+
name?: string
|
|
17
|
+
border?: boolean
|
|
18
|
+
id?: string
|
|
19
|
+
tabindex?: string | number
|
|
20
|
+
ariaLabel?: string
|
|
21
|
+
ariaControls?: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type QyRadioEmits = {
|
|
25
|
+
'update:modelValue': (value: QyRadioValue) => void
|
|
26
|
+
change: (value: QyRadioValue) => void
|
|
27
|
+
focus: (event: FocusEvent) => void
|
|
28
|
+
blur: (event: FocusEvent) => void
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare const QyRadio: DefineComponent<
|
|
32
|
+
QyRadioProps,
|
|
33
|
+
{},
|
|
34
|
+
{},
|
|
35
|
+
{},
|
|
36
|
+
{},
|
|
37
|
+
ComponentOptionsMixin,
|
|
38
|
+
ComponentOptionsMixin,
|
|
39
|
+
QyRadioEmits
|
|
40
|
+
> &
|
|
41
|
+
Plugin
|
|
42
|
+
|
|
43
|
+
export { QyRadio }
|
|
44
|
+
export default QyRadio
|
|
@@ -1,12 +1,60 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
ComponentOptionsMixin,
|
|
3
|
+
DefineComponent,
|
|
4
|
+
Plugin
|
|
5
|
+
} from 'vue'
|
|
6
|
+
import type {
|
|
7
|
+
QyRadioSize,
|
|
8
|
+
QyRadioValue
|
|
9
|
+
} from '../qy-radio'
|
|
2
10
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* 这里同时声明 DefineComponent 和 Plugin:
|
|
7
|
-
* - DefineComponent 用于模板、TSX 或局部 components 注册时获得组件类型。
|
|
8
|
-
* - Plugin 用于 app.use(QyRadioGroup) 时通过 Vue 插件类型校验。
|
|
9
|
-
*/
|
|
10
|
-
declare const QyRadioGroup: DefineComponent<any, any, any> & Plugin
|
|
11
|
+
export type QyRadioGroupSize = QyRadioSize
|
|
12
|
+
export type QyRadioGroupType = 'radio' | 'button'
|
|
11
13
|
|
|
14
|
+
export interface QyRadioGroupOption {
|
|
15
|
+
[key: string]: unknown
|
|
16
|
+
label?: string
|
|
17
|
+
value?: QyRadioValue
|
|
18
|
+
disabled?: boolean
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface QyRadioGroupProps {
|
|
22
|
+
modelValue?: QyRadioValue | null
|
|
23
|
+
options?: QyRadioGroupOption[]
|
|
24
|
+
labelKey?: string
|
|
25
|
+
valueKey?: string
|
|
26
|
+
disabledKey?: string
|
|
27
|
+
disabled?: boolean
|
|
28
|
+
size?: QyRadioGroupSize
|
|
29
|
+
name?: string
|
|
30
|
+
type?: QyRadioGroupType
|
|
31
|
+
border?: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type QyRadioGroupEmits = {
|
|
35
|
+
'update:modelValue': (value: QyRadioValue) => void
|
|
36
|
+
change: (value: QyRadioValue) => void
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface QyRadioGroupExposed {
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated 仅为已发布兼容保留,不新增实例能力。
|
|
42
|
+
*/
|
|
43
|
+
getRadioGroupInstance(): unknown
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare const QyRadioGroup: DefineComponent<
|
|
47
|
+
QyRadioGroupProps,
|
|
48
|
+
QyRadioGroupExposed,
|
|
49
|
+
{},
|
|
50
|
+
{},
|
|
51
|
+
{},
|
|
52
|
+
ComponentOptionsMixin,
|
|
53
|
+
ComponentOptionsMixin,
|
|
54
|
+
QyRadioGroupEmits
|
|
55
|
+
> &
|
|
56
|
+
Plugin
|
|
57
|
+
|
|
58
|
+
export { QyRadioGroup }
|
|
59
|
+
export type { QyRadioSize, QyRadioValue }
|
|
12
60
|
export default QyRadioGroup
|
package/qy-select/index.d.ts
CHANGED
|
@@ -1,5 +1,67 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
ComponentOptionsMixin,
|
|
3
|
+
DefineComponent,
|
|
4
|
+
Plugin
|
|
5
|
+
} from 'vue'
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
export type QySelectPrimitive = string | number | boolean
|
|
4
8
|
|
|
9
|
+
export type QySelectObjectValue = object
|
|
10
|
+
|
|
11
|
+
export type QySelectValue = QySelectPrimitive | QySelectObjectValue
|
|
12
|
+
export type QySelectModelValue = QySelectValue | QySelectValue[] | null | undefined
|
|
13
|
+
export type QySelectSize = 'small' | 'default' | 'large'
|
|
14
|
+
|
|
15
|
+
export type QySelectOption = object
|
|
16
|
+
|
|
17
|
+
export interface QySelectProps {
|
|
18
|
+
modelValue?: QySelectModelValue
|
|
19
|
+
options?: QySelectOption[]
|
|
20
|
+
labelKey?: string
|
|
21
|
+
valueKey?: string
|
|
22
|
+
disabledKey?: string
|
|
23
|
+
objectIdentityKey?: string
|
|
24
|
+
placeholder?: string
|
|
25
|
+
disabled?: boolean
|
|
26
|
+
clearable?: boolean
|
|
27
|
+
filterable?: boolean
|
|
28
|
+
loading?: boolean
|
|
29
|
+
multiple?: boolean
|
|
30
|
+
collapseTags?: boolean
|
|
31
|
+
collapseTagsTooltip?: boolean
|
|
32
|
+
autoSelectSingle?: boolean
|
|
33
|
+
size?: QySelectSize
|
|
34
|
+
teleported?: boolean
|
|
35
|
+
appendTo?: string | HTMLElement
|
|
36
|
+
fitInputWidth?: boolean
|
|
37
|
+
popperClass?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type QySelectEmits = {
|
|
41
|
+
'update:modelValue': (value: QySelectModelValue) => void
|
|
42
|
+
change: (value: QySelectModelValue) => void
|
|
43
|
+
clear: () => void
|
|
44
|
+
'visible-change': (visible: boolean) => void
|
|
45
|
+
focus: (event: FocusEvent) => void
|
|
46
|
+
blur: (event: FocusEvent) => void
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface QySelectExposed {
|
|
50
|
+
focus(): void
|
|
51
|
+
blur(): void
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare const QySelect: DefineComponent<
|
|
55
|
+
QySelectProps,
|
|
56
|
+
QySelectExposed,
|
|
57
|
+
{},
|
|
58
|
+
{},
|
|
59
|
+
{},
|
|
60
|
+
ComponentOptionsMixin,
|
|
61
|
+
ComponentOptionsMixin,
|
|
62
|
+
QySelectEmits
|
|
63
|
+
> &
|
|
64
|
+
Plugin
|
|
65
|
+
|
|
66
|
+
export { QySelect }
|
|
5
67
|
export default QySelect
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ComponentOptionsMixin,
|
|
3
|
+
DefineComponent,
|
|
4
|
+
Plugin
|
|
5
|
+
} from 'vue'
|
|
6
|
+
|
|
7
|
+
export type QySwitchValue = boolean | string | number
|
|
8
|
+
export type QySwitchSize = 'small' | 'default' | 'large'
|
|
9
|
+
|
|
10
|
+
export interface QySwitchProps {
|
|
11
|
+
modelValue?: QySwitchValue
|
|
12
|
+
activeValue?: QySwitchValue
|
|
13
|
+
inactiveValue?: QySwitchValue
|
|
14
|
+
disabled?: boolean
|
|
15
|
+
loading?: boolean
|
|
16
|
+
size?: QySwitchSize
|
|
17
|
+
activeText?: string
|
|
18
|
+
inactiveText?: string
|
|
19
|
+
inlinePrompt?: boolean
|
|
20
|
+
name?: string
|
|
21
|
+
id?: string
|
|
22
|
+
tabindex?: string | number
|
|
23
|
+
ariaLabel?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type QySwitchEmits = {
|
|
27
|
+
'update:modelValue': (value: QySwitchValue) => void
|
|
28
|
+
change: (value: QySwitchValue) => void
|
|
29
|
+
focus: (event: FocusEvent) => void
|
|
30
|
+
blur: (event: FocusEvent) => void
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare const QySwitch: DefineComponent<
|
|
34
|
+
QySwitchProps,
|
|
35
|
+
{},
|
|
36
|
+
{},
|
|
37
|
+
{},
|
|
38
|
+
{},
|
|
39
|
+
ComponentOptionsMixin,
|
|
40
|
+
ComponentOptionsMixin,
|
|
41
|
+
QySwitchEmits
|
|
42
|
+
> &
|
|
43
|
+
Plugin
|
|
44
|
+
|
|
45
|
+
export { QySwitch }
|
|
46
|
+
export default QySwitch
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { DefineComponent, Plugin } from 'vue'
|
|
2
|
-
|
|
3
|
-
export type QyColumnFixed = 'left' | 'right' | false
|
|
4
|
-
|
|
5
|
-
export interface QyTableColumnSetting {
|
|
6
|
-
key: string
|
|
7
|
-
type?: string
|
|
8
|
-
label?: string
|
|
9
|
-
prop?: string
|
|
10
|
-
visible: boolean
|
|
11
|
-
width?: string | number
|
|
12
|
-
fixed: QyColumnFixed
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
declare const QyTableColumnSettings: DefineComponent<any, any, any> & Plugin
|
|
16
|
-
|
|
17
|
-
export { QyTableColumnSettings }
|
|
18
|
-
export default QyTableColumnSettings
|
|
1
|
+
import type { DefineComponent, Plugin } from 'vue'
|
|
2
|
+
|
|
3
|
+
export type QyColumnFixed = 'left' | 'right' | false
|
|
4
|
+
|
|
5
|
+
export interface QyTableColumnSetting {
|
|
6
|
+
key: string
|
|
7
|
+
type?: string
|
|
8
|
+
label?: string
|
|
9
|
+
prop?: string
|
|
10
|
+
visible: boolean
|
|
11
|
+
width?: string | number
|
|
12
|
+
fixed: QyColumnFixed
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare const QyTableColumnSettings: DefineComponent<any, any, any> & Plugin
|
|
16
|
+
|
|
17
|
+
export { QyTableColumnSettings }
|
|
18
|
+
export default QyTableColumnSettings
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ComponentOptionsMixin,
|
|
3
|
+
DefineComponent,
|
|
4
|
+
Plugin
|
|
5
|
+
} from 'vue'
|
|
6
|
+
|
|
7
|
+
export type QyTagTone =
|
|
8
|
+
| 'neutral'
|
|
9
|
+
| 'primary'
|
|
10
|
+
| 'success'
|
|
11
|
+
| 'warning'
|
|
12
|
+
| 'danger'
|
|
13
|
+
| 'info'
|
|
14
|
+
export type QyTagSize = 'sm' | 'md' | 'lg'
|
|
15
|
+
export type QyTagEffect = 'light' | 'dark' | 'plain'
|
|
16
|
+
|
|
17
|
+
export interface QyTagProps {
|
|
18
|
+
tone?: QyTagTone
|
|
19
|
+
size?: QyTagSize
|
|
20
|
+
effect?: QyTagEffect
|
|
21
|
+
closable?: boolean
|
|
22
|
+
round?: boolean
|
|
23
|
+
disabled?: boolean
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type QyTagEmits = {
|
|
27
|
+
click: (event: MouseEvent) => void
|
|
28
|
+
close: (event: MouseEvent) => void
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare const QyTag: DefineComponent<
|
|
32
|
+
QyTagProps,
|
|
33
|
+
{},
|
|
34
|
+
{},
|
|
35
|
+
{},
|
|
36
|
+
{},
|
|
37
|
+
ComponentOptionsMixin,
|
|
38
|
+
ComponentOptionsMixin,
|
|
39
|
+
QyTagEmits
|
|
40
|
+
> &
|
|
41
|
+
Plugin
|
|
42
|
+
|
|
43
|
+
export { QyTag }
|
|
44
|
+
export default QyTag
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ComponentOptionsMixin,
|
|
3
|
+
DefineComponent,
|
|
4
|
+
Plugin
|
|
5
|
+
} from 'vue'
|
|
6
|
+
|
|
7
|
+
export type QyTooltipPlacement =
|
|
8
|
+
| 'top'
|
|
9
|
+
| 'top-start'
|
|
10
|
+
| 'top-end'
|
|
11
|
+
| 'bottom'
|
|
12
|
+
| 'bottom-start'
|
|
13
|
+
| 'bottom-end'
|
|
14
|
+
| 'left'
|
|
15
|
+
| 'left-start'
|
|
16
|
+
| 'left-end'
|
|
17
|
+
| 'right'
|
|
18
|
+
| 'right-start'
|
|
19
|
+
| 'right-end'
|
|
20
|
+
| 'auto'
|
|
21
|
+
| 'auto-start'
|
|
22
|
+
| 'auto-end'
|
|
23
|
+
export type QyTooltipEffect = 'light' | 'dark'
|
|
24
|
+
|
|
25
|
+
export interface QyTooltipProps {
|
|
26
|
+
content?: string
|
|
27
|
+
placement?: QyTooltipPlacement
|
|
28
|
+
effect?: QyTooltipEffect
|
|
29
|
+
disabled?: boolean
|
|
30
|
+
showDelay?: number
|
|
31
|
+
hideDelay?: number
|
|
32
|
+
offset?: number
|
|
33
|
+
maxWidth?: number | string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type QyTooltipEmits = {
|
|
37
|
+
open: () => void
|
|
38
|
+
close: () => void
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare const QyTooltip: DefineComponent<
|
|
42
|
+
QyTooltipProps,
|
|
43
|
+
{},
|
|
44
|
+
{},
|
|
45
|
+
{},
|
|
46
|
+
{},
|
|
47
|
+
ComponentOptionsMixin,
|
|
48
|
+
ComponentOptionsMixin,
|
|
49
|
+
QyTooltipEmits
|
|
50
|
+
> &
|
|
51
|
+
Plugin
|
|
52
|
+
|
|
53
|
+
export { QyTooltip }
|
|
54
|
+
export default QyTooltip
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DefineComponent, Plugin } from 'vue'
|
|
2
|
-
|
|
3
|
-
declare const QyTreeSelect: DefineComponent<any, any, any> & Plugin
|
|
4
|
-
|
|
5
|
-
export default QyTreeSelect
|
|
1
|
+
import type { DefineComponent, Plugin } from 'vue'
|
|
2
|
+
|
|
3
|
+
declare const QyTreeSelect: DefineComponent<any, any, any> & Plugin
|
|
4
|
+
|
|
5
|
+
export default QyTreeSelect
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const m=require("element-plus/es"),e=require("vue"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H={class:"qy-table-column-settings"},K={class:"qy-table-column-settings__table-wrap"},L=["data-testid","onClick"],Q={class:"qy-table-column-settings__side","data-testid":"settings-side-actions"},R={class:"qy-table-column-settings__side-main"},W={key:0,class:"qy-table-column-settings__selected is-empty"},j={key:1,class:"qy-table-column-settings__selected"},A={class:"qy-table-column-settings__side-footer"},G=e.defineComponent({name:"QyTableColumnSettings",__name:"index",props:{modelValue:{type:Boolean},settings:{default:()=>[]},defaultSettings:{default:void 0},title:{default:"列设置"},width:{default:"700px"},showDeleteCache:{type:Boolean,default:!0},unconfigurableTypes:{default:()=>["index","selection","expand","setup"]}},emits:["update:modelValue","confirm","reset","cancel","delete-cache","change"],setup(p,{emit:w}){const c=p,u=w,s=e.ref([]),r=e.ref(""),b=l=>l.map(t=>({...t})),h=()=>{var l;s.value=b(c.settings),r.value=((l=s.value[0])==null?void 0:l.key)||""};e.watch(()=>c.modelValue,l=>{l&&h()},{immediate:!0});const v=()=>{u("change",b(s.value))},f=l=>s.value.find(t=>t.key===l),o=e.computed(()=>f(r.value)),d=e.computed(()=>s.value.findIndex(l=>l.key===r.value)),N=l=>!!(l.type&&c.unconfigurableTypes.includes(l.type)),E=l=>l==="left"?"left":l==="right"?"right":"none",k=l=>l.type==="index"?"序号":l.type==="selection"?"多选":l.type==="expand"?"展开":l.type==="setup"?"设置":l.label||l.prop||l.key,V=l=>{l&&(r.value=l.key)},C=l=>{o.value&&q(o.value.key,l)},q=(l,t)=>{const n=f(l);n&&(n.fixed=t,v())},S=(l,t)=>{const n=f(l);!n||N(n)||(n.visible=t,v())},B=(l,t)=>{const n=f(l);n&&(n.width=t,v())},_=(l,t)=>{if(l===t||l<0||l>=s.value.length||t<0||t>=s.value.length)return;const n=[...s.value],[g]=n.splice(l,1);n.splice(t,0,g),s.value=n,r.value=g.key,v()},$=()=>{var t,n;const l=(t=c.defaultSettings)!=null&&t.length?c.defaultSettings:c.settings;s.value=b(l),r.value=((n=s.value[0])==null?void 0:n.key)||"",u("reset",b(s.value)),v()},x=()=>{u("cancel"),u("update:modelValue",!1)},T=()=>{u("confirm",b(s.value)),u("update:modelValue",!1)};return(l,t)=>{const n=m.ElTableColumn,g=m.ElInput,D=m.ElSwitch,U=m.ElTable,i=m.ElButton,z=m.ElDialog;return e.openBlock(),e.createBlock(z,{"model-value":p.modelValue,title:p.title,width:p.width,"append-to-body":"",onClose:x},{footer:e.withCtx(()=>[e.createVNode(i,{"data-action":"cancel",onClick:x},{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createTextVNode(" 取消 ",-1)])]),_:1}),e.createVNode(i,{type:"primary","data-action":"confirm",onClick:T},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode(" 确定 ",-1)])]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",H,[e.createElementVNode("div",K,[e.createVNode(U,{data:s.value,"row-key":"key",height:"400px",border:"","highlight-current-row":"","data-testid":"settings-table",onCurrentChange:V,onRowClick:V},{default:e.withCtx(()=>[e.createVNode(n,{label:"列名",prop:"label","show-overflow-tooltip":""},{default:e.withCtx(({row:a})=>[e.createElementVNode("div",{class:"qy-table-column-settings__name","data-testid":`table-row-${a.key}`,onClick:y=>V(a)},[e.createElementVNode("span",{class:e.normalizeClass(["qy-table-column-settings__fixed-mark",`is-${E(a.fixed)}`]),"aria-hidden":"true"},null,2),e.createElementVNode("span",null,e.toDisplayString(k(a)),1)],8,L)]),_:1}),e.createVNode(n,{label:"列宽(px)",prop:"width",width:"150"},{default:e.withCtx(({row:a})=>[e.createVNode(g,{"model-value":a.width,size:"small",placeholder:"留空自动设置宽度","data-testid":"width","onUpdate:modelValue":y=>B(a.key,y)},null,8,["model-value","onUpdate:modelValue"])]),_:1}),e.createVNode(n,{label:"列显示",prop:"visible",width:"100"},{default:e.withCtx(({row:a})=>[e.createVNode(D,{"model-value":a.visible,disabled:N(a),style:{"--el-switch-on-color":"rgb(99 102 241)"},"data-testid":"visible-switch","onUpdate:modelValue":y=>S(a.key,!!y)},null,8,["model-value","disabled","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])]),e.createElementVNode("div",Q,[e.createElementVNode("div",R,[o.value?(e.openBlock(),e.createElementBlock("div",j,e.toDisplayString(k(o.value)),1)):(e.openBlock(),e.createElementBlock("div",W," 请选择列 ")),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value||d.value===0,"data-action":"top",onClick:t[0]||(t[0]=a=>_(d.value,0))},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-top"},null,-1),e.createElementVNode("span",null,"置顶",-1)])]),_:1},8,["disabled"]),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value||d.value===0,"data-action":"up",onClick:t[1]||(t[1]=a=>_(d.value,d.value-1))},{default:e.withCtx(()=>[...t[9]||(t[9]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-up"},null,-1),e.createElementVNode("span",null,"上移",-1)])]),_:1},8,["disabled"]),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value||d.value===s.value.length-1,"data-action":"down",onClick:t[2]||(t[2]=a=>_(d.value,d.value+1))},{default:e.withCtx(()=>[...t[10]||(t[10]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-down"},null,-1),e.createElementVNode("span",null,"下移",-1)])]),_:1},8,["disabled"]),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value||d.value===s.value.length-1,"data-action":"bottom",onClick:t[3]||(t[3]=a=>_(d.value,s.value.length-1))},{default:e.withCtx(()=>[...t[11]||(t[11]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-bottom"},null,-1),e.createElementVNode("span",null,"置底",-1)])]),_:1},8,["disabled"]),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value,"data-action":"fixed-left",onClick:t[4]||(t[4]=a=>C("left"))},{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-fixed-left"},null,-1),e.createElementVNode("span",null,"固定左边",-1)])]),_:1},8,["disabled"]),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value,"data-action":"fixed-right",onClick:t[5]||(t[5]=a=>C("right"))},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-fixed-right"},null,-1),e.createElementVNode("span",null,"固定右边",-1)])]),_:1},8,["disabled"]),e.createVNode(i,{class:"qy-table-column-settings__side-button",disabled:!o.value,"data-action":"clear-fixed",onClick:t[6]||(t[6]=a=>C(!1))},{default:e.withCtx(()=>[...t[14]||(t[14]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-clear-fixed"},null,-1),e.createElementVNode("span",null,"取消固定",-1)])]),_:1},8,["disabled"])]),e.createElementVNode("div",A,[e.createVNode(i,{"data-action":"reset",onClick:$},{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-reset"},null,-1),e.createElementVNode("span",null,"恢复默认",-1)])]),_:1}),p.showDeleteCache?(e.openBlock(),e.createBlock(i,{key:0,type:"danger",plain:"","data-action":"delete-cache",onClick:t[7]||(t[7]=a=>u("delete-cache"))},{default:e.withCtx(()=>[...t[16]||(t[16]=[e.createElementVNode("span",{class:"qy-table-column-settings__action-icon is-reset"},null,-1),e.createElementVNode("span",null,"删除缓存",-1)])]),_:1})):e.createCommentVNode("",!0)])])])]),_:1},8,["model-value","title","width"])}}}),J=F._export_sfc(G,[["__scopeId","data-v-56d579b9"]]);exports.TableColumnSettings=J;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const x=require("element-plus/es"),e=require("vue"),w=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),b={class:"qy-menu-actions__panel"},T=["disabled","data-action-key","onClick"],C={key:0,class:"qy-menu-actions__loading"},E={key:0,class:"qy-menu-actions__empty"},V={key:1,class:"qy-menu-actions__inline"},z=["disabled","data-action-key","onClick"],A={key:0,class:"qy-menu-actions__loading"},M={key:0,class:"qy-menu-actions__empty"},N=e.defineComponent({name:"QyMenuActions",__name:"index",props:{actions:{default:()=>[]},row:{},rowIndex:{},context:{},mode:{default:"inline"},emptyText:{default:"无数据"},popoverWidth:{default:150},confirmMethod:{}},emits:["action","confirm-required"],setup(s,{emit:_}){const r=s,y=_,k=e.computed(()=>{var t,n;return{...r.context,row:r.row??((t=r.context)==null?void 0:t.row),rowIndex:r.rowIndex??((n=r.context)==null?void 0:n.rowIndex)}}),d=e.ref(!1),i=e.ref(new Set),h=(t,n)=>({...k.value,target:n.currentTarget,hide:q,setLoading:l=>B(t,l)}),m=t=>typeof t=="function"?t(k.value):!!t,c=e.computed(()=>r.actions.filter(t=>!m(t.hidden))),g=e.computed(()=>c.value.some(t=>a(t))),u=t=>m(t.disabled)||a(t),a=t=>i.value.has(t.key)||m(t.loading),v=(t,n)=>{const l=t.type||n;return{default:"var(--el-text-color-primary)",primary:"var(--el-color-primary)",success:"var(--el-color-success)",warning:"var(--el-color-warning)",danger:"var(--el-color-danger)"}[l]},f=async(t,n)=>{if(n.stopPropagation(),u(t))return;const l=h(t,n);if(t.confirm){if(!r.confirmMethod){y("confirm-required",t,l);return}if(!await r.confirmMethod(t,l))return}y("action",t,l)};function q(){d.value=!1}function B(t,n){const l=new Set(i.value);n?l.add(t.key):l.delete(t.key),i.value=l}return e.onBeforeUnmount(()=>{i.value=new Set}),(t,n)=>{const l=x.ElPopover;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-menu-actions",`is-${s.mode}`])},[s.mode==="popover"?(e.openBlock(),e.createBlock(l,{key:0,visible:d.value,"onUpdate:visible":n[0]||(n[0]=o=>d.value=o),trigger:"hover",placement:"left",width:s.popoverWidth,"hide-after":g.value?999999:100,"show-arrow":!1,"popper-class":"qy-menu-actions__popover"},{reference:e.withCtx(()=>[...n[1]||(n[1]=[e.createElementVNode("button",{class:"qy-menu-actions__trigger",type:"button","aria-label":"行操作"},[e.createElementVNode("svg",{class:"qy-menu-actions__trigger-icon",viewBox:"0 0 24 24","aria-hidden":"true"},[e.createElementVNode("path",{fill:"currentColor",d:"M8 17q.425 0 .713-.288T9 16q0-.425-.288-.712T8 15q-.425 0-.712.288T7 16q0 .425.288.713T8 17m0-4q.425 0 .713-.288T9 12q0-.425-.288-.712T8 11q-.425 0-.712.288T7 12q0 .425.288.713T8 13m0-4q.425 0 .713-.288T9 8q0-.425-.288-.712T8 7q-.425 0-.712.288T7 8q0 .425.288.713T8 9m3 8h6v-2h-6zm0-4h6v-2h-6zm0-4h6V7h-6zM5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5z"})])],-1)])]),default:e.withCtx(()=>[e.createElementVNode("div",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,o=>(e.openBlock(),e.createElementBlock("button",{key:o.key,class:e.normalizeClass(["qy-menu-actions__item",[`is-${o.type||"default"}`,{"is-loading":a(o)}]]),disabled:u(o),"data-action-key":o.key,style:e.normalizeStyle({color:v(o,"default")}),type:"button",onClick:p=>f(o,p)},[a(o)?(e.openBlock(),e.createElementBlock("span",C)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(o.label),1)],14,T))),128)),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",E,e.toDisplayString(s.emptyText),1))])]),_:1},8,["visible","width","hide-after"])):(e.openBlock(),e.createElementBlock("div",V,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,o=>(e.openBlock(),e.createElementBlock("button",{key:o.key,class:e.normalizeClass(["qy-menu-actions__item",[`is-${o.type||"primary"}`,{"is-loading":a(o)}]]),disabled:u(o),"data-action-key":o.key,style:e.normalizeStyle({color:v(o,"primary")}),type:"button",onClick:p=>f(o,p)},[a(o)?(e.openBlock(),e.createElementBlock("span",A)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(o.label),1)],14,z))),128)),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(s.emptyText),1))]))],2)}}}),S=w._export_sfc(N,[["__scopeId","data-v-484879c4"]]);exports.MenuActions=S;
|