diff --git a/public/css/loading.css b/public/css/loading.css
new file mode 100644
index 000000000..a148ed671
--- /dev/null
+++ b/public/css/loading.css
@@ -0,0 +1,65 @@
+.app-view-loading {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 99999;
+ background-color: rgba(255, 255, 255, 0.7);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.app-view-loading > div {
+ text-align: center;
+}
+.app-view-loading > div > div {
+ color: #ccc;
+ margin: 0;
+ font: 11px verdana;
+ line-height: 16px;
+ text-transform: uppercase;
+ letter-spacing: 1px;
+}
+.app-view-loading > div > span {
+ display: inline-block;
+ vertical-align: middle;
+ width: 8px;
+ height: 8px;
+ margin: 2px;
+ background: #007DB6;
+ border-radius: 8px;
+ animation: app-view-loadanim 1s infinite alternate;
+}
+.app-view-loading > div > span:nth-of-type(2) {
+ background: #008FB2;
+ animation-delay: 0.2s;
+}
+.app-view-loading > div > span:nth-of-type(3) {
+ background: #009B9E;
+ animation-delay: 0.4s;
+}
+.app-view-loading > div > span:nth-of-type(4) {
+ background: #00A77D;
+ animation-delay: 0.6s;
+}
+.app-view-loading > div > span:nth-of-type(5) {
+ background: #00B247;
+ animation-delay: 0.8s;
+}
+.app-view-loading > div > span:nth-of-type(6) {
+ background: #5AB027;
+ animation-delay: 1.0s;
+}
+.app-view-loading > div > span:nth-of-type(7) {
+ background: #A0B61E;
+ animation-delay: 1.2s;
+}
+@keyframes app-view-loadanim {
+ 0% {
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
diff --git a/resources/assets/js/components/Minder.vue b/resources/assets/js/components/Minder.vue
index 0fa740c1a..b2b54202a 100644
--- a/resources/assets/js/components/Minder.vue
+++ b/resources/assets/js/components/Minder.vue
@@ -50,10 +50,10 @@
-
+
-
+
@@ -218,8 +218,10 @@
data() {
return {
loadIng: true,
- isHand: false,
+ isHand: this.readOnly,
zoom: 100,
+
+ backup: null
};
},
mounted() {
@@ -233,24 +235,53 @@
if (data.app !== 'minder') {
return
}
- if (data.action === 'ready') {
- this.loadIng = false
- this.rendData()
+ switch (data.action) {
+ case 'ready':
+ this.loadIng = false
+ this.rendData()
+ break;
+
+ case 'content':
+ this.backup = JSON.stringify(data.content)
+ this.$emit('input', data.content);
+ break;
}
},
- execCommand(var1, var2) {
-
+ onHand() {
+ if (this.readOnly) {
+ this.execCommand('removeAllSelected')
+ return
+ }
+ this.execCommand('Hand')
+ this.isHand = !this.isHand
},
- exportHandle(n, filename) {
- filename = filename || (this.value.root.data.text || this.$L('无标题'));
+ execCommand(command, value) {
+ this.$refs.frame.postMessage({
+ app: 'minder',
+ action: 'command',
+ command,
+ value
+ })
+ },
+
+ exportHandle(type, filename) {
+ this.$refs.frame.postMessage({
+ app: 'minder',
+ action: 'export',
+ type,
+ name: filename || (this.value.root.data.text || this.$L('无标题'))
+ })
},
rendData() {
if (this.loadIng) {
return
}
+ if (this.backup === JSON.stringify(this.value)) {
+ return
+ }
this.$refs.frame.postMessage({
app: 'minder',
action: 'setContent',
diff --git a/resources/assets/js/pages/manage/components/FileContent.vue b/resources/assets/js/pages/manage/components/FileContent.vue
index e644da727..dec245fca 100644
--- a/resources/assets/js/pages/manage/components/FileContent.vue
+++ b/resources/assets/js/pages/manage/components/FileContent.vue
@@ -485,10 +485,10 @@ export default {
});
},
- exportMenu(act) {
+ exportMenu(type) {
switch (this.file.type) {
case 'mind':
- this.$refs.myMind.exportHandle(act == 'pdf' ? 1 : 0, this.file.name);
+ this.$refs.myMind.exportHandle(type, this.file.name);
break;
}
},
diff --git a/resources/assets/js/pages/manage/components/FilePreview.vue b/resources/assets/js/pages/manage/components/FilePreview.vue
index d1c7cfc93..4fc25d4e5 100644
--- a/resources/assets/js/pages/manage/components/FilePreview.vue
+++ b/resources/assets/js/pages/manage/components/FilePreview.vue
@@ -159,10 +159,10 @@ export default {
})
},
- exportMenu(act) {
+ exportMenu(type) {
switch (this.file.type) {
case 'mind':
- this.$refs.myMind.exportHandle(act == 'pdf' ? 1 : 0, this.file.name);
+ this.$refs.myMind.exportHandle(type, this.file.name);
break;
}
},
diff --git a/resources/assets/sass/app.scss b/resources/assets/sass/app.scss
index 81680608e..4838f6925 100644
--- a/resources/assets/sass/app.scss
+++ b/resources/assets/sass/app.scss
@@ -3,7 +3,6 @@
@import "element";
@import "fonts-ft";
@import "taskfont";
-@import "loading";
@import "scrollbar";
@import "components/_";
@import "pages/_";
diff --git a/resources/assets/sass/loading.scss b/resources/assets/sass/loading.scss
deleted file mode 100755
index fb3ca46c3..000000000
--- a/resources/assets/sass/loading.scss
+++ /dev/null
@@ -1,75 +0,0 @@
-.app-view-loading {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 99999;
- background-color: rgba(255, 255, 255, 0.7);
- display: flex;
- align-items: center;
- justify-content: center;
-
- > div {
- text-align: center;
-
- > div {
- color: #ccc;
- margin: 0;
- font: 11px verdana;
- line-height: 16px;
- text-transform: uppercase;
- letter-spacing: 1px;
- }
-
- > span {
- display: inline-block;
- vertical-align: middle;
- width: 8px;
- height: 8px;
- margin: 2px;
- background: #007DB6;
- border-radius: 8px;
- animation: app-view-loadanim 1s infinite alternate;
-
- &:nth-of-type(2) {
- background: #008FB2;
- animation-delay: 0.2s;
- }
-
- &:nth-of-type(3) {
- background: #009B9E;
- animation-delay: 0.4s;
- }
-
- &:nth-of-type(4) {
- background: #00A77D;
- animation-delay: 0.6s;
- }
-
- &:nth-of-type(5) {
- background: #00B247;
- animation-delay: 0.8s;
- }
-
- &:nth-of-type(6) {
- background: #5AB027;
- animation-delay: 1.0s;
- }
-
- &:nth-of-type(7) {
- background: #A0B61E;
- animation-delay: 1.2s;
- }
- }
-
- @keyframes app-view-loadanim {
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
- }
- }
-}
diff --git a/resources/assets/statics/public/css/loading.css b/resources/assets/statics/public/css/loading.css
new file mode 100644
index 000000000..a148ed671
--- /dev/null
+++ b/resources/assets/statics/public/css/loading.css
@@ -0,0 +1,65 @@
+.app-view-loading {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 99999;
+ background-color: rgba(255, 255, 255, 0.7);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.app-view-loading > div {
+ text-align: center;
+}
+.app-view-loading > div > div {
+ color: #ccc;
+ margin: 0;
+ font: 11px verdana;
+ line-height: 16px;
+ text-transform: uppercase;
+ letter-spacing: 1px;
+}
+.app-view-loading > div > span {
+ display: inline-block;
+ vertical-align: middle;
+ width: 8px;
+ height: 8px;
+ margin: 2px;
+ background: #007DB6;
+ border-radius: 8px;
+ animation: app-view-loadanim 1s infinite alternate;
+}
+.app-view-loading > div > span:nth-of-type(2) {
+ background: #008FB2;
+ animation-delay: 0.2s;
+}
+.app-view-loading > div > span:nth-of-type(3) {
+ background: #009B9E;
+ animation-delay: 0.4s;
+}
+.app-view-loading > div > span:nth-of-type(4) {
+ background: #00A77D;
+ animation-delay: 0.6s;
+}
+.app-view-loading > div > span:nth-of-type(5) {
+ background: #00B247;
+ animation-delay: 0.8s;
+}
+.app-view-loading > div > span:nth-of-type(6) {
+ background: #5AB027;
+ animation-delay: 1.0s;
+}
+.app-view-loading > div > span:nth-of-type(7) {
+ background: #A0B61E;
+ animation-delay: 1.2s;
+}
+@keyframes app-view-loadanim {
+ 0% {
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
diff --git a/resources/views/main.blade.php b/resources/views/main.blade.php
index 12bba8aab..ae0ad8990 100755
--- a/resources/views/main.blade.php
+++ b/resources/views/main.blade.php
@@ -12,6 +12,7 @@
{{ config('app.name', 'WebPage') }}
+