vxe-pc-ui 0.2.0 → 0.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/anchor/index.js +2 -0
- package/es/anchor/src/anchor.js +18 -18
- package/es/anchor-link/index.js +2 -0
- package/es/breadcrumb/index.js +2 -0
- package/es/breadcrumb/src/breadcrumb.js +2 -2
- package/es/breadcrumb-item/index.js +2 -0
- package/es/button/index.js +2 -0
- package/es/button/src/button-group.js +2 -5
- package/es/button-group/index.js +2 -0
- package/es/checkbox/src/checkbox.js +8 -8
- package/es/checkbox/src/group.js +6 -6
- package/es/checkbox-group/index.js +1 -1
- package/es/col/index.js +2 -0
- package/es/components.js +3 -0
- package/es/form/index.js +2 -0
- package/es/form/src/form-config-item.js +3 -8
- package/es/form/src/form-item.js +3 -8
- package/es/form/src/form.js +5 -8
- package/es/form/src/render.js +2 -10
- package/es/form-design/index.js +2 -0
- package/es/form-gather/index.js +2 -0
- package/es/form-item/index.js +2 -0
- package/es/icon/index.js +2 -0
- package/es/input/index.js +1 -1
- package/es/input/style.css +5 -5
- package/es/input/style.min.css +1 -1
- package/es/layout-aside/index.js +2 -0
- package/es/layout-body/index.js +2 -0
- package/es/layout-container/index.js +2 -0
- package/es/layout-footer/index.js +2 -0
- package/es/layout-header/index.js +2 -0
- package/es/list/index.js +10 -0
- package/es/list/src/list.js +340 -0
- package/es/list/style.css +26 -0
- package/es/list/style.min.css +1 -0
- package/es/list-design/index.js +2 -0
- package/es/loading/index.js +2 -0
- package/es/modal/index.js +1 -1
- package/es/modal/src/modal.js +2 -5
- package/es/modal/style.css +1 -1
- package/es/modal/style.min.css +1 -1
- package/es/optgroup/index.js +1 -1
- package/es/option/index.js +1 -1
- package/es/pager/index.js +1 -1
- package/es/pager/src/pager.js +4 -4
- package/es/pager/style.css +2 -2
- package/es/pager/style.min.css +1 -1
- package/es/pulldown/index.js +1 -1
- package/es/pulldown/style.css +2 -2
- package/es/pulldown/style.min.css +1 -1
- package/es/radio/index.js +1 -1
- package/es/radio-button/index.js +1 -1
- package/es/radio-group/index.js +1 -1
- package/es/row/index.js +2 -0
- package/es/select/index.js +1 -1
- package/es/select/style.css +2 -2
- package/es/select/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/index.js +1 -1
- package/es/switch/style.css +1 -1
- package/es/switch/style.min.css +1 -1
- package/es/tab-pane/index.js +2 -0
- package/es/tabs/index.js +2 -0
- package/es/tabs/src/tabs.js +50 -19
- package/es/tabs/style.css +49 -34
- package/es/tabs/style.min.css +1 -1
- package/es/textarea/index.js +1 -1
- package/es/textarea/style.css +2 -2
- package/es/textarea/style.min.css +1 -1
- package/es/tooltip/index.js +2 -0
- package/es/tooltip/src/tooltip.js +2 -7
- package/es/ui/src/core.js +1 -1
- package/es/ui/src/globalStore.js +64 -66
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/resize.js +81 -0
- package/es/ui/src/store.js +8 -1
- package/es/vxe-input/style.css +5 -5
- package/es/vxe-input/style.min.css +1 -1
- package/es/vxe-list/index.js +3 -0
- package/es/vxe-list/style.css +26 -0
- package/es/vxe-list/style.min.css +1 -0
- package/es/vxe-modal/style.css +1 -1
- package/es/vxe-modal/style.min.css +1 -1
- package/es/vxe-pager/style.css +2 -2
- package/es/vxe-pager/style.min.css +1 -1
- package/es/vxe-pulldown/style.css +2 -2
- package/es/vxe-pulldown/style.min.css +1 -1
- package/es/vxe-select/style.css +2 -2
- package/es/vxe-select/style.min.css +1 -1
- package/es/vxe-switch/style.css +1 -1
- package/es/vxe-switch/style.min.css +1 -1
- package/es/vxe-tabs/style.css +49 -34
- package/es/vxe-tabs/style.min.css +1 -1
- package/es/vxe-textarea/style.css +2 -2
- package/es/vxe-textarea/style.min.css +1 -1
- package/lib/anchor/index.js +2 -0
- package/lib/anchor/index.min.js +1 -1
- package/lib/anchor/src/anchor.js +18 -18
- package/lib/anchor/src/anchor.min.js +1 -1
- package/lib/anchor-link/index.js +2 -0
- package/lib/anchor-link/index.min.js +1 -1
- package/lib/breadcrumb/index.js +2 -0
- package/lib/breadcrumb/index.min.js +1 -1
- package/lib/breadcrumb/src/breadcrumb.js +2 -2
- package/lib/breadcrumb/src/breadcrumb.min.js +1 -1
- package/lib/breadcrumb-item/index.js +2 -0
- package/lib/breadcrumb-item/index.min.js +1 -1
- package/lib/button/index.js +2 -0
- package/lib/button/index.min.js +1 -1
- package/lib/button/src/button-group.js +5 -7
- package/lib/button/src/button-group.min.js +1 -1
- package/lib/button-group/index.js +2 -0
- package/lib/button-group/index.min.js +1 -1
- package/lib/checkbox/src/checkbox.js +8 -8
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/checkbox/src/group.js +6 -6
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/checkbox-group/index.js +1 -1
- package/lib/checkbox-group/index.min.js +1 -1
- package/lib/col/index.js +2 -0
- package/lib/col/index.min.js +1 -1
- package/lib/components.js +13 -1
- package/lib/components.min.js +1 -1
- package/lib/form/index.js +2 -0
- package/lib/form/index.min.js +1 -1
- package/lib/form/src/form-config-item.js +3 -4
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-item.js +3 -4
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +7 -8
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/render.js +4 -8
- package/lib/form/src/render.min.js +1 -1
- package/lib/form-design/index.js +2 -0
- package/lib/form-design/index.min.js +1 -1
- package/lib/form-gather/index.js +2 -0
- package/lib/form-gather/index.min.js +1 -1
- package/lib/form-item/index.js +2 -0
- package/lib/form-item/index.min.js +1 -1
- package/lib/icon/index.js +2 -0
- package/lib/icon/index.min.js +1 -1
- package/lib/index.umd.js +737 -167
- package/lib/index.umd.min.js +1 -1
- package/lib/input/index.js +1 -1
- package/lib/input/index.min.js +1 -1
- package/lib/input/style/style.css +5 -5
- package/lib/input/style/style.min.css +1 -1
- package/lib/layout-aside/index.js +2 -0
- package/lib/layout-aside/index.min.js +1 -1
- package/lib/layout-body/index.js +2 -0
- package/lib/layout-body/index.min.js +1 -1
- package/lib/layout-container/index.js +2 -0
- package/lib/layout-container/index.min.js +1 -1
- package/lib/layout-footer/index.js +2 -0
- package/lib/layout-footer/index.min.js +1 -1
- package/lib/layout-header/index.js +2 -0
- package/lib/layout-header/index.min.js +1 -1
- package/lib/list/index.js +17 -0
- package/lib/list/index.min.js +1 -0
- package/lib/list/src/list.js +397 -0
- package/lib/list/src/list.min.js +1 -0
- package/lib/list/style/index.js +1 -0
- package/lib/list/style/style.css +26 -0
- package/lib/list/style/style.min.css +1 -0
- package/lib/list-design/index.js +2 -0
- package/lib/list-design/index.min.js +1 -1
- package/lib/loading/index.js +2 -0
- package/lib/loading/index.min.js +1 -1
- package/lib/modal/index.js +1 -5
- package/lib/modal/index.min.js +1 -1
- package/lib/modal/src/modal.js +3 -4
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +1 -1
- package/lib/modal/style/style.min.css +1 -1
- package/lib/optgroup/index.js +1 -1
- package/lib/optgroup/index.min.js +1 -1
- package/lib/option/index.js +1 -1
- package/lib/option/index.min.js +1 -1
- package/lib/pager/index.js +1 -1
- package/lib/pager/index.min.js +1 -1
- package/lib/pager/src/pager.js +6 -7
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pager/style/style.css +2 -2
- package/lib/pager/style/style.min.css +1 -1
- package/lib/pulldown/index.js +1 -1
- package/lib/pulldown/index.min.js +1 -1
- package/lib/pulldown/style/style.css +2 -2
- package/lib/pulldown/style/style.min.css +1 -1
- package/lib/radio/index.js +1 -1
- package/lib/radio/index.min.js +1 -1
- package/lib/radio-button/index.js +1 -1
- package/lib/radio-button/index.min.js +1 -1
- package/lib/radio-group/index.js +1 -1
- package/lib/radio-group/index.min.js +1 -1
- package/lib/row/index.js +2 -0
- package/lib/row/index.min.js +1 -1
- package/lib/select/index.js +1 -1
- package/lib/select/index.min.js +1 -1
- package/lib/select/style/style.css +2 -2
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/index.js +1 -1
- package/lib/switch/index.min.js +1 -1
- package/lib/switch/style/style.css +1 -1
- package/lib/switch/style/style.min.css +1 -1
- package/lib/tab-pane/index.js +2 -0
- package/lib/tab-pane/index.min.js +1 -1
- package/lib/tabs/index.js +2 -0
- package/lib/tabs/index.min.js +1 -1
- package/lib/tabs/src/tabs.js +50 -12
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/tabs/style/style.css +49 -34
- package/lib/tabs/style/style.min.css +1 -1
- package/lib/textarea/index.js +1 -1
- package/lib/textarea/index.min.js +1 -1
- package/lib/textarea/style/style.css +2 -2
- package/lib/textarea/style/style.min.css +1 -1
- package/lib/tooltip/index.js +2 -0
- package/lib/tooltip/index.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +3 -4
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/ui/src/core.js +1 -1
- package/lib/ui/src/core.min.js +1 -1
- package/lib/ui/src/globalStore.js +63 -65
- package/lib/ui/src/globalStore.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/resize.js +96 -0
- package/lib/ui/src/resize.min.js +1 -0
- package/lib/ui/src/store.js +8 -1
- package/lib/ui/src/store.min.js +1 -1
- package/lib/vxe-input/style/style.css +5 -5
- package/lib/vxe-input/style/style.min.css +1 -1
- package/lib/vxe-list/index.js +22 -0
- package/lib/vxe-list/index.min.js +1 -0
- package/lib/vxe-list/style/index.js +1 -0
- package/lib/vxe-list/style/style.css +26 -0
- package/lib/vxe-list/style/style.min.css +1 -0
- package/lib/vxe-modal/style/style.css +1 -1
- package/lib/vxe-modal/style/style.min.css +1 -1
- package/lib/vxe-pager/style/style.css +2 -2
- package/lib/vxe-pager/style/style.min.css +1 -1
- package/lib/vxe-pulldown/style/style.css +2 -2
- package/lib/vxe-pulldown/style/style.min.css +1 -1
- package/lib/vxe-select/style/style.css +2 -2
- package/lib/vxe-select/style/style.min.css +1 -1
- package/lib/vxe-switch/style/style.css +1 -1
- package/lib/vxe-switch/style/style.min.css +1 -1
- package/lib/vxe-tabs/style/style.css +49 -34
- package/lib/vxe-tabs/style/style.min.css +1 -1
- package/lib/vxe-textarea/style/style.css +2 -2
- package/lib/vxe-textarea/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/anchor/index.ts +3 -0
- package/packages/anchor/src/anchor.ts +23 -23
- package/packages/anchor-link/index.ts +3 -0
- package/packages/breadcrumb/index.ts +3 -0
- package/packages/breadcrumb/src/breadcrumb.ts +2 -2
- package/packages/breadcrumb-item/index.ts +3 -0
- package/packages/button/index.ts +3 -0
- package/packages/button-group/index.ts +3 -0
- package/packages/checkbox/index.ts +2 -2
- package/packages/checkbox/src/checkbox.ts +8 -8
- package/packages/checkbox/src/group.ts +6 -6
- package/packages/checkbox-group/index.ts +3 -4
- package/packages/col/index.ts +3 -0
- package/packages/components.ts +3 -0
- package/packages/form/index.ts +3 -0
- package/packages/form/src/form.ts +4 -4
- package/packages/form-design/index.ts +3 -0
- package/packages/form-gather/index.ts +3 -0
- package/packages/form-item/index.ts +3 -0
- package/packages/icon/index.ts +3 -0
- package/packages/input/index.ts +3 -4
- package/packages/layout-aside/index.ts +3 -0
- package/packages/layout-body/index.ts +3 -0
- package/packages/layout-container/index.ts +3 -0
- package/packages/layout-footer/index.ts +3 -0
- package/packages/layout-header/index.ts +3 -0
- package/packages/list/index.ts +14 -0
- package/packages/list/src/list.ts +372 -0
- package/packages/list-design/index.ts +3 -0
- package/packages/loading/index.ts +3 -0
- package/packages/optgroup/index.ts +3 -4
- package/packages/option/index.ts +3 -4
- package/packages/pager/index.ts +3 -4
- package/packages/pager/src/pager.ts +3 -3
- package/packages/pulldown/index.ts +3 -4
- package/packages/radio/index.ts +3 -4
- package/packages/radio-button/index.ts +3 -4
- package/packages/radio-group/index.ts +2 -3
- package/packages/row/index.ts +3 -0
- package/packages/select/index.ts +3 -4
- package/packages/switch/index.ts +1 -2
- package/packages/tab-pane/index.ts +3 -0
- package/packages/tabs/index.ts +3 -0
- package/packages/tabs/src/tabs.ts +49 -19
- package/packages/textarea/index.ts +3 -4
- package/packages/tooltip/index.ts +3 -0
- package/packages/ui/src/globalStore.ts +63 -65
- package/packages/ui/src/resize.ts +85 -0
- package/styles/all.scss +1 -0
- package/styles/components/input.scss +5 -5
- package/styles/components/list.scss +1 -1
- package/styles/components/modal.scss +1 -1
- package/styles/components/pager.scss +2 -2
- package/styles/components/pulldown.scss +2 -2
- package/styles/components/select.scss +2 -2
- package/styles/components/switch.scss +1 -1
- package/styles/components/tabs.scss +44 -34
- package/styles/components/textarea.scss +2 -2
- package/types/all.d.ts +1 -0
- package/types/components/list.d.ts +166 -0
- package/types/components/tab-pane.d.ts +1 -1
- package/types/components/tabs.d.ts +2 -2
- package/types/ui/global-config.d.ts +67 -25
package/packages/pager/index.ts
CHANGED
|
@@ -4,12 +4,11 @@ import { dynamicApp } from '../dynamics'
|
|
|
4
4
|
|
|
5
5
|
export const VxePager = Object.assign(VxePagerComponent, {
|
|
6
6
|
install: function (app: App) {
|
|
7
|
-
app.component(VxePagerComponent.name, VxePagerComponent)
|
|
7
|
+
app.component(VxePagerComponent.name as string, VxePagerComponent)
|
|
8
8
|
}
|
|
9
9
|
})
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
dynamicApp.component(VxePagerComponent.name, VxePagerComponent)
|
|
11
|
+
dynamicApp.component(VxePagerComponent.name as string, VxePagerComponent)
|
|
14
12
|
|
|
13
|
+
export const Pager = VxePager
|
|
15
14
|
export default VxePager
|
|
@@ -61,7 +61,7 @@ export default defineComponent({
|
|
|
61
61
|
|
|
62
62
|
const computeSize = useSize(props)
|
|
63
63
|
|
|
64
|
-
const $
|
|
64
|
+
const $xeGrid = inject('$xeGrid', null as any)
|
|
65
65
|
|
|
66
66
|
const reactData = reactive<PagerReactData>({
|
|
67
67
|
inpCurrPage: props.currentPage
|
|
@@ -506,7 +506,7 @@ export default defineComponent({
|
|
|
506
506
|
childNodes.push(
|
|
507
507
|
h('span', {
|
|
508
508
|
class: 'vxe-pager--left-wrapper'
|
|
509
|
-
}, slots.left({ $grid: $
|
|
509
|
+
}, slots.left({ $grid: $xeGrid }))
|
|
510
510
|
)
|
|
511
511
|
}
|
|
512
512
|
layouts.forEach((name) => {
|
|
@@ -564,7 +564,7 @@ export default defineComponent({
|
|
|
564
564
|
childNodes.push(
|
|
565
565
|
h('span', {
|
|
566
566
|
class: 'vxe-pager--right-wrapper'
|
|
567
|
-
}, slots.right({ $grid: $
|
|
567
|
+
}, slots.right({ $grid: $xeGrid }))
|
|
568
568
|
)
|
|
569
569
|
}
|
|
570
570
|
return h('div', {
|
|
@@ -4,12 +4,11 @@ import { dynamicApp } from '../dynamics'
|
|
|
4
4
|
|
|
5
5
|
export const VxePulldown = Object.assign(VxePulldownComponent, {
|
|
6
6
|
install: function (app: App) {
|
|
7
|
-
app.component(VxePulldownComponent.name, VxePulldownComponent)
|
|
7
|
+
app.component(VxePulldownComponent.name as string, VxePulldownComponent)
|
|
8
8
|
}
|
|
9
9
|
})
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
dynamicApp.component(VxePulldownComponent.name, VxePulldownComponent)
|
|
11
|
+
dynamicApp.component(VxePulldownComponent.name as string, VxePulldownComponent)
|
|
14
12
|
|
|
13
|
+
export const Pulldown = VxePulldown
|
|
15
14
|
export default VxePulldown
|
package/packages/radio/index.ts
CHANGED
|
@@ -4,12 +4,11 @@ import { dynamicApp } from '../dynamics'
|
|
|
4
4
|
|
|
5
5
|
export const VxeRadio = Object.assign(VxeRadioComponent, {
|
|
6
6
|
install: function (app: App) {
|
|
7
|
-
app.component(VxeRadioComponent.name, VxeRadioComponent)
|
|
7
|
+
app.component(VxeRadioComponent.name as string, VxeRadioComponent)
|
|
8
8
|
}
|
|
9
9
|
})
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
dynamicApp.component(VxeRadioComponent.name, VxeRadioComponent)
|
|
11
|
+
dynamicApp.component(VxeRadioComponent.name as string, VxeRadioComponent)
|
|
14
12
|
|
|
13
|
+
export const Radio = VxeRadio
|
|
15
14
|
export default VxeRadio
|
|
@@ -4,12 +4,11 @@ import { dynamicApp } from '../dynamics'
|
|
|
4
4
|
|
|
5
5
|
export const VxeRadioButton = Object.assign(VxeRadioButtonComponent, {
|
|
6
6
|
install: function (app: App) {
|
|
7
|
-
app.component(VxeRadioButtonComponent.name, VxeRadioButtonComponent)
|
|
7
|
+
app.component(VxeRadioButtonComponent.name as string, VxeRadioButtonComponent)
|
|
8
8
|
}
|
|
9
9
|
})
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
dynamicApp.component(VxeRadioButtonComponent.name, VxeRadioButtonComponent)
|
|
11
|
+
dynamicApp.component(VxeRadioButtonComponent.name as string, VxeRadioButtonComponent)
|
|
14
12
|
|
|
13
|
+
export const RadioButton = VxeRadioButton
|
|
15
14
|
export default VxeRadioButton
|
|
@@ -8,8 +8,7 @@ export const VxeRadioGroup = Object.assign(VxeRadioGroupComponent, {
|
|
|
8
8
|
}
|
|
9
9
|
})
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
dynamicApp.component(VxeRadioGroupComponent.name, VxeRadioGroupComponent)
|
|
11
|
+
dynamicApp.component(VxeRadioGroupComponent.name as string, VxeRadioGroupComponent)
|
|
14
12
|
|
|
13
|
+
export const RadioGroup = VxeRadioGroup
|
|
15
14
|
export default VxeRadioGroup
|
package/packages/row/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { App } from 'vue'
|
|
2
2
|
import VxeRowComponent from './src/row'
|
|
3
|
+
import { dynamicApp } from '../dynamics'
|
|
3
4
|
|
|
4
5
|
const VxeRow = Object.assign({}, VxeRowComponent, {
|
|
5
6
|
install (app: App) {
|
|
@@ -7,5 +8,7 @@ const VxeRow = Object.assign({}, VxeRowComponent, {
|
|
|
7
8
|
}
|
|
8
9
|
})
|
|
9
10
|
|
|
11
|
+
dynamicApp.component(VxeRowComponent.name as string, VxeRowComponent)
|
|
12
|
+
|
|
10
13
|
export const Row = VxeRow
|
|
11
14
|
export default VxeRow
|
package/packages/select/index.ts
CHANGED
|
@@ -4,12 +4,11 @@ import { dynamicApp } from '../dynamics'
|
|
|
4
4
|
|
|
5
5
|
export const VxeSelect = Object.assign(VxeSelectComponent, {
|
|
6
6
|
install: function (app: App) {
|
|
7
|
-
app.component(VxeSelectComponent.name, VxeSelectComponent)
|
|
7
|
+
app.component(VxeSelectComponent.name as string, VxeSelectComponent)
|
|
8
8
|
}
|
|
9
9
|
})
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
dynamicApp.component(VxeSelectComponent.name, VxeSelectComponent)
|
|
11
|
+
dynamicApp.component(VxeSelectComponent.name as string, VxeSelectComponent)
|
|
14
12
|
|
|
13
|
+
export const Select = VxeSelect
|
|
15
14
|
export default VxeSelect
|
package/packages/switch/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { App } from 'vue'
|
|
2
2
|
import VxeTabPaneComponent from '../tabs/src/tab-pane'
|
|
3
|
+
import { dynamicApp } from '../dynamics'
|
|
3
4
|
|
|
4
5
|
const VxeTabPane = Object.assign({}, VxeTabPaneComponent, {
|
|
5
6
|
install (app: App) {
|
|
@@ -7,5 +8,7 @@ const VxeTabPane = Object.assign({}, VxeTabPaneComponent, {
|
|
|
7
8
|
}
|
|
8
9
|
})
|
|
9
10
|
|
|
11
|
+
dynamicApp.component(VxeTabPaneComponent.name as string, VxeTabPaneComponent)
|
|
12
|
+
|
|
10
13
|
export const TabPane = VxeTabPane
|
|
11
14
|
export default VxeTabPane
|
package/packages/tabs/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { App } from 'vue'
|
|
2
2
|
import VxeTabsComponent from './src/tabs'
|
|
3
|
+
import { dynamicApp } from '../dynamics'
|
|
3
4
|
|
|
4
5
|
const VxeTabs = Object.assign({}, VxeTabsComponent, {
|
|
5
6
|
install (app: App) {
|
|
@@ -7,5 +8,7 @@ const VxeTabs = Object.assign({}, VxeTabsComponent, {
|
|
|
7
8
|
}
|
|
8
9
|
})
|
|
9
10
|
|
|
11
|
+
dynamicApp.component(VxeTabsComponent.name as string, VxeTabsComponent)
|
|
12
|
+
|
|
10
13
|
export const Tabs = VxeTabs
|
|
11
14
|
export default VxeTabs
|
|
@@ -13,9 +13,14 @@ export default defineComponent({
|
|
|
13
13
|
destroyOnClose: Boolean as PropType<VxeTabsPropTypes.DestroyOnClose>,
|
|
14
14
|
type: String as PropType<VxeTabsPropTypes.Type>
|
|
15
15
|
},
|
|
16
|
-
emits: [
|
|
16
|
+
emits: [
|
|
17
|
+
'update:modelValue',
|
|
18
|
+
'click',
|
|
19
|
+
'change',
|
|
20
|
+
'load'
|
|
21
|
+
],
|
|
17
22
|
setup (props, context) {
|
|
18
|
-
const { slots } = context
|
|
23
|
+
const { slots, emit } = context
|
|
19
24
|
|
|
20
25
|
const xID = XEUtils.uniqueId()
|
|
21
26
|
|
|
@@ -75,27 +80,48 @@ export default defineComponent({
|
|
|
75
80
|
const { type, options } = props
|
|
76
81
|
const { staticTabs, activeName } = reactData
|
|
77
82
|
const headerWrapperEl = refHeaderElem.value
|
|
78
|
-
|
|
83
|
+
let lintWidth = 0
|
|
84
|
+
let lintLeft = 0
|
|
85
|
+
if (headerWrapperEl) {
|
|
79
86
|
const index = XEUtils.findIndexOf(staticTabs.length ? staticTabs : options, item => item.name === activeName)
|
|
80
87
|
if (index > -1) {
|
|
81
88
|
const tabEl = headerWrapperEl.children[index] as HTMLDivElement
|
|
82
89
|
const tabWidth = tabEl.clientWidth
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
if (type === 'card') {
|
|
91
|
+
lintWidth = tabWidth + 1
|
|
92
|
+
lintLeft = tabEl.offsetLeft
|
|
93
|
+
} else if (type === 'border-card') {
|
|
94
|
+
lintWidth = tabWidth + 1
|
|
95
|
+
lintLeft = tabEl.offsetLeft - 1
|
|
96
|
+
} else if (!type) {
|
|
97
|
+
lintWidth = Math.max(4, Math.floor(tabWidth * 0.6))
|
|
98
|
+
lintLeft = tabEl.offsetLeft + Math.floor((tabWidth - lintWidth) / 2)
|
|
99
|
+
}
|
|
86
100
|
}
|
|
87
101
|
}
|
|
102
|
+
reactData.lintLeft = lintLeft
|
|
103
|
+
reactData.lintWidth = lintWidth
|
|
88
104
|
})
|
|
89
105
|
}
|
|
90
106
|
|
|
91
107
|
const clickEvent = (evnt: KeyboardEvent, item: VxeTabPaneProps | VxeTabPaneDefines.TabConfig) => {
|
|
92
|
-
const { initNames } = reactData
|
|
108
|
+
const { initNames, activeName } = reactData
|
|
93
109
|
const { name } = item
|
|
110
|
+
let isInit = false
|
|
111
|
+
const value = name
|
|
94
112
|
if (!initNames.includes(name)) {
|
|
113
|
+
isInit = true
|
|
95
114
|
initNames.push(name)
|
|
96
115
|
}
|
|
97
116
|
reactData.activeName = name
|
|
98
|
-
|
|
117
|
+
emit('update:modelValue', value)
|
|
118
|
+
if (name !== activeName) {
|
|
119
|
+
emit('change', { value, name, $event: evnt })
|
|
120
|
+
}
|
|
121
|
+
emit('click', { name, $event: evnt })
|
|
122
|
+
if (isInit) {
|
|
123
|
+
emit('load', { name, $event: evnt })
|
|
124
|
+
}
|
|
99
125
|
}
|
|
100
126
|
|
|
101
127
|
const renderTabHeader = (list: VxeTabsPropTypes.Options | VxeTabPaneDefines.TabConfig[]) => {
|
|
@@ -111,6 +137,7 @@ export default defineComponent({
|
|
|
111
137
|
const { title, name, slots } = item
|
|
112
138
|
const tabSlot = slots ? slots.tab : null
|
|
113
139
|
return h('div', {
|
|
140
|
+
key: name,
|
|
114
141
|
class: ['vxe-tab-header--item', {
|
|
115
142
|
'is--active': activeName === name
|
|
116
143
|
}],
|
|
@@ -123,15 +150,13 @@ export default defineComponent({
|
|
|
123
150
|
}, tabSlot ? callSlot(tabSlot, { name, title }) : `${title}`)
|
|
124
151
|
])
|
|
125
152
|
})),
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
})
|
|
153
|
+
h('span', {
|
|
154
|
+
class: `vxe-tabs-header--active-line-${type || 'default'}`,
|
|
155
|
+
style: {
|
|
156
|
+
left: `${lintLeft}px`,
|
|
157
|
+
width: `${lintWidth}px`
|
|
158
|
+
}
|
|
159
|
+
})
|
|
135
160
|
])
|
|
136
161
|
}
|
|
137
162
|
|
|
@@ -143,6 +168,7 @@ export default defineComponent({
|
|
|
143
168
|
default () {
|
|
144
169
|
return name && initNames.includes(name)
|
|
145
170
|
? h('div', {
|
|
171
|
+
key: name,
|
|
146
172
|
class: ['vxe-tab-pane--item', {
|
|
147
173
|
'is--visible': activeName === name
|
|
148
174
|
}]
|
|
@@ -156,7 +182,7 @@ export default defineComponent({
|
|
|
156
182
|
const { destroyOnClose } = props
|
|
157
183
|
const activeOptionTab = computeActiveOptionTab.value
|
|
158
184
|
if (destroyOnClose) {
|
|
159
|
-
return activeOptionTab ? renderOptionPane(activeOptionTab) : createCommentVNode()
|
|
185
|
+
return activeOptionTab ? [renderOptionPane(activeOptionTab)] : createCommentVNode()
|
|
160
186
|
}
|
|
161
187
|
return options.map(renderOptionPane)
|
|
162
188
|
}
|
|
@@ -167,6 +193,7 @@ export default defineComponent({
|
|
|
167
193
|
const defaultSlot = slots ? slots.default : null
|
|
168
194
|
return name && initNames.includes(name)
|
|
169
195
|
? h('div', {
|
|
196
|
+
key: name,
|
|
170
197
|
class: ['vxe-tab-pane--item', {
|
|
171
198
|
'is--visible': activeName === name
|
|
172
199
|
}]
|
|
@@ -178,7 +205,7 @@ export default defineComponent({
|
|
|
178
205
|
const { destroyOnClose } = props
|
|
179
206
|
const activeDefaultTab = computeActiveDefaultTab.value
|
|
180
207
|
if (destroyOnClose) {
|
|
181
|
-
return activeDefaultTab ? renderDefaultPane(activeDefaultTab) : createCommentVNode()
|
|
208
|
+
return activeDefaultTab ? [renderDefaultPane(activeDefaultTab)] : createCommentVNode()
|
|
182
209
|
}
|
|
183
210
|
return staticTabs.map(renderDefaultPane)
|
|
184
211
|
}
|
|
@@ -204,6 +231,9 @@ export default defineComponent({
|
|
|
204
231
|
|
|
205
232
|
watch(() => props.modelValue, (val) => {
|
|
206
233
|
reactData.activeName = val
|
|
234
|
+
})
|
|
235
|
+
|
|
236
|
+
watch(() => reactData.activeName, () => {
|
|
207
237
|
updateLineStyle()
|
|
208
238
|
})
|
|
209
239
|
|
|
@@ -4,12 +4,11 @@ import { dynamicApp } from '../dynamics'
|
|
|
4
4
|
|
|
5
5
|
export const VxeTextarea = Object.assign(VxeTextareaComponent, {
|
|
6
6
|
install: function (app: App) {
|
|
7
|
-
app.component(VxeTextareaComponent.name, VxeTextareaComponent)
|
|
7
|
+
app.component(VxeTextareaComponent.name as string, VxeTextareaComponent)
|
|
8
8
|
}
|
|
9
9
|
})
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
dynamicApp.component(VxeTextareaComponent.name, VxeTextareaComponent)
|
|
11
|
+
dynamicApp.component(VxeTextareaComponent.name as string, VxeTextareaComponent)
|
|
14
12
|
|
|
13
|
+
export const Textarea = VxeTextarea
|
|
15
14
|
export default VxeTextarea
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { App } from 'vue'
|
|
2
2
|
import VxeTooltipComponent from './src/tooltip'
|
|
3
|
+
import { dynamicApp } from '../dynamics'
|
|
3
4
|
|
|
4
5
|
const VxeTooltip = Object.assign({}, VxeTooltipComponent, {
|
|
5
6
|
install (app: App) {
|
|
@@ -7,5 +8,7 @@ const VxeTooltip = Object.assign({}, VxeTooltipComponent, {
|
|
|
7
8
|
}
|
|
8
9
|
})
|
|
9
10
|
|
|
11
|
+
dynamicApp.component(VxeTooltipComponent.name as string, VxeTooltipComponent)
|
|
12
|
+
|
|
10
13
|
export const Tooltip = VxeTooltip
|
|
11
14
|
export default VxeTooltip
|
|
@@ -7,25 +7,21 @@ const globalConfigStore: Required<VxeGlobalConfig> = {
|
|
|
7
7
|
zIndex: 999,
|
|
8
8
|
emptyCell: ' ',
|
|
9
9
|
loadingText: '',
|
|
10
|
+
resizeInterval: 500,
|
|
10
11
|
|
|
11
12
|
i18n: (key: string) => key,
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// pageSize: 10,
|
|
25
|
-
// pagerCount: 7,
|
|
26
|
-
// pageSizes: [10, 15, 20, 50, 100],
|
|
27
|
-
// layouts: ['PrevJump', 'PrevPage', 'Jump', 'PageCount', 'NextPage', 'NextJump', 'Sizes', 'Total']
|
|
28
|
-
},
|
|
14
|
+
anchor: {},
|
|
15
|
+
anchorLink: {},
|
|
16
|
+
breadcrumb: {
|
|
17
|
+
separator: '/'
|
|
18
|
+
},
|
|
19
|
+
breadcrumbItem: {},
|
|
20
|
+
button: {},
|
|
21
|
+
buttonGroup: {},
|
|
22
|
+
checkbox: {},
|
|
23
|
+
checkboxGroup: {},
|
|
24
|
+
col: {},
|
|
29
25
|
form: {
|
|
30
26
|
// preventSubmit: false,
|
|
31
27
|
// size: null,
|
|
@@ -39,6 +35,10 @@ const globalConfigStore: Required<VxeGlobalConfig> = {
|
|
|
39
35
|
},
|
|
40
36
|
titleAsterisk: true
|
|
41
37
|
},
|
|
38
|
+
formDesign: {},
|
|
39
|
+
formGather: {},
|
|
40
|
+
formItem: {},
|
|
41
|
+
icon: {},
|
|
42
42
|
input: {
|
|
43
43
|
// size: null,
|
|
44
44
|
// transfer: false
|
|
@@ -52,49 +52,21 @@ const globalConfigStore: Required<VxeGlobalConfig> = {
|
|
|
52
52
|
digits: 2,
|
|
53
53
|
controls: true
|
|
54
54
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
select: {
|
|
63
|
-
// size: null,
|
|
64
|
-
// transfer: false,
|
|
65
|
-
// optionConfig: {
|
|
66
|
-
// keyField: '_X_OPTION_KEY'
|
|
67
|
-
// },
|
|
68
|
-
multiCharOverflow: 8
|
|
69
|
-
},
|
|
70
|
-
button: {
|
|
71
|
-
// size: null,
|
|
72
|
-
// transfer: false
|
|
73
|
-
},
|
|
74
|
-
buttonGroup: {
|
|
75
|
-
// size: null
|
|
76
|
-
},
|
|
77
|
-
radio: {
|
|
78
|
-
// size: null,
|
|
79
|
-
strict: true
|
|
80
|
-
},
|
|
81
|
-
radioButton: {
|
|
82
|
-
// size: null,
|
|
83
|
-
strict: true
|
|
84
|
-
},
|
|
85
|
-
radioGroup: {
|
|
55
|
+
layoutAside: {},
|
|
56
|
+
layoutBody: {},
|
|
57
|
+
layoutContainer: {},
|
|
58
|
+
layoutFooter: {},
|
|
59
|
+
layoutHeader: {},
|
|
60
|
+
listDesign: {},
|
|
61
|
+
list: {
|
|
86
62
|
// size: null,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
checkboxGroup: {
|
|
93
|
-
// size: null
|
|
94
|
-
},
|
|
95
|
-
switch: {
|
|
96
|
-
// size: null
|
|
63
|
+
scrollY: {
|
|
64
|
+
enabled: true,
|
|
65
|
+
gt: 100
|
|
66
|
+
// oSize: 0
|
|
67
|
+
}
|
|
97
68
|
},
|
|
69
|
+
loading: {},
|
|
98
70
|
modal: {
|
|
99
71
|
// size: null,
|
|
100
72
|
top: 15,
|
|
@@ -113,16 +85,42 @@ const globalConfigStore: Required<VxeGlobalConfig> = {
|
|
|
113
85
|
// storage: false,
|
|
114
86
|
storageKey: 'VXE_MODAL_POSITION'
|
|
115
87
|
},
|
|
116
|
-
|
|
88
|
+
optgroup: {},
|
|
89
|
+
option: {},
|
|
90
|
+
pager: {
|
|
117
91
|
// size: null,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
92
|
+
// autoHidden: false,
|
|
93
|
+
// perfect: true,
|
|
94
|
+
// pageSize: 10,
|
|
95
|
+
// pagerCount: 7,
|
|
96
|
+
// pageSizes: [10, 15, 20, 50, 100],
|
|
97
|
+
// layouts: ['PrevJump', 'PrevPage', 'Jump', 'PageCount', 'NextPage', 'NextJump', 'Sizes', 'Total']
|
|
98
|
+
},
|
|
99
|
+
pulldown: {},
|
|
100
|
+
radio: {
|
|
101
|
+
strict: true
|
|
102
|
+
},
|
|
103
|
+
radioButton: {
|
|
104
|
+
strict: true
|
|
105
|
+
},
|
|
106
|
+
radioGroup: {
|
|
107
|
+
strict: true
|
|
123
108
|
},
|
|
124
|
-
|
|
125
|
-
|
|
109
|
+
row: {},
|
|
110
|
+
select: {
|
|
111
|
+
multiCharOverflow: 8
|
|
112
|
+
},
|
|
113
|
+
switch: {},
|
|
114
|
+
tabPane: {},
|
|
115
|
+
tabs: {},
|
|
116
|
+
textarea: {},
|
|
117
|
+
tooltip: {
|
|
118
|
+
// size: null,
|
|
119
|
+
trigger: 'hover',
|
|
120
|
+
theme: 'dark',
|
|
121
|
+
enterDelay: 500,
|
|
122
|
+
leaveDelay: 300
|
|
123
|
+
}
|
|
126
124
|
}
|
|
127
125
|
|
|
128
126
|
export default globalConfigStore
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import XEUtils from 'xe-utils'
|
|
2
|
+
import globalConfigStore from './globalStore'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 监听 resize 事件
|
|
6
|
+
* 如果项目中已使用了 resize-observer-polyfill,那么只需要将方法定义全局,该组件就会自动使用
|
|
7
|
+
*/
|
|
8
|
+
let resizeTimeout: any
|
|
9
|
+
/* eslint-disable no-use-before-define */
|
|
10
|
+
const eventStore: XEResizeObserver[] = []
|
|
11
|
+
const defaultInterval = 500
|
|
12
|
+
|
|
13
|
+
function eventHandle () {
|
|
14
|
+
if (eventStore.length) {
|
|
15
|
+
eventStore.forEach((item) => {
|
|
16
|
+
item.tarList.forEach((observer) => {
|
|
17
|
+
const { target, width, heighe } = observer
|
|
18
|
+
const clientWidth = target.clientWidth
|
|
19
|
+
const clientHeight = target.clientHeight
|
|
20
|
+
const rWidth = clientWidth && width !== clientWidth
|
|
21
|
+
const rHeight = clientHeight && heighe !== clientHeight
|
|
22
|
+
if (rWidth || rHeight) {
|
|
23
|
+
observer.width = clientWidth
|
|
24
|
+
observer.heighe = clientHeight
|
|
25
|
+
setTimeout(item.callback)
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
30
|
+
eventListener()
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function eventListener () {
|
|
35
|
+
clearTimeout(resizeTimeout)
|
|
36
|
+
resizeTimeout = setTimeout(eventHandle, globalConfigStore.resizeInterval || defaultInterval)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export class XEResizeObserver {
|
|
40
|
+
tarList: {
|
|
41
|
+
target: Element;
|
|
42
|
+
width: number;
|
|
43
|
+
heighe: number;
|
|
44
|
+
}[] = []
|
|
45
|
+
|
|
46
|
+
callback: (...args: any[]) => void
|
|
47
|
+
|
|
48
|
+
constructor (callback: (...args: any[]) => void) {
|
|
49
|
+
this.callback = callback
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
observe (target: Element): void {
|
|
53
|
+
if (target) {
|
|
54
|
+
const { tarList } = this
|
|
55
|
+
if (!tarList.some(observer => observer.target === target)) {
|
|
56
|
+
tarList.push({
|
|
57
|
+
target,
|
|
58
|
+
width: target.clientWidth,
|
|
59
|
+
heighe: target.clientHeight
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
if (!eventStore.length) {
|
|
63
|
+
eventListener()
|
|
64
|
+
}
|
|
65
|
+
if (!eventStore.some((item) => item === this)) {
|
|
66
|
+
eventStore.push(this)
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
unobserve (target: Element): void {
|
|
72
|
+
XEUtils.remove(eventStore, item => item.tarList.some(observer => observer.target === target))
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
disconnect (): void {
|
|
76
|
+
XEUtils.remove(eventStore, item => item === this)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function createResizeEvent (callback: (...args: any[]) => void): any {
|
|
81
|
+
if (window.ResizeObserver) {
|
|
82
|
+
return new window.ResizeObserver(callback)
|
|
83
|
+
}
|
|
84
|
+
return new XEResizeObserver(callback)
|
|
85
|
+
}
|
package/styles/all.scss
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
@import './components/layout-footer.scss';
|
|
22
22
|
@import './components/layout-header.scss';
|
|
23
23
|
@import './components/list-design.scss';
|
|
24
|
+
@import './components/list.scss';
|
|
24
25
|
@import './components/loading.scss';
|
|
25
26
|
@import './components/modal.scss';
|
|
26
27
|
@import './components/optgroup.scss';
|
|
@@ -12,7 +12,7 @@ $iconWidth: 1.6em;
|
|
|
12
12
|
font-family: inherit;
|
|
13
13
|
line-height: inherit;
|
|
14
14
|
padding: 0 0.6em;
|
|
15
|
-
color: var(--vxe-font-color);
|
|
15
|
+
color: var(--vxe-ui-font-color);
|
|
16
16
|
border: 1px solid var(--vxe-ui-input-border-color);
|
|
17
17
|
background-color: var(--vxe-ui-input-background-color);
|
|
18
18
|
box-shadow: none;
|
|
@@ -205,7 +205,7 @@ $iconWidth: 1.6em;
|
|
|
205
205
|
.vxe-input--suffix {
|
|
206
206
|
&:hover {
|
|
207
207
|
.vxe-input--clear-icon {
|
|
208
|
-
color: var(--vxe-font-color);
|
|
208
|
+
color: var(--vxe-ui-font-color);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
&:active {
|
|
@@ -218,7 +218,7 @@ $iconWidth: 1.6em;
|
|
|
218
218
|
&:hover {
|
|
219
219
|
.vxe-input--search-suffix,
|
|
220
220
|
.vxe-input--password-suffix {
|
|
221
|
-
color: var(--vxe-font-color);
|
|
221
|
+
color: var(--vxe-ui-font-color);
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
&:active {
|
|
@@ -231,7 +231,7 @@ $iconWidth: 1.6em;
|
|
|
231
231
|
.vxe-input--number-prev,
|
|
232
232
|
.vxe-input--number-next {
|
|
233
233
|
&:hover {
|
|
234
|
-
color: var(--vxe-font-color);
|
|
234
|
+
color: var(--vxe-ui-font-color);
|
|
235
235
|
}
|
|
236
236
|
&:active {
|
|
237
237
|
color: var(--vxe-primary-color);
|
|
@@ -303,7 +303,7 @@ $iconWidth: 1.6em;
|
|
|
303
303
|
position: absolute;
|
|
304
304
|
left: 0;
|
|
305
305
|
padding: 4px 0;
|
|
306
|
-
color: var(--vxe-font-color);
|
|
306
|
+
color: var(--vxe-ui-font-color);
|
|
307
307
|
font-size: var(--vxe-font-size);
|
|
308
308
|
text-align: left;
|
|
309
309
|
&:not(.is--transfer) {
|