sh-view 2.0.0 → 2.0.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/package.json +1 -1
- package/packages/components/global-components/sh-drawer/index.vue +1 -1
- package/packages/components/global-components/sh-form/css/index.scss +2 -2
- package/packages/components/global-components/sh-poptip/index.vue +2 -1
- package/packages/components/global-components/sh-tabs/index.vue +11 -4
package/package.json
CHANGED
|
@@ -392,7 +392,7 @@ export default {
|
|
|
392
392
|
position: absolute;
|
|
393
393
|
top: 0;
|
|
394
394
|
bottom: 0;
|
|
395
|
-
background-color:
|
|
395
|
+
background-color: var(--vxe-table-body-background-color);
|
|
396
396
|
border: 0;
|
|
397
397
|
background-clip: padding-box;
|
|
398
398
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
.vxe-input--inner[disabled], .vxe-textarea--inner[disabled]{
|
|
6
6
|
cursor: auto;
|
|
7
7
|
color: #333;
|
|
8
|
-
background-color:
|
|
8
|
+
background-color: var(--vxe-table-body-background-color);
|
|
9
9
|
border-color: var(--vxe-primary-lighten-color);
|
|
10
10
|
}
|
|
11
11
|
.vxe-checkbox.is--disabled{
|
|
12
12
|
cursor: auto;
|
|
13
13
|
color: #333;
|
|
14
14
|
& > input + .vxe-checkbox--icon{
|
|
15
|
-
background-color:
|
|
15
|
+
background-color: var(--vxe-table-body-background-color);
|
|
16
16
|
border-color: var(--vxe-primary-lighten-color);
|
|
17
17
|
}
|
|
18
18
|
& > input + .vxe-checkbox--icon:before{
|
|
@@ -350,6 +350,7 @@ $poptip-arrow-color: hsla(0, 0%, 85%, 0.5);
|
|
|
350
350
|
&-rel {
|
|
351
351
|
display: inline-block;
|
|
352
352
|
position: relative;
|
|
353
|
+
width: 100%;
|
|
353
354
|
}
|
|
354
355
|
&-title {
|
|
355
356
|
margin: 0;
|
|
@@ -386,7 +387,7 @@ $poptip-arrow-color: hsla(0, 0%, 85%, 0.5);
|
|
|
386
387
|
}
|
|
387
388
|
&-inner {
|
|
388
389
|
width: 100%;
|
|
389
|
-
background-color:
|
|
390
|
+
background-color: var(--vxe-table-body-background-color);
|
|
390
391
|
background-clip: padding-box;
|
|
391
392
|
border-radius: var(--vxe-border-radius);
|
|
392
393
|
box-shadow: var(--box-shadow);
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<slot name="tabItem" v-bind="{ ...tab, isActive: tab.value === activeKey }">
|
|
12
12
|
<div v-if="tab.icon" class="sh-tab-icon"><sh-icon :type="tab.icon"></sh-icon></div>
|
|
13
13
|
<div class="sh-tab-label">{{ tab[labelField] }}</div>
|
|
14
|
-
<div v-if="
|
|
14
|
+
<div v-if="getTabIsClosable(tab)" class="sh-tab-close" @click.stop="handleClose(tab)"><sh-icon type="ios-close"></sh-icon></div>
|
|
15
15
|
</slot>
|
|
16
16
|
</div>
|
|
17
17
|
</template>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
<div v-if="$slots.right" class="sh-tabs-nav-slot sh-tabs-nav-right"><slot name="right"></slot></div>
|
|
23
23
|
</div>
|
|
24
|
-
<div v-if="
|
|
24
|
+
<div v-if="hasContent" class="sh-tabs-content">
|
|
25
25
|
<div ref="contentWrap" class="sh-tabs-content-wrap" :class="{ 'sh-tabs-content-animated': animated }" :style="contentStyle">
|
|
26
26
|
<template v-for="(tab, tabIndex) in tabList" :key="tabIndex">
|
|
27
27
|
<div class="sh-tabs-content-item">
|
|
@@ -65,6 +65,10 @@ export default {
|
|
|
65
65
|
closable: {
|
|
66
66
|
type: Boolean,
|
|
67
67
|
default: false
|
|
68
|
+
},
|
|
69
|
+
isContent: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: true
|
|
68
72
|
}
|
|
69
73
|
},
|
|
70
74
|
emits: ['update:modelValue', 'close', 'change'],
|
|
@@ -77,8 +81,8 @@ export default {
|
|
|
77
81
|
}
|
|
78
82
|
},
|
|
79
83
|
computed: {
|
|
80
|
-
|
|
81
|
-
return this.activeKey && this.options.map(item => item.value).includes(this.activeKey)
|
|
84
|
+
hasContent() {
|
|
85
|
+
return this.isContent && this.activeKey && this.options.map(item => item.value).includes(this.activeKey)
|
|
82
86
|
},
|
|
83
87
|
tabList() {
|
|
84
88
|
return this.options.filter(tab => !this.closedList.includes(tab.value)) || []
|
|
@@ -131,6 +135,9 @@ export default {
|
|
|
131
135
|
const { navStyle } = this
|
|
132
136
|
return navStyle.transform ? Number(navStyle.transform.match(/translateX\(-(\d+(\.\d+)*)px\)/)[1]) : 0
|
|
133
137
|
},
|
|
138
|
+
getTabIsClosable(tab) {
|
|
139
|
+
return this.closable && !tab.disabled && !tab.unClosed
|
|
140
|
+
},
|
|
134
141
|
handleResize(e) {
|
|
135
142
|
const navWidth = this.$refs.nav.offsetWidth
|
|
136
143
|
const containerWidth = this.$refs.navScroll.offsetWidth
|