xianniu-ui 0.9.12 → 0.9.14

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": "xianniu-ui",
3
- "version": "0.9.12",
3
+ "version": "0.9.14",
4
4
  "private": false,
5
5
  "main": "lib/xianniu-ui.umd.min.js",
6
6
  "scripts": {
@@ -98,6 +98,7 @@
98
98
  label="序号"
99
99
  v-if="index && data.length"
100
100
  type="index"
101
+ :index="indexMethod"
101
102
  ></el-table-column>
102
103
  <slot>
103
104
  <column
@@ -206,6 +207,9 @@ export default {
206
207
  isRadio() {
207
208
  return this.type === "radio" || this.radio;
208
209
  },
210
+ currentTable() {
211
+ return this.$refs.table;
212
+ },
209
213
  },
210
214
  created() {},
211
215
  updated() {
@@ -216,6 +220,12 @@ export default {
216
220
  });
217
221
  },
218
222
  methods: {
223
+ indexMethod(index) {
224
+ if (this.page && this.page.pageNum && this.page.pageSize) {
225
+ return (this.page.pageNum - 1) * this.page.pageSize + index + 1;
226
+ }
227
+ return index + 1;
228
+ },
219
229
  getList(val) {
220
230
  this.$emit("on-page", val);
221
231
  },
@@ -294,6 +304,9 @@ export default {
294
304
  return 1;
295
305
  }
296
306
  },
307
+ toggleRowExpansion(row, expanded) {
308
+ this.$refs.table.toggleRowExpansion(row, expanded);
309
+ },
297
310
  },
298
311
  };
299
312
  </script>