shijiplus-web-plugin 0.1.50 → 0.1.51

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": "shijiplus-web-plugin",
3
- "version": "0.1.50",
3
+ "version": "0.1.51",
4
4
  "files": [
5
5
  "src"
6
6
  ],
@@ -44,6 +44,22 @@ const install = (vue, opts = {}) => {
44
44
  return result
45
45
  }
46
46
  vue.prototype.$isEqual = isEqual
47
+
48
+ Vue.prototype.$priceFormat = function (obj) {
49
+ // { { row.presentPrice } } 元 + {{ row.presentKPrice }
50
+ // }K币
51
+ let result = ''
52
+ if (obj.presentPrice) {
53
+ result += '¥' + obj.presentPrice
54
+ }
55
+ if (obj.presentKPrice) {
56
+ if (result) {
57
+ result += ' + '
58
+ }
59
+ result += obj.presentKPrice + 'K币'
60
+ }
61
+ return result || '¥0'
62
+ }
47
63
  }
48
64
 
49
65
  function convertNumberToString(obj) {