vxe-pc-ui 1.2.0 → 1.4.0
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/drawer/index.js +0 -1
- package/es/form/src/form.js +5 -2
- package/es/form-design/widget-select/select-form.js +2 -3
- package/es/icon/style/iconfont.1716394371834.ttf +0 -0
- package/es/icon/style/iconfont.1716394371834.woff +0 -0
- package/es/icon/style/iconfont.1716394371834.woff2 +0 -0
- package/es/icon/style.css +1 -1
- package/es/iconfont.1716394371834.ttf +0 -0
- package/es/iconfont.1716394371834.woff +0 -0
- package/es/iconfont.1716394371834.woff2 +0 -0
- package/es/modal/index.js +0 -1
- package/es/print/src/util.js +9 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +9 -1
- package/lib/drawer/index.js +1 -2
- package/lib/drawer/index.min.js +1 -1
- package/lib/form/src/form.js +5 -2
- package/lib/form/src/form.min.js +1 -1
- package/lib/form-design/widget-select/select-form.js +1 -2
- package/lib/form-design/widget-select/select-form.min.js +1 -1
- package/lib/icon/style/iconfont.1716394371834.ttf +0 -0
- package/lib/icon/style/iconfont.1716394371834.woff +0 -0
- package/lib/icon/style/iconfont.1716394371834.woff2 +0 -0
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1309 -1
- package/lib/iconfont.1716394371834.ttf +0 -0
- package/lib/iconfont.1716394371834.woff +0 -0
- package/lib/iconfont.1716394371834.woff2 +0 -0
- package/lib/index.umd.js +33 -22
- package/lib/index.umd.min.js +1 -1
- package/lib/modal/index.js +1 -2
- package/lib/modal/index.min.js +1 -1
- package/lib/print/src/util.js +9 -0
- package/lib/print/src/util.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +9 -1
- package/lib/ui/index.min.js +1 -1
- package/package.json +7 -5
- package/packages/components.ts +1 -3
- package/packages/drawer/index.ts +0 -2
- package/packages/form/src/form-config-item.ts +2 -2
- package/packages/form/src/form-gather.ts +1 -1
- package/packages/form/src/form-item.ts +2 -2
- package/packages/form/src/form.ts +5 -2
- package/packages/form-design/widget-select/select-form.ts +2 -3
- package/packages/input/src/input.ts +2 -2
- package/packages/modal/index.ts +0 -2
- package/packages/print/src/print.ts +1 -1
- package/packages/print/src/util.ts +9 -0
- package/packages/pulldown/src/pulldown.ts +2 -2
- package/packages/select/src/select.ts +2 -2
- package/packages/ui/index.ts +9 -1
- package/packages/ui/src/vn.ts +1 -2
- package/types/components/colgroup.d.ts +137 -0
- package/types/components/column.d.ts +621 -0
- package/types/components/form-item.d.ts +7 -3
- package/types/components/form.d.ts +2 -2
- package/types/components/grid.d.ts +633 -0
- package/types/components/option.d.ts +2 -2
- package/types/components/print.d.ts +19 -3
- package/types/components/table-module/custom.d.ts +32 -0
- package/types/components/table-module/edit.d.ts +166 -0
- package/types/components/table-module/export.d.ts +81 -0
- package/types/components/table-module/filter.d.ts +79 -0
- package/types/components/table-module/index.d.ts +7 -0
- package/types/components/table-module/keyboard.d.ts +22 -0
- package/types/components/table-module/menu.d.ts +54 -0
- package/types/components/table-module/validator.d.ts +104 -0
- package/types/components/table-plugins/extend-cell-area.d.ts +601 -0
- package/types/components/table-plugins/index.d.ts +1 -0
- package/types/components/table.d.ts +3714 -0
- package/types/components/toolbar.d.ts +291 -0
- package/types/components/tooltip.d.ts +1 -1
- package/types/ui/commands.d.ts +13 -0
- package/types/ui/formats.d.ts +11 -0
- package/types/ui/global-config.d.ts +43 -0
- package/types/ui/global-icon.d.ts +34 -0
- package/types/ui/hooks.d.ts +11 -0
- package/types/ui/index.d.ts +6 -8
- package/types/ui/interceptor.d.ts +47 -0
- package/types/ui/menus.d.ts +14 -0
- package/types/ui/renderer.d.ts +224 -8
- package/types/ui/validators.d.ts +5 -0
package/lib/ui/index.js
CHANGED
|
@@ -18,7 +18,8 @@ Object.keys(_core).forEach(function (key) {
|
|
|
18
18
|
});
|
|
19
19
|
});
|
|
20
20
|
var _dynamics = require("../dynamics");
|
|
21
|
-
_core.VxeUI.uiVersion = "1.
|
|
21
|
+
_core.VxeUI.uiVersion = "1.4.0";
|
|
22
|
+
_core.VxeUI.tableVersion = '';
|
|
22
23
|
_core.VxeUI.dynamicApp = _dynamics.dynamicApp;
|
|
23
24
|
(0, _core.setConfig)({
|
|
24
25
|
anchor: {},
|
|
@@ -32,6 +33,10 @@ _core.VxeUI.dynamicApp = _dynamics.dynamicApp;
|
|
|
32
33
|
checkbox: {},
|
|
33
34
|
checkboxGroup: {},
|
|
34
35
|
col: {},
|
|
36
|
+
colgroup: {},
|
|
37
|
+
collapse: {},
|
|
38
|
+
collapsePane: {},
|
|
39
|
+
column: {},
|
|
35
40
|
drawer: {
|
|
36
41
|
// size: null,
|
|
37
42
|
showHeader: true,
|
|
@@ -60,6 +65,7 @@ _core.VxeUI.dynamicApp = _dynamics.dynamicApp;
|
|
|
60
65
|
},
|
|
61
66
|
formGather: {},
|
|
62
67
|
formItem: {},
|
|
68
|
+
grid: {},
|
|
63
69
|
icon: {},
|
|
64
70
|
input: {
|
|
65
71
|
// size: null,
|
|
@@ -135,8 +141,10 @@ _core.VxeUI.dynamicApp = _dynamics.dynamicApp;
|
|
|
135
141
|
},
|
|
136
142
|
switch: {},
|
|
137
143
|
tabPane: {},
|
|
144
|
+
table: {},
|
|
138
145
|
tabs: {},
|
|
139
146
|
textarea: {},
|
|
147
|
+
toolbar: {},
|
|
140
148
|
tooltip: {
|
|
141
149
|
// size: null,
|
|
142
150
|
trigger: 'hover',
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={},_core=(exports.default=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics"));_core.VxeUI.uiVersion="1.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={},_core=(exports.default=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics"));_core.VxeUI.uiVersion="1.4.0",_core.VxeUI.tableVersion="",_core.VxeUI.dynamicApp=_dynamics.dynamicApp,(0,_core.setConfig)({anchor:{},anchorLink:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{},buttonGroup:{},checkbox:{},checkboxGroup:{},col:{},colgroup:{},collapse:{},collapsePane:{},column:{},drawer:{showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0},form:{validConfig:{showMessage:!0,autoPos:!0},tooltipConfig:{enterable:!0},titleAsterisk:!0},formDesign:{formConfig:{vertical:!0}},formGather:{},formItem:{},grid:{},icon:{},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{},layoutContainer:{},layoutFooter:{},layoutHeader:{},listDesign:{},list:{scrollY:{enabled:!0,gt:100}},loading:{},modal:{top:15,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,draggable:!0,showConfirmButton:null,storageKey:"VXE_MODAL_POSITION"},optgroup:{},option:{},pager:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},row:{},select:{multiCharOverflow:8},switch:{},tabPane:{},table:{},tabs:{},textarea:{},toolbar:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300}});const iconPrefix="vxe-icon-";(0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_PWD:iconPrefix+"eye-fill",INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",INPUT_PREV_NUM:iconPrefix+"caret-up",INPUT_NEXT_NUM:iconPrefix+"caret-down",INPUT_DATE:iconPrefix+"calendar",INPUT_SEARCH:iconPrefix+"search",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",DESIGN_FORM_WIDGET_ADD:iconPrefix+"square-plus-fill",DESIGN_FORM_WIDGET_COPY:iconPrefix+"copy",DESIGN_FORM_WIDGET_DELETE:iconPrefix+"delete",DESIGN_FORM_WIDGET_OPTION_DELETE:iconPrefix+"delete",DESIGN_FORM_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",DESIGN_FORM_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus"});var _default=exports.default=_core.VxeUI;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-pc-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "一个基于 vue 的 PC 端组件库",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -20,9 +20,12 @@
|
|
|
20
20
|
],
|
|
21
21
|
"main": "lib/index.common.js",
|
|
22
22
|
"module": "es/index.esm.js",
|
|
23
|
+
"unpkg": "lib/index.umd.js",
|
|
24
|
+
"jsdelivr": "lib/index.umd.js",
|
|
25
|
+
"style": "lib/style.css",
|
|
23
26
|
"typings": "types/index.d.ts",
|
|
24
27
|
"dependencies": {
|
|
25
|
-
"@vxe-ui/core": "^0.
|
|
28
|
+
"@vxe-ui/core": "^0.4.0"
|
|
26
29
|
},
|
|
27
30
|
"devDependencies": {
|
|
28
31
|
"@types/resize-observer-browser": "^0.1.11",
|
|
@@ -58,10 +61,9 @@
|
|
|
58
61
|
"sass": "^1.75.0",
|
|
59
62
|
"sass-loader": "^14.2.0",
|
|
60
63
|
"typescript": "~4.5.5",
|
|
61
|
-
"vue": "3.
|
|
64
|
+
"vue": "3.4.27",
|
|
62
65
|
"vue-i18n": "^9.13.1",
|
|
63
|
-
"vue-router": "^4.3.2"
|
|
64
|
-
"vuex": "^4.1.0"
|
|
66
|
+
"vue-router": "^4.3.2"
|
|
65
67
|
},
|
|
66
68
|
"vetur": {
|
|
67
69
|
"tags": "helper/vetur/tags.json",
|
package/packages/components.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { App } from 'vue'
|
|
2
|
-
import { setConfig } from '@vxe-ui/core'
|
|
2
|
+
import { setConfig, VxeGlobalConfig } from '@vxe-ui/core'
|
|
3
3
|
|
|
4
4
|
import VxeAnchor from './anchor'
|
|
5
5
|
import VxeAnchorLink from './anchor-link'
|
|
@@ -55,8 +55,6 @@ import VxeTree from './tree'
|
|
|
55
55
|
import VxeTreeSelect from './tree-select'
|
|
56
56
|
import VxeUpload from './upload'
|
|
57
57
|
|
|
58
|
-
import type { VxeGlobalConfig } from '../types'
|
|
59
|
-
|
|
60
58
|
const components = [
|
|
61
59
|
VxeAnchor,
|
|
62
60
|
VxeAnchorLink,
|
package/packages/drawer/index.ts
CHANGED
|
@@ -57,8 +57,6 @@ const DrawerController = {
|
|
|
57
57
|
open: openDrawer
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
export const drawer = DrawerController
|
|
61
|
-
|
|
62
60
|
export const VxeDrawer = Object.assign(VxeDrawerComponent, {
|
|
63
61
|
install: function (app: App) {
|
|
64
62
|
app.component(VxeDrawerComponent.name as string, VxeDrawerComponent)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent, h, inject, provide, PropType, createCommentVNode } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
|
-
import { getIcon, getI18n, renderer } from '@vxe-ui/core'
|
|
3
|
+
import { getIcon, getI18n, renderer, VxeComponentSlotType } from '@vxe-ui/core'
|
|
4
4
|
import { getFuncText, isEnableConf } from '../../ui/src/utils'
|
|
5
5
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
6
6
|
import { renderTitle } from './render'
|
|
7
7
|
import { isActiveItem } from './util'
|
|
8
8
|
|
|
9
|
-
import type { VxeFormConstructor, VxeFormDefines, VxeFormPrivateMethods
|
|
9
|
+
import type { VxeFormConstructor, VxeFormDefines, VxeFormPrivateMethods } from '../../../types'
|
|
10
10
|
|
|
11
11
|
const VxeFormConfigItem = defineComponent({
|
|
12
12
|
name: 'VxeFormConfigItem',
|
|
@@ -34,7 +34,7 @@ export default defineComponent({
|
|
|
34
34
|
const span = props.span || ($xeForm ? $xeForm.props.span : null)
|
|
35
35
|
return h('div', {
|
|
36
36
|
ref: refElem,
|
|
37
|
-
class: ['vxe-form--gather vxe-form--item-row', formItem.id, span ? `vxe-form--item-col_${span} is--span` : '', className ? (XEUtils.isFunction(className) ? className({ $form: $xeForm, data: $xeForm ? $xeForm.props.data : {}, item: formItem, field: field as string, property: field as string }) : className) : '']
|
|
37
|
+
class: ['vxe-form--gather vxe-form--item-row', formItem.id, span ? `vxe-form--item-col_${span} is--span` : '', className ? (XEUtils.isFunction(className) ? className({ $form: $xeForm, data: $xeForm ? $xeForm.props.data : {}, item: formItem as any, field: field as string, property: field as string }) : className) : '']
|
|
38
38
|
}, defaultSlot ? defaultSlot() : [])
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent, h, onUnmounted, inject, ref, Ref, provide, onMounted, PropType, createCommentVNode, reactive } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
|
-
import { getIcon, getI18n, renderer } from '@vxe-ui/core'
|
|
3
|
+
import { getIcon, getI18n, renderer, VxeComponentSlotType } from '@vxe-ui/core'
|
|
4
4
|
import { getFuncText, isEnableConf } from '../../ui/src/utils'
|
|
5
5
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
6
6
|
import { createItem, watchItem, destroyItem, assembleItem, XEFormItemProvide, isActiveItem } from './util'
|
|
7
7
|
import { renderTitle } from './render'
|
|
8
8
|
|
|
9
|
-
import type {
|
|
9
|
+
import type { VxeFormConstructor, VxeFormDefines, VxeFormItemPropTypes, VxeFormPrivateMethods } from '../../../types'
|
|
10
10
|
|
|
11
11
|
export const formItemProps = {
|
|
12
12
|
title: String as PropType<VxeFormItemPropTypes.Title>,
|
|
@@ -290,8 +290,11 @@ export default defineComponent({
|
|
|
290
290
|
inputElem = el.querySelector(`.${item.id} ${itemRender.autofocus}`) as HTMLInputElement
|
|
291
291
|
}
|
|
292
292
|
// 渲染器的聚焦处理
|
|
293
|
-
if (!inputElem
|
|
294
|
-
|
|
293
|
+
if (!inputElem) {
|
|
294
|
+
const formItemAutoFocus = compConf ? compConf.formItemAutoFocus : null
|
|
295
|
+
if (formItemAutoFocus) {
|
|
296
|
+
inputElem = el.querySelector(`.${item.id} ${formItemAutoFocus}`) as HTMLInputElement
|
|
297
|
+
}
|
|
295
298
|
}
|
|
296
299
|
if (inputElem) {
|
|
297
300
|
inputElem.focus()
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { PropType, VNode, defineComponent, h, onMounted, ref, watch } from 'vue'
|
|
2
|
-
import { getIcon } from '@vxe-ui/core'
|
|
2
|
+
import { VxeUI, getIcon } from '@vxe-ui/core'
|
|
3
3
|
import VxeFormComponent from '../../form/src/form'
|
|
4
4
|
import VxeFormItemComponent from '../../form/src/form-item'
|
|
5
5
|
import VxeButtonComponent from '../../button/src/button'
|
|
6
6
|
import VxeInputComponent from '../../input/src/input'
|
|
7
7
|
import VxeTextareaComponent from '../../textarea/src/textarea'
|
|
8
8
|
import VxeSwitchComponent from '../../switch/src/switch'
|
|
9
|
-
import { modal } from '../../modal'
|
|
10
9
|
import { WidgetSelectFormObjVO, WidgetSelectFormOptionObjVO, WidgetSelectFormOptionSubObjVO } from './select-data'
|
|
11
10
|
import { useKebabCaseName } from '../render/hooks'
|
|
12
11
|
|
|
@@ -118,7 +117,7 @@ export const WidgetSelectFormComponent = defineComponent({
|
|
|
118
117
|
|
|
119
118
|
optionsContent.value = contList.join('\n')
|
|
120
119
|
|
|
121
|
-
modal.open({
|
|
120
|
+
VxeUI.modal.open({
|
|
122
121
|
title: `${widget.title} - 批量编辑选项`,
|
|
123
122
|
width: 500,
|
|
124
123
|
height: '50vh ',
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent, h, Teleport, ref, Ref, computed, reactive, inject, nextTick, watch, onUnmounted, PropType } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
|
-
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize } from '@vxe-ui/core'
|
|
3
|
+
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize, VxeComponentStyleType } from '@vxe-ui/core'
|
|
4
4
|
import { getFuncText, getLastZIndex, nextZIndex } from '../../ui/src/utils'
|
|
5
5
|
import { hasClass, getAbsolutePos, getEventTargetNode } from '../../ui/src/dom'
|
|
6
6
|
import { toStringTimeDate, getDateQuarter } from './date'
|
|
7
7
|
import { handleNumber, toFloatValueFixed } from './number'
|
|
8
8
|
|
|
9
|
-
import type {
|
|
9
|
+
import type { VxeInputConstructor, VxeInputEmits, InputReactData, InputMethods, VxeInputPropTypes, InputPrivateRef, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines } from '../../../types'
|
|
10
10
|
|
|
11
11
|
interface DateYearItem {
|
|
12
12
|
date: Date;
|
package/packages/modal/index.ts
CHANGED
|
@@ -94,8 +94,6 @@ const ModalController = {
|
|
|
94
94
|
message: openMessage
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
export const modal = ModalController
|
|
98
|
-
|
|
99
97
|
export const VxeModal = Object.assign(VxeModalComponent, {
|
|
100
98
|
install: function (app: App) {
|
|
101
99
|
app.component(VxeModalComponent.name as string, VxeModalComponent)
|
|
@@ -11,7 +11,7 @@ export default defineComponent({
|
|
|
11
11
|
title: String as PropType<VxePrintPropTypes.Title>,
|
|
12
12
|
content: String as PropType<VxePrintPropTypes.Content>,
|
|
13
13
|
customStyle: String as PropType<VxePrintPropTypes.CustomStyle>,
|
|
14
|
-
beforeMethod: Function as PropType<VxePrintPropTypes.
|
|
14
|
+
beforeMethod: Function as PropType<VxePrintPropTypes.BeforeMethod>
|
|
15
15
|
},
|
|
16
16
|
emits: [],
|
|
17
17
|
setup (props, context) {
|
|
@@ -87,5 +87,14 @@ function handlePrint (opts: VxePrintProps, content = '') {
|
|
|
87
87
|
|
|
88
88
|
export const printHtml: VxePrintDefines.PrintFunction = (options) => {
|
|
89
89
|
const opts = Object.assign({}, options)
|
|
90
|
+
if (opts.sheetName) {
|
|
91
|
+
opts.title = opts.title || opts.sheetName
|
|
92
|
+
}
|
|
93
|
+
if (opts.style) {
|
|
94
|
+
opts.customStyle = opts.customStyle || opts.style
|
|
95
|
+
}
|
|
96
|
+
if (opts.beforePrintMethod) {
|
|
97
|
+
opts.beforeMethod = opts.beforeMethod || opts.beforePrintMethod
|
|
98
|
+
}
|
|
90
99
|
return handlePrint(opts, opts.content)
|
|
91
100
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, h, Teleport, ref, Ref, onUnmounted, reactive, nextTick, PropType, watch, createCommentVNode } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
|
-
import { getConfig, globalEvents, createEvent, useSize } from '@vxe-ui/core'
|
|
3
|
+
import { getConfig, globalEvents, createEvent, useSize, VxeComponentStyleType } from '@vxe-ui/core'
|
|
4
4
|
import { getAbsolutePos, getEventTargetNode } from '../../ui/src/dom'
|
|
5
5
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils'
|
|
6
6
|
|
|
7
|
-
import type {
|
|
7
|
+
import type { VxePulldownConstructor, VxePulldownPropTypes, VxePulldownEmits, PulldownReactData, PulldownMethods, PulldownPrivateRef, VxePulldownMethods } from '../../../types'
|
|
8
8
|
|
|
9
9
|
export default defineComponent({
|
|
10
10
|
name: 'VxePulldown',
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent, h, Teleport, PropType, ref, Ref, inject, computed, provide, onUnmounted, reactive, nextTick, watch, onMounted, createCommentVNode } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
|
-
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize } from '@vxe-ui/core'
|
|
3
|
+
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize, VxeComponentSlotType } from '@vxe-ui/core'
|
|
4
4
|
import { getEventTargetNode, getAbsolutePos } from '../../ui/src/dom'
|
|
5
5
|
import { getLastZIndex, nextZIndex, getFuncText } from '../../ui/src/utils'
|
|
6
6
|
import VxeInputComponent from '../../input/src/input'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
|
|
9
|
-
import type { VxeSelectPropTypes, VxeSelectConstructor, SelectReactData, VxeSelectEmits, VxeInputConstructor, SelectMethods, SelectPrivateRef, VxeSelectMethods, VxeOptgroupProps, VxeOptionProps, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, VxeInputDefines
|
|
9
|
+
import type { VxeSelectPropTypes, VxeSelectConstructor, SelectReactData, VxeSelectEmits, VxeInputConstructor, SelectMethods, SelectPrivateRef, VxeSelectMethods, VxeOptgroupProps, VxeOptionProps, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, VxeInputDefines } from '../../../types'
|
|
10
10
|
|
|
11
11
|
function isOptionVisible (option: any) {
|
|
12
12
|
return option.visible !== false
|
package/packages/ui/index.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VxeUI, setConfig, setIcon } from '@vxe-ui/core'
|
|
2
2
|
import { dynamicApp } from '../dynamics'
|
|
3
3
|
|
|
4
|
-
VxeUI.uiVersion = process.env.
|
|
4
|
+
VxeUI.uiVersion = process.env.VUE_APP_VXE_VERSION as string
|
|
5
|
+
VxeUI.tableVersion = ''
|
|
5
6
|
|
|
6
7
|
VxeUI.dynamicApp = dynamicApp
|
|
7
8
|
|
|
@@ -17,6 +18,10 @@ setConfig({
|
|
|
17
18
|
checkbox: {},
|
|
18
19
|
checkboxGroup: {},
|
|
19
20
|
col: {},
|
|
21
|
+
colgroup: {},
|
|
22
|
+
collapse: {},
|
|
23
|
+
collapsePane: {},
|
|
24
|
+
column: {},
|
|
20
25
|
drawer: {
|
|
21
26
|
// size: null,
|
|
22
27
|
showHeader: true,
|
|
@@ -45,6 +50,7 @@ setConfig({
|
|
|
45
50
|
},
|
|
46
51
|
formGather: {},
|
|
47
52
|
formItem: {},
|
|
53
|
+
grid: {},
|
|
48
54
|
icon: {},
|
|
49
55
|
input: {
|
|
50
56
|
// size: null,
|
|
@@ -120,8 +126,10 @@ setConfig({
|
|
|
120
126
|
},
|
|
121
127
|
switch: {},
|
|
122
128
|
tabPane: {},
|
|
129
|
+
table: {},
|
|
123
130
|
tabs: {},
|
|
124
131
|
textarea: {},
|
|
132
|
+
toolbar: {},
|
|
125
133
|
tooltip: {
|
|
126
134
|
// size: null,
|
|
127
135
|
trigger: 'hover',
|
package/packages/ui/src/vn.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
|
-
|
|
3
|
-
import type { VxeComponentSlotType } from '../../../types'
|
|
2
|
+
import { VxeComponentSlotType } from '@vxe-ui/core'
|
|
4
3
|
|
|
5
4
|
export function getOnName (type: string) {
|
|
6
5
|
return 'on' + type.substring(0, 1).toLocaleUpperCase() + type.substring(1)
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { RenderFunction, SetupContext, Ref, ComponentPublicInstance, DefineComponent } from 'vue'
|
|
2
|
+
import { defineVxeComponent, VxeComponentBaseOptions, VxeComponentEventParams } from '@vxe-ui/core'
|
|
3
|
+
import { VxeColumnPropTypes, VxeColumnSlotTypes } from './column'
|
|
4
|
+
|
|
5
|
+
/* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
|
|
6
|
+
|
|
7
|
+
export declare const VxeColgroup: defineVxeComponent<VxeColgroupProps, VxeColgroupEventProps>
|
|
8
|
+
export type VxeColgroupComponent = DefineComponent<VxeColgroupProps, VxeColgroupEmits>
|
|
9
|
+
|
|
10
|
+
export type VxeColgroupInstance = ComponentPublicInstance<VxeColgroupProps, VxeColgroupConstructor>
|
|
11
|
+
|
|
12
|
+
export interface VxeColgroupConstructor extends VxeComponentBaseOptions, VxeColgroupMethods {
|
|
13
|
+
props: VxeColgroupProps
|
|
14
|
+
context: SetupContext<VxeColgroupEmits>
|
|
15
|
+
reactData: ColgroupReactData
|
|
16
|
+
getRefMaps(): ColgroupPrivateRef
|
|
17
|
+
getComputeMaps(): ColgroupPrivateComputed
|
|
18
|
+
renderVN: RenderFunction
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ColgroupPrivateRef {
|
|
22
|
+
refElem: Ref<HTMLDivElement | undefined>
|
|
23
|
+
}
|
|
24
|
+
export interface VxeColgroupPrivateRef extends ColgroupPrivateRef { }
|
|
25
|
+
|
|
26
|
+
export namespace VxeColgroupPropTypes {
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type VxeColgroupProps = {
|
|
30
|
+
/**
|
|
31
|
+
* 渲染类型
|
|
32
|
+
*/
|
|
33
|
+
type?: VxeColumnPropTypes.Type
|
|
34
|
+
/**
|
|
35
|
+
* 列字段名
|
|
36
|
+
*/
|
|
37
|
+
field?: VxeColumnPropTypes.Field
|
|
38
|
+
/**
|
|
39
|
+
* 列标题
|
|
40
|
+
*/
|
|
41
|
+
title?: VxeColumnPropTypes.Title
|
|
42
|
+
/**
|
|
43
|
+
* 列宽度
|
|
44
|
+
*/
|
|
45
|
+
width?: VxeColumnPropTypes.Width
|
|
46
|
+
/**
|
|
47
|
+
* 列最小宽度,把剩余宽度按比例分配
|
|
48
|
+
*/
|
|
49
|
+
minWidth?: VxeColumnPropTypes.MinWidth
|
|
50
|
+
/**
|
|
51
|
+
* 是否允许拖动列宽调整大小
|
|
52
|
+
*/
|
|
53
|
+
resizable?: VxeColumnPropTypes.Resizable
|
|
54
|
+
/**
|
|
55
|
+
* 将列固定在左侧或者右侧
|
|
56
|
+
*/
|
|
57
|
+
fixed?: VxeColumnPropTypes.Fixed
|
|
58
|
+
/**
|
|
59
|
+
* 列对其方式
|
|
60
|
+
*/
|
|
61
|
+
align?: VxeColumnPropTypes.Align
|
|
62
|
+
/**
|
|
63
|
+
* 表头对齐方式
|
|
64
|
+
*/
|
|
65
|
+
headerAlign?: VxeColumnPropTypes.HeaderAlign
|
|
66
|
+
/**
|
|
67
|
+
* 当内容过长时显示为省略号
|
|
68
|
+
*/
|
|
69
|
+
showOverflow?: VxeColumnPropTypes.ShowOverflow
|
|
70
|
+
/**
|
|
71
|
+
* 当表头内容过长时显示为省略号
|
|
72
|
+
*/
|
|
73
|
+
showHeaderOverflow?: VxeColumnPropTypes.ShowHeaderOverflow
|
|
74
|
+
/**
|
|
75
|
+
* 给单元格附加 className
|
|
76
|
+
*/
|
|
77
|
+
className?: VxeColumnPropTypes.ClassName
|
|
78
|
+
/**
|
|
79
|
+
* 给表头单元格附加 className
|
|
80
|
+
*/
|
|
81
|
+
headerClassName?: VxeColumnPropTypes.HeaderClassName
|
|
82
|
+
/**
|
|
83
|
+
* 是否可视
|
|
84
|
+
*/
|
|
85
|
+
visible?: VxeColumnPropTypes.Visible
|
|
86
|
+
/**
|
|
87
|
+
* 额外的参数
|
|
88
|
+
*/
|
|
89
|
+
params?: VxeColumnPropTypes.Params
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface ColgroupPrivateComputed {
|
|
93
|
+
}
|
|
94
|
+
export interface VxeColgroupPrivateComputed extends ColgroupPrivateComputed { }
|
|
95
|
+
|
|
96
|
+
export interface ColgroupReactData {
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface ColgroupMethods {
|
|
100
|
+
dispatchEvent(type: ValueOf<VxeColgroupEmits>, params: Record<string, any>, evnt: Event | null): void
|
|
101
|
+
}
|
|
102
|
+
export interface VxeColgroupMethods extends ColgroupMethods { }
|
|
103
|
+
|
|
104
|
+
export interface ColgroupPrivateMethods { }
|
|
105
|
+
export interface VxeColgroupPrivateMethods extends ColgroupPrivateMethods { }
|
|
106
|
+
|
|
107
|
+
export type VxeColgroupEmits = []
|
|
108
|
+
|
|
109
|
+
export namespace VxeColgroupDefines {
|
|
110
|
+
export interface ColgroupEventParams extends VxeComponentEventParams {
|
|
111
|
+
$colgroup: VxeColgroupConstructor
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type VxeColgroupEventProps = {}
|
|
116
|
+
|
|
117
|
+
export interface VxeColgroupListeners { }
|
|
118
|
+
|
|
119
|
+
export namespace VxeColgroupEvents { }
|
|
120
|
+
|
|
121
|
+
export namespace VxeColgroupSlotTypes {
|
|
122
|
+
export interface DefaultSlotParams {}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface VxeColgroupSlots {
|
|
126
|
+
/**
|
|
127
|
+
* 自定义表头内容的模板
|
|
128
|
+
*/
|
|
129
|
+
header: (params: VxeColumnSlotTypes.HeaderSlotParams<D>) => any
|
|
130
|
+
/**
|
|
131
|
+
* 只对 type=checkbox,radio 有效,自定义标题模板
|
|
132
|
+
*/
|
|
133
|
+
title: (params: VxeColumnSlotTypes.HeaderSlotParams<D>) => any
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export const Colgroup: typeof VxeColgroup
|
|
137
|
+
export default VxeColgroup
|