sh-view 2.9.3 → 2.9.4
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sh-view",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.4",
|
|
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",
|
|
@@ -17,6 +17,20 @@ const getDefaultMessage = (renderType, title) => {
|
|
|
17
17
|
return message
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
// 表格序号构造方法
|
|
21
|
+
export const seqMethod = ({ $table, seq, $rowIndex }, pagerConfig) => {
|
|
22
|
+
const pageStart = (+pagerConfig.pageSize || 50) * ((+pagerConfig.currentPage || 1) - 1)
|
|
23
|
+
if (pagerConfig && pagerConfig.enabled) {
|
|
24
|
+
if (String(seq).includes('.')) {
|
|
25
|
+
const seqIndex = seq.indexOf('.')
|
|
26
|
+
const seqStart = seq.substr(0, seqIndex)
|
|
27
|
+
return $vUtils.add(pageStart, seqStart) + seq.substr(seqIndex)
|
|
28
|
+
}
|
|
29
|
+
return $vUtils.add(pageStart, seq)
|
|
30
|
+
}
|
|
31
|
+
return seq
|
|
32
|
+
}
|
|
33
|
+
|
|
20
34
|
// 表格打印、导出统一过滤列
|
|
21
35
|
export const columnDefaultFilterMethod = ({ column, $columnIndex }) => {
|
|
22
36
|
let field = column.field
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, onMounted, reactive, ref, watch, nextTick } from 'vue'
|
|
2
|
-
import { columnDefaultFilterMethod, tableFooterCompute, getTransfarFields, formulaReplaceAll } from './tableMethods'
|
|
2
|
+
import { seqMethod, columnDefaultFilterMethod, tableFooterCompute, getTransfarFields, formulaReplaceAll, seqMethod } from './tableMethods'
|
|
3
3
|
|
|
4
4
|
// 记录自定义参数,传给vxe要过滤掉
|
|
5
5
|
let omitProps = [
|
|
@@ -130,20 +130,7 @@ export default function (props, context, proxy, isGrid) {
|
|
|
130
130
|
})
|
|
131
131
|
const tableSeqConfig = computed(() => {
|
|
132
132
|
const pagerConfig = tablePagerConfig.value
|
|
133
|
-
|
|
134
|
-
return {
|
|
135
|
-
seqMethod: ({ $table, seq, $rowIndex }) => {
|
|
136
|
-
if (pagerConfig && pagerConfig.enabled) {
|
|
137
|
-
if (String(seq).includes('.')) {
|
|
138
|
-
const seqIndex = seq.indexOf('.')
|
|
139
|
-
const seqStart = seq.substr(0, seqIndex)
|
|
140
|
-
return $vUtils.add(pageStart, seqStart) + seq.substr(seqIndex)
|
|
141
|
-
}
|
|
142
|
-
return $vUtils.add(pageStart, seq)
|
|
143
|
-
}
|
|
144
|
-
return seq
|
|
145
|
-
}
|
|
146
|
-
}
|
|
133
|
+
return Object.assign({ seqMethod: obj => seqMethod(obj, pagerConfig) }, props.seqConfig)
|
|
147
134
|
})
|
|
148
135
|
const tableMoneyConfig = computed(() => {
|
|
149
136
|
return Object.assign({ style: { width: '60px' } }, $vTableSetup.moneyConfig, props.moneyConfig, tableVmConfig.value)
|