leisure-core 0.5.87 → 0.5.89
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/le-list/src/main.vue +26 -1
- package/le-role-user/src/main.vue +4 -2
- package/package.json +1 -1
package/le-list/src/main.vue
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
<el-form-item>
|
|
6
6
|
<div class="queryBtnClass">
|
|
7
7
|
<slot></slot>
|
|
8
|
-
<le-button type="primary" @click="onClickQuery()"
|
|
8
|
+
<le-button type="primary" @click="onClickQuery()" v-if="isDispQBtn"
|
|
9
|
+
>查询</le-button
|
|
10
|
+
>
|
|
9
11
|
<le-button type="primary" @click="addItem()" v-if="isDispAddBtn">{{
|
|
10
12
|
addBtnText
|
|
11
13
|
}}</le-button>
|
|
@@ -138,6 +140,10 @@ export default {
|
|
|
138
140
|
type: Boolean,
|
|
139
141
|
default: true,
|
|
140
142
|
},
|
|
143
|
+
isDispQBtn: {
|
|
144
|
+
type: Boolean,
|
|
145
|
+
default: true,
|
|
146
|
+
},
|
|
141
147
|
addBtnText: {
|
|
142
148
|
type: String,
|
|
143
149
|
default: "新建",
|
|
@@ -319,13 +325,32 @@ export default {
|
|
|
319
325
|
}
|
|
320
326
|
|
|
321
327
|
case "currency":
|
|
328
|
+
// if (value == null || value === "") return "";
|
|
329
|
+
// const num = parseFloat(value);
|
|
330
|
+
// if (isNaN(num)) return value;
|
|
331
|
+
|
|
332
|
+
// return new Intl.NumberFormat("zh-CN", {
|
|
333
|
+
// style: "currency",
|
|
334
|
+
// currency: "CNY",
|
|
335
|
+
// minimumFractionDigits: 0, // 最少小数位数
|
|
336
|
+
// maximumFractionDigits: 4, // 最多小数位数
|
|
337
|
+
// }).format(num);
|
|
322
338
|
if (value == null || value === "") return "";
|
|
323
339
|
const num = parseFloat(value);
|
|
324
340
|
if (isNaN(num)) return value;
|
|
325
341
|
|
|
342
|
+
const decimalPart = num.toString().split(".")[1];
|
|
343
|
+
const hasDecimal = decimalPart && decimalPart.length > 0;
|
|
344
|
+
|
|
326
345
|
return new Intl.NumberFormat("zh-CN", {
|
|
327
346
|
style: "currency",
|
|
328
347
|
currency: "CNY",
|
|
348
|
+
minimumFractionDigits: hasDecimal
|
|
349
|
+
? Math.min(decimalPart.length, 2)
|
|
350
|
+
: 0,
|
|
351
|
+
maximumFractionDigits: hasDecimal
|
|
352
|
+
? Math.min(decimalPart.length, 4)
|
|
353
|
+
: 0,
|
|
329
354
|
}).format(num);
|
|
330
355
|
|
|
331
356
|
default:
|
|
@@ -121,8 +121,10 @@ export default {
|
|
|
121
121
|
},
|
|
122
122
|
roleLoadFinished() {
|
|
123
123
|
if (this.isShowRoleList) {
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
if (Object.keys(this.currentItem).length !== 0) {
|
|
125
|
+
let uid = this.currentItem.id;
|
|
126
|
+
this.$refs.roleComponent.fillCheckboxStatus(uid);
|
|
127
|
+
}
|
|
126
128
|
}
|
|
127
129
|
},
|
|
128
130
|
openEditWindow(item) {
|