bill 8 kuukautta sitten
vanhempi
commit
0fe97fc2ae
2 muutettua tiedostoa jossa 7 lisäystä ja 4 poistoa
  1. 6 3
      src/views/tagging/edit.vue
  2. 1 1
      src/views/tagging/styles.vue

+ 6 - 3
src/views/tagging/edit.vue

@@ -73,7 +73,7 @@
           <template #preIcon><span>提取人:</span></template>
         </ui-input>
       </template>
-      <div class="input">
+      <div class="input" style="padding-top: 10px">
         <div class="mat-select">
           <span>音乐</span>
           <span class="select" @click="musicSelect">+从媒体库上传</span>
@@ -166,8 +166,6 @@ import {
 import { defStyleType, styleTypes } from "@/api";
 import { selectMaterials } from "@/components/materials/quisk";
 import { getFileName } from "@/utils";
-import { taggingsGroup } from "@/sdk";
-import { useViewStack } from "@/hook";
 
 export type EditProps = {
   data: Tagging;
@@ -223,6 +221,11 @@ const styles = computed(() => {
       : 0
   );
 });
+watchEffect(() => {
+  if (type.value && activeStyle.value?.typeId !== type.value && styles.value.length) {
+    tagging.value.styleId = styles.value[0].id;
+  }
+});
 
 const deleteStyle = (style: TaggingStyle) => {
   const index = taggingStyles.value.indexOf(style);

+ 1 - 1
src/views/tagging/styles.vue

@@ -127,7 +127,7 @@ const clickHandler = (hotStyle: TaggingStyle) => {
 .hot-styles {
   --size: 40px;
   --icon-size: calc(var(--size) * 0.85);
-  margin: 24px 0;
+  margin: 20px 0;
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(var(--size), 1fr));
   gap: calc(var(--size) / 4);