sone-ui-component-3.2.4 2.1.39 → 2.1.41

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": "sone-ui-component-3.2.4",
3
- "version": "2.1.39",
3
+ "version": "2.1.41",
4
4
  "private": false,
5
5
  "main": "lib/sone-ui.common.js",
6
6
  "files": [
@@ -231,6 +231,7 @@ export default {
231
231
 
232
232
  if (this.precision !== undefined) {
233
233
  currentValue = this.toPrecision(currentValue, this.precision);
234
+ // currentValue = this.fixPrecision(currentValue, this.precision);
234
235
  }
235
236
  }
236
237
  this.$emit("updateDisplayValue", currentValue);
@@ -238,6 +239,27 @@ export default {
238
239
  }
239
240
  },
240
241
  methods: {
242
+ fixPrecision(num, precision){
243
+ if(precision === 0) return num;
244
+ if(typeof num !== 'number') return num;
245
+ let val = num;
246
+ if(String(val).indexOf('.') === -1){
247
+ for(let i = 0; i < precision; i++){
248
+ if(i === 0){
249
+ val = val + '.0'
250
+ }else{
251
+ val = val + '0'
252
+ }
253
+ }
254
+ }else{
255
+ let arr = String(val).split('.');
256
+ let newPrecision = precision - arr[1].length;
257
+ for(let i = 0; i < newPrecision; i++){
258
+ val = val + '0'
259
+ }
260
+ }
261
+ return val;
262
+ },
241
263
  toPrecision(num, precision) {
242
264
  if (num === "" || num === null || num === undefined) {
243
265
  return "";
@@ -99,7 +99,7 @@
99
99
  >
100
100
  <template v-for="(item,index) in operation.buttonList">
101
101
  <el-tooltip
102
- :content="item.label"
102
+ :content="String(item.label)"
103
103
  :key="index"
104
104
  effect="light"
105
105
  placement="top"
@@ -123,7 +123,7 @@
123
123
  >
124
124
  <template v-for="(item,index) in scope.row.buttonShow.filter(d=>d.isShow).slice(0,2)">
125
125
  <el-tooltip
126
- :content="operation.buttonList.find(d=>d.id===item.id).label"
126
+ :content="String(operation.buttonList.find(d=>d.id===item.id).label)"
127
127
  :key="index"
128
128
  effect="light"
129
129
  placement="top"
@@ -176,7 +176,7 @@
176
176
  >
177
177
  <template v-for="(item,index) in operation.buttonList">
178
178
  <el-tooltip
179
- :content="item.label"
179
+ :content="String(item.label)"
180
180
  :key="index"
181
181
  effect="light"
182
182
  placement="top"
@@ -198,7 +198,7 @@
198
198
  >
199
199
  <template v-for="(item,index) in operation.buttonList.slice(0,2)">
200
200
  <el-tooltip
201
- :content="item.label"
201
+ :content="String(item.label)"
202
202
  :key="index"
203
203
  effect="light"
204
204
  placement="top"
@@ -546,9 +546,9 @@
546
546
  v-if="childColumn.slotCell"
547
547
  ></slot>
548
548
  <template v-else>
549
- <el-tooltip :content="scope.row[childColumn.prop]" placement="top" effect="light" popper-class="over_popper">
550
- <span class="over_title">{{ scope.row[childColumn.prop] }}</span>
551
- </el-tooltip>
549
+ <!-- <el-tooltip :content="scope.row[childColumn.prop]" placement="top" effect="light" popper-class="over_popper"> -->
550
+ <span class="over_title" :title="scope.row[childColumn.prop]">{{ scope.row[childColumn.prop] }}</span>
551
+ <!-- </el-tooltip> -->
552
552
  </template>
553
553
  </template>
554
554
  </el-table-column>
@@ -613,10 +613,10 @@
613
613
  v-if="column.slotCell"
614
614
  ></slot>
615
615
  <template v-else>
616
- <el-tooltip :content="scope.row[column.prop]" placement="top" effect="light" popper-class="over_popper">
617
- <span class="over_title">{{ scope.row[column.prop] }}</span>
618
- </el-tooltip>
619
- </template>
616
+ <!-- <el-tooltip :content="scope.row[column.prop]" placement="top" effect="light" popper-class="over_popper"> -->
617
+ <span class="over_title" :title="scope.row[column.prop]">{{ scope.row[column.prop] }}</span>
618
+ <!-- </el-tooltip> -->
619
+ </template>
620
620
  </template>
621
621
  </el-table-column>
622
622
  </template>
package/src/index.js CHANGED
@@ -57,7 +57,7 @@ if (typeof window !== 'undefined' && window.Vue) {
57
57
  }
58
58
 
59
59
  export default {
60
- version: '2.1.39',
60
+ version: '2.1.41',
61
61
  locale: locale.use,
62
62
  i18n: locale.i18n,
63
63
  install,