detail.js 479 B

12345678910111213141516171819
  1. import { ref } from "vue";
  2. import { defineStore } from "pinia";
  3. export const useDetailStore = defineStore("detail", () => {
  4. const searchVisible = ref(false);
  5. const searchKey = ref("");
  6. /**
  7. * 是否显示简介
  8. */
  9. const introductionVisible = ref(false);
  10. const openSearchDrawer = (key = "") => {
  11. searchKey.value = key;
  12. searchVisible.value = true;
  13. };
  14. return { searchVisible, searchKey, introductionVisible, openSearchDrawer };
  15. });