sh-view 2.9.16 → 2.9.18
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/sh-card/index.vue +6 -3
- package/packages/components/sh-date/index.vue +4 -3
- package/packages/components/sh-row/css/index.scss +1 -1
- package/packages/components/sh-table/grid.vue +1 -1
- package/packages/components/sh-table/js/useTable.js +4 -5
- package/packages/components/sh-table/table.vue +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sh-view",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.18",
|
|
4
4
|
"description": "基于vxe-table二次封装,更包含Alert,Badge,Card,CodeEditor,Col,Corner,CountTo,Drawer,Empty,Form,Header,Icon,List,Loading,Modal,Noticebar,Poptip,Progress,PullRefresh,Query,Result,Row,Split,Grid,Table,Tabs,Tag,Toolbar,Tree,Upload,WaterFall,WaterMark等丰富组件库",
|
|
5
5
|
"main": "packages/index.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -92,8 +92,8 @@ export default defineComponent({
|
|
|
92
92
|
background-color: var(--bg-main-color);
|
|
93
93
|
.sh-card-head {
|
|
94
94
|
@include layoutFlex;
|
|
95
|
+
flex-wrap: nowrap;
|
|
95
96
|
.sh-card-head-title {
|
|
96
|
-
flex: 1;
|
|
97
97
|
display: block;
|
|
98
98
|
overflow: hidden;
|
|
99
99
|
text-overflow: ellipsis;
|
|
@@ -104,10 +104,13 @@ export default defineComponent({
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
.sh-card-head-extra {
|
|
107
|
-
@include layoutFlex;
|
|
108
|
-
flex: 0;
|
|
109
107
|
display: inline-flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
flex-wrap: nowrap;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
text-overflow: ellipsis;
|
|
110
112
|
white-space: nowrap;
|
|
113
|
+
margin-left: auto;
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
116
|
.sh-card-body {
|
|
@@ -111,23 +111,24 @@ export default defineComponent({
|
|
|
111
111
|
const inputValue = ref(props.modelValue)
|
|
112
112
|
const rangeValue = ref(Array.isArray(props.modelValue) ? props.modelValue : [])
|
|
113
113
|
|
|
114
|
+
const vmConfig = computed(() => ({ size: props.size }))
|
|
114
115
|
const inputConfig = computed(() => {
|
|
115
116
|
let defaultProps = {}
|
|
116
117
|
let vxeProps = $vUtils.omit(props, (val, key) => {
|
|
117
118
|
return omitProps.includes(key) || $vUtils.isNone(val)
|
|
118
119
|
})
|
|
119
120
|
let shProps = {}
|
|
120
|
-
return Object.assign(defaultProps, vxeProps, shProps)
|
|
121
|
+
return Object.assign(defaultProps, vxeProps, shProps, vmConfig)
|
|
121
122
|
})
|
|
122
123
|
const pulldownConfig = computed(() => {
|
|
123
|
-
return Object.assign({ transfer: true }, props.pulldown)
|
|
124
|
+
return Object.assign({ transfer: true }, props.pulldown, vmConfig)
|
|
124
125
|
})
|
|
125
126
|
const calendarFormat = computed(() => {
|
|
126
127
|
if (props.type === 'month') return 'yyyy-MM'
|
|
127
128
|
else if (props.type === 'year') return 'yyyy'
|
|
128
129
|
return props.format || 'yyyy-MM-dd'
|
|
129
130
|
})
|
|
130
|
-
const rangeInputConfig = computed(() => ({ type: 'text', readonly: true }))
|
|
131
|
+
const rangeInputConfig = computed(() => ({ type: 'text', readonly: true, ...vmConfig }))
|
|
131
132
|
const startInputConfig = computed(() => {
|
|
132
133
|
let startValue = rangeValue.value[0] || ''
|
|
133
134
|
let startLabel = $vUtils.toDateString(startValue, calendarFormat.value)
|
|
@@ -14,7 +14,7 @@ $uiprefix: sh;
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
@each $prefix, $value in (start, flex-start), (center, center), (end, flex-end), (around, space-around), (between, space-between) {
|
|
17
|
+
@each $prefix, $value in (start, flex-start), (center, center), (end, flex-end), (around, space-around), (between, space-between), (stretch, stretch) {
|
|
18
18
|
.#{$uiprefix}-row-justify-#{$prefix} {
|
|
19
19
|
justify-content: $value;
|
|
20
20
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<vxe-toolbar ref="toolbarRef" v-bind="tableToolbarConfig">
|
|
40
40
|
<template #buttons>
|
|
41
41
|
<div v-if="tableGlobalConfig.title" class="sh-table-toolbar-item">
|
|
42
|
-
<h3 class="tableName">{{
|
|
42
|
+
<h3 class="tableName">{{ tableName }}</h3>
|
|
43
43
|
</div>
|
|
44
44
|
<!--ps:全表搜索不支持反转-->
|
|
45
45
|
<div v-if="tableGlobalConfig.globalFilter" class="sh-table-toolbar-item">
|
|
@@ -17,7 +17,6 @@ let omitProps = [
|
|
|
17
17
|
'onPrintMethod'
|
|
18
18
|
]
|
|
19
19
|
const globalConfigDefault = {
|
|
20
|
-
tableName: '',
|
|
21
20
|
title: false, // 是否显示 tableName
|
|
22
21
|
selectType: '', // 是否选择框 空 radio checkbox
|
|
23
22
|
seq: false, // 是否展示序号列
|
|
@@ -137,7 +136,7 @@ export default function (props, context, proxy, isGrid) {
|
|
|
137
136
|
const tableExportConfig = computed(() =>
|
|
138
137
|
Object.assign(
|
|
139
138
|
{
|
|
140
|
-
filename:
|
|
139
|
+
filename: props.tableName,
|
|
141
140
|
sheetName: 'sheet1',
|
|
142
141
|
type: 'xlsx',
|
|
143
142
|
types: ['xlsx', 'csv', 'pdf', 'html', 'xml', 'txt'],
|
|
@@ -150,8 +149,8 @@ export default function (props, context, proxy, isGrid) {
|
|
|
150
149
|
const tablePrintConfig = computed(() =>
|
|
151
150
|
Object.assign(
|
|
152
151
|
{
|
|
153
|
-
filename:
|
|
154
|
-
sheetName:
|
|
152
|
+
filename: props.tableName,
|
|
153
|
+
sheetName: props.tableName,
|
|
155
154
|
beforePrintMethod: obj => getExportPrintDataByOption(obj, 'print')
|
|
156
155
|
},
|
|
157
156
|
exportAndPrintDefault,
|
|
@@ -223,7 +222,7 @@ export default function (props, context, proxy, isGrid) {
|
|
|
223
222
|
const globalTool = globalFg.title || globalFg.globalFilter
|
|
224
223
|
const toolbarTool = toolbarFg.import || toolbarFg.export || toolbarFg.print || toolbarFg.refresh || toolbarFg.custom
|
|
225
224
|
const slotsTool = slots.toolbar || slots.toolbarLeft || slots.toolbarRight
|
|
226
|
-
return globalTool || toolbarTool || slotsTool || toolsFg.length > 0
|
|
225
|
+
return globalTool || toolbarTool || slotsTool || toolsFg.length > 0 || tableMoneyConfig.value.enabled
|
|
227
226
|
})
|
|
228
227
|
|
|
229
228
|
// 获取选中数据
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<vxe-toolbar ref="toolbarRef" v-bind="tableToolbarConfig">
|
|
15
15
|
<template #buttons>
|
|
16
16
|
<div v-if="tableGlobalConfig.title" class="sh-table-toolbar-item">
|
|
17
|
-
<h3 class="tableName">{{
|
|
17
|
+
<h3 class="tableName">{{ tableName }}</h3>
|
|
18
18
|
</div>
|
|
19
19
|
<!--ps:全表搜索不支持反转-->
|
|
20
20
|
<div v-if="tableGlobalConfig.globalFilter" class="sh-table-toolbar-item">
|