vxe-table 4.7.78 → 4.7.80
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.ja-JP.md +1 -1
- package/README.md +1 -1
- package/es/locale/lang/en-US.js +0 -7
- package/es/locale/lang/hu-HU.d.ts +2 -0
- package/es/locale/lang/hu-HU.js +496 -501
- package/es/locale/lang/ja-JP.js +0 -7
- package/es/locale/lang/ko-KR.d.ts +2 -0
- package/es/locale/lang/ko-KR.js +0 -7
- package/es/locale/lang/pt-BR.js +0 -7
- package/es/locale/lang/ru-RU.d.ts +2 -0
- package/es/locale/lang/ru-RU.js +496 -503
- package/es/locale/lang/uk-UA.d.ts +2 -0
- package/es/locale/lang/uk-UA.js +666 -0
- package/es/locale/lang/vi-VN.js +0 -7
- package/es/locale/lang/zh-CHT.js +666 -0
- package/es/locale/lang/zh-CN.js +0 -7
- package/es/locale/lang/zh-HK.js +2 -2
- package/es/locale/lang/zh-MO.js +2 -2
- package/es/locale/lang/zh-TC.js +2 -673
- package/es/locale/lang/zh-TW.js +2 -2
- package/es/style.css +1 -1
- package/es/table/render/index.js +4 -25
- package/es/table/src/table.js +3 -3
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/vn.js +23 -0
- package/lib/index.umd.js +32 -37
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +0 -7
- package/lib/locale/lang/en-US.umd.js +0 -7
- package/lib/locale/lang/hu-HU.d.ts +2 -0
- package/lib/locale/lang/hu-HU.js +496 -501
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +686 -0
- package/lib/locale/lang/ja-JP.js +0 -7
- package/lib/locale/lang/ja-JP.umd.js +0 -7
- package/lib/locale/lang/ko-KR.d.ts +2 -0
- package/lib/locale/lang/ko-KR.js +0 -7
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +686 -0
- package/lib/locale/lang/pt-BR.js +0 -7
- package/lib/locale/lang/pt-BR.umd.js +0 -7
- package/lib/locale/lang/ru-RU.d.ts +2 -0
- package/lib/locale/lang/ru-RU.js +496 -503
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +686 -0
- package/lib/locale/lang/uk-UA.d.ts +2 -0
- package/lib/locale/lang/uk-UA.js +672 -0
- package/lib/locale/lang/uk-UA.min.js +1 -0
- package/lib/locale/lang/uk-UA.umd.js +686 -0
- package/lib/locale/lang/vi-VN.js +0 -7
- package/lib/locale/lang/zh-CHT.js +672 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -0
- package/lib/locale/lang/zh-CN.js +0 -7
- package/lib/locale/lang/zh-CN.umd.js +0 -7
- package/lib/locale/lang/zh-HK.js +2 -2
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +7 -677
- package/lib/locale/lang/zh-MO.js +2 -2
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +7 -677
- package/lib/locale/lang/zh-TC.js +3 -673
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +7 -677
- package/lib/locale/lang/zh-TW.js +2 -2
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +7 -677
- package/lib/style.css +1 -1
- package/lib/table/render/index.js +7 -28
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/table.js +3 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +2 -2
- 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/ui/src/vn.js +25 -0
- package/lib/ui/src/vn.min.js +1 -1
- package/package.json +4 -4
- package/packages/locale/lang/en-US.ts +0 -9
- package/packages/locale/lang/hu-HU.ts +496 -503
- package/packages/locale/lang/ja-JP.ts +0 -9
- package/packages/locale/lang/ko-KR.ts +0 -9
- package/packages/locale/lang/pt-BR.ts +0 -9
- package/packages/locale/lang/ru-RU.ts +496 -505
- package/packages/locale/lang/uk-UA.ts +666 -0
- package/packages/locale/lang/vi-VN.ts +0 -9
- package/packages/locale/lang/zh-CHT.ts +666 -0
- package/packages/locale/lang/zh-CN.ts +0 -9
- package/packages/locale/lang/zh-HK.ts +2 -2
- package/packages/locale/lang/zh-MO.ts +2 -2
- package/packages/locale/lang/zh-TC.ts +2 -674
- package/packages/locale/lang/zh-TW.ts +2 -2
- package/packages/table/render/index.ts +4 -27
- package/packages/table/src/table.ts +3 -3
- package/packages/ui/src/vn.ts +25 -0
- /package/es/{iconfont.1726051234125.ttf → iconfont.1726735367913.ttf} +0 -0
- /package/es/{iconfont.1726051234125.woff → iconfont.1726735367913.woff} +0 -0
- /package/es/{iconfont.1726051234125.woff2 → iconfont.1726735367913.woff2} +0 -0
- /package/lib/{iconfont.1726051234125.ttf → iconfont.1726735367913.ttf} +0 -0
- /package/lib/{iconfont.1726051234125.woff → iconfont.1726735367913.woff} +0 -0
- /package/lib/{iconfont.1726051234125.woff2 → iconfont.1726735367913.woff2} +0 -0
|
@@ -3,7 +3,7 @@ import XEUtils from 'xe-utils'
|
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
4
|
import { getCellValue, setCellValue } from '../../table/src/util'
|
|
5
5
|
import { getFuncText, formatText, isEmptyValue } from '../../ui/src/utils'
|
|
6
|
-
import { getOnName } from '../../ui/src/vn'
|
|
6
|
+
import { getOnName, getModelEvent, getChangeEvent } from '../../ui/src/vn'
|
|
7
7
|
import { errLog } from '../../ui/src/log'
|
|
8
8
|
|
|
9
9
|
import type { VxeButtonComponent } from 'vxe-pc-ui'
|
|
@@ -15,29 +15,6 @@ const componentDefaultModelProp = 'modelValue'
|
|
|
15
15
|
|
|
16
16
|
const defaultCompProps = { transfer: true }
|
|
17
17
|
|
|
18
|
-
function getModelEvent (renderOpts: any) {
|
|
19
|
-
switch (renderOpts.name) {
|
|
20
|
-
case 'input':
|
|
21
|
-
case 'textarea':
|
|
22
|
-
return 'input'
|
|
23
|
-
}
|
|
24
|
-
return 'update:modelValue'
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function getChangeEvent (renderOpts: any) {
|
|
28
|
-
switch (renderOpts.name) {
|
|
29
|
-
case 'input':
|
|
30
|
-
case 'textarea':
|
|
31
|
-
case 'VxeInput':
|
|
32
|
-
case 'VxeNumberInput':
|
|
33
|
-
case 'VxeTextarea':
|
|
34
|
-
case '$input':
|
|
35
|
-
case '$textarea':
|
|
36
|
-
return 'input'
|
|
37
|
-
}
|
|
38
|
-
return 'change'
|
|
39
|
-
}
|
|
40
|
-
|
|
41
18
|
function parseDate (value: any, props: any) {
|
|
42
19
|
return value && props.valueFormat ? XEUtils.toStringDate(value, props.valueFormat) : value
|
|
43
20
|
}
|
|
@@ -133,7 +110,7 @@ function getCellLabelVNs (renderOpts: any, params: any, cellLabel: any) {
|
|
|
133
110
|
* @param modelFunc
|
|
134
111
|
* @param changeFunc
|
|
135
112
|
*/
|
|
136
|
-
function
|
|
113
|
+
function getNativeElementOns (renderOpts: any, params: any, modelFunc?: any, changeFunc?: any) {
|
|
137
114
|
const { events } = renderOpts
|
|
138
115
|
const modelEvent = getModelEvent(renderOpts)
|
|
139
116
|
const changeEvent = getChangeEvent(renderOpts)
|
|
@@ -246,7 +223,7 @@ function getFilterOns (renderOpts: any, params: any, option: any) {
|
|
|
246
223
|
function getNativeEditOns (renderOpts: any, params: any) {
|
|
247
224
|
const { $table, row, column } = params
|
|
248
225
|
const { model } = column
|
|
249
|
-
return
|
|
226
|
+
return getNativeElementOns(renderOpts, params, (evnt: any) => {
|
|
250
227
|
// 处理 model 值双向绑定
|
|
251
228
|
const cellValue = evnt.target.value
|
|
252
229
|
if (isImmediateCell(renderOpts, params)) {
|
|
@@ -263,7 +240,7 @@ function getNativeEditOns (renderOpts: any, params: any) {
|
|
|
263
240
|
}
|
|
264
241
|
|
|
265
242
|
function getNativeFilterOns (renderOpts: any, params: any, option: any) {
|
|
266
|
-
return
|
|
243
|
+
return getNativeElementOns(renderOpts, params, (evnt: any) => {
|
|
267
244
|
// 处理 model 值双向绑定
|
|
268
245
|
option.data = evnt.target.value
|
|
269
246
|
}, () => {
|
|
@@ -410,7 +410,7 @@ export default defineComponent({
|
|
|
410
410
|
return Object.assign({}, getConfig().table.rowConfig, props.rowConfig) as VxeTablePropTypes.RowOpts
|
|
411
411
|
})
|
|
412
412
|
|
|
413
|
-
const
|
|
413
|
+
const computeResizeOpts = computed(() => {
|
|
414
414
|
return Object.assign({}, getConfig().table.resizeConfig, props.resizeConfig) as VxeTablePropTypes.ResizeOpts
|
|
415
415
|
})
|
|
416
416
|
|
|
@@ -647,7 +647,7 @@ export default defineComponent({
|
|
|
647
647
|
computeSYOpts,
|
|
648
648
|
computeColumnOpts,
|
|
649
649
|
computeRowOpts,
|
|
650
|
-
|
|
650
|
+
computeResizeOpts,
|
|
651
651
|
computeResizableOpts,
|
|
652
652
|
computeSeqOpts,
|
|
653
653
|
computeRadioOpts,
|
|
@@ -6936,7 +6936,7 @@ export default defineComponent({
|
|
|
6936
6936
|
})
|
|
6937
6937
|
|
|
6938
6938
|
if (props.autoResize) {
|
|
6939
|
-
const resizeOpts =
|
|
6939
|
+
const resizeOpts = computeResizeOpts.value
|
|
6940
6940
|
const { refreshDelay } = resizeOpts
|
|
6941
6941
|
const el = refElem.value
|
|
6942
6942
|
const parentEl = tablePrivateMethods.getParentElem()
|
package/packages/ui/src/vn.ts
CHANGED
|
@@ -6,6 +6,31 @@ export function getOnName (type: string) {
|
|
|
6
6
|
return 'on' + type.substring(0, 1).toLocaleUpperCase() + type.substring(1)
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
export function getModelEvent (renderOpts: any) {
|
|
10
|
+
switch (renderOpts.name) {
|
|
11
|
+
case 'input':
|
|
12
|
+
case 'textarea':
|
|
13
|
+
return 'input'
|
|
14
|
+
case 'select':
|
|
15
|
+
return 'change'
|
|
16
|
+
}
|
|
17
|
+
return 'update:modelValue'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function getChangeEvent (renderOpts: any) {
|
|
21
|
+
switch (renderOpts.name) {
|
|
22
|
+
case 'input':
|
|
23
|
+
case 'textarea':
|
|
24
|
+
case 'VxeInput':
|
|
25
|
+
case 'VxeNumberInput':
|
|
26
|
+
case 'VxeTextarea':
|
|
27
|
+
case '$input':
|
|
28
|
+
case '$textarea':
|
|
29
|
+
return 'input'
|
|
30
|
+
}
|
|
31
|
+
return 'change'
|
|
32
|
+
}
|
|
33
|
+
|
|
9
34
|
export function getSlotVNs (vns: VxeComponentSlotType | VxeComponentSlotType[]) {
|
|
10
35
|
if (XEUtils.isArray(vns)) {
|
|
11
36
|
return vns
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|