Browse Source

修复单页背景问题

郑国榕 8 years ago
parent
commit
1d6baf2033
3 changed files with 59 additions and 3 deletions
  1. 56 0
      .gitignore
  2. 1 1
      webapp/src/components/EditPanel.vue
  3. 2 2
      webapp/src/views/spaeditor/index.vue

+ 56 - 0
.gitignore

@@ -0,0 +1,56 @@
+# Created by .ignore support plugin (hsz.mobi)
+### Example user template template
+### Example user template
+dist
+.vscode
+# IntelliJ project files
+.idea
+*.iml
+out
+gen### Node template
+# Logs
+logs
+*.log
+npm-debug.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules
+jspm_packages
+
+# Optional npm cache directory
+.npm
+
+# Optional REPL history
+.node_repl_history
+
+.idea/BMBLOG.iml
+.idea/misc.xml
+.idea/modules.xml
+.idea/workspace.xml
+node_modules/
+public/upload
+public/*
+.DS_Store

+ 1 - 1
webapp/src/components/EditPanel.vue

@@ -124,7 +124,7 @@
         </div>
       </div>
     </div>
-    <div v-show="panelTabState === 1">
+    <div v-if="panelTabState === 1">
       <div class="item">
         <label>动画库</label>
         <div class="content">

+ 2 - 2
webapp/src/views/spaeditor/index.vue

@@ -151,8 +151,8 @@
         this.element.type = 'pic'
       },
 
-      addBG (src) {
-        this.$store.dispatch('addBGElement', { type: 'bg', imgSrc: src })
+      addBG (file) {
+        this.$store.dispatch('addBGElement', { type: 'bg', imgSrc: file.filePath })
       },
       cleanBG () {
         this.$store.dispatch('cleanBG')