Browse Source

refactor(frontend): 增加预览组件参数命名的可读性

Myon 2 years ago
parent
commit
f40d2a6a3b

+ 4 - 4
frontend/src/pages/library/BtnDialogPreviewVideo.vue

@@ -54,7 +54,7 @@ const $q = useQuasar();
 const props = defineProps({
   path: String,
   onBtnClick: Function,
-  subList: {
+  subtitleUrlList: {
     type: Array,
     default: () => [],
   },
@@ -89,7 +89,7 @@ const showSelectSubtitleDialog = () => {
     options: {
       type: 'radio',
       model: selectedSub.value,
-      items: props.subList.map((e) => ({ label: e, value: e })),
+      items: props.subtitleUrlList.map((e) => ({ label: e, value: e })),
     },
     cancel: true,
     persistent: true,
@@ -126,7 +126,7 @@ const artOption = computed(() => {
       },
     },
     controls:
-      props.subList.length === 0
+      props.subtitleUrlList.length === 0
         ? []
         : [
             {
@@ -155,7 +155,7 @@ const artOption = computed(() => {
 });
 
 const handleBeforeShow = async () => {
-  selectedSub.value = props.subList?.[0];
+  selectedSub.value = props.subtitleUrlList?.[0];
   const [res, err] = await LibraryApi.getVideoM3u8(props.path);
   checkResult.value = res || err;
 };

+ 1 - 1
frontend/src/pages/library/SearchPanelCsfApi.vue

@@ -19,7 +19,7 @@
           <div class="row">
             <btn-dialog-preview-video
               :path="path"
-              :sub-list="[selectedSubUrl]"
+              :subtitle-url-list="[selectedSubUrl]"
               :on-btn-click="(callback) => handlePreviewClick(item, callback)"
               :subtitle-type="selectedItem?.ext.replace('.', '')"
             />

+ 1 - 1
frontend/src/pages/library/SearchPanelCsfApiTvPackage.vue

@@ -55,7 +55,7 @@
                   <btn-dialog-preview-video
                     :disable="!getVideoFilePathOfSubtitle(item)"
                     :path="getVideoFilePathOfSubtitle(item)"
-                    :sub-list="[selectedSubUrl]"
+                    :subtitle-url-list="[selectedSubUrl]"
                     :on-btn-click="(callback) => handlePreviewClick(item, callback)"
                     :subtitle-type="selectedItem?.ext.replace('.', '')"
                   />

+ 1 - 1
frontend/src/pages/library/movies/ListItemMovie.vue

@@ -16,7 +16,7 @@
       <btn-dialog-preview-video
         v-if="hasSubtitle"
         size="sm"
-        :sub-list="detialInfo?.sub_url_list"
+        :subtitle-url-list="detialInfo?.sub_url_list"
         :path="data.video_f_path"
       />
 

+ 1 - 1
frontend/src/pages/library/tvs/DialogTVDetail.vue

@@ -80,7 +80,7 @@
                 <q-item-section>第 {{ pandStart2(item.episode) }} 集</q-item-section>
 
                 <q-item-section v-if="item.sub_f_path_list.length" side>
-                  <btn-dialog-preview-video :sub-list="item.sub_url_list" :path="item.video_f_path" />
+                  <btn-dialog-preview-video :subtitle-url-list="item.sub_url_list" :path="item.video_f_path" />
                 </q-item-section>
 
                 <q-item-section side>