diff --git a/magic-editor/src/console/src/assets/index.css b/magic-editor/src/console/src/assets/index.css index 90c320d8..fa56147d 100644 --- a/magic-editor/src/console/src/assets/index.css +++ b/magic-editor/src/console/src/assets/index.css @@ -295,4 +295,14 @@ .ma-table-request-row { display: flex; +} + +/** 旋转特效 **/ +@keyframes rotate { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } } \ No newline at end of file diff --git a/magic-editor/src/console/src/components/common/magic-tree.vue b/magic-editor/src/console/src/components/common/magic-tree.vue index 7556cd0b..15d984a8 100644 --- a/magic-editor/src/console/src/components/common/magic-tree.vue +++ b/magic-editor/src/console/src/components/common/magic-tree.vue @@ -2,13 +2,22 @@
- +
+ +
+
+
+ +
+ 加载中... +
+
无数据
@@ -20,11 +29,70 @@ export default { props: { data: Array, // 解决子组件不强制刷新 - forceUpdate: Boolean + forceUpdate: Boolean, + loading: { + type: Boolean, + default: false + }, + loadingTime: { + type: Number, + default: 500 + } }, components: { MagicTreeItem + }, + data() { + return { + showLoading: false + } + }, + watch: { + loading(newVal) { + if (newVal) { + this.showLoading = newVal + } else { + setTimeout(() => { + this.showLoading = newVal + }, this.loadingTime) + } + } + }, + mounted() { + this.showLoading = this.loading } } - + diff --git a/magic-editor/src/console/src/components/resources/magic-api-list.vue b/magic-editor/src/console/src/components/resources/magic-api-list.vue index 60203a62..4dcb3215 100644 --- a/magic-editor/src/console/src/components/resources/magic-api-list.vue +++ b/magic-editor/src/console/src/components/resources/magic-api-list.vue @@ -22,7 +22,7 @@ - +