@qynpm/ui 1.0.35 → 1.0.37
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 +85 -34
- package/dist/index.cjs +5 -4
- package/dist/index.mjs +61 -59
- package/dist/qy-action-bar/index.cjs +1 -1
- package/dist/qy-action-bar/index.mjs +1 -1
- package/dist/qy-dialog/index.cjs +1 -1
- package/dist/qy-dialog/index.mjs +1 -1
- package/dist/qy-drawer/index.cjs +1 -1
- package/dist/qy-drawer/index.mjs +1 -1
- package/dist/qy-file-picker/index.cjs +1 -1
- package/dist/qy-file-picker/index.mjs +1 -1
- package/dist/qy-form-section/index.cjs +1 -1
- package/dist/qy-form-section/index.mjs +1 -1
- package/dist/qy-fullscreen/index.cjs +1 -1
- package/dist/qy-fullscreen/index.mjs +1 -1
- package/dist/qy-icon/index.cjs +1 -1
- package/dist/qy-icon/index.mjs +2 -2
- package/dist/qy-icon-picker/index.cjs +2 -2
- package/dist/qy-icon-picker/index.mjs +2 -2
- package/dist/qy-image-upload/index.cjs +1 -1
- package/dist/qy-image-upload/index.mjs +1 -1
- package/dist/qy-input-number/index.cjs +1 -1
- package/dist/qy-input-number/index.mjs +1 -1
- package/dist/qy-input-tag/index.cjs +1 -0
- package/dist/qy-input-tag/index.mjs +7 -0
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
- package/dist/qy-money-input/index.cjs +1 -1
- package/dist/qy-money-input/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 +1 -1
- 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 +1 -1
- package/dist/qy-selection-dialog/index.cjs +1 -1
- package/dist/qy-selection-dialog/index.mjs +1 -1
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +5 -2
- package/dist/shared/index-3KGa3jVi.mjs +2754 -0
- package/dist/shared/{index-DY-CA7Vr.mjs → index-BF6f9QDU.mjs} +1 -1
- package/dist/shared/{index-Bi9wgcgT.cjs → index-BQEymEbE.cjs} +1 -1
- package/dist/shared/{index-3qEac4h8.cjs → index-BTbiht5h.cjs} +1 -1
- package/dist/shared/index-BYX0biqw.mjs +766 -0
- package/dist/shared/index-BxxwEr52.mjs +107 -0
- package/dist/shared/index-C1i-hd-W.cjs +1 -0
- package/dist/shared/{index-S8HW36Mc.mjs → index-Crr3HB8g.mjs} +1 -1
- package/dist/shared/index-D8kce2jH.cjs +1 -0
- package/dist/shared/index-Di_xbC7d.cjs +1 -0
- package/dist/shared/index-Dm8kY2v6.mjs +285 -0
- package/dist/shared/index-DnNIseRJ.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BiIgNax-.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DIWWHODS.mjs +197 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DwFGEW4B.mjs +143 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-ccFLNRry.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-B1FgJZbw.mjs +148 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CAW_QOyJ.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DVXf-yUs.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Dr9Elmzn.mjs +317 -0
- package/index.d.ts +82 -25
- package/package.json +490 -483
- package/qy-file-picker/index.d.ts +4 -1
- package/qy-icon/index.d.ts +9 -6
- package/qy-image-preview/index.d.ts +0 -1
- package/qy-image-upload/index.d.ts +69 -12
- package/qy-input/index.d.ts +76 -18
- package/qy-input-number/index.d.ts +64 -30
- package/qy-input-tag/index.d.ts +69 -0
- package/qy-money-input/index.d.ts +87 -12
- package/qy-upload/index.d.ts +99 -5
- package/dist/shared/index-AMu0L6uU.cjs +0 -1
- package/dist/shared/index-BekN1g_r.mjs +0 -3541
- package/dist/shared/index-BkX9xlbI.cjs +0 -1
- package/dist/shared/index-C91mzAI3.mjs +0 -254
- package/dist/shared/index-C_1KP3l9.mjs +0 -129
- package/dist/shared/index-Ce_hvR--.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-B0CXLnL1.mjs +0 -132
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BcZb1U13.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CIcZet5j.mjs +0 -286
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DccRGtZE.cjs +0 -1
- /package/dist/shared/{index.vue_vue_type_script_setup_true_lang-q37rBg6Z.mjs → index.vue_vue_type_script_setup_true_lang-CGsXVhJy.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_script_setup_true_lang-CglCPcj-.cjs → index.vue_vue_type_script_setup_true_lang-Dk83TGiU.cjs} +0 -0
|
@@ -33,7 +33,10 @@ export type QyFilePickerEmits = {
|
|
|
33
33
|
invalid: (detail: QyFilePickerInvalidDetail) => void
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated 请使用 QyUpload 的 `variant="file-list"` 与 `autoUpload=false`。
|
|
38
|
+
*/
|
|
39
|
+
declare const QyFilePicker: DefineComponent<
|
|
37
40
|
QyFilePickerProps,
|
|
38
41
|
QyFilePickerExposed,
|
|
39
42
|
{},
|
package/qy-icon/index.d.ts
CHANGED
|
@@ -57,16 +57,19 @@ export type QyIconAliases =
|
|
|
57
57
|
| Readonly<Record<string, string | number>>
|
|
58
58
|
| readonly QyIconAlias[]
|
|
59
59
|
|
|
60
|
-
export type QyIconRegistryOptions = Readonly<{
|
|
61
|
-
icons: readonly QyIconDefinitionInput[]
|
|
62
|
-
aliases?: QyIconAliases
|
|
63
|
-
|
|
60
|
+
export type QyIconRegistryOptions = Readonly<{
|
|
61
|
+
icons: readonly QyIconDefinitionInput[]
|
|
62
|
+
aliases?: QyIconAliases
|
|
63
|
+
loader?: () => Promise<QyIconRegistryOptions>
|
|
64
|
+
}>
|
|
64
65
|
|
|
65
66
|
export interface QyIconRegistry {
|
|
66
67
|
resolve(name: string | number): QyIconDefinition | undefined
|
|
67
68
|
has(name: string | number): boolean
|
|
68
|
-
list(): readonly QyIconDefinition[]
|
|
69
|
-
|
|
69
|
+
list(): readonly QyIconDefinition[]
|
|
70
|
+
load(): Promise<void>
|
|
71
|
+
retry(): Promise<void>
|
|
72
|
+
}
|
|
70
73
|
|
|
71
74
|
export interface QyIconAttrs {
|
|
72
75
|
class?: string
|
|
@@ -1,12 +1,69 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import type {
|
|
2
|
+
ComponentOptionsMixin,
|
|
3
|
+
DefineComponent,
|
|
4
|
+
Plugin
|
|
5
|
+
} from 'vue'
|
|
6
|
+
import type { QyUploadRequest, QyUploadValue } from '../qy-upload'
|
|
7
|
+
|
|
8
|
+
export type QyImageUploadMode = 'default' | 'voucher'
|
|
9
|
+
|
|
10
|
+
export interface QyImageUploadProps {
|
|
11
|
+
modelValue?: string | string[]
|
|
12
|
+
api?: string
|
|
13
|
+
name?: string
|
|
14
|
+
disabled?: boolean
|
|
15
|
+
multiple?: boolean
|
|
16
|
+
/** @deprecated 旧 CopyImgUpload 凭证桥接;新页面使用普通图片配置。 */
|
|
17
|
+
mode?: QyImageUploadMode
|
|
18
|
+
/** @deprecated 旧 CopyImgUpload 凭证桥接;新页面使用普通图片配置。 */
|
|
19
|
+
voucher?: boolean
|
|
20
|
+
fileType?: string[]
|
|
21
|
+
fileSize?: number
|
|
22
|
+
isShowTip?: boolean
|
|
23
|
+
limit?: number
|
|
24
|
+
tokenKey?: string
|
|
25
|
+
supportVideo?: boolean
|
|
26
|
+
size?: string
|
|
27
|
+
disableDrag?: boolean
|
|
28
|
+
showPasteInput?: boolean
|
|
29
|
+
pastePlaceholder?: string
|
|
30
|
+
callBack?: (value: QyUploadValue) => void
|
|
31
|
+
extraData?: Record<string, unknown>
|
|
32
|
+
uploadRequest?: QyUploadRequest
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface QyImageUploadExposed {
|
|
36
|
+
openFileDialog(): void
|
|
37
|
+
clearFiles(): void
|
|
38
|
+
getPathList(): string[]
|
|
39
|
+
/** @deprecated 旧 CopyImgUpload 读值桥接。 */
|
|
40
|
+
getFullPathList(): string[]
|
|
41
|
+
/** @deprecated 旧 CopyImgUpload 读值桥接。 */
|
|
42
|
+
readonly fullPathList: string[]
|
|
43
|
+
readonly pathList: string[]
|
|
44
|
+
getValue(): string | string[]
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type QyImageUploadEmits = {
|
|
48
|
+
'update:modelValue': (value: string | string[]) => void
|
|
49
|
+
change: (value: string | string[]) => void
|
|
50
|
+
success: (value: string | string[], response: unknown) => void
|
|
51
|
+
error: (error: unknown) => void
|
|
52
|
+
remove: (file: unknown, files: unknown[]) => void
|
|
53
|
+
/** @deprecated 旧 CopyImgUpload 成功通知桥接。 */
|
|
54
|
+
updateImg: (url: string) => void
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare const QyImageUpload: DefineComponent<
|
|
58
|
+
QyImageUploadProps,
|
|
59
|
+
QyImageUploadExposed,
|
|
60
|
+
{},
|
|
61
|
+
{},
|
|
62
|
+
{},
|
|
63
|
+
ComponentOptionsMixin,
|
|
64
|
+
ComponentOptionsMixin,
|
|
65
|
+
QyImageUploadEmits
|
|
66
|
+
> &
|
|
67
|
+
Plugin
|
|
68
|
+
|
|
69
|
+
export default QyImageUpload
|
package/qy-input/index.d.ts
CHANGED
|
@@ -1,21 +1,79 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import type { Component, DefineComponent, Plugin, StyleValue } from 'vue'
|
|
2
|
+
|
|
3
|
+
export type QyInputValue = string
|
|
4
|
+
export type QyInputModelValue = string | number | null | undefined
|
|
5
|
+
export type QyInputType =
|
|
6
|
+
| 'text'
|
|
7
|
+
| 'textarea'
|
|
8
|
+
| 'number'
|
|
9
|
+
| 'password'
|
|
10
|
+
| 'email'
|
|
11
|
+
| 'search'
|
|
12
|
+
| 'tel'
|
|
13
|
+
| 'url'
|
|
14
|
+
| (string & {})
|
|
15
|
+
export type QyInputSize = 'small' | 'default' | 'large'
|
|
16
|
+
export type QyInputTrimMode = 'none' | 'blur' | 'change'
|
|
17
|
+
export type QyInputAutoSize =
|
|
18
|
+
| {
|
|
19
|
+
minRows?: number
|
|
20
|
+
maxRows?: number
|
|
21
|
+
}
|
|
22
|
+
| boolean
|
|
23
|
+
export type QyInputIcon = string | Component
|
|
24
|
+
export type QyInputInputMode =
|
|
25
|
+
| 'none'
|
|
26
|
+
| 'text'
|
|
27
|
+
| 'tel'
|
|
28
|
+
| 'url'
|
|
29
|
+
| 'email'
|
|
30
|
+
| 'numeric'
|
|
31
|
+
| 'decimal'
|
|
32
|
+
| 'search'
|
|
33
|
+
export type QyInputModelModifiers = {
|
|
34
|
+
lazy?: true
|
|
35
|
+
number?: true
|
|
36
|
+
trim?: true
|
|
37
|
+
}
|
|
38
|
+
export type QyInputStyle = StyleValue
|
|
39
|
+
|
|
40
|
+
export interface QyInputProps {
|
|
41
|
+
id?: string
|
|
42
|
+
disabled?: boolean
|
|
43
|
+
modelValue?: QyInputModelValue
|
|
44
|
+
modelModifiers?: QyInputModelModifiers
|
|
45
|
+
maxlength?: string | number
|
|
46
|
+
minlength?: string | number
|
|
47
|
+
type?: QyInputType
|
|
48
|
+
size?: QyInputSize
|
|
49
|
+
resize?: 'none' | 'both' | 'horizontal' | 'vertical'
|
|
50
|
+
autosize?: QyInputAutoSize
|
|
51
|
+
autocomplete?: string
|
|
52
|
+
formatter?: (value: string) => string
|
|
53
|
+
parser?: (value: string) => string
|
|
54
|
+
placeholder?: string
|
|
55
|
+
form?: string
|
|
56
|
+
readonly?: boolean
|
|
57
|
+
clearable?: boolean
|
|
58
|
+
clearIcon?: QyInputIcon
|
|
59
|
+
showPassword?: boolean
|
|
60
|
+
showWordLimit?: boolean
|
|
61
|
+
wordLimitPosition?: 'inside' | 'outside'
|
|
62
|
+
suffixIcon?: QyInputIcon
|
|
63
|
+
prefixIcon?: QyInputIcon
|
|
64
|
+
containerRole?: string
|
|
65
|
+
tabindex?: string | number
|
|
66
|
+
validateEvent?: boolean
|
|
67
|
+
inputStyle?: QyInputStyle
|
|
68
|
+
autofocus?: boolean
|
|
69
|
+
rows?: number
|
|
70
|
+
ariaLabel?: string
|
|
71
|
+
inputmode?: QyInputInputMode
|
|
72
|
+
name?: string
|
|
73
|
+
countGraphemes?: (value: string) => number
|
|
74
|
+
removeSpace?: boolean
|
|
75
|
+
trimMode?: QyInputTrimMode
|
|
76
|
+
}
|
|
19
77
|
|
|
20
78
|
export type QyInputEmits = {
|
|
21
79
|
'update:modelValue': (value: QyInputValue) => void
|
|
@@ -1,21 +1,35 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type {
|
|
2
|
+
ComponentOptionsMixin,
|
|
3
|
+
DefineComponent,
|
|
4
|
+
Plugin,
|
|
5
|
+
PublicProps,
|
|
6
|
+
SlotsType
|
|
7
|
+
} from 'vue'
|
|
3
8
|
|
|
4
9
|
export type QyInputNumberValue = number | null | undefined
|
|
5
10
|
export type QyInputNumberClearValue = 'min' | 'max' | number | null
|
|
6
|
-
export type QyInputNumberControlsPosition = '' | 'right'
|
|
7
|
-
export type QyInputNumberSize = 'small' | 'default' | 'large'
|
|
8
|
-
|
|
9
|
-
export interface QyInputNumberProps
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
export type QyInputNumberControlsPosition = '' | 'right'
|
|
12
|
+
export type QyInputNumberSize = 'small' | 'default' | 'large'
|
|
13
|
+
|
|
14
|
+
export interface QyInputNumberProps {
|
|
15
|
+
id?: string
|
|
16
|
+
step?: number
|
|
17
|
+
stepStrictly?: boolean
|
|
18
|
+
max?: number
|
|
19
|
+
min?: number
|
|
20
|
+
modelValue?: QyInputNumberValue
|
|
21
|
+
readonly?: boolean
|
|
22
|
+
disabled?: boolean
|
|
23
|
+
size?: QyInputNumberSize
|
|
24
|
+
controls?: boolean
|
|
25
|
+
controlsPosition?: QyInputNumberControlsPosition
|
|
26
|
+
valueOnClear?: QyInputNumberClearValue
|
|
27
|
+
name?: string
|
|
28
|
+
placeholder?: string
|
|
29
|
+
precision?: number
|
|
30
|
+
validateEvent?: boolean
|
|
31
|
+
ariaLabel?: string
|
|
32
|
+
}
|
|
19
33
|
|
|
20
34
|
export type QyInputNumberEmits = {
|
|
21
35
|
'update:modelValue': (value: QyInputNumberValue) => void
|
|
@@ -25,21 +39,41 @@ export type QyInputNumberEmits = {
|
|
|
25
39
|
blur: (event: FocusEvent) => void
|
|
26
40
|
}
|
|
27
41
|
|
|
28
|
-
export interface QyInputNumberExposed {
|
|
29
|
-
focus(): void
|
|
30
|
-
blur(): void
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
QyInputNumberEmits
|
|
42
|
-
|
|
42
|
+
export interface QyInputNumberExposed {
|
|
43
|
+
focus(): void
|
|
44
|
+
blur(): void
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface QyInputNumberSlots {
|
|
48
|
+
prefix?: () => unknown
|
|
49
|
+
suffix?: () => unknown
|
|
50
|
+
'increase-icon'?: () => unknown
|
|
51
|
+
'decrease-icon'?: () => unknown
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
type QyInputNumberComponentProps = QyInputNumberProps & {
|
|
55
|
+
'onUpdate:modelValue'?: QyInputNumberEmits['update:modelValue']
|
|
56
|
+
onInput?: QyInputNumberEmits['input']
|
|
57
|
+
onChange?: QyInputNumberEmits['change']
|
|
58
|
+
onFocus?: QyInputNumberEmits['focus']
|
|
59
|
+
onBlur?: QyInputNumberEmits['blur']
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare const QyInputNumber: DefineComponent<
|
|
63
|
+
QyInputNumberProps,
|
|
64
|
+
QyInputNumberExposed,
|
|
65
|
+
{},
|
|
66
|
+
{},
|
|
67
|
+
{},
|
|
68
|
+
ComponentOptionsMixin,
|
|
69
|
+
ComponentOptionsMixin,
|
|
70
|
+
QyInputNumberEmits,
|
|
71
|
+
string,
|
|
72
|
+
PublicProps,
|
|
73
|
+
QyInputNumberComponentProps,
|
|
74
|
+
{},
|
|
75
|
+
SlotsType<QyInputNumberSlots>
|
|
76
|
+
> & Plugin
|
|
43
77
|
|
|
44
78
|
export { QyInputNumber }
|
|
45
79
|
export default QyInputNumber
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ComponentOptionsMixin,
|
|
3
|
+
DefineComponent,
|
|
4
|
+
Plugin
|
|
5
|
+
} from 'vue'
|
|
6
|
+
import type { QyTagEffect, QyTagTone } from '../qy-tag'
|
|
7
|
+
|
|
8
|
+
export type QyInputTagModelValue = string[]
|
|
9
|
+
export type QyInputTagTone = QyTagTone
|
|
10
|
+
export type QyInputTagEffect = QyTagEffect
|
|
11
|
+
export type QyInputTagSize = 'small' | 'default' | 'large'
|
|
12
|
+
export type QyInputTagTrigger = 'enter' | 'space'
|
|
13
|
+
|
|
14
|
+
export interface QyInputTagProps {
|
|
15
|
+
modelValue?: QyInputTagModelValue
|
|
16
|
+
max?: number
|
|
17
|
+
trigger?: QyInputTagTrigger
|
|
18
|
+
tagTone?: QyInputTagTone
|
|
19
|
+
tagEffect?: QyInputTagEffect
|
|
20
|
+
size?: QyInputTagSize
|
|
21
|
+
clearable?: boolean
|
|
22
|
+
disabled?: boolean
|
|
23
|
+
readonly?: boolean
|
|
24
|
+
placeholder?: string
|
|
25
|
+
autofocus?: boolean
|
|
26
|
+
validateEvent?: boolean
|
|
27
|
+
id?: string
|
|
28
|
+
tabindex?: string | number
|
|
29
|
+
maxlength?: string | number
|
|
30
|
+
minlength?: string | number
|
|
31
|
+
autocomplete?: string
|
|
32
|
+
ariaLabel?: string
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface QyInputTagSlots {
|
|
36
|
+
tag?: (props: { value: string; index: number }) => unknown
|
|
37
|
+
prefix?: () => unknown
|
|
38
|
+
suffix?: () => unknown
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type QyInputTagEmits = {
|
|
42
|
+
'update:modelValue': (value: QyInputTagModelValue) => void
|
|
43
|
+
change: (value: QyInputTagModelValue) => void
|
|
44
|
+
input: (value: string) => void
|
|
45
|
+
add: (value: string) => void
|
|
46
|
+
remove: (value: string, index: number) => void
|
|
47
|
+
clear: () => void
|
|
48
|
+
focus: (event: FocusEvent) => void
|
|
49
|
+
blur: (event: FocusEvent) => void
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface QyInputTagExposed {
|
|
53
|
+
focus(): void
|
|
54
|
+
blur(): void
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare const QyInputTag: DefineComponent<
|
|
58
|
+
QyInputTagProps,
|
|
59
|
+
QyInputTagExposed,
|
|
60
|
+
{},
|
|
61
|
+
{},
|
|
62
|
+
{},
|
|
63
|
+
ComponentOptionsMixin,
|
|
64
|
+
ComponentOptionsMixin,
|
|
65
|
+
QyInputTagEmits
|
|
66
|
+
> & Plugin
|
|
67
|
+
|
|
68
|
+
export { QyInputTag }
|
|
69
|
+
export default QyInputTag
|
|
@@ -1,12 +1,87 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import type {
|
|
2
|
+
ComponentOptionsMixin,
|
|
3
|
+
DefineComponent,
|
|
4
|
+
Plugin,
|
|
5
|
+
PublicProps,
|
|
6
|
+
SlotsType
|
|
7
|
+
} from 'vue'
|
|
8
|
+
|
|
9
|
+
export type QyMoneyInputValue = string | number | null | undefined
|
|
10
|
+
export type QyMoneyInputFormatTrigger = 'blur' | 'change' | 'none'
|
|
11
|
+
export type QyMoneyInputSize = 'small' | 'default' | 'large'
|
|
12
|
+
|
|
13
|
+
export interface QyMoneyInputProps {
|
|
14
|
+
modelValue?: QyMoneyInputValue
|
|
15
|
+
precision?: number
|
|
16
|
+
min?: number
|
|
17
|
+
max?: number
|
|
18
|
+
allowNegative?: boolean
|
|
19
|
+
formatTrigger?: QyMoneyInputFormatTrigger
|
|
20
|
+
emptyValue?: string | number
|
|
21
|
+
placeholder?: string
|
|
22
|
+
clearable?: boolean
|
|
23
|
+
disabled?: boolean
|
|
24
|
+
readonly?: boolean
|
|
25
|
+
size?: QyMoneyInputSize
|
|
26
|
+
name?: string
|
|
27
|
+
id?: string
|
|
28
|
+
autocomplete?: string
|
|
29
|
+
autofocus?: boolean
|
|
30
|
+
maxlength?: string | number
|
|
31
|
+
minlength?: string | number
|
|
32
|
+
tabindex?: string | number
|
|
33
|
+
ariaLabel?: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type QyMoneyInputEmits = {
|
|
37
|
+
'update:modelValue': (value: string) => void
|
|
38
|
+
input: (value: string) => void
|
|
39
|
+
change: (value: string) => void
|
|
40
|
+
focus: (event: FocusEvent) => void
|
|
41
|
+
blur: (event: FocusEvent) => void
|
|
42
|
+
clear: () => void
|
|
43
|
+
enter: (event: KeyboardEvent) => void
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface QyMoneyInputExposed {
|
|
47
|
+
focus(): void
|
|
48
|
+
blur(): void
|
|
49
|
+
select(): void
|
|
50
|
+
clear(): void
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface QyMoneyInputSlots {
|
|
54
|
+
prefix?: () => unknown
|
|
55
|
+
suffix?: () => unknown
|
|
56
|
+
prepend?: () => unknown
|
|
57
|
+
append?: () => unknown
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
type QyMoneyInputComponentProps = QyMoneyInputProps & {
|
|
61
|
+
'onUpdate:modelValue'?: QyMoneyInputEmits['update:modelValue']
|
|
62
|
+
onInput?: QyMoneyInputEmits['input']
|
|
63
|
+
onChange?: QyMoneyInputEmits['change']
|
|
64
|
+
onFocus?: QyMoneyInputEmits['focus']
|
|
65
|
+
onBlur?: QyMoneyInputEmits['blur']
|
|
66
|
+
onClear?: QyMoneyInputEmits['clear']
|
|
67
|
+
onEnter?: QyMoneyInputEmits['enter']
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare const QyMoneyInput: DefineComponent<
|
|
71
|
+
QyMoneyInputProps,
|
|
72
|
+
QyMoneyInputExposed,
|
|
73
|
+
{},
|
|
74
|
+
{},
|
|
75
|
+
{},
|
|
76
|
+
ComponentOptionsMixin,
|
|
77
|
+
ComponentOptionsMixin,
|
|
78
|
+
QyMoneyInputEmits,
|
|
79
|
+
string,
|
|
80
|
+
PublicProps,
|
|
81
|
+
QyMoneyInputComponentProps,
|
|
82
|
+
{},
|
|
83
|
+
SlotsType<QyMoneyInputSlots>
|
|
84
|
+
> & Plugin
|
|
85
|
+
|
|
86
|
+
export { QyMoneyInput }
|
|
87
|
+
export default QyMoneyInput
|
package/qy-upload/index.d.ts
CHANGED
|
@@ -1,5 +1,99 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type {
|
|
2
|
+
ComponentOptionsMixin,
|
|
3
|
+
DefineComponent,
|
|
4
|
+
Plugin
|
|
5
|
+
} from 'vue'
|
|
6
|
+
|
|
7
|
+
export type QyUploadVariant = 'media-card' | 'file-list'
|
|
8
|
+
export type QyUploadValueFormat = 'object' | 'array' | 'string'
|
|
9
|
+
export type QyUploadInvalidCode = 'extension' | 'size'
|
|
10
|
+
|
|
11
|
+
export interface QyUploadValue {
|
|
12
|
+
files: string[]
|
|
13
|
+
text: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface QyUploadResult {
|
|
17
|
+
url: string
|
|
18
|
+
name?: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface QyUploadRequestContext {
|
|
22
|
+
file: File
|
|
23
|
+
formData: FormData
|
|
24
|
+
api: string
|
|
25
|
+
name: string
|
|
26
|
+
tokenKey: string
|
|
27
|
+
extraData: Record<string, unknown>
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type QyUploadRequest = (
|
|
31
|
+
context: QyUploadRequestContext
|
|
32
|
+
) => Promise<QyUploadResult>
|
|
33
|
+
|
|
34
|
+
export interface QyUploadInvalidDetail {
|
|
35
|
+
code: QyUploadInvalidCode
|
|
36
|
+
file: File
|
|
37
|
+
message: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface QyUploadProps {
|
|
41
|
+
modelValue?: QyUploadValue | string[] | string
|
|
42
|
+
selectedFiles?: File[]
|
|
43
|
+
autoUpload?: boolean
|
|
44
|
+
variant?: QyUploadVariant
|
|
45
|
+
defaultValue?: { files?: string | string[]; text?: string }
|
|
46
|
+
valueFormat?: QyUploadValueFormat
|
|
47
|
+
showText?: boolean
|
|
48
|
+
showPasteInput?: boolean
|
|
49
|
+
pastePlaceholder?: string
|
|
50
|
+
multiple?: boolean
|
|
51
|
+
disabled?: boolean
|
|
52
|
+
fileType?: string[]
|
|
53
|
+
fileSize?: number
|
|
54
|
+
limit?: number
|
|
55
|
+
isShowTip?: boolean
|
|
56
|
+
api?: string
|
|
57
|
+
name?: string
|
|
58
|
+
tokenKey?: string
|
|
59
|
+
supportVideo?: boolean
|
|
60
|
+
size?: string
|
|
61
|
+
disableDrag?: boolean
|
|
62
|
+
callBack?: (value: QyUploadValue) => void
|
|
63
|
+
extraData?: Record<string, unknown>
|
|
64
|
+
uploadRequest?: QyUploadRequest
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface QyUploadExposed {
|
|
68
|
+
openFileDialog(): void
|
|
69
|
+
clearFiles(): void
|
|
70
|
+
getPathList(): string[]
|
|
71
|
+
getValue(): QyUploadValue
|
|
72
|
+
getModelValue(): QyUploadValue | string[] | string
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type QyUploadEmits = {
|
|
76
|
+
'update:modelValue': (value: QyUploadValue | string[] | string) => void
|
|
77
|
+
'update:selectedFiles': (files: File[]) => void
|
|
78
|
+
selectedFilesChange: (files: File[]) => void
|
|
79
|
+
change: (value: QyUploadValue) => void
|
|
80
|
+
success: (result: QyUploadResult) => void
|
|
81
|
+
error: (error: unknown) => void
|
|
82
|
+
remove: (file: unknown, files: unknown[]) => void
|
|
83
|
+
invalid: (detail: QyUploadInvalidDetail) => void
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
declare const QyUpload: DefineComponent<
|
|
87
|
+
QyUploadProps,
|
|
88
|
+
QyUploadExposed,
|
|
89
|
+
{},
|
|
90
|
+
{},
|
|
91
|
+
{},
|
|
92
|
+
ComponentOptionsMixin,
|
|
93
|
+
ComponentOptionsMixin,
|
|
94
|
+
QyUploadEmits
|
|
95
|
+
> &
|
|
96
|
+
Plugin
|
|
97
|
+
|
|
98
|
+
export { QyUpload }
|
|
99
|
+
export default QyUpload
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("vue"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),I=Symbol("QyIconRegistry"),E=new WeakMap;function z(e){const t=[],n=new Map;for(const a of(e==null?void 0:e.icons)??[]){const s=d(a==null?void 0:a.name);if(!s)throw new Error("QyIcon definition name must not be empty.");const u=p(s);if(n.has(u))throw new Error(`Duplicate icon name "${s}".`);const l=K(a,s);t.push(l),n.set(u,l)}const c=[],i=new Map;for(const a of C(e==null?void 0:e.aliases)){const s=d(a.name),u=d(a.target),l=p(s),w=p(u);if(!s)throw new Error("QyIcon alias name must not be empty.");if(!u)throw new Error(`QyIcon alias "${s}" target must not be empty.`);if(n.has(l))throw new Error(`Icon alias "${s}" conflicts with a canonical icon name.`);if(i.has(l))throw new Error(`Duplicate icon alias "${s}".`);const m=n.get(w);if(!m)throw new Error(`Icon alias "${s}" target "${u}" not found.`);i.set(l,p(m.name)),c.push(Object.freeze({name:s,target:m.name}))}const g=Object.freeze({definitions:Object.freeze(t),aliases:Object.freeze(c),byName:n,aliasTargets:i}),f=Object.freeze({resolve(a){const s=p(d(a)),u=i.get(s)??s,l=n.get(u);return l?Q(l):void 0},has(a){const s=p(d(a));return n.has(i.get(s)??s)},list(){return Object.freeze(t.map(Q))}});return E.set(f,g),f}function x(...e){const t=[],n=[];for(const c of e){const i=E.get(c);if(!i)throw new TypeError("mergeQyIconRegistries accepts only QyIcon registries created by this package.");t.push(...i.definitions),n.push(...i.aliases)}try{return z({icons:t,aliases:n})}catch(c){const i=c instanceof Error?c.message:String(c);throw new Error(`Icon registry merge conflict: ${i}`)}}function B(e){if(!E.has(e))throw new TypeError("createQyIconPlugin accepts only a QyIcon registry created by this package.");return Object.freeze({install(t){t.provide(I,e)}})}function d(e){const t=typeof e=="string"||typeof e=="number"?String(e).trim():"";if(!t)return"";const n=/^#icon-(.+)$/i.exec(t);if(n)return n[1].trim();const c=/^icon-\[([^\[\]]+?)--([^\[\]]+?)\]$/i.exec(t);return c?`iconify:${c[1]}:${c[2]}`:t}function p(e){return e.toLocaleLowerCase()}function C(e){return e?Array.isArray(e)?[...e]:Object.entries(e).map(([t,n])=>({name:t,target:n})):[]}function K(e,t){const n={...e.label===void 0?{}:{label:q(e.label,t)},...e.keywords===void 0?{}:{keywords:D(e.keywords,t)}};switch(e.source){case"symbol":return b({name:t,source:"symbol",value:v("symbol",e.value,t),...n});case"component":return b({name:t,source:"component",value:v("component",e.value,t),...n});case"class":return b({name:t,source:"class",value:v("class",e.value,t),...n});default:throw new Error(`QyIcon definition "${t}" has unsupported source "${String(e.source)}".`)}}function v(e,t,n){if(e==="symbol"){if(typeof t!="string"||!/^#[^\s#]+$/.test(t))throw new Error(`QyIcon symbol "${n}" must be a same-document #fragment.`);return t}if(e==="component"){if(typeof t!="object"&&typeof t!="function"||t===null)throw new Error(`QyIcon component "${n}" must be a Vue component.`);return t}if(e!=="class")throw new Error(`QyIcon definition "${n}" has unsupported source "${String(e)}".`);if(typeof t!="string"||!t.trim()||!/^[A-Za-z0-9_:.\/\[\]%-]+(?:\s+[A-Za-z0-9_:.\/\[\]%-]+)*$/.test(t.trim()))throw new Error(`QyIcon class "${n}" must be a trusted static class string.`);return t.trim()}function q(e,t){if(typeof e!="string")throw new Error(`QyIcon label "${t}" must be a string.`);return e}function D(e,t){if(!Array.isArray(e)||e.some(n=>typeof n!="string"))throw new Error(`QyIcon keywords "${t}" must be strings.`);return Object.freeze([...e])}function b(e){return e.keywords&&!Object.isFrozen(e.keywords)&&(e={...e,keywords:Object.freeze([...e.keywords])}),Object.freeze(e)}function Q(e){return b({...e,...e.keywords?{keywords:[...e.keywords]}:{}})}const P=["role","aria-label","aria-hidden","data-qy-icon-missing"],L={key:1,"aria-hidden":"true",focusable:"false"},T=["href","xlink:href"],V=r.defineComponent({name:"QyIcon",inheritAttrs:!1,__name:"index",props:{name:{},icon:{},size:{default:"1em"},color:{default:"currentColor"},spin:{type:Boolean,default:!1},label:{}},setup(e){const t=e,n=r.useAttrs(),c=r.useSlots(),i=r.inject(I,null),g=r.computed(()=>t.icon?r.markRaw(r.toRaw(t.icon)):void 0),f=r.computed(()=>t.name===void 0||t.name===null?"":d(t.name)),a=r.computed(()=>{if(!(t.icon||!i||!f.value))return i.resolve(f.value)}),s=r.ref(null),u=r.computed(()=>!!(!t.icon&&f.value&&!a.value)),l=r.computed(()=>{const o=typeof t.label=="string"?t.label.trim():"";if(o)return o;const y=n["aria-label"];return R(y)?String(y):""}),w=r.computed(()=>l.value?"img":n.role),m=r.computed(()=>O(t.size)),$=r.computed(()=>({width:m.value,height:m.value,fontSize:m.value,color:t.color||"currentColor"})),S=r.computed(()=>{const o={};for(const[y,h]of Object.entries(n))A(y)&&(o[y]=h);return o}),j=r.computed(()=>Object.freeze({name:f.value}));r.watchEffect(()=>{const o=a.value;s.value&&(o==null?void 0:o.source)==="symbol"&&(s.value.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o.value),s.value.setAttribute("xlink:href",o.value))}),r.watchEffect(()=>{});function O(o){return typeof o=="number"?Number.isFinite(o)&&o>0?`${o}px`:"1em":o.trim()||"1em"}function R(o){return typeof o=="string"?o.trim().length>0:o!=null&&o!==!1}function A(o){return o!=="class"&&o!=="style"&&o!=="role"&&o!=="aria-label"&&o!=="aria-hidden"&&o!=="data-qy-icon-missing"&&(o==="id"||o==="title"||o.startsWith("data-")||o.startsWith("aria-"))}return(o,y)=>{var h,k,_;return r.openBlock(),r.createElementBlock("span",r.mergeProps(S.value,{class:["qy-icon",[r.unref(n).class,{"is-spin":t.spin}]],style:[r.unref(n).style,$.value],role:w.value,"aria-label":l.value||void 0,"aria-hidden":l.value?void 0:"true","data-qy-icon-missing":u.value?f.value:void 0}),[g.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(g.value),{key:0,"aria-hidden":"true"})):((h=a.value)==null?void 0:h.source)==="symbol"?(r.openBlock(),r.createElementBlock("svg",L,[r.createElementVNode("use",{ref_key:"symbolElement",ref:s,href:a.value.value,"xlink:href":a.value.value},null,8,T)])):((k=a.value)==null?void 0:k.source)==="component"?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(a.value.value),{key:2,"aria-hidden":"true"})):((_=a.value)==null?void 0:_.source)==="class"?(r.openBlock(),r.createElementBlock("span",{key:3,class:r.normalizeClass(["qy-icon__class",a.value.value]),"aria-hidden":"true"},null,2)):u.value&&r.unref(c).fallback?r.renderSlot(o.$slots,"fallback",r.normalizeProps(r.guardReactiveProps(j.value)),void 0,!0,4):r.createCommentVNode("",!0)],16,P)}}}),Y=N._export_sfc(V,[["__scopeId","data-v-e4e9c6ae"]]);exports.Icon=Y;exports.QY_ICON_REGISTRY_KEY=I;exports.createQyIconPlugin=B;exports.createQyIconRegistry=z;exports.mergeQyIconRegistries=x;exports.normalizeQyIconName=d;
|