搜索结果列表页面开发
This commit is contained in:
24
src/stores/merge.ts
Normal file
24
src/stores/merge.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { ref, computed } from 'vue';
|
||||
import { getStore, setStore } from '@/utils/storage';
|
||||
import { defineStore } from 'pinia';
|
||||
import { localStorageKeys } from '@/constant/index';
|
||||
|
||||
// mr 详情页 文件变更
|
||||
export const useMrChangeStore = defineStore('merge-change-db', () => {
|
||||
// 记录正在添加 issue 的 diff 文件: `文件名-行号-左/右`
|
||||
const addingDiscussionsFile = ref('');
|
||||
// 记录 diff 文件是否折叠 issue
|
||||
const foldDiscussionsFile = ref({ curClickFile: '', record: {} });
|
||||
|
||||
// 显示设置
|
||||
const setting = getStore(localStorageKeys.merge_showformat_setting);
|
||||
const mergeDiffOutputFormat = ref(setting ? setting.mergeDiffOutputFormat : 'side-by-side');
|
||||
const ignore_whitespace_change = ref(setting ? setting.ignore_whitespace_change : false);
|
||||
|
||||
return {
|
||||
addingDiscussionsFile,
|
||||
foldDiscussionsFile,
|
||||
mergeDiffOutputFormat,
|
||||
ignore_whitespace_change
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user