Ver código fonte

增加标头组件

汪钰 3 anos atrás
pai
commit
ddefdc7d8b
4 arquivos alterados com 39 adições e 2 exclusões
  1. 1 0
      .gitignore
  2. 34 0
      src/components/header-title/index.vue
  3. 2 0
      src/main.js
  4. 2 2
      vue.config.js

+ 1 - 0
.gitignore

@@ -22,3 +22,4 @@ yarn-error.log*
 *.sln
 *.sw?
 vue.config.js
+vue.config.js

+ 34 - 0
src/components/header-title/index.vue

@@ -0,0 +1,34 @@
+<template>
+  <div class="divider">
+    <div class="title">
+      <div class="ele-bg-primary"></div>
+      <span>{{ title }}</span>
+    </div>
+    <div class="ele-bg-primary" style="width: 100%; height: 2px"></div>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: ['title']
+  };
+</script>
+<style lang="scss" scoped>
+  .divider {
+    margin-bottom: 20px;
+
+    .title {
+      display: flex;
+      align-items: center;
+      margin-bottom: 10px;
+      div {
+        width: 8px;
+        height: 20px;
+        margin-right: 10px;
+      }
+      span {
+        font-size: 20px;
+      }
+    }
+  }
+</style>

+ 2 - 0
src/main.js

@@ -13,6 +13,8 @@ import DictSelection from '@/components/Dict/DictSelection';
 // import tinymce from '@/components/FormGenerator/components/tinymce/index.js';
 import TinymceEditor from '@/components/TinymceEditor/index.vue';
 // import SvgIcon from '@/components/FormGenerator/components/SvgIcon'; // svg component
+import HeaderTitle from '@/components/header-title';
+Vue.component('HeaderTitle', HeaderTitle);
 
 // // register globally
 Vue.component('tinymce', TinymceEditor);

+ 2 - 2
vue.config.js

@@ -22,10 +22,10 @@ module.exports = {
       '/api': {
         // target: 'http://192.168.3.51:86', // 测试
 
-        target: 'http://192.168.3.35:8080', // kang杨威
+        // target: 'http://192.168.3.35:8080', // kang杨威
         // target: 'http://192.168.3.25:8080', // 黄峥嵘
         // target: 'http://192.168.3.41:8080', // 何江鹏
-        // target: 'http://192.168.3.33:8080', // 谢一平
+        target: 'http://192.168.3.33:8080', // 谢一平
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {