mali-applet-ui 1.1.99 → 1.1.100

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.
@@ -106,6 +106,10 @@ export default {
106
106
  headerData: Array,
107
107
  data: Array,
108
108
  columns: Array,
109
+ columnConfig: {
110
+ type: Object,
111
+ default: () => ({})
112
+ },
109
113
  showMore: Boolean,
110
114
  loadStatus: String,
111
115
  rowConfig: {
@@ -148,6 +152,9 @@ export default {
148
152
  rowOpts () {
149
153
  return { ...this.rowConfig }
150
154
  },
155
+ columnOpts () {
156
+ return { ...this.columnConfig }
157
+ },
151
158
  sortOpts () {
152
159
  return { ...this.sortConfig }
153
160
  },
@@ -258,11 +265,12 @@ export default {
258
265
  return this.showOverflow ? '84rpx' : ''
259
266
  },
260
267
  getColWidth (column) {
261
- if (column.width) {
262
- if (isNaN(column.width)) {
263
- return column.width
268
+ const colWidth = column.width || this.columnOpts.width
269
+ if (colWidth) {
270
+ if (isNaN(colWidth)) {
271
+ return colWidth
264
272
  }
265
- return `${column.width}rpx`
273
+ return `${colWidth}rpx`
266
274
  }
267
275
  return `${this.colMinWidth}%`
268
276
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.1.99",
3
+ "version": "1.1.100",
4
4
  "description": "码里UI-小程序组件库(vue2)",
5
5
  "files": [
6
6
  "lib",