xianniu-ui 0.3.16 → 0.3.17

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.3.16",
3
+ "version": "0.3.17",
4
4
  "private": false,
5
5
  "main": "lib/xianniu-ui.umd.min.js",
6
6
  "scripts": {
@@ -195,7 +195,6 @@ export default {
195
195
  },
196
196
  computed: {},
197
197
  created() {
198
- console.log(this.$slots);
199
198
  !this.$slots.default &&
200
199
  this.columns.length &&
201
200
  this.columns.forEach((item) => {
package/src/utils/math.js CHANGED
@@ -30,7 +30,7 @@ class Math {
30
30
  })
31
31
  }
32
32
  }
33
- autoComputed(fields = [], fieldsRules = {}, field = '') {
33
+ autoComputed(fields = [], fieldsRules = {}, field = '', value) {
34
34
  if (!fields.length || !Object.keys(fieldsRules).length) {
35
35
  throw new Error('error arguments: fields or fieldsRules')
36
36
  }
@@ -41,8 +41,8 @@ class Math {
41
41
  _fields.splice(idx, 1)
42
42
  }
43
43
  _fields.push(field)
44
- _fieldsRules[_fields[0]]()
45
- return { fields: _fields, fieldsRules: _fieldsRules, field }
44
+ _fieldsRules[_fields[0]](value)
45
+ return { fields: _fields, fieldsRules: _fieldsRules, field, value }
46
46
  }
47
47
  }
48
48
 
@@ -61,8 +61,8 @@ const mul = function (...args) {
61
61
  const div = function (...args) {
62
62
  return new Math('div').result(...args)
63
63
  }
64
- const autoComputed = function (fields = [], fieldsRules = {}, field = '') {
65
- return new Math().autoComputed(fields, fieldsRules, field)
64
+ const autoComputed = function (fields = [], fieldsRules = {}, field = '', value) {
65
+ return new Math().autoComputed(fields, fieldsRules, field, value)
66
66
  }
67
67
  export default {
68
68
  add,