vxe-pc-ui 3.16.20 → 3.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/es/button/src/button.js +1 -1
- package/es/calendar/style.css +2 -0
- package/es/calendar/style.min.css +1 -1
- package/es/cascader/style.css +2 -0
- package/es/cascader/style.min.css +1 -1
- package/es/checkbox/style.css +1 -0
- package/es/checkbox/style.min.css +1 -1
- package/es/checkbox-button/style.css +1 -0
- package/es/checkbox-button/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/link/src/link.js +1 -1
- package/es/list/style.css +3 -0
- package/es/list/style.min.css +1 -1
- package/es/menu/src/menu.js +2 -2
- package/es/print/src/util.js +1 -1
- package/es/radio/style.css +1 -0
- package/es/radio/style.min.css +1 -1
- package/es/select/src/select.js +2 -1
- package/es/select/style.css +2 -0
- package/es/select/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tree/style.css +2 -0
- package/es/tree/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-calendar/style.css +2 -0
- package/es/vxe-calendar/style.min.css +1 -1
- package/es/vxe-cascader/style.css +2 -0
- package/es/vxe-cascader/style.min.css +1 -1
- package/es/vxe-checkbox/style.css +1 -0
- package/es/vxe-checkbox/style.min.css +1 -1
- package/es/vxe-checkbox-button/style.css +1 -0
- package/es/vxe-checkbox-button/style.min.css +1 -1
- package/es/vxe-list/style.css +3 -0
- package/es/vxe-list/style.min.css +1 -1
- package/es/vxe-radio/style.css +1 -0
- package/es/vxe-radio/style.min.css +1 -1
- package/es/vxe-select/style.css +2 -0
- package/es/vxe-select/style.min.css +1 -1
- package/es/vxe-tree/style.css +2 -0
- package/es/vxe-tree/style.min.css +1 -1
- package/lib/button/src/button.js +1 -1
- package/lib/button/src/button.min.js +1 -1
- package/lib/calendar/style/style.css +2 -0
- package/lib/calendar/style/style.min.css +1 -1
- package/lib/cascader/style/style.css +2 -0
- package/lib/cascader/style/style.min.css +1 -1
- package/lib/checkbox/style/style.css +1 -0
- package/lib/checkbox/style/style.min.css +1 -1
- package/lib/checkbox-button/style/style.css +1 -0
- package/lib/checkbox-button/style/style.min.css +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 +266 -46
- 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 +323 -82
- package/lib/index.umd.min.js +1 -1
- package/lib/link/src/link.js +1 -1
- package/lib/link/src/link.min.js +1 -1
- package/lib/list/style/style.css +3 -0
- package/lib/list/style/style.min.css +1 -1
- package/lib/menu/src/menu.js +2 -2
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/print/src/util.js +1 -1
- package/lib/print/src/util.min.js +1 -1
- package/lib/radio/style/style.css +1 -0
- package/lib/radio/style/style.min.css +1 -1
- package/lib/select/src/select.js +2 -1
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +2 -0
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tree/style/style.css +2 -0
- package/lib/tree/style/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/lib/vxe-calendar/style/style.css +2 -0
- package/lib/vxe-calendar/style/style.min.css +1 -1
- package/lib/vxe-cascader/style/style.css +2 -0
- package/lib/vxe-cascader/style/style.min.css +1 -1
- package/lib/vxe-checkbox/style/style.css +1 -0
- package/lib/vxe-checkbox/style/style.min.css +1 -1
- package/lib/vxe-checkbox-button/style/style.css +1 -0
- package/lib/vxe-checkbox-button/style/style.min.css +1 -1
- package/lib/vxe-list/style/style.css +3 -0
- package/lib/vxe-list/style/style.min.css +1 -1
- package/lib/vxe-radio/style/style.css +1 -0
- package/lib/vxe-radio/style/style.min.css +1 -1
- package/lib/vxe-select/style/style.css +2 -0
- package/lib/vxe-select/style/style.min.css +1 -1
- package/lib/vxe-tree/style/style.css +2 -0
- package/lib/vxe-tree/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/button/src/button.ts +1 -1
- package/packages/color-picker/index.ts +15 -0
- package/packages/color-picker/src/color-picker.ts +41 -29
- package/packages/color-picker/src/util.ts +267 -42
- package/packages/date-picker/src/date-picker.ts +4 -2
- package/packages/date-range-picker/src/date-range-picker.ts +4 -2
- package/packages/link/src/link.ts +1 -1
- package/packages/menu/src/menu.ts +2 -2
- package/packages/print/src/util.ts +1 -1
- package/packages/select/src/select.ts +4 -2
- package/styles/components/checkbox-button.scss +1 -0
- package/styles/helpers/baseMixin.scss +2 -0
- package/styles/print/default.css +1 -0
- 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.1784793415987.ttf → iconfont.1784893277784.ttf} +0 -0
- /package/es/icon/{iconfont.1784793415987.woff → iconfont.1784893277784.woff} +0 -0
- /package/es/icon/{iconfont.1784793415987.woff2 → iconfont.1784893277784.woff2} +0 -0
- /package/es/{iconfont.1784793415987.ttf → iconfont.1784893277784.ttf} +0 -0
- /package/es/{iconfont.1784793415987.woff → iconfont.1784893277784.woff} +0 -0
- /package/es/{iconfont.1784793415987.woff2 → iconfont.1784893277784.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1784793415987.ttf → iconfont.1784893277784.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1784793415987.woff → iconfont.1784893277784.woff} +0 -0
- /package/lib/icon/style/{iconfont.1784793415987.woff2 → iconfont.1784893277784.woff2} +0 -0
- /package/lib/{iconfont.1784793415987.ttf → iconfont.1784893277784.ttf} +0 -0
- /package/lib/{iconfont.1784793415987.woff → iconfont.1784893277784.woff} +0 -0
- /package/lib/{iconfont.1784793415987.woff2 → iconfont.1784893277784.woff2} +0 -0
|
@@ -2,6 +2,7 @@ import { VueConstructor } from 'vue'
|
|
|
2
2
|
import { VxeUI } from '@vxe-ui/core'
|
|
3
3
|
import VxeColorPickerComponent from './src/color-picker'
|
|
4
4
|
import { dynamicApp } from '../dynamics'
|
|
5
|
+
import { parseColor, hasRgb, hasHex, toRgb, toHex, toHsl, toHsv, toRgbString, toHexString, lighten, darken } from './src/util'
|
|
5
6
|
|
|
6
7
|
export const VxeColorPicker = Object.assign({}, VxeColorPickerComponent, {
|
|
7
8
|
install (app: VueConstructor) {
|
|
@@ -12,5 +13,19 @@ export const VxeColorPicker = Object.assign({}, VxeColorPickerComponent, {
|
|
|
12
13
|
dynamicApp.use(VxeColorPicker)
|
|
13
14
|
VxeUI.component(VxeColorPickerComponent)
|
|
14
15
|
|
|
16
|
+
VxeUI.color = {
|
|
17
|
+
parseColor,
|
|
18
|
+
hasRgb,
|
|
19
|
+
hasHex,
|
|
20
|
+
toRgb,
|
|
21
|
+
toRgbString,
|
|
22
|
+
toHex,
|
|
23
|
+
toHexString,
|
|
24
|
+
toHsl,
|
|
25
|
+
toHsv,
|
|
26
|
+
lighten,
|
|
27
|
+
darken
|
|
28
|
+
}
|
|
29
|
+
|
|
15
30
|
export const ColorPicker = VxeColorPicker
|
|
16
31
|
export default VxeColorPicker
|
|
@@ -4,12 +4,12 @@ import XEUtils from 'xe-utils'
|
|
|
4
4
|
import { VxeUI, getIcon, getConfig, getI18n, globalEvents, createEvent, globalMixins, renderEmptyElement } from '../../ui'
|
|
5
5
|
import { getEventTargetNode, getPopupContainer, toCssUnit, updatePanelPlacement } from '../../ui/src/dom'
|
|
6
6
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils'
|
|
7
|
-
import {
|
|
7
|
+
import { parseValColor, updateColorAlpha, hexToHsv, rgbToHsv, rgbToHexVal, hexToRgb, hsvToRgb, toValRgb } from './util'
|
|
8
8
|
import VxeButtonComponent from '../../button'
|
|
9
9
|
import VxeInputComponent from '../../input'
|
|
10
10
|
import VxeNumberInputComponent from '../../number-input'
|
|
11
11
|
|
|
12
|
-
import type { ColorPickerReactData, VxeColorPickerPropTypes, VxeColorPickerEmits, VxeComponentSizeType, ColorPickerInternalData, ValueOf, VxeModalConstructor, VxeModalMethods, VxeDrawerConstructor, VxeDrawerMethods, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods } from '../../../types'
|
|
12
|
+
import type { ColorPickerReactData, VxeColorPickerPropTypes, VxeColorPickerEmits, VxeComponentSizeType, ColorPickerInternalData, ValueOf, VxeModalConstructor, VxeModalMethods, VxeDrawerConstructor, VxeDrawerMethods, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, VxeCardConstructor, VxeCardPrivateMethods } from '../../../types'
|
|
13
13
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
14
14
|
|
|
15
15
|
const WinEyeDropper = typeof window !== 'undefined' ? (window as any).EyeDropper : null
|
|
@@ -143,6 +143,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
143
143
|
$xeModal(): (VxeModalConstructor & VxeModalMethods) | null
|
|
144
144
|
$xeDrawer(): (VxeDrawerConstructor & VxeDrawerMethods) | null
|
|
145
145
|
$xeTable(): (VxeTableConstructor & VxeTablePrivateMethods) | null
|
|
146
|
+
$xeCard(): (VxeCardConstructor & VxeCardPrivateMethods) | null
|
|
146
147
|
$xeForm(): (VxeFormConstructor & VxeFormPrivateMethods) | null
|
|
147
148
|
formItemInfo(): VxeFormDefines.ProvideItemInfo | null
|
|
148
149
|
}),
|
|
@@ -180,6 +181,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
180
181
|
const $xeTable = $xeColorPicker.$xeTable
|
|
181
182
|
const $xeModal = $xeColorPicker.$xeModal
|
|
182
183
|
const $xeDrawer = $xeColorPicker.$xeDrawer
|
|
184
|
+
const $xeCard = $xeColorPicker.$xeCard
|
|
183
185
|
const $xeForm = $xeColorPicker.$xeForm
|
|
184
186
|
|
|
185
187
|
const { transfer } = props
|
|
@@ -188,7 +190,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
188
190
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
189
191
|
return globalTransfer
|
|
190
192
|
}
|
|
191
|
-
if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
|
|
193
|
+
if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
|
|
192
194
|
return true
|
|
193
195
|
}
|
|
194
196
|
}
|
|
@@ -284,31 +286,41 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
284
286
|
const isRgb = $xeColorPicker.computeIsRgb
|
|
285
287
|
const hueSliderEl = $xeColorPicker.$refs.refHueSliderElem as HTMLDivElement
|
|
286
288
|
const alphaSliderEl = $xeColorPicker.$refs.refAlphaSliderElem as HTMLDivElement
|
|
287
|
-
const colorRest =
|
|
288
|
-
reactData.hexValue =
|
|
289
|
-
reactData.rValue =
|
|
290
|
-
reactData.gValue =
|
|
291
|
-
reactData.bValue =
|
|
292
|
-
reactData.aValue =
|
|
293
|
-
if (colorRest
|
|
294
|
-
if (
|
|
295
|
-
|
|
296
|
-
const rgbRest = hexToRgb(colorRest.hex)
|
|
297
|
-
if (rgbRest) {
|
|
298
|
-
reactData.rValue = rgbRest.r
|
|
299
|
-
reactData.gValue = rgbRest.g
|
|
300
|
-
reactData.bValue = rgbRest.b
|
|
301
|
-
reactData.aValue = rgbRest.a
|
|
302
|
-
}
|
|
303
|
-
}
|
|
289
|
+
const colorRest = parseValColor(selectColor)
|
|
290
|
+
reactData.hexValue = ''
|
|
291
|
+
reactData.rValue = 0
|
|
292
|
+
reactData.gValue = 0
|
|
293
|
+
reactData.bValue = 0
|
|
294
|
+
reactData.aValue = 1
|
|
295
|
+
if (colorRest) {
|
|
296
|
+
if (colorRest.type === 'hex') {
|
|
297
|
+
reactData.hexValue = colorRest.hex
|
|
304
298
|
} else {
|
|
305
|
-
|
|
306
|
-
|
|
299
|
+
reactData.rValue = colorRest.r
|
|
300
|
+
reactData.gValue = colorRest.g
|
|
301
|
+
reactData.bValue = colorRest.b
|
|
302
|
+
reactData.aValue = colorRest.a
|
|
303
|
+
}
|
|
304
|
+
if (colorRest.value) {
|
|
305
|
+
if (isRgb) {
|
|
306
|
+
if (colorRest.type === 'hex') {
|
|
307
|
+
const rgbRest = hexToRgb(colorRest.hex)
|
|
308
|
+
if (rgbRest) {
|
|
309
|
+
reactData.rValue = rgbRest.r
|
|
310
|
+
reactData.gValue = rgbRest.g
|
|
311
|
+
reactData.bValue = rgbRest.b
|
|
312
|
+
reactData.aValue = rgbRest.a
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
} else {
|
|
316
|
+
if (colorRest.type !== 'hex') {
|
|
317
|
+
reactData.hexValue = rgbToHexVal(colorRest.r, colorRest.g, colorRest.b, colorRest.a)
|
|
318
|
+
}
|
|
307
319
|
}
|
|
308
320
|
}
|
|
309
321
|
}
|
|
310
322
|
if (isAniVisible) {
|
|
311
|
-
const hsvRest = colorRest.type === 'hex' ? hexToHsv(colorRest.hex) : rgbToHsv(colorRest)
|
|
323
|
+
const hsvRest = colorRest ? (colorRest.type === 'hex' ? hexToHsv(colorRest.hex) : rgbToHsv(colorRest)) : null
|
|
312
324
|
const colorPanelEl = $xeColorPicker.$refs.refColorPanelElem as HTMLDivElement
|
|
313
325
|
if (hsvRest) {
|
|
314
326
|
if (colorPanelEl) {
|
|
@@ -321,7 +333,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
321
333
|
}
|
|
322
334
|
}
|
|
323
335
|
if (alphaSliderEl) {
|
|
324
|
-
$xeColorPicker.handleAlphaColor(alphaSliderEl.clientWidth *
|
|
336
|
+
$xeColorPicker.handleAlphaColor(alphaSliderEl.clientWidth * reactData.aValue)
|
|
325
337
|
}
|
|
326
338
|
}
|
|
327
339
|
},
|
|
@@ -543,7 +555,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
543
555
|
gNum = itemNum - offsetNum
|
|
544
556
|
break
|
|
545
557
|
}
|
|
546
|
-
reactData.panelColor =
|
|
558
|
+
reactData.panelColor = toValRgb(rNum, gNum, bNum)
|
|
547
559
|
hueSliderBtnEl.style.left = toCssUnit(offsetLeft)
|
|
548
560
|
}
|
|
549
561
|
},
|
|
@@ -627,7 +639,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
627
639
|
const reactData = $xeColorPicker.reactData
|
|
628
640
|
|
|
629
641
|
const { rValue, gValue, bValue, aValue } = reactData
|
|
630
|
-
reactData.selectColor =
|
|
642
|
+
reactData.selectColor = toValRgb(rValue, gValue, bValue, aValue)
|
|
631
643
|
$xeColorPicker.updateModelColor()
|
|
632
644
|
},
|
|
633
645
|
handleInputAlphaEvent () {
|
|
@@ -692,12 +704,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
692
704
|
const colorPanelRect = colorPanelEl.getBoundingClientRect()
|
|
693
705
|
const offsetTop = Math.min(clientHeight, Math.max(0, clientY - colorPanelRect.y))
|
|
694
706
|
const offsetLeft = Math.min(clientWidth, Math.max(0, clientX - colorPanelRect.x))
|
|
695
|
-
const colorRest =
|
|
707
|
+
const colorRest = parseValColor(panelColor)
|
|
696
708
|
if (colorRest) {
|
|
697
709
|
const hsvRest = colorRest.type === 'hex' ? hexToHsv(colorRest.hex) : rgbToHsv(colorRest)
|
|
698
710
|
if (hsvRest) {
|
|
699
711
|
const ragRest = hsvToRgb(hsvRest.h, offsetLeft / clientWidth, (1 - offsetTop / clientHeight))
|
|
700
|
-
reactData.selectColor =
|
|
712
|
+
reactData.selectColor = toValRgb(ragRest.r, ragRest.g, ragRest.b, showAlpha ? aValue : null)
|
|
701
713
|
$xeColorPicker.handlePanelColor(offsetLeft, offsetTop)
|
|
702
714
|
}
|
|
703
715
|
}
|
|
@@ -1089,7 +1101,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1089
1101
|
reactData.hexValue = val
|
|
1090
1102
|
},
|
|
1091
1103
|
change () {
|
|
1092
|
-
const colorRest =
|
|
1104
|
+
const colorRest = parseValColor(reactData.hexValue)
|
|
1093
1105
|
if (colorRest) {
|
|
1094
1106
|
if (colorRest.value) {
|
|
1095
1107
|
reactData.selectColor = colorRest.value
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
|
|
3
|
+
import type { VxeColorPickerDefines } from '../../../types'
|
|
4
|
+
|
|
3
5
|
const hexAlphaKeyMaps: Record<string, number> = {}
|
|
4
6
|
const hexAlphaNumMaps: Record<string, string> = {}
|
|
5
7
|
'FF,FC,FA,F7,F5,F2,F0,ED,EB,E8,E6,E3,E0,DE,DB,D9,D6,D4,D1,CF,CC,C9,C7,C4,C2,BF,BD,BA,B8,B5,B3,B0,AD,AB,A8,A6,A3,A1,9E,9C,99,96,94,91,8F,8C,8A,87,85,82,80,7D,7A,78,75,73,70,6E,6B,69,66,63,61,5E,5C,59,57,54,52,4F,4D,4A,47,45,42,40,3D,3B,38,36,33,30,2E,2B,29,26,24,21,1F,1C,1A,17,14,12,0F,0D,0A,08,05,03,00'.split(',').forEach((key, i) => {
|
|
@@ -10,15 +12,156 @@ const hexAlphaNumMaps: Record<string, string> = {}
|
|
|
10
12
|
|
|
11
13
|
const rgbRE = /^rgb(a?)\((\d{1,3})[,\s]+(\d{1,3})[,\s]+(\d{1,3})([,//\s]+([0-9.]{1,4})(%?))?\)$/
|
|
12
14
|
export function hasRgb (value: string) {
|
|
13
|
-
return value && rgbRE.test(value)
|
|
15
|
+
return !!(value && rgbRE.test(value))
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
const hexRE = /^(#?)([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/
|
|
17
19
|
export function hasHex (value: string) {
|
|
18
|
-
return value && hexRE.test(value)
|
|
20
|
+
return !!(value && hexRE.test(value))
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function toRgb (value: string) {
|
|
24
|
+
if (value) {
|
|
25
|
+
if (hexRE.test(value)) {
|
|
26
|
+
return hexToRgb(value)
|
|
27
|
+
}
|
|
28
|
+
return parseRgbVal(value)
|
|
29
|
+
}
|
|
30
|
+
return null
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toRgbString (value: string) {
|
|
34
|
+
const rgbRest = toRgb(value)
|
|
35
|
+
if (rgbRest) {
|
|
36
|
+
return rgbRest.label
|
|
37
|
+
}
|
|
38
|
+
return ''
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function toHex (value: string) {
|
|
42
|
+
if (value) {
|
|
43
|
+
if (rgbRE.test(value)) {
|
|
44
|
+
return rgbValToHex(value)
|
|
45
|
+
}
|
|
46
|
+
return parseHexVal(value)
|
|
47
|
+
}
|
|
48
|
+
return null
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function toHexString (value: string) {
|
|
52
|
+
const hexRest = toHex(value)
|
|
53
|
+
if (hexRest) {
|
|
54
|
+
return hexRest.label
|
|
55
|
+
}
|
|
56
|
+
return ''
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function toHsl (value: string) {
|
|
60
|
+
const rgbRest = toRgb(value)
|
|
61
|
+
if (rgbRest) {
|
|
62
|
+
const hslRest = rgbToHsl(rgbRest)
|
|
63
|
+
if (hslRest) {
|
|
64
|
+
const rest: VxeColorPickerDefines.HslObj = { value, type: 'hsl', ...hslRest }
|
|
65
|
+
return rest
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return null
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function toHsv (value: string) {
|
|
72
|
+
const rgbRest = toRgb(value)
|
|
73
|
+
if (rgbRest) {
|
|
74
|
+
const hslRest = rgbToHsv(rgbRest)
|
|
75
|
+
if (hslRest) {
|
|
76
|
+
const rest: VxeColorPickerDefines.HsvObj = { value, type: 'hsv', ...hslRest }
|
|
77
|
+
return rest
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return null
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function parseColor<T extends keyof VxeColorPickerDefines.ParseResultMap> (val: string, format?: T): VxeColorPickerDefines.ParseResultMap[T] | null {
|
|
84
|
+
if (val) {
|
|
85
|
+
if (format === 'hex') {
|
|
86
|
+
return toHex(val) as any
|
|
87
|
+
}
|
|
88
|
+
if (format === 'hsl') {
|
|
89
|
+
return toHsl(val) as any
|
|
90
|
+
}
|
|
91
|
+
if (format === 'hsv') {
|
|
92
|
+
return toHsv(val) as any
|
|
93
|
+
}
|
|
94
|
+
return toRgb(val) as any
|
|
95
|
+
}
|
|
96
|
+
return null
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function handleNumClamp (val: number) {
|
|
100
|
+
return Math.min(1, Math.max(0, val))
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function createLightenDarken (isAdd: number) {
|
|
104
|
+
return function (val: string, ratio?: number) {
|
|
105
|
+
const colorRest = parseColor(val)
|
|
106
|
+
const hslRest = toHsl(val)
|
|
107
|
+
if (colorRest && hslRest) {
|
|
108
|
+
ratio = ratio === 0 ? 0 : ratio || 10
|
|
109
|
+
hslRest.l += (isAdd ? ratio : -ratio) / 100
|
|
110
|
+
hslRest.l = handleNumClamp(hslRest.l)
|
|
111
|
+
const rgbRest = hslToRgb(hslRest)
|
|
112
|
+
if (rgbRest) {
|
|
113
|
+
if (colorRest?.type === 'hex') {
|
|
114
|
+
return rgbToHexVal(rgbRest.r, rgbRest.g, rgbRest.b, hslRest.a)
|
|
115
|
+
}
|
|
116
|
+
return toValRgb(rgbRest.r, rgbRest.g, rgbRest.b, hslRest.a)
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return val
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export const lighten = createLightenDarken(1)
|
|
124
|
+
export const darken = createLightenDarken(0)
|
|
125
|
+
|
|
126
|
+
function parseHexVal (value: string) {
|
|
127
|
+
if (value) {
|
|
128
|
+
const hexRest = value.match(hexRE)
|
|
129
|
+
if (hexRest) {
|
|
130
|
+
const rest:VxeColorPickerDefines.HexObj = {
|
|
131
|
+
value,
|
|
132
|
+
label: value,
|
|
133
|
+
type: 'hex',
|
|
134
|
+
hex: value,
|
|
135
|
+
hexV: hexRest[2],
|
|
136
|
+
hexA: hexRest[3] || '',
|
|
137
|
+
a: (hexRest[3] ? hexAlphaKeyMaps[hexRest[3].toUpperCase()] : 1) || 1
|
|
138
|
+
}
|
|
139
|
+
return rest
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return null
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function parseRgbVal (value: string) {
|
|
146
|
+
if (value) {
|
|
147
|
+
const rgbRest = value.match(rgbRE)
|
|
148
|
+
if (rgbRest) {
|
|
149
|
+
const rest: VxeColorPickerDefines.RgbObj = {
|
|
150
|
+
value,
|
|
151
|
+
label: value,
|
|
152
|
+
type: (rgbRest[6] ? 'rgba' : 'rgb') as 'rgba' | 'rgb',
|
|
153
|
+
r: parseInt(rgbRest[2]),
|
|
154
|
+
g: parseInt(rgbRest[3]),
|
|
155
|
+
b: parseInt(rgbRest[4]),
|
|
156
|
+
a: rgbRest[7] ? parseInt(rgbRest[6]) / 100 : (rgbRest[6] ? parseFloat(rgbRest[6]) : 1)
|
|
157
|
+
}
|
|
158
|
+
return rest
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return null
|
|
19
162
|
}
|
|
20
163
|
|
|
21
|
-
export function
|
|
164
|
+
export function parseValColor (value: string) {
|
|
22
165
|
const rest = {
|
|
23
166
|
value: '',
|
|
24
167
|
type: '',
|
|
@@ -31,57 +174,47 @@ export function parseColor (value: string) {
|
|
|
31
174
|
a: 1
|
|
32
175
|
}
|
|
33
176
|
if (value) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
rest
|
|
38
|
-
rest.hex = value
|
|
39
|
-
rest.hexV = hexRest[2]
|
|
40
|
-
rest.hexA = hexRest[3] || ''
|
|
41
|
-
rest.a = (hexRest[3] ? hexAlphaKeyMaps[hexRest[3].toUpperCase()] : 1) || 1
|
|
42
|
-
}
|
|
43
|
-
const rgbRest = value.match(rgbRE)
|
|
44
|
-
if (rgbRest) {
|
|
45
|
-
rest.value = value
|
|
46
|
-
rest.type = rgbRest[6] ? 'rgba' : 'rgb'
|
|
47
|
-
rest.r = parseInt(rgbRest[2])
|
|
48
|
-
rest.g = parseInt(rgbRest[3])
|
|
49
|
-
rest.b = parseInt(rgbRest[4])
|
|
50
|
-
rest.a = rgbRest[7] ? parseInt(rgbRest[6]) / 100 : (rgbRest[6] ? parseFloat(rgbRest[6]) : 1)
|
|
177
|
+
if (hexRE.test(value)) {
|
|
178
|
+
return Object.assign(rest, parseHexVal(value))
|
|
179
|
+
} else if (rgbRE.test(value)) {
|
|
180
|
+
return Object.assign(rest, parseRgbVal(value))
|
|
51
181
|
}
|
|
52
182
|
}
|
|
53
183
|
return rest
|
|
54
184
|
}
|
|
55
185
|
|
|
56
186
|
export function updateColorAlpha (value: string, alpha: number = 1) {
|
|
57
|
-
const colorRest =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return
|
|
187
|
+
const colorRest = parseValColor(value)
|
|
188
|
+
if (colorRest) {
|
|
189
|
+
const { type } = colorRest
|
|
190
|
+
if (type === 'hex') {
|
|
191
|
+
return `#${colorRest.hexV}${alpha === 1 ? '' : (hexAlphaNumMaps[alpha] || '')}`
|
|
192
|
+
}
|
|
193
|
+
return toValRgb(colorRest.r, colorRest.g, colorRest.b, alpha)
|
|
64
194
|
}
|
|
65
195
|
return ''
|
|
66
196
|
}
|
|
67
197
|
|
|
68
|
-
export function
|
|
69
|
-
if (XEUtils.eqNull(a)) {
|
|
198
|
+
export function toValRgb (r: number, g: number, b: number, a?: number | null) {
|
|
199
|
+
if (XEUtils.eqNull(a) || a === 1) {
|
|
70
200
|
return `rgb(${r},${g},${b})`
|
|
71
201
|
}
|
|
72
202
|
return `rgba(${r},${g},${b},${a})`
|
|
73
203
|
}
|
|
74
204
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return ''
|
|
205
|
+
function rgbValToHex (value: string) {
|
|
206
|
+
const rgbRest = parseRgbVal(value)
|
|
207
|
+
if (rgbRest) {
|
|
208
|
+
const hexVal = rgbToHexVal(rgbRest.r, rgbRest.g, rgbRest.b, rgbRest.a)
|
|
209
|
+
if (hexVal) {
|
|
210
|
+
return parseHexVal(hexVal)
|
|
211
|
+
}
|
|
83
212
|
}
|
|
84
|
-
|
|
213
|
+
return null
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function rgbToHexVal (r: number, g: number, b: number, a?: number) {
|
|
217
|
+
a = XEUtils.isNumber(a) ? a : 1
|
|
85
218
|
const hexR = r.toString(16).padStart(2, '0')
|
|
86
219
|
const hexG = g.toString(16).padStart(2, '0')
|
|
87
220
|
const hexB = b.toString(16).padStart(2, '0')
|
|
@@ -136,6 +269,91 @@ export function rgbToHsv (rgbRest: {
|
|
|
136
269
|
}
|
|
137
270
|
}
|
|
138
271
|
|
|
272
|
+
function rgbToHsl (rgbRest: {
|
|
273
|
+
r: number
|
|
274
|
+
g: number
|
|
275
|
+
b: number
|
|
276
|
+
a?: number
|
|
277
|
+
}) {
|
|
278
|
+
if (!rgbRest) {
|
|
279
|
+
return null
|
|
280
|
+
}
|
|
281
|
+
const { r, g, b, a } = rgbRest
|
|
282
|
+
const rNorm = r / 255
|
|
283
|
+
const gNorm = g / 255
|
|
284
|
+
const bNorm = b / 255
|
|
285
|
+
|
|
286
|
+
const max = Math.max(rNorm, gNorm, bNorm)
|
|
287
|
+
const min = Math.min(rNorm, gNorm, bNorm)
|
|
288
|
+
const delta = max - min
|
|
289
|
+
|
|
290
|
+
let h = 0
|
|
291
|
+
let s = 0
|
|
292
|
+
const l = (max + min) / 2
|
|
293
|
+
|
|
294
|
+
if (delta !== 0) {
|
|
295
|
+
s = l > 0.5 ? delta / (2 - max - min) : delta / (max + min)
|
|
296
|
+
if (max === rNorm) {
|
|
297
|
+
h = ((gNorm - bNorm) / delta) % 6
|
|
298
|
+
} else if (max === gNorm) {
|
|
299
|
+
h = (bNorm - rNorm) / delta + 2
|
|
300
|
+
} else {
|
|
301
|
+
h = (rNorm - gNorm) / delta + 4
|
|
302
|
+
}
|
|
303
|
+
h *= 60
|
|
304
|
+
if (h < 0) {
|
|
305
|
+
h += 360
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return {
|
|
310
|
+
h,
|
|
311
|
+
s,
|
|
312
|
+
l,
|
|
313
|
+
a: XEUtils.isNumber(a) ? a : 1
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
function hslToRgb (slRest: {
|
|
318
|
+
h: number
|
|
319
|
+
s: number
|
|
320
|
+
l: number
|
|
321
|
+
}) {
|
|
322
|
+
if (!slRest) {
|
|
323
|
+
return null
|
|
324
|
+
}
|
|
325
|
+
let { h, s, l } = slRest
|
|
326
|
+
const sNorm = s
|
|
327
|
+
const lNorm = l
|
|
328
|
+
|
|
329
|
+
h = ((h % 360) + 360) % 360
|
|
330
|
+
|
|
331
|
+
const c = (1 - Math.abs(2 * lNorm - 1)) * sNorm
|
|
332
|
+
const x = c * (1 - Math.abs((h / 60) % 2 - 1))
|
|
333
|
+
const m = lNorm - c / 2
|
|
334
|
+
|
|
335
|
+
let r: number, g: number, b: number
|
|
336
|
+
if (h >= 0 && h < 60) {
|
|
337
|
+
r = c; g = x; b = 0
|
|
338
|
+
} else if (h >= 60 && h < 120) {
|
|
339
|
+
r = x; g = c; b = 0
|
|
340
|
+
} else if (h >= 120 && h < 180) {
|
|
341
|
+
r = 0; g = c; b = x
|
|
342
|
+
} else if (h >= 180 && h < 240) {
|
|
343
|
+
r = 0; g = x; b = c
|
|
344
|
+
} else if (h >= 240 && h < 300) {
|
|
345
|
+
r = x; g = 0; b = c
|
|
346
|
+
} else {
|
|
347
|
+
r = c; g = 0; b = x
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
return {
|
|
351
|
+
r: Math.round((r + m) * 255),
|
|
352
|
+
g: Math.round((g + m) * 255),
|
|
353
|
+
b: Math.round((b + m) * 255)
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
139
357
|
export function hsvToRgb (h: number, s: number, v: number) {
|
|
140
358
|
let r = 0
|
|
141
359
|
let g = 0
|
|
@@ -186,11 +404,18 @@ export function hexToRgb (str: string) {
|
|
|
186
404
|
if (str) {
|
|
187
405
|
const rests = str.match(/^(#?)([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})?$/)
|
|
188
406
|
if (rests) {
|
|
407
|
+
const r = parseInt(rests[2], 16)
|
|
408
|
+
const g = parseInt(rests[3], 16)
|
|
409
|
+
const b = parseInt(rests[4], 16)
|
|
410
|
+
const a = (rests[5] ? hexAlphaKeyMaps[rests[5].toUpperCase()] : 1) || 1
|
|
189
411
|
return {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
412
|
+
value: str,
|
|
413
|
+
label: toValRgb(r, g, b, rests[5] ? a : null),
|
|
414
|
+
type: (rests[5] ? 'rgba' : 'rgb') as 'rgba' | 'rgb',
|
|
415
|
+
r,
|
|
416
|
+
g,
|
|
417
|
+
b,
|
|
418
|
+
a
|
|
194
419
|
}
|
|
195
420
|
}
|
|
196
421
|
}
|
|
@@ -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 { VxeDatePickerConstructor, VxeDatePickerEmits, DatePickerInternalData, DatePickerReactData, VxeButtonGroupDefines, VxeComponentSizeType, VxeDatePanelDefines, VxeDatePickerPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines, ValueOf, VxeModalConstructor, VxeDrawerConstructor, VxeModalMethods, VxeDrawerMethods, VxeDatePickerDefines, VxeDatePanelConstructor } from '../../../types'
|
|
14
|
+
import type { VxeDatePickerConstructor, VxeDatePickerEmits, DatePickerInternalData, DatePickerReactData, VxeButtonGroupDefines, VxeComponentSizeType, VxeDatePanelDefines, VxeDatePickerPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines, ValueOf, VxeModalConstructor, VxeDrawerConstructor, VxeModalMethods, VxeDrawerMethods, VxeDatePickerDefines, VxeDatePanelConstructor, VxeCardConstructor, VxeCardPrivateMethods } from '../../../types'
|
|
15
15
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
16
16
|
|
|
17
17
|
const { warnLog, errLog } = createComponentLog('date-picker')
|
|
@@ -206,6 +206,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
206
206
|
$xeModal(): (VxeModalConstructor & VxeModalMethods) | null
|
|
207
207
|
$xeDrawer(): (VxeDrawerConstructor & VxeDrawerMethods) | null
|
|
208
208
|
$xeTable(): (VxeTableConstructor & VxeTablePrivateMethods) | null
|
|
209
|
+
$xeCard(): (VxeCardConstructor & VxeCardPrivateMethods) | null
|
|
209
210
|
$xeForm(): (VxeFormConstructor & VxeFormPrivateMethods) | null
|
|
210
211
|
formItemInfo(): VxeFormDefines.ProvideItemInfo | null
|
|
211
212
|
}),
|
|
@@ -215,6 +216,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
215
216
|
const $xeTable = $xeDatePicker.$xeTable
|
|
216
217
|
const $xeModal = $xeDatePicker.$xeModal
|
|
217
218
|
const $xeDrawer = $xeDatePicker.$xeDrawer
|
|
219
|
+
const $xeCard = $xeDatePicker.$xeCard
|
|
218
220
|
const $xeForm = $xeDatePicker.$xeForm
|
|
219
221
|
|
|
220
222
|
const { transfer } = props
|
|
@@ -227,7 +229,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
227
229
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
228
230
|
return globalTransfer
|
|
229
231
|
}
|
|
230
|
-
if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
|
|
232
|
+
if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
|
|
231
233
|
return true
|
|
232
234
|
}
|
|
233
235
|
}
|
|
@@ -11,7 +11,7 @@ import VxeDatePanelComponent from '../../date-panel/src/date-panel'
|
|
|
11
11
|
import VxeButtonComponent from '../../button/src/button'
|
|
12
12
|
import VxeButtonGroupComponent from '../../button/src/button-group'
|
|
13
13
|
|
|
14
|
-
import type { VxeDateRangePickerConstructor, VxeDateRangePickerEmits, DateRangePickerReactData, DateRangePickerInternalData, VxeButtonGroupDefines, VxeComponentSizeType, VxeDateRangePickerPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines, ValueOf, VxeModalConstructor, VxeDrawerConstructor, VxeModalMethods, VxeDrawerMethods, VxeDateRangePickerDefines, VxeDatePanelConstructor } from '../../../types'
|
|
14
|
+
import type { VxeDateRangePickerConstructor, VxeDateRangePickerEmits, DateRangePickerReactData, DateRangePickerInternalData, VxeButtonGroupDefines, VxeComponentSizeType, VxeDateRangePickerPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines, ValueOf, VxeModalConstructor, VxeDrawerConstructor, VxeModalMethods, VxeDrawerMethods, VxeDateRangePickerDefines, 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')
|
|
@@ -199,6 +199,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
199
199
|
$xeModal(): (VxeModalConstructor & VxeModalMethods) | null
|
|
200
200
|
$xeDrawer(): (VxeDrawerConstructor & VxeDrawerMethods) | null
|
|
201
201
|
$xeTable(): (VxeTableConstructor & VxeTablePrivateMethods) | null
|
|
202
|
+
$xeCard(): (VxeCardConstructor & VxeCardPrivateMethods) | null
|
|
202
203
|
$xeForm(): (VxeFormConstructor & VxeFormPrivateMethods) | null
|
|
203
204
|
formItemInfo(): VxeFormDefines.ProvideItemInfo | null
|
|
204
205
|
}),
|
|
@@ -208,6 +209,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
208
209
|
const $xeTable = $xeDateRangePicker.$xeTable
|
|
209
210
|
const $xeModal = $xeDateRangePicker.$xeModal
|
|
210
211
|
const $xeDrawer = $xeDateRangePicker.$xeDrawer
|
|
212
|
+
const $xeCard = $xeDateRangePicker.$xeCard
|
|
211
213
|
const $xeForm = $xeDateRangePicker.$xeForm
|
|
212
214
|
|
|
213
215
|
const { transfer } = props
|
|
@@ -220,7 +222,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
220
222
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
221
223
|
return globalTransfer
|
|
222
224
|
}
|
|
223
|
-
if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
|
|
225
|
+
if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
|
|
224
226
|
return true
|
|
225
227
|
}
|
|
226
228
|
}
|
|
@@ -687,7 +687,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
687
687
|
to: routerLink,
|
|
688
688
|
target: linkTarget
|
|
689
689
|
},
|
|
690
|
-
|
|
690
|
+
nativeOn: linkOns
|
|
691
691
|
}, $xeMenu.renderMenuTitle(h, item, itemList))
|
|
692
692
|
: h('div', {
|
|
693
693
|
class: 'vxe-menu--item-link is--default',
|
|
@@ -747,7 +747,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
747
747
|
to: routerLink,
|
|
748
748
|
target: linkTarget
|
|
749
749
|
},
|
|
750
|
-
|
|
750
|
+
nativeOn: linkOns
|
|
751
751
|
}, $xeMenu.renderMenuTitle(h, item, itemList))
|
|
752
752
|
: h('div', {
|
|
753
753
|
class: 'vxe-menu--item-link is--default',
|
|
@@ -8,7 +8,7 @@ import type { VxePrintProps, VxePrintPropTypes, VxePrintDefines, VxePrintConstru
|
|
|
8
8
|
let printFrame: any
|
|
9
9
|
|
|
10
10
|
// 默认导出或打印的 HTML 样式
|
|
11
|
-
const defaultHtmlStyle = 'body{padding:0;color:rgba(0,0,0,0.7);font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu
|
|
11
|
+
const defaultHtmlStyle = 'body{padding:0;color:rgba(0,0,0,0.7);font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu}body *{-webkit-box-sizing:border-box;box-sizing:border-box}.vxe-table{border-collapse:collapse;text-align:left;border-spacing:0}.vxe-table.is--default-width,.vxe-table.is--auto-width{width:100%}.vxe-table.is--scale-width{table-layout:fixed}.vxe-table,.vxe-table th,.vxe-table td,.vxe-table td{white-space:pre-line;word-break:break-all;border-color:#D0D0D0;border-style:solid;border-width:0}.border--default,.border--full,.border--outer{border-top-width:1px}.border--default,.border--full,.border--outer{border-left-width:1px}.border--outer,.border--default th,.border--default td,.border--full th,.border--full td,.border--outer th,.border--inner th,.border--inner td{border-bottom-width:1px}.border--default,.border--outer,.border--full th,.border--full td{border-right-width:1px}.border--default th,.border--full th,.border--outer th{background-color:#f8f8f9}.vxe-table td>div,.vxe-table th>div{padding:0.5em 0.4em}.col--center{text-align:center}.col--right{text-align:right}.vxe-table .col--ellipsis>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.vxe-table--tree-node{text-align:left}.vxe-table--tree-node-wrapper{position:relative}.vxe-table--tree-icon-wrapper{position:absolute;top:50%;width:1em;height:1em;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.vxe-table--tree-unfold-icon,.vxe-table--tree-fold-icon{position:absolute;width:0;height:0;border-style:solid;border-width:0.5em;border-right-color:transparent;border-bottom-color:transparent}.vxe-table--tree-unfold-icon{left:.3em;top:0;border-left-color:#939599;border-top-color:transparent}.vxe-table--tree-fold-icon{left:0;top:.3em;border-left-color:transparent;border-top-color:#939599}.vxe-table--tree-cell{display:block;padding-left:1.5em}.vxe-table input[type="checkbox"]{margin:0}.vxe-table input[type="checkbox"],.vxe-table input[type="radio"],.vxe-table input[type="checkbox"]+span,.vxe-table input[type="radio"]+span{vertical-align:middle;padding-left:0.4em}'
|
|
12
12
|
|
|
13
13
|
export function trimHtml (html: string) {
|
|
14
14
|
return `${html}`.replace(/(<!---->)/, '')
|