1.代码优化

sws 2024-09-02
v1.0.0
sws 2024-09-02 11:41:07 +08:00
parent 02c6745020
commit ead30f62a8
2 changed files with 0 additions and 25 deletions

View File

@ -11,6 +11,5 @@ export * from './modules/footer-nav-content';
export * from './modules/upload';
export * from './modules/shop';
export * from './modules/custom';
export * from './modules/article';
export * from './modules/common';
export { store };

View File

@ -1,24 +0,0 @@
import { ref, computed } from 'vue';
import { defineStore } from 'pinia';
export const articleStore = defineStore('article', () => {
// 文章是否需要调接口判断
const is_article_api = ref(false);
// 文章数据
const article = ref<select_1[]>([]);
// 存储文章数据
const set_article = (data: select_1[]) => {
article.value = data;
is_article_api.value = true;
};
// 如果为false 则转为true
const set_is_article_api = (bool: boolean) => {
is_article_api.value = bool;
};
return {
article,
is_article_api,
set_article,
set_is_article_api,
};
});