bri-components 1.2.16 → 1.2.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/lib/bri-components.min.js +2 -2
- package/package.json +1 -1
- package/src/components/controls/base/DshSelect.vue +3 -3
- package/src/components/list/BriTable.vue +5 -2
- package/src/components/other/BriIframe.vue +14 -19
- package/src/components/other/BriLoading.vue +11 -9
- package/src/styles/components/other/BriIframe.less +1 -0
package/package.json
CHANGED
|
@@ -226,10 +226,10 @@
|
|
|
226
226
|
callback: data => {
|
|
227
227
|
this.initListData = [
|
|
228
228
|
...this.initListData,
|
|
229
|
-
...data.list.map(
|
|
229
|
+
...data.list.map(dataItem =>
|
|
230
230
|
({
|
|
231
|
-
_key:
|
|
232
|
-
name:
|
|
231
|
+
_key: dataItem[item._key || "_key"],
|
|
232
|
+
name: dataItem[item._name || "name"]
|
|
233
233
|
})
|
|
234
234
|
)
|
|
235
235
|
];
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
<div
|
|
14
14
|
v-else
|
|
15
|
-
class="
|
|
15
|
+
class="BriIframe-nodata"
|
|
16
16
|
>
|
|
17
17
|
<img
|
|
18
18
|
:src="noData"
|
|
@@ -59,25 +59,20 @@
|
|
|
59
59
|
methods: {
|
|
60
60
|
init () {
|
|
61
61
|
let iframe = this.$refs.BriIframe;
|
|
62
|
-
if (
|
|
63
|
-
|
|
62
|
+
if (iframe) {
|
|
63
|
+
this.loading = true;
|
|
64
|
+
if (iframe.attachEvent) {
|
|
65
|
+
iframe.attachEvent("onreadystatechange", () => {
|
|
66
|
+
if (iframe.readyState === "complete" || iframe.readyState == "loaded") {
|
|
67
|
+
this.loading = false;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
} else {
|
|
71
|
+
iframe.addEventListener("load", () => {
|
|
72
|
+
this.loading = false;
|
|
73
|
+
}, false);
|
|
74
|
+
}
|
|
64
75
|
}
|
|
65
|
-
this.loading = true;
|
|
66
|
-
if (iframe.attachEvent) {
|
|
67
|
-
iframe.attachEvent("onreadystatechange", () => {
|
|
68
|
-
if (iframe.readyState === "complete" || iframe.readyState == "loaded") {
|
|
69
|
-
this.loadingEnd();
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
} else {
|
|
73
|
-
iframe.addEventListener("load", () => {
|
|
74
|
-
this.loadingEnd();
|
|
75
|
-
}, false);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
loadingEnd () {
|
|
80
|
-
this.loading = false;
|
|
81
76
|
},
|
|
82
77
|
/**
|
|
83
78
|
* 在iframe页面使用举例:
|
|
@@ -8,22 +8,24 @@
|
|
|
8
8
|
}"
|
|
9
9
|
>
|
|
10
10
|
<div class="BriLoading-main">
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
<!-- loading -->
|
|
12
|
+
<template v-if="value === 1">
|
|
13
|
+
<slot>
|
|
13
14
|
<div
|
|
14
15
|
class="BriLoading-main-loading"
|
|
15
16
|
:style="getStyle"
|
|
16
|
-
>
|
|
17
|
-
</div>
|
|
17
|
+
></div>
|
|
18
18
|
<div
|
|
19
19
|
v-if="showLoadingText"
|
|
20
20
|
class="BriLoading-main-loadingText"
|
|
21
21
|
>
|
|
22
22
|
{{ loadText }}
|
|
23
23
|
</div>
|
|
24
|
-
</
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
</slot>
|
|
25
|
+
</template>
|
|
26
|
+
<!-- nodata -->
|
|
27
|
+
<template v-else-if="value === 2">
|
|
28
|
+
<slot name="nodata">
|
|
27
29
|
<bri-svg :src="imgSrc" />
|
|
28
30
|
<div
|
|
29
31
|
v-if="noText"
|
|
@@ -31,8 +33,8 @@
|
|
|
31
33
|
>
|
|
32
34
|
{{ noText }}
|
|
33
35
|
</div>
|
|
34
|
-
</
|
|
35
|
-
</
|
|
36
|
+
</slot>
|
|
37
|
+
</template>
|
|
36
38
|
</div>
|
|
37
39
|
</div>
|
|
38
40
|
</template>
|