1 line
1.3 KiB
Plaintext
1 line
1.3 KiB
Plaintext
|
{"version":3,"file":"sys.js","sources":["../../../../../src/sheep/store/sys.js"],"sourcesContent":["import { defineStore } from 'pinia'\r\nimport app from './app'\r\n\r\nconst sys = defineStore({\r\n id: 'sys',\r\n state: () => ({\r\n theme: '', // 主题,\r\n mode: 'light', // 明亮模式、暗黑模式(暂未支持)\r\n modeAuto: false, // 跟随系统\r\n fontSize: 1, // 设置默认字号等级(0-4)\r\n }),\r\n getters: {},\r\n actions: {\r\n setTheme(theme = '') {\r\n if (theme === '') {\r\n this.theme = app().template?.basic.theme || 'orange'\r\n } else {\r\n this.theme = theme\r\n }\r\n },\r\n },\r\n persist: {\r\n enabled: true,\r\n strategies: [\r\n {\r\n key: 'sys-store',\r\n },\r\n ],\r\n },\r\n})\r\n\r\nexport default sys\r\n"],"names":["defineStore","app"],"mappings":";;;AAGK,MAAC,MAAMA,cAAAA,YAAY;AAAA,EACtB,IAAI;AAAA,EACJ,OAAO,OAAO;AAAA,IACZ,OAAO;AAAA;AAAA,IACP,MAAM;AAAA;AAAA,IACN,UAAU;AAAA;AAAA,IACV,UAAU;AAAA;AAAA,EACd;AAAA,EACE,SAAS,CAAE;AAAA,EACX,SAAS;AAAA,IACP,SAAS,QAAQ,IAAI;;AACnB,UAAI,UAAU,IAAI;AAChB,aAAK,UAAQC,qBAAG,IAAA,EAAG,aAANA,mBAAgB,MAAM,UAAS;AAAA,MACpD,OAAa;AACL,aAAK,QAAQ;AAAA,MACd;AAAA,IACF;AAAA,EACF;AAAA,EACD,SAAS;AAAA,IACP,SAAS;AAAA,IACT,YAAY;AAAA,MACV;AAAA,QACE,KAAK;AAAA,MACN;AAAA,IACF;AAAA,EACF;AACH,CAAC;;;;;;;"}
|