liyongli 2 năm trước cách đây
mục cha
commit
820095ca03
1 tập tin đã thay đổi với 64 bổ sung6 xóa
  1. 64 6
      src/view/allMedia/AIeditor/index.vue

+ 64 - 6
src/view/allMedia/AIeditor/index.vue

@@ -31,9 +31,23 @@
           />
           <Transition name="toolCol">
             <div class="tool" v-if="toolShow">
-              <el-icon color="#cacaca" :size="25">
-                <MoreFilled style="transform: rotate(90deg)" />
-              </el-icon>
+              <el-popover placement="left" :width="110" trigger="click">
+                <template #reference>
+                  <el-icon color="#cacaca" :size="25">
+                    <MoreFilled style="transform: rotate(90deg)" />
+                  </el-icon>
+                </template>
+                <div
+                  v-text="item.text"
+                  @click="selectETpye = i"
+                  v-for="(item, i) in types"
+                  :key="i"
+                  :class="{
+                    more_menu_items_div: true,
+                    more_menu_items_div_choose: selectETpye === i,
+                  }"
+                ></div>
+              </el-popover>
               <el-button
                 type="primary"
                 style="
@@ -247,6 +261,30 @@ const right_head = ref({});
 
 const titleh1 = ref('');
 
+const selectETpye = ref(0);
+const types = [
+  {
+    text: '通用',
+    type: '',
+  },
+  {
+    text: '论文',
+    type: 'paper',
+  },
+  {
+    text: '公文',
+    type: 'content',
+  },
+  {
+    text: '作文',
+    type: 'essay',
+  },
+  {
+    text: '小说',
+    type: 'novel',
+  },
+];
+
 const component_list = [pen_ink, review, image, dictionary, comment];
 // index对应ai里的功能
 const component_2_list = [
@@ -509,6 +547,7 @@ const saveDagang = generateType => {
       prev: text[0] || undefined, // 获取大纲内容
       next: text[1] || undefined,
     },
+    domain: types[selectETpye.value].type,
     generateType,
     length: btnType.value,
     noblock: true,
@@ -603,6 +642,25 @@ const get = (p, generateType) => {
   opacity: 0;
   transform: translateX(100%);
 }
+
+.more_menu_items_div {
+  height: 40px;
+  cursor: pointer;
+  width: 100%;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -ms-flex-align: center;
+  align-items: center;
+  -webkit-box-pack: center;
+  -ms-flex-pack: center;
+  justify-content: center;
+}
+.more_menu_items_div:hover,
+.more_menu_items_div_choose {
+  background: #e4f2ff;
+}
 </style>
 
 <style scoped>
@@ -624,14 +682,14 @@ const get = (p, generateType) => {
   width: 100%;
   max-width: 816px;
   box-shadow: 0 0 25px #eeeeee;
-  height: 100vh;
+  height: calc(100vh - 40px);
   margin: 1em auto;
 }
 
 .bgeditor {
   padding: 0 73px 0 73px;
   flex: 1;
-  height: 100vh;
+  height: calc(100vh - 40px);
   overflow: hidden;
 }
 
@@ -686,7 +744,7 @@ const get = (p, generateType) => {
   flex: 1;
   margin-top: 1em;
   margin-left: 15px;
-  height: 100vh;
+  height: calc(100vh - 40px);
   overflow-y: auto;
 }