피니아가 있는 게터는 로드할 수 없습니다.
P粉092778585
P粉092778585 2024-01-28 22:10:22
0
1
382

VueJS의 pinia를 사용하면 스토어를 사용하여 라이센스를 저장하고 라이센스에는 프로젝트를 참조하는 번호가 있습니다. 정보가 포함된 품목 목록은 다른 상점에 있습니다. 그래서 프로젝트 정보(이름, 회사...)를 얻기 위해 라이센스 저장소에 getter를 만들었습니다.

그러나 페이지가 로드될 때 게터 값이 표시되지 않습니다. 내 상점을 보기 위해 Vuejs 웹 브라우저 확장 프로그램에 들어가면 값이 표시됩니다. 그리고 템플릿에서 getter를 사용하는 방법을 이해하지 못합니다... 시도했지만 결과가 없습니다...

제 문제를 설명하기 위해 동영상을 만들었습니다. https://www.youtube.com/watch?v=Er4xcQ-Mq2Y

도와주셔서 감사합니다!

내 검색 페이지:

으아악

src/stores의 라이선스 저장소:

<h1>Licences actives (de type "DEV")</h1>
  <table>
    <tr>
      <th>Numero/Clé</th>
      <th>Fin d'activation</th>
      <th>type</th>
      <th>Entreprise</th>
      <th>N° d'Affaire<br />(Projet)</th>
      <th>Projet</th>
      <th>Responsable</th>
      <th>Version</th>
      <th>Version Soft</th>
      <th>Durée restante <br />(jours)</th>
    </tr>

    <tr v-for="article in currentList" :key="article.numero">
      <td style="color: red">{{ article.numero }}</td>
      <td>{{ Date_formate(new Date(article.fin_activation)) }}</td>
      <td>{{ article.type }}</td>
      <td style="color: red">{{ article.entreprise }}</td>
      <td>{{ article.affaire }}</td>
      <td>{{ article.name }}</td>
      <td>{{ article.responsable }}</td>
      <td>{{ article.version }}</td>
      <td>{{ article.version_soft }}</td>
      <td>
        {{
          Math.round((new Date(article.fin_activation) - Date.now()) / 86400000)
        }}
      </td>
    </tr>
    <br />
  </table>
</template>

<script setup>
import { computed, onMounted, ref } from "@vue/runtime-core";
import { useListLicences } from "../stores/licence";
import { Date_formate } from "../plugin/functions";

const useListLicences2 = useListLicences();
const currentList = computed(() => {

  return useListLicences2.$state.list;

</script>

P粉092778585
P粉092778585

모든 응답(1)
P粉020085599

사용 방법:

으아악

$state 확장된 개체이므로 응답이 없습니다

최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!