Initial commit: One Pipe System
完整的管理系统,包含账户管理、卡片管理、套餐管理、财务管理等功能模块。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
40
src/store/modules/table.ts
Normal file
40
src/store/modules/table.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import { TableSizeEnum } from '@/enums/formEnum'
|
||||
|
||||
// 表格
|
||||
export const useTableStore = defineStore(
|
||||
'tableStore',
|
||||
() => {
|
||||
// 表格大小
|
||||
const tableSize = ref(TableSizeEnum.DEFAULT)
|
||||
// 斑马纹
|
||||
const isZebra = ref(false)
|
||||
// 边框
|
||||
const isBorder = ref(false)
|
||||
// 表头背景
|
||||
const isHeaderBackground = ref(false)
|
||||
|
||||
const setTableSize = (size: TableSizeEnum) => (tableSize.value = size)
|
||||
const setIsZebra = (value: boolean) => (isZebra.value = value)
|
||||
const setIsBorder = (value: boolean) => (isBorder.value = value)
|
||||
const setIsHeaderBackground = (value: boolean) => (isHeaderBackground.value = value)
|
||||
|
||||
return {
|
||||
tableSize,
|
||||
isZebra,
|
||||
isBorder,
|
||||
isHeaderBackground,
|
||||
setTableSize,
|
||||
setIsZebra,
|
||||
setIsBorder,
|
||||
setIsHeaderBackground
|
||||
}
|
||||
},
|
||||
{
|
||||
persist: {
|
||||
key: 'table',
|
||||
storage: localStorage
|
||||
}
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user