gemercheung 2 年之前
父节点
当前提交
dbee3ff934

+ 2 - 1
packages/qjkankan-editor/.env.testdev

@@ -6,4 +6,5 @@ VUE_APP_PROXY_URL_ROOT='https://test.4dkankan.com'
 VUE_APP_PROXY_URL='https://test.4dkankan.com/qjkankan/'
 VUE_APP_PROXY_URL='https://test.4dkankan.com/qjkankan/'
 VUE_APP_ORIGIN=
 VUE_APP_ORIGIN=
 VUE_APP_URL_FILL=
 VUE_APP_URL_FILL=
-VUE_APP_DEBBUG_FLAG=0425-02
+VUE_APP_DEBBUG_FLAG=0425-02
+VUE_APP_DEBBUG_NOTIFY=1

+ 1 - 0
packages/qjkankan-editor/.env.testprod

@@ -8,3 +8,4 @@ VUE_APP_PROXY_URL='https://test.4dkankan.com/qjkankan/'
 VUE_APP_ORIGIN=
 VUE_APP_ORIGIN=
 VUE_APP_URL_FILL=/qjkankan
 VUE_APP_URL_FILL=/qjkankan
 VUE_APP_DEBBUG_FLAG=0525-01
 VUE_APP_DEBBUG_FLAG=0525-01
+VUE_APP_DEBBUG_NOTIFY=1

+ 3 - 0
packages/qjkankan-editor/package.json

@@ -34,9 +34,12 @@
     "vue": "^2.6.12",
     "vue": "^2.6.12",
     "vue-awesome-swiper": "^4.1.1",
     "vue-awesome-swiper": "^4.1.1",
     "vue-cropperjs": "^4.2.0",
     "vue-cropperjs": "^4.2.0",
+    "vue-demi": "^0.14.5",
     "vue-i18n": "^8.22.3",
     "vue-i18n": "^8.22.3",
     "vue-photo-preview": "^1.1.3",
     "vue-photo-preview": "^1.1.3",
     "vue-router": "^3.4.9",
     "vue-router": "^3.4.9",
+    "vue-toast-notification": "^3.1.1",
+    "vue-toastification": "^1.7.14",
     "vuex": "^3.6.0"
     "vuex": "^3.6.0"
   },
   },
   "devDependencies": {
   "devDependencies": {

+ 19 - 4
packages/qjkankan-editor/src/mixins/debuggerHelper.js

@@ -1,13 +1,28 @@
-
+import Vue from 'vue'
 export const debuggerHelper = (show = true) => {
 export const debuggerHelper = (show = true) => {
 
 
     if (show) {
     if (show) {
         // log.setColors({
         // log.setColors({
         var css = "background: #28b561; color:#fff;font-size:14px;padding:5px;";
         var css = "background: #28b561; color:#fff;font-size:14px;padding:5px;";
 
 
-        console.log(`%c 👉:当前版本::---> 1.4.0--${process.env.VUE_APP_DEBBUG_FLAG}`,css);
+        console.log(`%c 👉:当前版本::---> 1.4.0--${process.env.VUE_APP_DEBBUG_FLAG}`, css);
 
 
     }
     }
-
-
+    if (Number(process.env.VUE_APP_DEBBUG_NOTIFY) === 1) {
+    
+        Vue.$toast.warning("当前正在开发重构中, 如果要指定版本,请联系开发!", {
+            position: "top-center",
+            timeout: 400000,
+            closeOnClick: true,
+            pauseOnFocusLoss: true,
+            pauseOnHover: true,
+            draggable: true,
+            draggablePercent: 0.6,
+            showCloseButtonOnHover: false,
+            hideProgressBar: true,
+            closeButton: "button",
+            icon: true,
+            rtl: false
+        });
+    }
 }
 }

+ 17 - 15
packages/qjkankan-editor/src/pages/Edit.vue

@@ -5,31 +5,33 @@
 </template>
 </template>
 <script>
 <script>
 import AppLayout from "@/framework/EditorAppLayout.vue";
 import AppLayout from "@/framework/EditorAppLayout.vue";
+import { ref, reactive, defineComponent } from "vue-demi";
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
 
 
 export default {
 export default {
   components: {
   components: {
-    AppLayout
+    AppLayout,
   },
   },
   computed: {
   computed: {
-    ...mapGetters([
-      'isInfoChangedSinceSave',
-    ]),
+    ...mapGetters(["isInfoChangedSinceSave"]),
   },
   },
   mounted() {
   mounted() {
-    document.title = this.$i18n.t('gather.editpage_name')
+    document.title = this.$i18n.t("gather.editpage_name");
 
 
-    window.addEventListener('beforeunload', (e) => {
-      if (this.isInfoChangedSinceSave) {
-        e.preventDefault()
-        e.returnValue = '您有未保存的修改,仍要离开?' // 如今的浏览器不会显示这条信息了。
+    window.addEventListener(
+      "beforeunload",
+      (e) => {
+        if (this.isInfoChangedSinceSave) {
+          e.preventDefault();
+          e.returnValue = "您有未保存的修改,仍要离开?"; // 如今的浏览器不会显示这条信息了。
+        }
+      },
+      {
+        capture: true,
       }
       }
-    }, {
-      capture: true,
-    })
+    );
   },
   },
 };
 };
-
 </script>
 </script>
 <style lang="less">
 <style lang="less">
 html,
 html,
@@ -48,7 +50,7 @@ body {
   color: #fff;
   color: #fff;
   font-size: 14px;
   font-size: 14px;
   line-height: normal;
   line-height: normal;
-  background-color: #1A1B1D;
+  background-color: #1a1b1d;
   user-select: none;
   user-select: none;
   font-family: OpenSans, sans-serif;
   font-family: OpenSans, sans-serif;
 }
 }
@@ -63,4 +65,4 @@ img {
 }
 }
 </style>
 </style>
 <style lang="less" src="@/assets/style/style.pc.editor.less"></style>
 <style lang="less" src="@/assets/style/style.pc.editor.less"></style>
-<!-- <style src="@/assets/fonts/iconfont.css"></style> -->
+<!-- <style src="@/assets/fonts/iconfont.css"></style> -->

+ 24 - 1
packages/qjkankan-editor/src/pages/edit.js

@@ -9,10 +9,31 @@ import '@/directives/vTitleInEditor.js'
 import '@/directives/vTooltipInEditor.js'
 import '@/directives/vTooltipInEditor.js'
 import { i18n } from "@/lang"
 import { i18n } from "@/lang"
 import { debuggerHelper } from '../mixins/debuggerHelper'
 import { debuggerHelper } from '../mixins/debuggerHelper'
+import Toast from "vue-toastification";
+import "vue-toastification/dist/index.css";
+
+const options = {
+  transition: 'Vue-Toastification__bounce',
+  maxToasts: 3,
+  newestOnTop: true,
+  position: 'top-right',
+  timeout: 2000,
+  closeOnClick: true,
+  pauseOnFocusLoss: true,
+  pauseOnHover: false,
+  draggable: true,
+  draggablePercent: 0.7,
+  showCloseButtonOnHover: false,
+  hideProgressBar: true,
+  closeButton: 'button',
+  icon: true,
+  rtl: false
+};
+
+Vue.use(Toast, options);
 debuggerHelper(true);
 debuggerHelper(true);
 
 
 // console.log(`version: ${process.env.VUE_APP_VERSION}`)
 // console.log(`version: ${process.env.VUE_APP_VERSION}`)
-
 // 热点图标默认大小
 // 热点图标默认大小
 window.g_hotspotCurrentScale = 1
 window.g_hotspotCurrentScale = 1
 
 
@@ -31,3 +52,5 @@ new Vue({
   i18n,
   i18n,
   render: h => h(App)
   render: h => h(App)
 }).$mount('#app')
 }).$mount('#app')
+
+

+ 25 - 3
packages/qjkankan-editor/src/pages/material.js

@@ -11,17 +11,39 @@ import '@/directives/vTitleInManageCenter.js'
 import '@/directives/vTooltipInManageCenter.js'
 import '@/directives/vTooltipInManageCenter.js'
 import { i18n } from "@/lang"
 import { i18n } from "@/lang"
 import { debuggerHelper } from '../mixins/debuggerHelper'
 import { debuggerHelper } from '../mixins/debuggerHelper'
+import Toast from "vue-toastification";
+import "vue-toastification/dist/index.css";
+
+const options = {
+  transition: 'Vue-Toastification__bounce',
+  maxToasts: 3,
+  newestOnTop: true,
+  position: 'top-right',
+  timeout: 2000,
+  closeOnClick: true,
+  pauseOnFocusLoss: true,
+  pauseOnHover: false,
+  draggable: true,
+  draggablePercent: 0.7,
+  showCloseButtonOnHover: false,
+  hideProgressBar: true,
+  closeButton: 'button',
+  icon: true,
+  rtl: false
+};
+
+Vue.use(Toast, options);
 debuggerHelper(true);
 debuggerHelper(true);
 
 
 Vue.component(Button.name, Button);
 Vue.component(Button.name, Button);
 
 
 window.tipInstance = null
 window.tipInstance = null
 
 
-Vue.use(Viewer,{
+Vue.use(Viewer, {
   defaultOptions: {
   defaultOptions: {
     toolbar: 0,
     toolbar: 0,
-    title:0,
-    navbar:false
+    title: 0,
+    navbar: false
   }
   }
 })
 })
 
 

+ 22 - 0
packages/qjkankan-editor/src/pages/show.js

@@ -6,6 +6,28 @@ import 'viewerjs/dist/viewer.css'
 import Viewer from 'v-viewer'
 import Viewer from 'v-viewer'
 import { i18n } from "@/lang"
 import { i18n } from "@/lang"
 import { debuggerHelper } from '../mixins/debuggerHelper'
 import { debuggerHelper } from '../mixins/debuggerHelper'
+import Toast from "vue-toastification";
+import "vue-toastification/dist/index.css";
+
+const options = {
+  transition: 'Vue-Toastification__bounce',
+  maxToasts: 3,
+  newestOnTop: true,
+  position: 'top-right',
+  timeout: 2000,
+  closeOnClick: true,
+  pauseOnFocusLoss: true,
+  pauseOnHover: false,
+  draggable: true,
+  draggablePercent: 0.7,
+  showCloseButtonOnHover: false,
+  hideProgressBar: true,
+  closeButton: 'button',
+  icon: true,
+  rtl: false
+};
+
+Vue.use(Toast, options);
 debuggerHelper(true);
 debuggerHelper(true);
 
 
 Vue.use(Viewer, {
 Vue.use(Viewer, {

+ 22 - 0
packages/qjkankan-editor/src/pages/showMobile.js

@@ -6,6 +6,28 @@ import preview from 'vue-photo-preview'
 import 'vue-photo-preview/dist/skin.css'
 import 'vue-photo-preview/dist/skin.css'
 import Videojs from 'video.js'
 import Videojs from 'video.js'
 import 'video.js/dist/video-js.css'
 import 'video.js/dist/video-js.css'
+import Toast from "vue-toastification";
+import "vue-toastification/dist/index.css";
+
+const options = {
+  transition: 'Vue-Toastification__bounce',
+  maxToasts: 3,
+  newestOnTop: true,
+  position: 'top-right',
+  timeout: 2000,
+  closeOnClick: true,
+  pauseOnFocusLoss: true,
+  pauseOnHover: false,
+  draggable: true,
+  draggablePercent: 0.7,
+  showCloseButtonOnHover: false,
+  hideProgressBar: true,
+  closeButton: 'button',
+  icon: true,
+  rtl: false
+};
+
+Vue.use(Toast, options);
 
 
 Vue.use(preview,{
 Vue.use(preview,{
   toolbar: 0,
   toolbar: 0,