Browse Source

xiugai1

master
yangzhou-cyber 3 years ago
parent
commit
9c8b987e6a
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      src/utils/mixin.js

+ 11
- 4
src/utils/mixin.js View File

@@ -1,7 +1,6 @@


let getNumber = (item, index, arr, props) => {
let number = 1

while (arr[++index]) {
for (let prop of props) {
if (arr[index][prop].trim() != item[prop].trim()) {
@@ -214,8 +213,8 @@ export let categoryName = {
* @param {*} params
* [{name: 'quota, col: [1,2]}]
*/
export function mergeSpan(params) {
export function mergeSpan(params) {
return {
methods: {
reduceData(data) {
@@ -239,6 +238,14 @@ export function mergeSpan(params) {
}
item[param.name + 'Row'] = getNumber(item, index, arr, spans)
}
if (params[ind + 1]) {
prev[ind+1] = item[params[ind+1].name].trim();
let spans = [];
for (let i = 0; i <= ind+1; i++) {
spans.push(params[i].name)
}
item[params[ind+1].name + 'Row'] = getNumber(item, index, arr, spans)
}
}
})
return item;

Loading…
Cancel
Save