vxe-table 4.3.0-beta.9 → 4.3.2
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.en.md +3 -3
- package/README.md +3 -3
- package/README.zh-TW.md +3 -3
- package/es/checkbox/src/checkbox.js +20 -7
- package/es/checkbox/src/group.js +14 -2
- package/es/checkbox/style.css +1 -1
- package/es/export/style.css +1 -1
- package/es/filter/style.css +1 -1
- package/es/form/src/form.js +1 -1
- package/es/form/style.css +1 -0
- package/es/grid/style.css +1 -1
- package/es/icon/src/icon.js +3 -2
- package/es/icon/style.css +69 -10
- package/es/list/src/list.js +1 -1
- package/es/loading/index.d.ts +4 -0
- package/es/loading/src/loading.js +33 -23
- package/es/loading/style.css +98 -0
- package/es/locale/lang/en-US.js +1 -1
- package/es/locale/lang/ja-JP.js +1 -1
- package/es/locale/lang/zh-CN.js +1 -1
- package/es/locale/lang/zh-TC.js +1 -1
- package/es/modal/src/modal.js +1 -1
- package/es/modal/style.css +2 -2
- package/es/pager/style.css +1 -1
- package/es/select/src/select.js +25 -3
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/body.js +17 -10
- package/es/table/src/props.js +2 -0
- package/es/table/src/table.js +8 -1
- package/es/table/style.css +93 -1
- package/es/toolbar/src/toolbar.js +7 -6
- package/es/toolbar/style.css +2 -2
- package/es/tools/log.js +1 -1
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/style.css +71 -11
- package/es/vxe-checkbox/style.css +1 -1
- package/es/vxe-form/style.css +1 -0
- package/es/vxe-grid/style.css +1 -1
- package/es/vxe-icon/style.css +69 -10
- package/es/vxe-loading/index.d.ts +4 -0
- package/es/vxe-loading/index.js +3 -0
- package/es/vxe-loading/style.css +98 -0
- package/es/vxe-modal/style.css +2 -2
- package/es/vxe-module-export/style.css +1 -1
- package/es/vxe-module-filter/style.css +1 -1
- package/es/vxe-pager/style.css +1 -1
- package/es/vxe-table/style.css +93 -1
- package/es/vxe-toolbar/style.css +2 -2
- package/lib/checkbox/src/checkbox.js +23 -7
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/checkbox/src/group.js +21 -1
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/checkbox/style/style.css +1 -1
- package/lib/checkbox/style/style.min.css +1 -1
- package/lib/export/style/style.css +1 -1
- package/lib/export/style/style.min.css +1 -1
- package/lib/filter/style/style.css +1 -1
- package/lib/filter/style/style.min.css +1 -1
- package/lib/form/src/form.js +1 -1
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/style/style.css +1 -0
- package/lib/form/style/style.min.css +1 -1
- package/lib/grid/style/style.css +1 -1
- package/lib/grid/style/style.min.css +1 -1
- package/lib/icon/src/icon.js +3 -2
- package/lib/icon/src/icon.min.js +1 -1
- package/lib/icon/style/style.css +69 -10
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +155 -51
- package/lib/index.umd.min.js +1 -1
- package/lib/list/src/list.js +1 -1
- package/lib/list/src/list.min.js +1 -1
- package/lib/loading/index.d.ts +4 -0
- package/lib/loading/src/loading.js +28 -18
- package/lib/loading/src/loading.min.js +1 -1
- package/lib/loading/style/index.js +1 -0
- package/lib/loading/style/style.css +98 -0
- package/lib/loading/style/style.min.css +1 -0
- package/lib/locale/lang/en-US.js +1 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -1
- package/lib/locale/lang/ja-JP.js +1 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -1
- package/lib/locale/lang/zh-CN.js +1 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -1
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +1 -1
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +1 -1
- package/lib/locale/lang/zh-TC.js +1 -1
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +1 -1
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +1 -1
- package/lib/modal/src/modal.js +1 -1
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +2 -2
- package/lib/modal/style/style.min.css +1 -1
- package/lib/pager/style/style.css +1 -1
- package/lib/pager/style/style.min.css +1 -1
- package/lib/select/src/select.js +37 -3
- package/lib/select/src/select.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +16 -7
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/props.js +2 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +8 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +93 -1
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +7 -6
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +2 -2
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/style/style.css +71 -11
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/lib/vxe-checkbox/style/style.css +1 -1
- package/lib/vxe-checkbox/style/style.min.css +1 -1
- package/lib/vxe-form/style/style.css +1 -0
- package/lib/vxe-form/style/style.min.css +1 -1
- package/lib/vxe-grid/style/style.css +1 -1
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/lib/vxe-icon/style/style.css +69 -10
- package/lib/vxe-icon/style/style.min.css +1 -1
- package/lib/vxe-loading/index.d.ts +4 -0
- package/lib/vxe-loading/index.js +30 -0
- package/lib/vxe-loading/index.min.js +1 -0
- package/lib/vxe-loading/style/style.css +98 -0
- package/lib/vxe-loading/style/style.min.css +1 -0
- package/lib/vxe-modal/style/style.css +2 -2
- package/lib/vxe-modal/style/style.min.css +1 -1
- package/lib/vxe-module-export/style/style.css +1 -1
- package/lib/vxe-module-export/style/style.min.css +1 -1
- package/lib/vxe-module-filter/style/style.css +1 -1
- package/lib/vxe-module-filter/style/style.min.css +1 -1
- package/lib/vxe-pager/style/style.css +1 -1
- package/lib/vxe-pager/style/style.min.css +1 -1
- package/lib/vxe-table/style/style.css +93 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-toolbar/style/style.css +2 -2
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/checkbox/src/checkbox.ts +20 -7
- package/packages/checkbox/src/group.ts +18 -3
- package/packages/form/src/form.ts +1 -1
- package/packages/icon/src/icon.ts +3 -2
- package/packages/list/src/list.ts +1 -1
- package/packages/loading/index.d.ts +4 -0
- package/packages/loading/src/loading.ts +34 -22
- package/packages/locale/lang/en-US.ts +1 -1
- package/packages/locale/lang/ja-JP.ts +1 -1
- package/packages/locale/lang/zh-CN.ts +1 -1
- package/packages/locale/lang/zh-TC.ts +1 -1
- package/packages/modal/src/modal.ts +1 -1
- package/packages/select/src/select.ts +27 -3
- package/packages/table/src/body.ts +15 -8
- package/packages/table/src/props.ts +2 -0
- package/packages/table/src/table.ts +9 -1
- package/packages/toolbar/src/toolbar.ts +7 -6
- package/styles/base/checked.scss +1 -1
- package/styles/footer.scss +0 -22
- package/styles/form.scss +1 -0
- package/styles/icon.scss +91 -15
- package/styles/loading.scss +3 -1
- package/styles/modules.scss +1 -6
- package/styles/table.scss +28 -0
- package/styles/variable.scss +2 -1
- package/types/all.d.ts +4 -2
- package/types/checkbox-group.d.ts +8 -1
- package/types/icon.d.ts +2 -0
- package/types/loading.d.ts +10 -0
- package/types/select.d.ts +2 -0
- package/types/table.d.ts +9 -0
- package/types/toolbar.d.ts +6 -1
- package/types/v-x-e-table/index.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-custom--option .vxe-checkbox--icon{font-size:1.
|
|
1
|
+
.vxe-custom--option .vxe-checkbox--icon{font-size:1.34em}.vxe-custom--option .vxe-checkbox--icon{color:#dcdfe6;vertical-align:middle;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.is--checked.vxe-custom--option,.is--indeterminate.vxe-custom--option{color:#409eff}.is--checked.vxe-custom--option .vxe-checkbox--icon,.is--indeterminate.vxe-custom--option .vxe-checkbox--icon{color:#409eff}.vxe-custom--option:not(.is--disabled){cursor:pointer}.vxe-custom--option:not(.is--disabled):hover .vxe-checkbox--icon{color:#409eff}.is--disabled.vxe-custom--option{color:#bfbfbf;cursor:not-allowed}.is--disabled.vxe-custom--option .vxe-checkbox--icon{color:#dcdfe6}.vxe-custom--option .vxe-checkbox--label{padding-left:.5em;vertical-align:middle}.vxe-toolbar{position:relative;display:flex;flex-direction:row;align-items:center;padding:.6em 0;color:#606266;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;background-color:#fff}.vxe-toolbar:after{content:"";display:block;clear:both;height:0;overflow:hidden;visibility:hidden}.vxe-toolbar.is--perfect{border:1px solid #e8eaec;border-bottom-width:0;background-color:#f8f8f9}.vxe-toolbar.is--loading:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:rgba(255,255,255,.5)}.vxe-toolbar .vxe-buttons--wrapper{flex-grow:1}.vxe-toolbar .vxe-buttons--wrapper>.vxe-button+.vxe-button--item,.vxe-toolbar .vxe-buttons--wrapper>.vxe-button--item+.vxe-button,.vxe-toolbar .vxe-buttons--wrapper>.vxe-button--item+.vxe-button--item{margin-left:.8em}.vxe-toolbar .vxe-buttons--wrapper>.vxe-button--item{display:inline-block}.vxe-toolbar .vxe-tools--wrapper>.vxe-button+.vxe-tool--item,.vxe-toolbar .vxe-tools--wrapper>.vxe-tool--item+.vxe-button,.vxe-toolbar .vxe-tools--wrapper>.vxe-tool--item+.vxe-tool--item{margin-left:.8em}.vxe-toolbar .vxe-tools--wrapper>.vxe-tool--item{display:inline-block}.vxe-toolbar .vxe-tools--wrapper>.vxe-button{display:flex;align-items:center;justify-content:center}.vxe-toolbar .vxe-buttons--wrapper,.vxe-toolbar .vxe-tools--operate,.vxe-toolbar .vxe-tools--wrapper{display:flex;align-items:center}.vxe-toolbar .vxe-buttons--wrapper,.vxe-toolbar .vxe-tools--wrapper{flex-wrap:wrap}.vxe-toolbar .vxe-tools--operate{flex-shrink:0}.vxe-toolbar .vxe-custom--wrapper{position:relative;margin-left:.8em}.vxe-toolbar .vxe-custom--wrapper.is--active>.vxe-button{background-color:#d9dadb;border-radius:50%}.vxe-toolbar .vxe-custom--wrapper.is--active .vxe-custom--option-wrapper{display:block}.vxe-toolbar .vxe-custom--option-wrapper{display:none;position:absolute;right:2px;text-align:left;background-color:#fff;z-index:19;border:1px solid #e8eaec;border-radius:4px;box-shadow:0 1px 6px rgba(0,0,0,.2)}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header{padding:.28em 0;font-weight:700;border-bottom:1px solid #dadce0}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body{padding:.2em 0;max-height:17.6em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body .vxe-custom--option:hover{background-color:#f5f7fa}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li{max-width:16em;min-width:12.5em;padding:.2em 1em .2em 1em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--2,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--2{padding-left:3.5em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--2 .vxe-checkbox--icon,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--2 .vxe-checkbox--icon{left:1.8em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--3,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--3{padding-left:4.5em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--3 .vxe-checkbox--icon,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--3 .vxe-checkbox--icon{left:2.8em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--4,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--4{padding-left:5.5em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--4 .vxe-checkbox--icon,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--4 .vxe-checkbox--icon{left:3.8em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--5,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--5{padding-left:6.5em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--5 .vxe-checkbox--icon,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--5 .vxe-checkbox--icon{left:4.8em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--6,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--6{padding-left:7.5em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--6 .vxe-checkbox--icon,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--6 .vxe-checkbox--icon{left:5.8em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--7,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--7{padding-left:8.5em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--7 .vxe-checkbox--icon,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--7 .vxe-checkbox--icon{left:6.8em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--8,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--8{padding-left:9.5em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--body>li.level--8 .vxe-checkbox--icon,.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--header>li.level--8 .vxe-checkbox--icon{left:7.8em}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--footer{border-top:1px solid #dadce0;text-align:right}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--footer button{background-color:transparent;width:50%;height:2.5em;border:0;color:#606266;text-align:center;cursor:pointer}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--footer button:focus{outline:0}.vxe-toolbar .vxe-custom--option-wrapper .vxe-custom--footer button:hover{color:#409eff}.vxe-custom--option-wrapper .vxe-custom--body,.vxe-custom--option-wrapper .vxe-custom--header{list-style-type:none;overflow-x:hidden;overflow-y:auto;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-custom--option-wrapper .vxe-custom--body>li,.vxe-custom--option-wrapper .vxe-custom--header>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-toolbar{font-size:14px}.vxe-toolbar.size--medium{font-size:14px}.vxe-toolbar.size--small{font-size:13px}.vxe-toolbar.size--mini{font-size:12px}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "4.3.
|
|
4
|
-
"description": "一个基于 vue 的 PC
|
|
3
|
+
"version": "4.3.2",
|
|
4
|
+
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、贼灵活的配置项等...",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve": "vue-cli-service serve",
|
|
7
7
|
"lint": "vue-cli-service lint",
|
|
@@ -42,17 +42,30 @@ export default defineComponent({
|
|
|
42
42
|
|
|
43
43
|
const $xecheckboxgroup = inject('$xecheckboxgroup', null as (VxeCheckboxGroupConstructor & VxeCheckboxGroupPrivateMethods) | null)
|
|
44
44
|
|
|
45
|
-
const
|
|
46
|
-
|
|
45
|
+
const computeIsChecked = computed(() => {
|
|
46
|
+
if ($xecheckboxgroup) {
|
|
47
|
+
return XEUtils.includes($xecheckboxgroup.props.modelValue, props.label)
|
|
48
|
+
}
|
|
49
|
+
return props.modelValue === props.checkedValue
|
|
47
50
|
})
|
|
48
51
|
|
|
49
|
-
const
|
|
50
|
-
|
|
52
|
+
const computeIsDisabled = computed(() => {
|
|
53
|
+
if (props.disabled) {
|
|
54
|
+
return true
|
|
55
|
+
}
|
|
56
|
+
if ($xecheckboxgroup) {
|
|
57
|
+
const { props: groupProps } = $xecheckboxgroup
|
|
58
|
+
const { computeIsMaximize } = $xecheckboxgroup.getComputeMaps()
|
|
59
|
+
const isMaximize = computeIsMaximize.value
|
|
60
|
+
const isChecked = computeIsChecked.value
|
|
61
|
+
return groupProps.disabled || (isMaximize && !isChecked)
|
|
62
|
+
}
|
|
63
|
+
return false
|
|
51
64
|
})
|
|
52
65
|
|
|
53
66
|
const changeEvent = (evnt: Event & { target: { checked: boolean } }) => {
|
|
54
67
|
const { checkedValue, uncheckedValue } = props
|
|
55
|
-
const isDisabled =
|
|
68
|
+
const isDisabled = computeIsDisabled.value
|
|
56
69
|
if (!isDisabled) {
|
|
57
70
|
const checked = evnt.target.checked
|
|
58
71
|
const value = checked ? checkedValue : uncheckedValue
|
|
@@ -80,8 +93,8 @@ export default defineComponent({
|
|
|
80
93
|
|
|
81
94
|
const renderVN = () => {
|
|
82
95
|
const vSize = computeSize.value
|
|
83
|
-
const isDisabled =
|
|
84
|
-
const isChecked =
|
|
96
|
+
const isDisabled = computeIsDisabled.value
|
|
97
|
+
const isChecked = computeIsChecked.value
|
|
85
98
|
const indeterminate = props.indeterminate
|
|
86
99
|
return h('label', {
|
|
87
100
|
class: ['vxe-checkbox', {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { defineComponent, h, provide, PropType, inject } from 'vue'
|
|
1
|
+
import { defineComponent, h, provide, PropType, computed, inject } from 'vue'
|
|
2
2
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { useSize } from '../../hooks/size'
|
|
5
5
|
|
|
6
|
-
import { VxeCheckboxGroupConstructor, VxeCheckboxGroupEmits, VxeCheckboxGroupPrivateMethods, CheckboxGroupPrivateMethods, CheckboxGroupMethods, VxeCheckboxGroupPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines } from '../../../types/all'
|
|
6
|
+
import { VxeCheckboxGroupConstructor, VxeCheckboxGroupEmits, VxeCheckboxGroupPrivateMethods, CheckboxGroupPrivateMethods, CheckboxPrivateComputed, CheckboxGroupMethods, VxeCheckboxGroupPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines } from '../../../types/all'
|
|
7
7
|
|
|
8
8
|
export default defineComponent({
|
|
9
9
|
name: 'VxeCheckboxGroup',
|
|
10
10
|
props: {
|
|
11
11
|
modelValue: Array as PropType<VxeCheckboxGroupPropTypes.ModelValue>,
|
|
12
12
|
disabled: Boolean as PropType<VxeCheckboxGroupPropTypes.Disabled>,
|
|
13
|
+
max: { type: [String, Number] as PropType<VxeCheckboxGroupPropTypes.Max>, default: null },
|
|
13
14
|
size: { type: String as PropType<VxeCheckboxGroupPropTypes.Size>, default: () => GlobalConfig.checkbox.size || GlobalConfig.size }
|
|
14
15
|
},
|
|
15
16
|
emits: [
|
|
@@ -23,10 +24,24 @@ export default defineComponent({
|
|
|
23
24
|
|
|
24
25
|
const xID = XEUtils.uniqueId()
|
|
25
26
|
|
|
27
|
+
const computeIsMaximize = computed(() => {
|
|
28
|
+
const { modelValue, max } = props
|
|
29
|
+
if (max) {
|
|
30
|
+
return (modelValue ? modelValue.length : 0) >= XEUtils.toNumber(max)
|
|
31
|
+
}
|
|
32
|
+
return false
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
const computeMaps: CheckboxPrivateComputed = {
|
|
36
|
+
computeIsMaximize
|
|
37
|
+
}
|
|
38
|
+
|
|
26
39
|
const $xecheckboxgroup = {
|
|
27
40
|
xID,
|
|
28
41
|
props,
|
|
29
|
-
context
|
|
42
|
+
context,
|
|
43
|
+
|
|
44
|
+
getComputeMaps: () => computeMaps
|
|
30
45
|
} as unknown as VxeCheckboxGroupConstructor & VxeCheckboxGroupPrivateMethods
|
|
31
46
|
|
|
32
47
|
useSize(props)
|
|
@@ -5,7 +5,8 @@ import { VxeIconPropTypes, VxeIconEmits } from '../../../types/all'
|
|
|
5
5
|
export default defineComponent({
|
|
6
6
|
name: 'VxeIcon',
|
|
7
7
|
props: {
|
|
8
|
-
name: String as PropType<VxeIconPropTypes.Name
|
|
8
|
+
name: String as PropType<VxeIconPropTypes.Name>,
|
|
9
|
+
roll: Boolean as PropType<VxeIconPropTypes.Roll>
|
|
9
10
|
},
|
|
10
11
|
emits: [
|
|
11
12
|
'click'
|
|
@@ -16,7 +17,7 @@ export default defineComponent({
|
|
|
16
17
|
}
|
|
17
18
|
return () => {
|
|
18
19
|
return h('i', {
|
|
19
|
-
class: `vxe-icon-${props.name}`,
|
|
20
|
+
class: [`vxe-icon-${props.name}`, props.roll ? 'roll' : ''],
|
|
20
21
|
onClick: clickEvent
|
|
21
22
|
})
|
|
22
23
|
}
|
|
@@ -1,32 +1,44 @@
|
|
|
1
|
-
import { defineComponent, h } from 'vue'
|
|
1
|
+
import { defineComponent, h, computed } from 'vue'
|
|
2
2
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
3
3
|
|
|
4
4
|
export default defineComponent({
|
|
5
5
|
name: 'VxeLoading',
|
|
6
6
|
props: {
|
|
7
|
-
|
|
7
|
+
modelValue: Boolean,
|
|
8
|
+
icon: String,
|
|
9
|
+
text: String
|
|
8
10
|
},
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
setup (props) {
|
|
12
|
+
const computeLoadingIcon = computed(() => {
|
|
13
|
+
return props.icon || GlobalConfig.icon.LOADING
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const computeLoadingText = computed(() => {
|
|
17
|
+
const loadingText = GlobalConfig.loadingText
|
|
18
|
+
return props.text || (loadingText === null ? loadingText : GlobalConfig.i18n('vxe.loading.text'))
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
return () => {
|
|
22
|
+
const loadingIcon = computeLoadingIcon.value
|
|
23
|
+
const loadingText = computeLoadingText.value
|
|
24
|
+
return h('div', {
|
|
25
|
+
class: ['vxe-loading', {
|
|
26
|
+
'is--visible': props.modelValue
|
|
27
|
+
}]
|
|
20
28
|
}, [
|
|
21
|
-
|
|
22
|
-
class:
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
h('div', {
|
|
30
|
+
class: 'vxe-loading--chunk'
|
|
31
|
+
}, [
|
|
32
|
+
loadingIcon ? h('i', {
|
|
33
|
+
class: loadingIcon
|
|
34
|
+
}) : h('div', {
|
|
35
|
+
class: 'vxe-loading--spinner'
|
|
36
|
+
}),
|
|
37
|
+
loadingText ? h('div', {
|
|
38
|
+
class: 'vxe-loading--text'
|
|
39
|
+
}, `${loadingText}`) : null
|
|
40
|
+
])
|
|
29
41
|
])
|
|
30
|
-
|
|
42
|
+
}
|
|
31
43
|
}
|
|
32
44
|
})
|
|
@@ -36,6 +36,7 @@ export default defineComponent({
|
|
|
36
36
|
optionGroupProps: Object as PropType<VxeSelectPropTypes.OptionGroupProps>,
|
|
37
37
|
optionConfig: Object as PropType<VxeSelectPropTypes.OptionConfig>,
|
|
38
38
|
className: [String, Function] as PropType<VxeSelectPropTypes.ClassName>,
|
|
39
|
+
max: { type: [String, Number] as PropType<VxeSelectPropTypes.Max>, default: null },
|
|
39
40
|
size: { type: String as PropType<VxeSelectPropTypes.Size>, default: () => GlobalConfig.select.size || GlobalConfig.size },
|
|
40
41
|
filterable: Boolean as PropType<VxeSelectPropTypes.Filterable>,
|
|
41
42
|
filterMethod: Function as PropType<VxeSelectPropTypes.FilterMethod>,
|
|
@@ -130,6 +131,14 @@ export default defineComponent({
|
|
|
130
131
|
return groupPropsOpts.options || 'options'
|
|
131
132
|
})
|
|
132
133
|
|
|
134
|
+
const computeIsMaximize = computed(() => {
|
|
135
|
+
const { modelValue, multiple, max } = props
|
|
136
|
+
if (multiple && max) {
|
|
137
|
+
return (modelValue ? modelValue.length : 0) >= XEUtils.toNumber(max)
|
|
138
|
+
}
|
|
139
|
+
return false
|
|
140
|
+
})
|
|
141
|
+
|
|
133
142
|
const computeOptionOpts = computed(() => {
|
|
134
143
|
return Object.assign({}, GlobalConfig.select.optionConfig, props.optionConfig)
|
|
135
144
|
})
|
|
@@ -677,6 +686,20 @@ export default defineComponent({
|
|
|
677
686
|
}
|
|
678
687
|
}
|
|
679
688
|
|
|
689
|
+
const checkOptionDisabled = (isSelected: any, option: VxeOptionProps, group?: VxeOptgroupProps) => {
|
|
690
|
+
if (option.disabled) {
|
|
691
|
+
return true
|
|
692
|
+
}
|
|
693
|
+
if (group && group.disabled) {
|
|
694
|
+
return true
|
|
695
|
+
}
|
|
696
|
+
const isMaximize = computeIsMaximize.value
|
|
697
|
+
if (isMaximize && !isSelected) {
|
|
698
|
+
return true
|
|
699
|
+
}
|
|
700
|
+
return false
|
|
701
|
+
}
|
|
702
|
+
|
|
680
703
|
const renderOption = (list: VxeOptionProps[], group?: VxeOptgroupProps) => {
|
|
681
704
|
const { optionKey, modelValue, multiple } = props
|
|
682
705
|
const { currentValue } = reactData
|
|
@@ -687,16 +710,17 @@ export default defineComponent({
|
|
|
687
710
|
const { useKey } = optionOpts
|
|
688
711
|
return list.map((option, cIndex) => {
|
|
689
712
|
const { slots, className } = option
|
|
690
|
-
const isVisible = !isGroup || isOptionVisible(option)
|
|
691
|
-
const isDisabled = (group && group.disabled) || option.disabled
|
|
692
713
|
const optionValue = option[valueField as 'value']
|
|
714
|
+
const isSelected = multiple ? (modelValue && modelValue.indexOf(optionValue) > -1) : modelValue === optionValue
|
|
715
|
+
const isVisible = !isGroup || isOptionVisible(option)
|
|
716
|
+
const isDisabled = checkOptionDisabled(isSelected, option, group)
|
|
693
717
|
const optid = getOptid(option)
|
|
694
718
|
const defaultSlot = slots ? slots.default : null
|
|
695
719
|
return isVisible ? h('div', {
|
|
696
720
|
key: useKey || optionKey ? optid : cIndex,
|
|
697
721
|
class: ['vxe-select-option', className ? (XEUtils.isFunction(className) ? className({ option, $select: $xeselect }) : className) : '', {
|
|
698
722
|
'is--disabled': isDisabled,
|
|
699
|
-
'is--selected':
|
|
723
|
+
'is--selected': isSelected,
|
|
700
724
|
'is--hover': currentValue === optionValue
|
|
701
725
|
}],
|
|
702
726
|
// attrs
|
|
@@ -31,7 +31,7 @@ export default defineComponent({
|
|
|
31
31
|
|
|
32
32
|
const { xID, props: tableProps, context: tableContext, reactData: tableReactData, internalData: tableInternalData } = $xetable
|
|
33
33
|
const { refTableHeader, refTableBody, refTableFooter, refTableLeftBody, refTableRightBody, refValidTooltip } = $xetable.getRefMaps()
|
|
34
|
-
const { computeEditOpts, computeMouseOpts, computeSYOpts, computeEmptyOpts, computeKeyboardOpts, computeTooltipOpts, computeRadioOpts, computeTreeOpts, computeCheckboxOpts, computeValidOpts, computeRowOpts, computeColumnOpts } = $xetable.getComputeMaps()
|
|
34
|
+
const { computeEditOpts, computeMouseOpts, computeSYOpts, computeEmptyOpts, computeKeyboardOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeValidOpts, computeRowOpts, computeColumnOpts } = $xetable.getComputeMaps()
|
|
35
35
|
|
|
36
36
|
const refElem = ref() as Ref<XEBodyScrollElement>
|
|
37
37
|
const refBodyTable = ref() as Ref<HTMLTableElement>
|
|
@@ -397,11 +397,14 @@ export default defineComponent({
|
|
|
397
397
|
)
|
|
398
398
|
// 如果行被展开了
|
|
399
399
|
if (isExpandRow) {
|
|
400
|
-
|
|
400
|
+
const expandOpts = computeExpandOpts.value
|
|
401
|
+
const { height: expandHeight } = expandOpts
|
|
402
|
+
const cellStyle: any = {}
|
|
403
|
+
if (expandHeight) {
|
|
404
|
+
cellStyle.height = `${expandHeight}px`
|
|
405
|
+
}
|
|
401
406
|
if (treeConfig) {
|
|
402
|
-
cellStyle = {
|
|
403
|
-
paddingLeft: `${(rowLevel * treeOpts.indent) + 30}px`
|
|
404
|
-
}
|
|
407
|
+
cellStyle.paddingLeft = `${(rowLevel * treeOpts.indent) + 30}px`
|
|
405
408
|
}
|
|
406
409
|
const { showOverflow } = expandColumn
|
|
407
410
|
const hasEllipsis = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ? allColumnOverflow : showOverflow
|
|
@@ -414,14 +417,18 @@ export default defineComponent({
|
|
|
414
417
|
...trOn
|
|
415
418
|
}, [
|
|
416
419
|
h('td', {
|
|
417
|
-
class:
|
|
420
|
+
class: {
|
|
421
|
+
'vxe-body--expanded-column': 1,
|
|
418
422
|
'fixed--hidden': fixedType && !hasFixedColumn,
|
|
419
423
|
'col--ellipsis': hasEllipsis
|
|
420
|
-
}
|
|
424
|
+
},
|
|
421
425
|
colspan: tableColumn.length
|
|
422
426
|
}, [
|
|
423
427
|
h('div', {
|
|
424
|
-
class:
|
|
428
|
+
class: {
|
|
429
|
+
'vxe-body--expanded-cell': 1,
|
|
430
|
+
'is--ellipsis': expandHeight
|
|
431
|
+
},
|
|
425
432
|
style: cellStyle
|
|
426
433
|
}, [
|
|
427
434
|
expandColumn.renderData(expandParams)
|
|
@@ -147,6 +147,8 @@ export default {
|
|
|
147
147
|
validConfig: Object as PropType<VxeTablePropTypes.ValidConfig>,
|
|
148
148
|
// 校验规则配置项
|
|
149
149
|
editRules: Object as PropType<VxeTablePropTypes.EditRules>,
|
|
150
|
+
// 加载中配置项
|
|
151
|
+
loadingConfig: Object as PropType<VxeTablePropTypes.LoadingConfig>,
|
|
150
152
|
// 空内容渲染配置项
|
|
151
153
|
emptyRender: Object as PropType<VxeTablePropTypes.EmptyRender>,
|
|
152
154
|
// 自定义列配置项
|
|
@@ -486,6 +486,10 @@ export default defineComponent({
|
|
|
486
486
|
return Object.assign({}, GlobalConfig.table.emptyRender, props.emptyRender) as VxeTablePropTypes.EmptyOpts
|
|
487
487
|
})
|
|
488
488
|
|
|
489
|
+
const computeLoadingOpts = computed(() => {
|
|
490
|
+
return Object.assign({}, GlobalConfig.table.loadingConfig, props.loadingConfig) as VxeTablePropTypes.LoadingOpts
|
|
491
|
+
})
|
|
492
|
+
|
|
489
493
|
const computeCellOffsetWidth = computed(() => {
|
|
490
494
|
return props.border ? Math.max(2, Math.ceil(reactData.scrollbarWidth / reactData.tableColumn.length)) : 1
|
|
491
495
|
})
|
|
@@ -578,6 +582,7 @@ export default defineComponent({
|
|
|
578
582
|
computeExpandOpts,
|
|
579
583
|
computeTreeOpts,
|
|
580
584
|
computeEmptyOpts,
|
|
585
|
+
computeLoadingOpts,
|
|
581
586
|
computeCustomOpts,
|
|
582
587
|
computeIsAllCheckboxDisabled
|
|
583
588
|
}
|
|
@@ -5938,6 +5943,7 @@ export default defineComponent({
|
|
|
5938
5943
|
const mouseOpts = computeMouseOpts.value
|
|
5939
5944
|
const validOpts = computeValidOpts.value
|
|
5940
5945
|
const validTipOpts = computeValidTipOpts.value
|
|
5946
|
+
const loadingOpts = computeLoadingOpts.value
|
|
5941
5947
|
const isMenu = computeIsMenu.value
|
|
5942
5948
|
return h('div', {
|
|
5943
5949
|
ref: refElem,
|
|
@@ -6050,7 +6056,9 @@ export default defineComponent({
|
|
|
6050
6056
|
*/
|
|
6051
6057
|
h(VxeLoading, {
|
|
6052
6058
|
class: 'vxe-table--loading',
|
|
6053
|
-
loading
|
|
6059
|
+
modelValue: loading,
|
|
6060
|
+
icon: loadingOpts.icon,
|
|
6061
|
+
text: loadingOpts.text
|
|
6054
6062
|
}),
|
|
6055
6063
|
/**
|
|
6056
6064
|
* 筛选
|
|
@@ -268,11 +268,11 @@ export default defineComponent({
|
|
|
268
268
|
const { isRefresh } = reactData
|
|
269
269
|
const refreshOpts = computeRefreshOpts.value
|
|
270
270
|
if (!isRefresh) {
|
|
271
|
-
const
|
|
272
|
-
if (
|
|
271
|
+
const queryMethod = refreshOpts.queryMethod || refreshOpts.query
|
|
272
|
+
if (queryMethod) {
|
|
273
273
|
reactData.isRefresh = true
|
|
274
274
|
try {
|
|
275
|
-
Promise.resolve(
|
|
275
|
+
Promise.resolve(queryMethod({})).catch((e) => e).then(() => {
|
|
276
276
|
reactData.isRefresh = false
|
|
277
277
|
})
|
|
278
278
|
} catch (e) {
|
|
@@ -280,7 +280,7 @@ export default defineComponent({
|
|
|
280
280
|
}
|
|
281
281
|
} else if ($xegrid) {
|
|
282
282
|
reactData.isRefresh = true
|
|
283
|
-
$xegrid.commitProxy('reload').catch((e) => e).then(() => {
|
|
283
|
+
$xegrid.commitProxy(refreshOpts.code || 'reload').catch((e) => e).then(() => {
|
|
284
284
|
reactData.isRefresh = false
|
|
285
285
|
})
|
|
286
286
|
}
|
|
@@ -608,8 +608,9 @@ export default defineComponent({
|
|
|
608
608
|
nextTick(() => {
|
|
609
609
|
const { refresh } = props
|
|
610
610
|
const refreshOpts = computeRefreshOpts.value
|
|
611
|
-
|
|
612
|
-
|
|
611
|
+
const queryMethod = refreshOpts.queryMethod || refreshOpts.query
|
|
612
|
+
if (refresh && !$xegrid && !queryMethod) {
|
|
613
|
+
warnLog('vxe.error.notFunc', ['queryMethod'])
|
|
613
614
|
}
|
|
614
615
|
})
|
|
615
616
|
|
package/styles/base/checked.scss
CHANGED
package/styles/footer.scss
CHANGED
|
@@ -1,23 +1 @@
|
|
|
1
1
|
/**Variable**/
|
|
2
|
-
|
|
3
|
-
.vxe-table--footer-wrapper {
|
|
4
|
-
color: $vxe-table-footer-font-color;
|
|
5
|
-
margin-top: -1px;
|
|
6
|
-
&.body--wrapper{
|
|
7
|
-
overflow-x: auto;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.vxe-footer--column {
|
|
12
|
-
&.col--ellipsis {
|
|
13
|
-
& > .vxe-cell {
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
.vxe-cell--item {
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
text-overflow: ellipsis;
|
|
19
|
-
white-space: nowrap;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|