vxe-pc-ui 4.16.21 → 4.16.22
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/dist/all.esm.js +316 -66
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/color-picker/index.js +14 -0
- package/es/color-picker/src/color-picker.js +40 -28
- package/es/color-picker/src/util.js +252 -36
- package/es/date-picker/src/date-picker.js +2 -1
- package/es/date-range-picker/src/date-range-picker.js +2 -1
- package/es/icon/style.css +1 -1
- package/es/select/src/select.js +2 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/color-picker/index.js +14 -0
- package/lib/color-picker/index.min.js +1 -1
- package/lib/color-picker/src/color-picker.js +38 -27
- package/lib/color-picker/src/color-picker.min.js +1 -1
- package/lib/color-picker/src/util.js +272 -49
- package/lib/color-picker/src/util.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +2 -1
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +2 -1
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +324 -80
- package/lib/index.umd.min.js +1 -1
- package/lib/select/src/select.js +2 -1
- package/lib/select/src/select.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/color-picker/index.ts +15 -0
- package/packages/color-picker/src/color-picker.ts +40 -29
- package/packages/color-picker/src/util.ts +267 -42
- package/packages/date-picker/src/date-picker.ts +3 -2
- package/packages/date-range-picker/src/date-range-picker.ts +3 -2
- package/packages/select/src/select.ts +3 -2
- package/types/components/color-picker.d.ts +93 -0
- package/types/components/grid.d.ts +6 -0
- package/types/components/table.d.ts +2 -2
- package/types/ui/index.d.ts +2 -0
- /package/es/icon/{iconfont.1784868322028.ttf → iconfont.1784893283450.ttf} +0 -0
- /package/es/icon/{iconfont.1784868322028.woff → iconfont.1784893283450.woff} +0 -0
- /package/es/icon/{iconfont.1784868322028.woff2 → iconfont.1784893283450.woff2} +0 -0
- /package/es/{iconfont.1784868322028.ttf → iconfont.1784893283450.ttf} +0 -0
- /package/es/{iconfont.1784868322028.woff → iconfont.1784893283450.woff} +0 -0
- /package/es/{iconfont.1784868322028.woff2 → iconfont.1784893283450.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1784868322028.ttf → iconfont.1784893283450.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1784868322028.woff → iconfont.1784893283450.woff} +0 -0
- /package/lib/icon/style/{iconfont.1784868322028.woff2 → iconfont.1784893283450.woff2} +0 -0
- /package/lib/{iconfont.1784868322028.ttf → iconfont.1784893283450.ttf} +0 -0
- /package/lib/{iconfont.1784868322028.woff → iconfont.1784893283450.woff} +0 -0
- /package/lib/{iconfont.1784868322028.woff2 → iconfont.1784893283450.woff2} +0 -0
|
@@ -11,7 +11,7 @@ import VxeDatePanelComponent from '../../date-panel'
|
|
|
11
11
|
import VxeButtonComponent from '../../button'
|
|
12
12
|
import VxeButtonGroupComponent from '../../button-group'
|
|
13
13
|
|
|
14
|
-
import type { VxeDateRangePickerConstructor, VxeDateRangePickerEmits, DateRangePickerInternalData, DateRangePickerReactData, DateRangePickerMethods, VxeDateRangePickerPropTypes, DateRangePickerPrivateRef, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines, ValueOf, VxeModalConstructor, VxeDatePanelPropTypes, VxeDrawerConstructor, VxeModalMethods, VxeDrawerMethods, VxeDatePanelEvents, VxeDateRangePickerDefines, VxeButtonGroupEvents, VxeDatePanelConstructor } from '../../../types'
|
|
14
|
+
import type { VxeDateRangePickerConstructor, VxeDateRangePickerEmits, DateRangePickerInternalData, DateRangePickerReactData, DateRangePickerMethods, VxeDateRangePickerPropTypes, DateRangePickerPrivateRef, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines, ValueOf, VxeModalConstructor, VxeDatePanelPropTypes, VxeDrawerConstructor, VxeModalMethods, VxeDrawerMethods, VxeDatePanelEvents, VxeDateRangePickerDefines, VxeButtonGroupEvents, VxeDatePanelConstructor, VxeCardConstructor, VxeCardPrivateMethods } from '../../../types'
|
|
15
15
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
16
16
|
|
|
17
17
|
const { errLog } = createComponentLog('date-range-picker')
|
|
@@ -176,6 +176,7 @@ export default defineVxeComponent({
|
|
|
176
176
|
const $xeModal = inject<(VxeModalConstructor & VxeModalMethods) | null>('$xeModal', null)
|
|
177
177
|
const $xeDrawer = inject<(VxeDrawerConstructor & VxeDrawerMethods) | null>('$xeDrawer', null)
|
|
178
178
|
const $xeTable = inject<(VxeTableConstructor & VxeTablePrivateMethods) | null>('$xeTable', null)
|
|
179
|
+
const $xeCard = inject<(VxeCardConstructor & VxeCardPrivateMethods) | null>('$xeCard', null)
|
|
179
180
|
const $xeForm = inject<(VxeFormConstructor & VxeFormPrivateMethods) | null>('$xeForm', null)
|
|
180
181
|
const formItemInfo = inject<VxeFormDefines.ProvideItemInfo | null>('xeFormItemInfo', null)
|
|
181
182
|
|
|
@@ -222,7 +223,7 @@ export default defineVxeComponent({
|
|
|
222
223
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
223
224
|
return globalTransfer
|
|
224
225
|
}
|
|
225
|
-
if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
|
|
226
|
+
if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
|
|
226
227
|
return true
|
|
227
228
|
}
|
|
228
229
|
}
|
|
@@ -9,7 +9,7 @@ import { createComponentLog } from '../../ui/src/log'
|
|
|
9
9
|
import VxeInputComponent from '../../input/src/input'
|
|
10
10
|
import VxeButtonComponent from '../../button/src/button'
|
|
11
11
|
|
|
12
|
-
import type { VxeSelectPropTypes, VxeSelectConstructor, SelectInternalData, SelectReactData, VxeSelectDefines, VxeButtonEvents, ValueOf, VxeSelectEmits, VxeComponentSlotType, VxeInputConstructor, SelectMethods, SelectPrivateRef, VxeSelectMethods, VxeOptionProps, VxeDrawerConstructor, VxeDrawerMethods, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, VxeModalConstructor, VxeModalMethods, VxeInputEvents, VxeComponentStyleType } from '../../../types'
|
|
12
|
+
import type { VxeSelectPropTypes, VxeSelectConstructor, SelectInternalData, SelectReactData, VxeSelectDefines, VxeButtonEvents, ValueOf, VxeSelectEmits, VxeComponentSlotType, VxeInputConstructor, SelectMethods, SelectPrivateRef, VxeSelectMethods, VxeOptionProps, VxeDrawerConstructor, VxeDrawerMethods, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, VxeModalConstructor, VxeModalMethods, VxeInputEvents, VxeComponentStyleType, VxeCardConstructor, VxeCardPrivateMethods } from '../../../types'
|
|
13
13
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
14
14
|
|
|
15
15
|
const { errLog } = createComponentLog('select')
|
|
@@ -216,6 +216,7 @@ export default defineVxeComponent({
|
|
|
216
216
|
const $xeModal = inject<(VxeModalConstructor & VxeModalMethods)| null>('$xeModal', null)
|
|
217
217
|
const $xeDrawer = inject<(VxeDrawerConstructor & VxeDrawerMethods) | null>('$xeDrawer', null)
|
|
218
218
|
const $xeTable = inject<(VxeTableConstructor & VxeTablePrivateMethods) | null>('$xeTable', null)
|
|
219
|
+
const $xeCard = inject<(VxeCardConstructor & VxeCardPrivateMethods) | null>('$xeCard', null)
|
|
219
220
|
const $xeForm = inject<(VxeFormConstructor & VxeFormPrivateMethods)| null>('$xeForm', null)
|
|
220
221
|
const formItemInfo = inject<VxeFormDefines.ProvideItemInfo | null>('xeFormItemInfo', null)
|
|
221
222
|
|
|
@@ -280,7 +281,7 @@ export default defineVxeComponent({
|
|
|
280
281
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
281
282
|
return globalTransfer
|
|
282
283
|
}
|
|
283
|
-
if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
|
|
284
|
+
if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
|
|
284
285
|
return true
|
|
285
286
|
}
|
|
286
287
|
}
|
|
@@ -146,6 +146,53 @@ export interface VxeColorPickerMethods extends ColorPickerMethods { }
|
|
|
146
146
|
export interface ColorPickerPrivateMethods { }
|
|
147
147
|
export interface VxeColorPickerPrivateMethods extends ColorPickerPrivateMethods { }
|
|
148
148
|
|
|
149
|
+
export interface ColorController {
|
|
150
|
+
/**
|
|
151
|
+
* 解析颜色
|
|
152
|
+
*/
|
|
153
|
+
parseColor<T extends keyof VxeColorPickerDefines.ParseResultMap>(color: string, format?: T): VxeColorPickerDefines.ParseResultMap[T] | null
|
|
154
|
+
/**
|
|
155
|
+
* 判断颜色是否 RGB 格式
|
|
156
|
+
*/
|
|
157
|
+
hasRgb(color: string): boolean
|
|
158
|
+
/**
|
|
159
|
+
* 判断颜色是否 HEX 格式
|
|
160
|
+
*/
|
|
161
|
+
hasHex(color: string): boolean
|
|
162
|
+
/**
|
|
163
|
+
* 转成 RGB 格式
|
|
164
|
+
*/
|
|
165
|
+
toRgb(color: string): VxeColorPickerDefines.RgbObj | null
|
|
166
|
+
/**
|
|
167
|
+
* 转成 RGB 字符串格式
|
|
168
|
+
*/
|
|
169
|
+
toRgbString(color: string): string
|
|
170
|
+
/**
|
|
171
|
+
* 转成 HEX 格式
|
|
172
|
+
*/
|
|
173
|
+
toHex(color: string): VxeColorPickerDefines.HexObj | null
|
|
174
|
+
/**
|
|
175
|
+
* 转成 HEX 字符串格式
|
|
176
|
+
*/
|
|
177
|
+
toHexString(color: string): string
|
|
178
|
+
/**
|
|
179
|
+
* 转成 HSL 格式
|
|
180
|
+
*/
|
|
181
|
+
toHsl(color: string): VxeColorPickerDefines.HslObj | null
|
|
182
|
+
/**
|
|
183
|
+
* 转成 HSV 格式
|
|
184
|
+
*/
|
|
185
|
+
toHsv(color: string): VxeColorPickerDefines.HsvObj | null
|
|
186
|
+
/**
|
|
187
|
+
* 对颜色进行高亮
|
|
188
|
+
*/
|
|
189
|
+
lighten(color: string, ratio: number): string
|
|
190
|
+
/**
|
|
191
|
+
* 对颜色进行加深
|
|
192
|
+
*/
|
|
193
|
+
darken(color: string, ratio: number): string
|
|
194
|
+
}
|
|
195
|
+
|
|
149
196
|
export type VxeColorPickerEmits = [
|
|
150
197
|
'update:modelValue',
|
|
151
198
|
'change',
|
|
@@ -157,6 +204,52 @@ export namespace VxeColorPickerDefines {
|
|
|
157
204
|
export interface ColorPickerEventParams extends VxeComponentEventParams {
|
|
158
205
|
$colorPicker: VxeColorPickerConstructor
|
|
159
206
|
}
|
|
207
|
+
|
|
208
|
+
export type ParseResultMap = {
|
|
209
|
+
'': VxeColorPickerDefines.RgbObj
|
|
210
|
+
'rgb': VxeColorPickerDefines.RgbObj
|
|
211
|
+
'rgba': VxeColorPickerDefines.RgbObj
|
|
212
|
+
'hex': VxeColorPickerDefines.HexObj
|
|
213
|
+
'hsl': VxeColorPickerDefines.HslObj
|
|
214
|
+
'hsv': VxeColorPickerDefines.HsvObj
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface RgbObj {
|
|
218
|
+
type: 'rgba' | 'rgb'
|
|
219
|
+
value: string
|
|
220
|
+
label: string
|
|
221
|
+
r: number
|
|
222
|
+
g: number
|
|
223
|
+
b: number
|
|
224
|
+
a: number
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface HexObj {
|
|
228
|
+
type: 'hex'
|
|
229
|
+
value: string
|
|
230
|
+
label: string
|
|
231
|
+
hex: string
|
|
232
|
+
hexV: string
|
|
233
|
+
hexA: string
|
|
234
|
+
a: number
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export interface HslObj {
|
|
238
|
+
type: 'hsl'
|
|
239
|
+
value: string
|
|
240
|
+
h: number
|
|
241
|
+
s: number
|
|
242
|
+
l: number
|
|
243
|
+
a: number
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export interface HsvObj {
|
|
247
|
+
type: 'hsv'
|
|
248
|
+
value: string
|
|
249
|
+
h: number
|
|
250
|
+
s: number
|
|
251
|
+
v: number
|
|
252
|
+
}
|
|
160
253
|
}
|
|
161
254
|
|
|
162
255
|
export type VxeColorPickerEventProps = {
|
|
@@ -7070,8 +7070,8 @@ export namespace VxeTableDefines {
|
|
|
7070
7070
|
export type CustomEventType = 'reset' | 'confirm' | 'update:width' | 'update:fixed' | 'update:sort' | 'update:visible' | 'update:align' | 'update:headerAlign' | 'update:footerAlign' | 'update:aggGroup' | 'update:aggFunc'
|
|
7071
7071
|
|
|
7072
7072
|
export interface CustomStoreData {
|
|
7073
|
-
|
|
7074
|
-
|
|
7073
|
+
pagerData?: {
|
|
7074
|
+
pSize?: number
|
|
7075
7075
|
}
|
|
7076
7076
|
alignData?: Record<string, VxeColumnPropTypes.Align>
|
|
7077
7077
|
headerAlignData?: Record<string, VxeColumnPropTypes.HeaderAlign>
|
package/types/ui/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { App } from 'vue'
|
|
2
2
|
import { VxeUI, getI18n, setConfig } from '@vxe-ui/core'
|
|
3
3
|
import { LoadingController } from '../components/loading'
|
|
4
|
+
import { ColorController } from '../components/color-picker'
|
|
4
5
|
import { ModalController } from '../components/modal'
|
|
5
6
|
import { DrawerController } from '../components/drawer'
|
|
6
7
|
import { WatermarkController } from '../components/watermark'
|
|
@@ -34,6 +35,7 @@ export const readFile: VxeUploadDefines.ReadFileFunction
|
|
|
34
35
|
declare module '@vxe-ui/core' {
|
|
35
36
|
export interface VxeUIExport {
|
|
36
37
|
loading: LoadingController
|
|
38
|
+
color: ColorController
|
|
37
39
|
modal: ModalController
|
|
38
40
|
drawer: DrawerController
|
|
39
41
|
watermark: WatermarkController
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|