skyline-vue-admin 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/components/avatar-input/index.cjs.map +1 -1
  2. package/dist/components/avatar-input/index.mjs.map +1 -1
  3. package/dist/components/create/index.cjs.map +1 -1
  4. package/dist/components/create/index.mjs.map +1 -1
  5. package/dist/components/edit-button/index.cjs.map +1 -1
  6. package/dist/components/edit-button/index.mjs.map +1 -1
  7. package/dist/components/file-multiple-input/index.cjs.map +1 -1
  8. package/dist/components/file-multiple-input/index.mjs.map +1 -1
  9. package/dist/components/image-field/index.cjs.map +1 -1
  10. package/dist/components/image-field/index.mjs.map +1 -1
  11. package/dist/components/link-field/index.cjs.map +1 -1
  12. package/dist/components/link-field/index.mjs.map +1 -1
  13. package/dist/components/radio-button-group-input/index.cjs.map +1 -1
  14. package/dist/components/radio-button-group-input/index.mjs.map +1 -1
  15. package/dist/components/reference-array-field/index.cjs.map +1 -1
  16. package/dist/components/reference-array-field/index.mjs.map +1 -1
  17. package/dist/components/reference-array-input/index.cjs.map +1 -1
  18. package/dist/components/reference-array-input/index.mjs.map +1 -1
  19. package/dist/components/reference-field/index.cjs.map +1 -1
  20. package/dist/components/reference-field/index.mjs.map +1 -1
  21. package/dist/components/reference-image-field/index.cjs.map +1 -1
  22. package/dist/components/reference-image-field/index.mjs.map +1 -1
  23. package/dist/components/show/index.cjs.map +1 -1
  24. package/dist/components/show/index.mjs.map +1 -1
  25. package/dist/components/show-button/index.cjs.map +1 -1
  26. package/dist/components/show-button/index.mjs.map +1 -1
  27. package/dist/components/show-simple-layout/index.cjs.map +1 -1
  28. package/dist/components/show-simple-layout/index.mjs.map +1 -1
  29. package/dist/components/simple-form/index.cjs.map +1 -1
  30. package/dist/components/simple-form/index.mjs.map +1 -1
  31. package/dist/components/single-field-list/index.cjs.map +1 -1
  32. package/dist/components/single-field-list/index.mjs.map +1 -1
  33. package/dist/components/text-input/index.cjs.map +1 -1
  34. package/dist/components/text-input/index.mjs.map +1 -1
  35. package/dist/components/tree-select-input/index.cjs +1 -1
  36. package/dist/components/tree-select-input/index.cjs.map +1 -1
  37. package/dist/components/tree-select-input/index.d.ts +0 -1
  38. package/dist/components/tree-select-input/index.mjs +29 -35
  39. package/dist/components/tree-select-input/index.mjs.map +1 -1
  40. package/dist/components/tree-with-details/index.cjs +1 -1
  41. package/dist/components/tree-with-details/index.cjs.map +1 -1
  42. package/dist/components/tree-with-details/index.d.ts +0 -1
  43. package/dist/components/tree-with-details/index.mjs +28 -31
  44. package/dist/components/tree-with-details/index.mjs.map +1 -1
  45. package/dist/hooks/useFormGrid.cjs.map +1 -1
  46. package/dist/hooks/useFormGrid.mjs.map +1 -1
  47. package/dist/hooks/useMenu.cjs.map +1 -1
  48. package/dist/hooks/useMenu.mjs.map +1 -1
  49. package/dist/hooks/usePermission.cjs.map +1 -1
  50. package/dist/hooks/usePermission.mjs.map +1 -1
  51. package/dist/hooks/useReferenceArrayField.cjs.map +1 -1
  52. package/dist/hooks/useReferenceArrayField.mjs.map +1 -1
  53. package/dist/hooks/useReferenceArrayInput.cjs.map +1 -1
  54. package/dist/hooks/useReferenceArrayInput.mjs.map +1 -1
  55. package/dist/hooks/useRouteKeepAlive.cjs.map +1 -1
  56. package/dist/hooks/useRouteKeepAlive.mjs.map +1 -1
  57. package/dist/hooks/useShow.cjs.map +1 -1
  58. package/dist/hooks/useShow.mjs.map +1 -1
  59. package/dist/hooks/useSize.cjs.map +1 -1
  60. package/dist/hooks/useSize.mjs.map +1 -1
  61. package/dist/hooks/useTab.cjs.map +1 -1
  62. package/dist/hooks/useTab.mjs.map +1 -1
  63. package/dist/hooks/useTreeWithDetails.cjs.map +1 -1
  64. package/dist/hooks/useTreeWithDetails.mjs.map +1 -1
  65. package/dist/hooks/useUser.cjs.map +1 -1
  66. package/dist/hooks/useUser.mjs.map +1 -1
  67. package/dist/i18n/locales/en.cjs.map +1 -1
  68. package/dist/i18n/locales/en.mjs.map +1 -1
  69. package/dist/i18n/locales/zh-cn.cjs.map +1 -1
  70. package/dist/i18n/locales/zh-cn.mjs.map +1 -1
  71. package/dist/icons/EpDelete.cjs.map +1 -1
  72. package/dist/icons/EpDelete.mjs.map +1 -1
  73. package/dist/icons/EpDocumentAdd.cjs.map +1 -1
  74. package/dist/icons/EpDocumentAdd.mjs.map +1 -1
  75. package/dist/icons/EpDownload.cjs.map +1 -1
  76. package/dist/icons/EpDownload.mjs.map +1 -1
  77. package/dist/icons/EpFullScreen.cjs.map +1 -1
  78. package/dist/icons/EpFullScreen.mjs.map +1 -1
  79. package/dist/icons/EpMoon.cjs.map +1 -1
  80. package/dist/icons/EpMoon.mjs.map +1 -1
  81. package/dist/icons/EpPlus.cjs.map +1 -1
  82. package/dist/icons/EpPlus.mjs.map +1 -1
  83. package/dist/icons/EpRefresh.cjs.map +1 -1
  84. package/dist/icons/EpRefresh.mjs.map +1 -1
  85. package/dist/icons/EpSunny.cjs.map +1 -1
  86. package/dist/icons/EpSunny.mjs.map +1 -1
  87. package/dist/icons/EpSwitchFilled.cjs.map +1 -1
  88. package/dist/icons/EpSwitchFilled.mjs.map +1 -1
  89. package/dist/icons/EpUploadFilled.cjs.map +1 -1
  90. package/dist/icons/EpUploadFilled.mjs.map +1 -1
  91. package/dist/icons/FluentFullScreenMinimize20Regular.cjs.map +1 -1
  92. package/dist/icons/FluentFullScreenMinimize20Regular.mjs.map +1 -1
  93. package/dist/icons/NimbusTextSize.cjs.map +1 -1
  94. package/dist/icons/NimbusTextSize.mjs.map +1 -1
  95. package/dist/icons/SkyMenuCollapse.cjs.map +1 -1
  96. package/dist/icons/SkyMenuCollapse.mjs.map +1 -1
  97. package/dist/icons/SlTrans.cjs.map +1 -1
  98. package/dist/icons/SlTrans.mjs.map +1 -1
  99. package/dist/layouts/default.cjs +1 -1
  100. package/dist/layouts/default.cjs.map +1 -1
  101. package/dist/layouts/default.mjs +19 -19
  102. package/dist/layouts/default.mjs.map +1 -1
  103. package/dist/pages/login.cjs.map +1 -1
  104. package/dist/pages/login.mjs.map +1 -1
  105. package/dist/pages/not-found.cjs.map +1 -1
  106. package/dist/pages/not-found.mjs.map +1 -1
  107. package/dist/pages/welcome.cjs.map +1 -1
  108. package/dist/pages/welcome.mjs.map +1 -1
  109. package/dist/router/index.cjs +1 -1
  110. package/dist/router/index.cjs.map +1 -1
  111. package/dist/router/index.mjs +31 -31
  112. package/dist/router/index.mjs.map +1 -1
  113. package/dist/setup/index.cjs.map +1 -1
  114. package/dist/setup/index.d.ts +1 -1
  115. package/dist/setup/index.mjs.map +1 -1
  116. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("element-plus/es/components/card/style/css");require("element-plus/es/components/col/style/css");require("element-plus/es/components/row/style/css");require("element-plus/es/components/skeleton/style/css");require("element-plus/es/components/tree/style/css");const e=require("vue");require("../../hooks/useUser.cjs");require("../../hooks/usePermission.cjs");require("../../hooks/useMenu.cjs");require("../../hooks/useTab.cjs");require("../../hooks/useRouteKeepAlive.cjs");require("../../hooks/useSize.cjs");require("../../hooks/useLang.cjs");require("../../hooks/useTheme.cjs");require("../../hooks/useList.cjs");require("../../hooks/useHiddenTitle.cjs");require("../../hooks/useForm.cjs");require("../../hooks/useShow.cjs");require("../../hooks/useReferenceArrayField.cjs");const y=require("../../hooks/useTreeWithDetails.cjs");require("../../hooks/useFormGrid.cjs");const q=require("../../hooks/useReferenceArrayInput.cjs"),g=require("../../setup/index.cjs"),v=require("@vueuse/core"),i=require("element-plus"),h=require("vue-router"),m=e.defineComponent({name:"SkyTreeWithDetails",inheritAttrs:!1,props:{create:Object,edit:Object,optionChildren:{type:String,default:"children"},optionName:{type:String,default:"name"},defaultExpandAll:{type:Boolean,default:!0},nodeKey:{type:String,default:"id"},size:{type:Number,default:30}},setup(t,{attrs:s}){const l=h.useRoute();let n;const{state:d,isLoading:o,execute:u}=v.useAsyncState(async a=>(n=new AbortController,g.skyConfig.dataProvider?.getList?.(l.meta.resource,{pagination:{page:1,perPage:t.size},filter:a,signal:n.signal})),void 0,{immediate:!0}),f=a=>{r.value===a[t.nodeKey]?r.value=void 0:r.value=a[t.nodeKey]},r=e.ref(),c=e.ref(0);return y.useProvideTreeWithDetails({createSuccess:async()=>{await u(),c.value++},editSuccess:async()=>{await u()},deleteSuccess:async()=>{await u(),r.value=void 0}}),q.useProvideReferenceArrayInput({reference:l.meta.resource,getList:a=>u(0,a),listData:d,listLoading:o}),()=>e.createVNode("div",{class:"sky-tree-with-details"},[e.createVNode(i.ElRow,null,{default:()=>[e.createVNode(i.ElCol,{span:8},{default:()=>[e.createVNode(i.ElCard,null,{default:()=>[e.createVNode(i.ElSkeleton,{loading:o.value,animated:!0},{default:()=>[e.createVNode(i.ElTree,e.mergeProps({data:d.value?.data,props:{children:t.optionChildren,label:t.optionName},defaultExpandAll:t.defaultExpandAll,expandOnClickNode:!1,nodeKey:t.nodeKey,"onNode-click":f,highlightCurrent:!0,currentNodeKey:r.value},s),null)]})]})]}),e.createVNode(i.ElCol,{offset:1,span:15},{default:()=>[r.value?t.edit?e.h(t.edit,{key:r.value,dataId:r.value}):null:t.create?e.h(t.create,{key:c.value}):null]})]})])}});exports.SkyTreeWithDetails=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("element-plus/es/components/card/style/css");require("element-plus/es/components/col/style/css");require("element-plus/es/components/row/style/css");require("element-plus/es/components/skeleton/style/css");require("element-plus/es/components/tree/style/css");const e=require("vue");require("../../hooks/useUser.cjs");require("../../hooks/usePermission.cjs");require("../../hooks/useMenu.cjs");require("../../hooks/useTab.cjs");require("../../hooks/useRouteKeepAlive.cjs");require("../../hooks/useSize.cjs");require("../../hooks/useLang.cjs");require("../../hooks/useTheme.cjs");require("../../hooks/useList.cjs");require("../../hooks/useHiddenTitle.cjs");require("../../hooks/useForm.cjs");require("../../hooks/useShow.cjs");require("../../hooks/useReferenceArrayField.cjs");const q=require("../../hooks/useTreeWithDetails.cjs");require("../../hooks/useFormGrid.cjs");const y=require("../../hooks/useReferenceArrayInput.cjs"),g=require("../../setup/index.cjs"),v=require("@vueuse/core"),a=require("element-plus"),h=require("vue-router"),m=e.defineComponent({name:"SkyTreeWithDetails",inheritAttrs:!1,props:{create:Object,edit:Object,optionChildren:{type:String,default:"children"},optionName:{type:String,default:"name"},nodeKey:{type:String,default:"id"},size:{type:Number,default:30}},setup(t,{attrs:s}){const n=h.useRoute();let l;const{state:d,isLoading:o,execute:u}=v.useAsyncState(async i=>(l=new AbortController,g.skyConfig.dataProvider?.getList?.(n.meta.resource,{pagination:{page:1,perPage:t.size},filter:i,signal:l.signal})),void 0,{immediate:!0}),f=i=>{r.value===i[t.nodeKey]?r.value=void 0:r.value=i[t.nodeKey]},r=e.ref(),c=e.ref(0);return q.useProvideTreeWithDetails({createSuccess:async()=>{await u(),c.value++},editSuccess:async()=>{await u()},deleteSuccess:async()=>{await u(),r.value=void 0}}),y.useProvideReferenceArrayInput({reference:n.meta.resource,getList:i=>u(0,i),listData:d,listLoading:o}),()=>e.createVNode("div",{class:"sky-tree-with-details"},[e.createVNode(a.ElRow,null,{default:()=>[e.createVNode(a.ElCol,{span:8},{default:()=>[e.createVNode(a.ElCard,null,{default:()=>[e.createVNode(a.ElSkeleton,{loading:o.value,animated:!0},{default:()=>[e.createVNode(a.ElTree,e.mergeProps({data:d.value?.data,props:{children:t.optionChildren,label:t.optionName},defaultExpandAll:!1,accordion:!0,expandOnClickNode:!1,nodeKey:t.nodeKey,"onNode-click":f,highlightCurrent:!0,currentNodeKey:r.value},s),null)]})]})]}),e.createVNode(a.ElCol,{offset:1,span:15},{default:()=>[r.value?t.edit?e.h(t.edit,{key:r.value,dataId:r.value}):null:t.create?e.h(t.create,{key:c.value}):null]})]})])}});exports.SkyTreeWithDetails=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/tree-with-details/index.tsx"],"sourcesContent":["import { useProvideReferenceArrayInput, useProvideTreeWithDetails } from '@/hooks'\nimport type { GetListResult, Identifier } from '@/provides'\nimport { skyConfig, type SkyComponent } from '@/setup'\nimport { useAsyncState } from '@vueuse/core'\nimport { ElCard, ElCol, ElRow, ElSkeleton, ElTree } from 'element-plus'\nimport { defineComponent, h, ref } from 'vue'\nimport { useRoute } from 'vue-router'\n\nexport interface SkyTreeWithDetailsProps {\n create?: SkyComponent\n edit?: SkyComponent\n optionChildren?: string\n optionName?: string\n defaultExpandAll?: boolean\n nodeKey?: string\n size?: number\n}\n\nexport const SkyTreeWithDetails = defineComponent<SkyTreeWithDetailsProps>({\n name: 'SkyTreeWithDetails',\n inheritAttrs: false,\n props: {\n create: Object,\n edit: Object,\n optionChildren: {\n type: String,\n default: 'children',\n },\n optionName: {\n type: String,\n default: 'name',\n },\n defaultExpandAll: {\n type: Boolean,\n default: true,\n },\n nodeKey: {\n type: String,\n default: 'id',\n },\n size: {\n type: Number,\n default: 30,\n },\n },\n setup(props, { attrs }) {\n const route = useRoute()\n\n let controller: AbortController | undefined\n const { state, isLoading, execute } = useAsyncState<\n GetListResult | undefined,\n [filter?: Record<string, unknown>]\n >(\n async (filter) => {\n controller = new AbortController()\n return skyConfig.dataProvider?.getList?.(route.meta.resource as string, {\n pagination: { page: 1, perPage: props.size! },\n filter,\n signal: controller.signal,\n })\n },\n undefined,\n {\n immediate: true,\n },\n )\n\n const onNodeClick = (node: Record<string, unknown>) => {\n if (editId.value === node[props.nodeKey!]) {\n // 再次点击选中的节点,退出编辑\n editId.value = undefined\n } else {\n editId.value = node[props.nodeKey!] as Identifier\n }\n }\n\n const editId = ref<Identifier>()\n const createNum = ref(0)\n\n useProvideTreeWithDetails({\n createSuccess: async () => {\n await execute()\n createNum.value++\n // if (result.data?.[props.nodeKey!]) {\n // editId.value = result.data[props.nodeKey!] as Identifier\n // }\n },\n editSuccess: async () => {\n await execute()\n },\n deleteSuccess: async () => {\n await execute()\n editId.value = undefined\n },\n })\n\n // 自动注入一次关联数据\n useProvideReferenceArrayInput({\n reference: route.meta.resource as string,\n getList: (filter?: Record<string, unknown>) => execute(0, filter),\n listData: state,\n listLoading: isLoading,\n })\n\n return () => (\n <div class=\"sky-tree-with-details\">\n <ElRow>\n <ElCol span={8}>\n <ElCard>\n <ElSkeleton loading={isLoading.value} animated>\n <ElTree\n data={state.value?.data}\n props={{ children: props.optionChildren, label: props.optionName }}\n defaultExpandAll={props.defaultExpandAll}\n expandOnClickNode={false}\n nodeKey={props.nodeKey}\n onNode-click={onNodeClick}\n highlightCurrent\n currentNodeKey={editId.value}\n {...attrs}\n ></ElTree>\n </ElSkeleton>\n </ElCard>\n </ElCol>\n <ElCol offset={1} span={15}>\n {editId.value\n ? props.edit\n ? h(props.edit, { key: editId.value, dataId: editId.value })\n : null\n : props.create\n ? h(props.create, { key: createNum.value })\n : null}\n </ElCol>\n </ElRow>\n </div>\n )\n },\n})\n"],"names":["SkyTreeWithDetails","defineComponent","name","inheritAttrs","props","create","edit","optionChildren","type","default","optionName","defaultExpandAll","nodeKey","size","attrs","route","useRoute","controller","execute","useAsyncState","filter","pagination","page","immediate","editId","ref","createNum","useProvideTreeWithDetails","useProvideReferenceArrayInput","reference","listData","listLoading","_createVNode","state","onNodeClick","h"],"mappings":"qmCAkBAA,EAAAC,EAAAA,gBAAA,CACEC,KAAAA,qBACAC,aAAAA,GACAC,MAAAA,CACEC,OAAAA,OACAC,KAAAA,OACAC,eAAAA,CACEC,KAAAA,OACAC,QAAAA,YAEFC,WAAAA,CACEF,KAAAA,OACAC,QAAAA,QAEFE,iBAAAA,CACEH,KAAAA,QACAC,QAAAA,IAEFG,QAAAA,CACEJ,KAAAA,OACAC,QAAAA,MAEFI,KAAAA,CACEL,KAAAA,OACAC,QAAAA,EACF,YAEaK,MAAAA,CAAM,EAAA,CACnB,MAAAC,EAAAC,EAAAA,SAAA,EAEA,IAAAC,4BAC0BC,QAAAA,CAAQ,EAAAC,EAAAA,cAAA,MAAAC,IAK9BH,EAAAA,IAAAA,qEAEEI,WAAAA,CAAcC,KAAAA,0CAGhB,CAAA,WAIAC,UAAAA,EACF,CAAA,oEAYFC,EAAAC,EAAAA,IAAA,EACAC,EAAAD,EAAAA,IAAA,CAAA,EAEAE,OAAAA,4BAAAA,+HAcE,CACF,CAAA,EAGAC,gCAAAA,CACEC,UAAAA,EAAAA,KAAAA,2BAEAC,SAAAA,EACAC,YAAAA,CACF,CAAA,EAEA,IAAAC,EAAAA,YAAA,MAAA,CAAO,MAAA,sDAAAvB,QAAAA,IAAAA,CAAAA,EAAAA,YAAAA,QAAAA,OAGa,EAAA,CAAAA,QAAAA,IAAAA,CAAAA,cAAAA,EAAAA,OAAAA,KAAAA,CAAAA,QAAAA,IAAAA,CAAAA,EAAAA,YAAAA,aAAAA,iBAE0B,SAAA,EAAA,EAAA,CAAAA,QAAAA,IAAAA,CAAAA,cAAAA,EAAAA,OAAAA,EAAAA,WAAAA,CAAA,KAAAwB,EAAA,OAAA,8FAIQ,kBAAA,qBAElB,eAAAC,EACG,iBAAA,GAAA,eAAAV,EAAA,KAEG,EAAAV,CAAA,EAAA,IAAA,CAAA,CACnB,CAAA,CAAA,CAAA,CAAA,CAAA,2BAAA,OAAA,SAKS,EAAA,CAAAL,QAAAA,IAAAA,CAAAA,EAAAA,MAAAA,EAAAA,KAAAA,EAAAA,EAAAA,EAAAA,KAAAA,2BAGsC,CAAA,EAAA,KAAAL,EAAA,OAAA+B,EAAAA,EAAA/B,EAAA,OAAA,oBAIpD,CAAA,CAAA,KAKpB,CACF,CAAA"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/tree-with-details/index.tsx"],"sourcesContent":["import { useProvideReferenceArrayInput, useProvideTreeWithDetails } from '@/hooks'\nimport type { GetListResult, Identifier } from '@/provides'\nimport { skyConfig, type SkyComponent } from '@/setup'\nimport { useAsyncState } from '@vueuse/core'\nimport { ElCard, ElCol, ElRow, ElSkeleton, ElTree } from 'element-plus'\nimport { defineComponent, h, ref } from 'vue'\nimport { useRoute } from 'vue-router'\n\nexport interface SkyTreeWithDetailsProps {\n create?: SkyComponent\n edit?: SkyComponent\n optionChildren?: string\n optionName?: string\n nodeKey?: string\n size?: number\n}\n\nexport const SkyTreeWithDetails = defineComponent<SkyTreeWithDetailsProps>({\n name: 'SkyTreeWithDetails',\n inheritAttrs: false,\n props: {\n create: Object,\n edit: Object,\n optionChildren: {\n type: String,\n default: 'children',\n },\n optionName: {\n type: String,\n default: 'name',\n },\n nodeKey: {\n type: String,\n default: 'id',\n },\n size: {\n type: Number,\n default: 30,\n },\n },\n setup(props, { attrs }) {\n const route = useRoute()\n\n let controller: AbortController | undefined\n const { state, isLoading, execute } = useAsyncState<\n GetListResult | undefined,\n [filter?: Record<string, unknown>]\n >(\n async (filter) => {\n controller = new AbortController()\n return skyConfig.dataProvider?.getList?.(route.meta.resource as string, {\n pagination: { page: 1, perPage: props.size! },\n filter,\n signal: controller.signal,\n })\n },\n undefined,\n {\n immediate: true,\n },\n )\n\n const onNodeClick = (node: Record<string, unknown>) => {\n if (editId.value === node[props.nodeKey!]) {\n // 再次点击选中的节点,退出编辑\n editId.value = undefined\n } else {\n editId.value = node[props.nodeKey!] as Identifier\n }\n }\n\n const editId = ref<Identifier>()\n const createNum = ref(0)\n\n useProvideTreeWithDetails({\n createSuccess: async () => {\n await execute()\n createNum.value++\n // if (result.data?.[props.nodeKey!]) {\n // editId.value = result.data[props.nodeKey!] as Identifier\n // }\n },\n editSuccess: async () => {\n await execute()\n },\n deleteSuccess: async () => {\n await execute()\n editId.value = undefined\n },\n })\n\n // 自动注入一次关联数据\n useProvideReferenceArrayInput({\n reference: route.meta.resource as string,\n getList: (filter?: Record<string, unknown>) => execute(0, filter),\n listData: state,\n listLoading: isLoading,\n })\n\n return () => (\n <div class=\"sky-tree-with-details\">\n <ElRow>\n <ElCol span={8}>\n <ElCard>\n <ElSkeleton loading={isLoading.value} animated>\n <ElTree\n data={state.value?.data}\n props={{ children: props.optionChildren, label: props.optionName }}\n defaultExpandAll={false}\n accordion={true}\n expandOnClickNode={false}\n nodeKey={props.nodeKey}\n onNode-click={onNodeClick}\n highlightCurrent\n currentNodeKey={editId.value}\n {...attrs}\n ></ElTree>\n </ElSkeleton>\n </ElCard>\n </ElCol>\n <ElCol offset={1} span={15}>\n {editId.value\n ? props.edit\n ? h(props.edit, { key: editId.value, dataId: editId.value })\n : null\n : props.create\n ? h(props.create, { key: createNum.value })\n : null}\n </ElCol>\n </ElRow>\n </div>\n )\n },\n})\n"],"names":["SkyTreeWithDetails","defineComponent","name","inheritAttrs","props","create","edit","optionChildren","type","default","optionName","nodeKey","size","attrs","route","useRoute","controller","execute","useAsyncState","filter","pagination","page","immediate","editId","ref","createNum","useProvideTreeWithDetails","useProvideReferenceArrayInput","reference","listData","listLoading","_createVNode","state","onNodeClick","h"],"mappings":"qmCAiBAA,EAAAC,EAAAA,gBAAA,CACEC,KAAAA,qBACAC,aAAAA,GACAC,MAAAA,CACEC,OAAAA,OACAC,KAAAA,OACAC,eAAAA,CACEC,KAAAA,OACAC,QAAAA,YAEFC,WAAAA,CACEF,KAAAA,OACAC,QAAAA,QAEFE,QAAAA,CACEH,KAAAA,OACAC,QAAAA,MAEFG,KAAAA,CACEJ,KAAAA,OACAC,QAAAA,EACF,YAEaI,MAAAA,CAAM,EAAA,CACnB,MAAAC,EAAAC,EAAAA,SAAA,EAEA,IAAAC,4BAC0BC,QAAAA,CAAQ,EAAAC,EAAAA,cAAA,MAAAC,IAK9BH,EAAAA,IAAAA,qEAEEI,WAAAA,CAAcC,KAAAA,0CAGhB,CAAA,WAIAC,UAAAA,EACF,CAAA,oEAYFC,EAAAC,EAAAA,IAAA,EACAC,EAAAD,EAAAA,IAAA,CAAA,EAEAE,OAAAA,4BAAAA,+HAcE,CACF,CAAA,EAGAC,gCAAAA,CACEC,UAAAA,EAAAA,KAAAA,2BAEAC,SAAAA,EACAC,YAAAA,CACF,CAAA,EAEA,IAAAC,EAAAA,YAAA,MAAA,CAAO,MAAA,sDAAAtB,QAAAA,IAAAA,CAAAA,EAAAA,YAAAA,QAAAA,OAGa,EAAA,CAAAA,QAAAA,IAAAA,CAAAA,cAAAA,EAAAA,OAAAA,KAAAA,CAAAA,QAAAA,IAAAA,CAAAA,EAAAA,YAAAA,aAAAA,iBAE0B,SAAA,EAAA,EAAA,CAAAA,QAAAA,IAAAA,CAAAA,cAAAA,EAAAA,OAAAA,EAAAA,WAAAA,CAAA,KAAAuB,EAAA,OAAA,0DAGkC,iBAAA,GAC3C,UAAA,GACR,kBAAA,qBAEO,eAAAC,EACG,iBAAA,GAAA,eAAAV,EAAA,KAEG,EAAAV,CAAA,EAAA,IAAA,CAAA,CACnB,CAAA,CAAA,CAAA,CAAA,CAAA,2BAAA,OAAA,SAKS,EAAA,CAAAJ,QAAAA,IAAAA,CAAAA,EAAAA,MAAAA,EAAAA,KAAAA,EAAAA,EAAAA,EAAAA,KAAAA,2BAGsC,CAAA,EAAA,KAAAL,EAAA,OAAA8B,EAAAA,EAAA9B,EAAA,OAAA,oBAIpD,CAAA,CAAA,KAKpB,CACF,CAAA"}
@@ -4,7 +4,6 @@ export interface SkyTreeWithDetailsProps {
4
4
  edit?: SkyComponent;
5
5
  optionChildren?: string;
6
6
  optionName?: string;
7
- defaultExpandAll?: boolean;
8
7
  nodeKey?: string;
9
8
  size?: number;
10
9
  }
@@ -3,7 +3,7 @@ import "element-plus/es/components/col/style/css";
3
3
  import "element-plus/es/components/row/style/css";
4
4
  import "element-plus/es/components/skeleton/style/css";
5
5
  import "element-plus/es/components/tree/style/css";
6
- import { defineComponent as y, ref as m, createVNode as a, mergeProps as g, h as s } from "vue";
6
+ import { defineComponent as y, ref as m, createVNode as i, mergeProps as g, h as s } from "vue";
7
7
  import "../../hooks/useUser.mjs";
8
8
  import "../../hooks/usePermission.mjs";
9
9
  import "../../hooks/useMenu.mjs";
@@ -22,8 +22,8 @@ import "../../hooks/useFormGrid.mjs";
22
22
  import { useProvideReferenceArrayInput as h } from "../../hooks/useReferenceArrayInput.mjs";
23
23
  import { skyConfig as k } from "../../setup/index.mjs";
24
24
  import { useAsyncState as C } from "@vueuse/core";
25
- import { ElRow as S, ElCol as c, ElCard as N, ElSkeleton as E, ElTree as A } from "element-plus";
26
- import { useRoute as w } from "vue-router";
25
+ import { ElRow as S, ElCol as c, ElCard as N, ElSkeleton as w, ElTree as E } from "element-plus";
26
+ import { useRoute as K } from "vue-router";
27
27
  const _ = /* @__PURE__ */ y({
28
28
  name: "SkyTreeWithDetails",
29
29
  inheritAttrs: !1,
@@ -38,10 +38,6 @@ const _ = /* @__PURE__ */ y({
38
38
  type: String,
39
39
  default: "name"
40
40
  },
41
- defaultExpandAll: {
42
- type: Boolean,
43
- default: !0
44
- },
45
41
  nodeKey: {
46
42
  type: String,
47
43
  default: "id"
@@ -52,68 +48,69 @@ const _ = /* @__PURE__ */ y({
52
48
  }
53
49
  },
54
50
  setup(e, {
55
- attrs: f
51
+ attrs: p
56
52
  }) {
57
- const l = w();
58
- let o;
53
+ const o = K();
54
+ let l;
59
55
  const {
60
56
  state: n,
61
57
  isLoading: d,
62
- execute: r
63
- } = C(async (i) => (o = new AbortController(), k.dataProvider?.getList?.(l.meta.resource, {
58
+ execute: a
59
+ } = C(async (r) => (l = new AbortController(), k.dataProvider?.getList?.(o.meta.resource, {
64
60
  pagination: {
65
61
  page: 1,
66
62
  perPage: e.size
67
63
  },
68
- filter: i,
69
- signal: o.signal
64
+ filter: r,
65
+ signal: l.signal
70
66
  })), void 0, {
71
67
  immediate: !0
72
- }), p = (i) => {
73
- t.value === i[e.nodeKey] ? t.value = void 0 : t.value = i[e.nodeKey];
68
+ }), f = (r) => {
69
+ t.value === r[e.nodeKey] ? t.value = void 0 : t.value = r[e.nodeKey];
74
70
  }, t = m(), u = m(0);
75
71
  return v({
76
72
  createSuccess: async () => {
77
- await r(), u.value++;
73
+ await a(), u.value++;
78
74
  },
79
75
  editSuccess: async () => {
80
- await r();
76
+ await a();
81
77
  },
82
78
  deleteSuccess: async () => {
83
- await r(), t.value = void 0;
79
+ await a(), t.value = void 0;
84
80
  }
85
81
  }), h({
86
- reference: l.meta.resource,
87
- getList: (i) => r(0, i),
82
+ reference: o.meta.resource,
83
+ getList: (r) => a(0, r),
88
84
  listData: n,
89
85
  listLoading: d
90
- }), () => a("div", {
86
+ }), () => i("div", {
91
87
  class: "sky-tree-with-details"
92
- }, [a(S, null, {
93
- default: () => [a(c, {
88
+ }, [i(S, null, {
89
+ default: () => [i(c, {
94
90
  span: 8
95
91
  }, {
96
- default: () => [a(N, null, {
97
- default: () => [a(E, {
92
+ default: () => [i(N, null, {
93
+ default: () => [i(w, {
98
94
  loading: d.value,
99
95
  animated: !0
100
96
  }, {
101
- default: () => [a(A, g({
97
+ default: () => [i(E, g({
102
98
  data: n.value?.data,
103
99
  props: {
104
100
  children: e.optionChildren,
105
101
  label: e.optionName
106
102
  },
107
- defaultExpandAll: e.defaultExpandAll,
103
+ defaultExpandAll: !1,
104
+ accordion: !0,
108
105
  expandOnClickNode: !1,
109
106
  nodeKey: e.nodeKey,
110
- "onNode-click": p,
107
+ "onNode-click": f,
111
108
  highlightCurrent: !0,
112
109
  currentNodeKey: t.value
113
- }, f), null)]
110
+ }, p), null)]
114
111
  })]
115
112
  })]
116
- }), a(c, {
113
+ }), i(c, {
117
114
  offset: 1,
118
115
  span: 15
119
116
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/tree-with-details/index.tsx"],"sourcesContent":["import { useProvideReferenceArrayInput, useProvideTreeWithDetails } from '@/hooks'\nimport type { GetListResult, Identifier } from '@/provides'\nimport { skyConfig, type SkyComponent } from '@/setup'\nimport { useAsyncState } from '@vueuse/core'\nimport { ElCard, ElCol, ElRow, ElSkeleton, ElTree } from 'element-plus'\nimport { defineComponent, h, ref } from 'vue'\nimport { useRoute } from 'vue-router'\n\nexport interface SkyTreeWithDetailsProps {\n create?: SkyComponent\n edit?: SkyComponent\n optionChildren?: string\n optionName?: string\n defaultExpandAll?: boolean\n nodeKey?: string\n size?: number\n}\n\nexport const SkyTreeWithDetails = defineComponent<SkyTreeWithDetailsProps>({\n name: 'SkyTreeWithDetails',\n inheritAttrs: false,\n props: {\n create: Object,\n edit: Object,\n optionChildren: {\n type: String,\n default: 'children',\n },\n optionName: {\n type: String,\n default: 'name',\n },\n defaultExpandAll: {\n type: Boolean,\n default: true,\n },\n nodeKey: {\n type: String,\n default: 'id',\n },\n size: {\n type: Number,\n default: 30,\n },\n },\n setup(props, { attrs }) {\n const route = useRoute()\n\n let controller: AbortController | undefined\n const { state, isLoading, execute } = useAsyncState<\n GetListResult | undefined,\n [filter?: Record<string, unknown>]\n >(\n async (filter) => {\n controller = new AbortController()\n return skyConfig.dataProvider?.getList?.(route.meta.resource as string, {\n pagination: { page: 1, perPage: props.size! },\n filter,\n signal: controller.signal,\n })\n },\n undefined,\n {\n immediate: true,\n },\n )\n\n const onNodeClick = (node: Record<string, unknown>) => {\n if (editId.value === node[props.nodeKey!]) {\n // 再次点击选中的节点,退出编辑\n editId.value = undefined\n } else {\n editId.value = node[props.nodeKey!] as Identifier\n }\n }\n\n const editId = ref<Identifier>()\n const createNum = ref(0)\n\n useProvideTreeWithDetails({\n createSuccess: async () => {\n await execute()\n createNum.value++\n // if (result.data?.[props.nodeKey!]) {\n // editId.value = result.data[props.nodeKey!] as Identifier\n // }\n },\n editSuccess: async () => {\n await execute()\n },\n deleteSuccess: async () => {\n await execute()\n editId.value = undefined\n },\n })\n\n // 自动注入一次关联数据\n useProvideReferenceArrayInput({\n reference: route.meta.resource as string,\n getList: (filter?: Record<string, unknown>) => execute(0, filter),\n listData: state,\n listLoading: isLoading,\n })\n\n return () => (\n <div class=\"sky-tree-with-details\">\n <ElRow>\n <ElCol span={8}>\n <ElCard>\n <ElSkeleton loading={isLoading.value} animated>\n <ElTree\n data={state.value?.data}\n props={{ children: props.optionChildren, label: props.optionName }}\n defaultExpandAll={props.defaultExpandAll}\n expandOnClickNode={false}\n nodeKey={props.nodeKey}\n onNode-click={onNodeClick}\n highlightCurrent\n currentNodeKey={editId.value}\n {...attrs}\n ></ElTree>\n </ElSkeleton>\n </ElCard>\n </ElCol>\n <ElCol offset={1} span={15}>\n {editId.value\n ? props.edit\n ? h(props.edit, { key: editId.value, dataId: editId.value })\n : null\n : props.create\n ? h(props.create, { key: createNum.value })\n : null}\n </ElCol>\n </ElRow>\n </div>\n )\n },\n})\n"],"names":["SkyTreeWithDetails","defineComponent","name","inheritAttrs","props","create","edit","optionChildren","type","default","optionName","defaultExpandAll","nodeKey","size","attrs","route","useRoute","controller","execute","useAsyncState","filter","pagination","page","immediate","editId","ref","createNum","useProvideTreeWithDetails","useProvideReferenceArrayInput","reference","listData","listLoading","_createVNode","state","onNodeClick","h"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAAA,IAAA,gBAAAC,EAAA;AAAA,EACEC,MAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,OAAAA;AAAAA,IACEC,QAAAA;AAAAA,IACAC,MAAAA;AAAAA,IACAC,gBAAAA;AAAAA,MACEC,MAAAA;AAAAA,MACAC,SAAAA;AAAAA;IAEFC,YAAAA;AAAAA,MACEF,MAAAA;AAAAA,MACAC,SAAAA;AAAAA;IAEFE,kBAAAA;AAAAA,MACEH,MAAAA;AAAAA,MACAC,SAAAA;AAAAA;IAEFG,SAAAA;AAAAA,MACEJ,MAAAA;AAAAA,MACAC,SAAAA;AAAAA;IAEFI,MAAAA;AAAAA,MACEL,MAAAA;AAAAA,MACAC,SAAAA;AAAAA,IACF;AAAA;;IAEaK,OAAAA;AAAAA,EAAM,GAAA;AACnB,UAAAC,IAAAC,EAAA;AAEA,QAAAC;;;;MAC0BC,SAAAA;AAAAA,IAAQ,IAAAC,EAAA,OAAAC,OAK9BH,IAAAA,IAAAA,gBAAAA;MAEEI,YAAAA;AAAAA,QAAcC,MAAAA;AAAAA;;;;IAGhB,CAAA;MAIAC,WAAAA;AAAAA,IACF,CAAA;;OAYFC,IAAAC,EAAA,GACAC,IAAAD,EAAA,CAAA;AAEAE,WAAAA,EAAAA;AAAAA;;;;;;;;MAcE;AAAA,IACF,CAAA,GAGAC,EAAAA;AAAAA,MACEC,WAAAA,EAAAA,KAAAA;AAAAA;MAEAC,UAAAA;AAAAA,MACAC,aAAAA;AAAAA,IACF,CAAA,GAEA,MAAAC,EAAA,OAAA;AAAA,MAAO,OAAA;AAAA;MAAAvB,SAAAA,MAAAA,CAAAA,EAAAA,GAAAA;AAAAA;MAGa,GAAA;AAAA,QAAAA,SAAAA,MAAAA,CAAAA,EAAAA,GAAAA,MAAAA;AAAAA,UAAAA,SAAAA,MAAAA,CAAAA,EAAAA,GAAAA;AAAAA;YAE0B,UAAA;AAAA,UAAA,GAAA;AAAA,YAAAA,SAAAA,MAAAA,CAAAA,EAAAA,GAAAA,EAAAA;AAAAA,cAAA,MAAAwB,EAAA,OAAA;AAAA;;;;;cAIQ,mBAAA;AAAA;cAElB,gBAAAC;AAAA,cACG,kBAAA;AAAA,cAAA,gBAAAV,EAAA;AAAA,YAEG,GAAAV,CAAA,GAAA,IAAA,CAAA;AAAA,UACnB,CAAA,CAAA;AAAA,QAAA,CAAA,CAAA;AAAA;QAAA,QAAA;AAAA;MAKS,GAAA;AAAA,QAAAL,SAAAA,MAAAA,CAAAA,EAAAA,QAAAA,EAAAA,OAAAA,EAAAA,EAAAA,MAAAA;AAAAA;;QAGsC,CAAA,IAAA,OAAAL,EAAA,SAAA+B,EAAA/B,EAAA,QAAA;AAAA;;MAIpD,CAAA,CAAA;AAAA;EAKpB;AACF,CAAA;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/tree-with-details/index.tsx"],"sourcesContent":["import { useProvideReferenceArrayInput, useProvideTreeWithDetails } from '@/hooks'\nimport type { GetListResult, Identifier } from '@/provides'\nimport { skyConfig, type SkyComponent } from '@/setup'\nimport { useAsyncState } from '@vueuse/core'\nimport { ElCard, ElCol, ElRow, ElSkeleton, ElTree } from 'element-plus'\nimport { defineComponent, h, ref } from 'vue'\nimport { useRoute } from 'vue-router'\n\nexport interface SkyTreeWithDetailsProps {\n create?: SkyComponent\n edit?: SkyComponent\n optionChildren?: string\n optionName?: string\n nodeKey?: string\n size?: number\n}\n\nexport const SkyTreeWithDetails = defineComponent<SkyTreeWithDetailsProps>({\n name: 'SkyTreeWithDetails',\n inheritAttrs: false,\n props: {\n create: Object,\n edit: Object,\n optionChildren: {\n type: String,\n default: 'children',\n },\n optionName: {\n type: String,\n default: 'name',\n },\n nodeKey: {\n type: String,\n default: 'id',\n },\n size: {\n type: Number,\n default: 30,\n },\n },\n setup(props, { attrs }) {\n const route = useRoute()\n\n let controller: AbortController | undefined\n const { state, isLoading, execute } = useAsyncState<\n GetListResult | undefined,\n [filter?: Record<string, unknown>]\n >(\n async (filter) => {\n controller = new AbortController()\n return skyConfig.dataProvider?.getList?.(route.meta.resource as string, {\n pagination: { page: 1, perPage: props.size! },\n filter,\n signal: controller.signal,\n })\n },\n undefined,\n {\n immediate: true,\n },\n )\n\n const onNodeClick = (node: Record<string, unknown>) => {\n if (editId.value === node[props.nodeKey!]) {\n // 再次点击选中的节点,退出编辑\n editId.value = undefined\n } else {\n editId.value = node[props.nodeKey!] as Identifier\n }\n }\n\n const editId = ref<Identifier>()\n const createNum = ref(0)\n\n useProvideTreeWithDetails({\n createSuccess: async () => {\n await execute()\n createNum.value++\n // if (result.data?.[props.nodeKey!]) {\n // editId.value = result.data[props.nodeKey!] as Identifier\n // }\n },\n editSuccess: async () => {\n await execute()\n },\n deleteSuccess: async () => {\n await execute()\n editId.value = undefined\n },\n })\n\n // 自动注入一次关联数据\n useProvideReferenceArrayInput({\n reference: route.meta.resource as string,\n getList: (filter?: Record<string, unknown>) => execute(0, filter),\n listData: state,\n listLoading: isLoading,\n })\n\n return () => (\n <div class=\"sky-tree-with-details\">\n <ElRow>\n <ElCol span={8}>\n <ElCard>\n <ElSkeleton loading={isLoading.value} animated>\n <ElTree\n data={state.value?.data}\n props={{ children: props.optionChildren, label: props.optionName }}\n defaultExpandAll={false}\n accordion={true}\n expandOnClickNode={false}\n nodeKey={props.nodeKey}\n onNode-click={onNodeClick}\n highlightCurrent\n currentNodeKey={editId.value}\n {...attrs}\n ></ElTree>\n </ElSkeleton>\n </ElCard>\n </ElCol>\n <ElCol offset={1} span={15}>\n {editId.value\n ? props.edit\n ? h(props.edit, { key: editId.value, dataId: editId.value })\n : null\n : props.create\n ? h(props.create, { key: createNum.value })\n : null}\n </ElCol>\n </ElRow>\n </div>\n )\n },\n})\n"],"names":["SkyTreeWithDetails","defineComponent","name","inheritAttrs","props","create","edit","optionChildren","type","default","optionName","nodeKey","size","attrs","route","useRoute","controller","execute","useAsyncState","filter","pagination","page","immediate","editId","ref","createNum","useProvideTreeWithDetails","useProvideReferenceArrayInput","reference","listData","listLoading","_createVNode","state","onNodeClick","h"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAAA,IAAA,gBAAAC,EAAA;AAAA,EACEC,MAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,OAAAA;AAAAA,IACEC,QAAAA;AAAAA,IACAC,MAAAA;AAAAA,IACAC,gBAAAA;AAAAA,MACEC,MAAAA;AAAAA,MACAC,SAAAA;AAAAA;IAEFC,YAAAA;AAAAA,MACEF,MAAAA;AAAAA,MACAC,SAAAA;AAAAA;IAEFE,SAAAA;AAAAA,MACEH,MAAAA;AAAAA,MACAC,SAAAA;AAAAA;IAEFG,MAAAA;AAAAA,MACEJ,MAAAA;AAAAA,MACAC,SAAAA;AAAAA,IACF;AAAA;;IAEaI,OAAAA;AAAAA,EAAM,GAAA;AACnB,UAAAC,IAAAC,EAAA;AAEA,QAAAC;;;;MAC0BC,SAAAA;AAAAA,IAAQ,IAAAC,EAAA,OAAAC,OAK9BH,IAAAA,IAAAA,gBAAAA;MAEEI,YAAAA;AAAAA,QAAcC,MAAAA;AAAAA;;;;IAGhB,CAAA;MAIAC,WAAAA;AAAAA,IACF,CAAA;;OAYFC,IAAAC,EAAA,GACAC,IAAAD,EAAA,CAAA;AAEAE,WAAAA,EAAAA;AAAAA;;;;;;;;MAcE;AAAA,IACF,CAAA,GAGAC,EAAAA;AAAAA,MACEC,WAAAA,EAAAA,KAAAA;AAAAA;MAEAC,UAAAA;AAAAA,MACAC,aAAAA;AAAAA,IACF,CAAA,GAEA,MAAAC,EAAA,OAAA;AAAA,MAAO,OAAA;AAAA;MAAAtB,SAAAA,MAAAA,CAAAA,EAAAA,GAAAA;AAAAA;MAGa,GAAA;AAAA,QAAAA,SAAAA,MAAAA,CAAAA,EAAAA,GAAAA,MAAAA;AAAAA,UAAAA,SAAAA,MAAAA,CAAAA,EAAAA,GAAAA;AAAAA;YAE0B,UAAA;AAAA,UAAA,GAAA;AAAA,YAAAA,SAAAA,MAAAA,CAAAA,EAAAA,GAAAA,EAAAA;AAAAA,cAAA,MAAAuB,EAAA,OAAA;AAAA;;;;cAGkC,kBAAA;AAAA,cAC3C,WAAA;AAAA,cACR,mBAAA;AAAA;cAEO,gBAAAC;AAAA,cACG,kBAAA;AAAA,cAAA,gBAAAV,EAAA;AAAA,YAEG,GAAAV,CAAA,GAAA,IAAA,CAAA;AAAA,UACnB,CAAA,CAAA;AAAA,QAAA,CAAA,CAAA;AAAA;QAAA,QAAA;AAAA;MAKS,GAAA;AAAA,QAAAJ,SAAAA,MAAAA,CAAAA,EAAAA,QAAAA,EAAAA,OAAAA,EAAAA,EAAAA,MAAAA;AAAAA;;QAGsC,CAAA,IAAA,OAAAL,EAAA,SAAA8B,EAAA9B,EAAA,QAAA;AAAA;;MAIpD,CAAA,CAAA;AAAA;EAKpB;AACF,CAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFormGrid.cjs","sources":["../../src/hooks/useFormGrid.ts"],"sourcesContent":["import { createInjectionState } from '@vueuse/core'\n\nexport const [useProvideFormGrid, useFormGrid] = createInjectionState((grid: boolean) => grid)\n"],"names":["useProvideFormGrid","useFormGrid","createInjectionState","grid"],"mappings":"gHAEa,CAACA,EAAoBC,CAAW,EAAIC,EAAAA,qBAAsBC,GAAkBA,CAAI"}
1
+ {"version":3,"file":"useFormGrid.cjs","sources":["../../src/hooks/useFormGrid.ts"],"sourcesContent":["import { createInjectionState } from '@vueuse/core'\r\n\r\nexport const [useProvideFormGrid, useFormGrid] = createInjectionState((grid: boolean) => grid)\r\n"],"names":["useProvideFormGrid","useFormGrid","createInjectionState","grid"],"mappings":"gHAEa,CAACA,EAAoBC,CAAW,EAAIC,EAAAA,qBAAsBC,GAAkBA,CAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFormGrid.mjs","sources":["../../src/hooks/useFormGrid.ts"],"sourcesContent":["import { createInjectionState } from '@vueuse/core'\n\nexport const [useProvideFormGrid, useFormGrid] = createInjectionState((grid: boolean) => grid)\n"],"names":["useProvideFormGrid","useFormGrid","createInjectionState","grid"],"mappings":";AAEO,MAAM,CAACA,GAAoBC,CAAW,IAAIC,EAAqB,CAACC,MAAkBA,CAAI;"}
1
+ {"version":3,"file":"useFormGrid.mjs","sources":["../../src/hooks/useFormGrid.ts"],"sourcesContent":["import { createInjectionState } from '@vueuse/core'\r\n\r\nexport const [useProvideFormGrid, useFormGrid] = createInjectionState((grid: boolean) => grid)\r\n"],"names":["useProvideFormGrid","useFormGrid","createInjectionState","grid"],"mappings":";AAEO,MAAM,CAACA,GAAoBC,CAAW,IAAIC,EAAqB,CAACC,MAAkBA,CAAI;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMenu.cjs","sources":["../../src/hooks/useMenu.ts"],"sourcesContent":["import type { CanAccessItem } from '@/provides'\nimport { skyConfig, type SkyMenu } from '@/setup'\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\nimport { computed } from 'vue'\nimport { usePermission } from './usePermission'\n\nconst getMenus = (menus: SkyMenu[], permissions: CanAccessItem[]) => {\n const result: SkyMenu[] = []\n for (const menu of menus) {\n if (skyConfig.dataProvider?.canAccess?.(menu.permission, permissions)) {\n const { children, ...rest } = menu\n result.push({\n ...rest,\n children: Array.isArray(children) ? getMenus(children, permissions) : undefined,\n })\n }\n }\n return result\n}\n\nexport const useMenu = createGlobalState(() => {\n const collapse = useLocalStorage(skyConfig.collapseName, false)\n const { permissions } = usePermission()\n const menus = computed<SkyMenu[]>(() => {\n if (skyConfig.menus) {\n return getMenus(skyConfig.menus, permissions.value)\n }\n return []\n })\n\n return {\n collapse,\n menus,\n }\n})\n"],"names":["getMenus","menus","permissions","result","menu","skyConfig","children","rest","useMenu","createGlobalState","collapse","useLocalStorage","usePermission","computed"],"mappings":"kMAMMA,EAAW,CAACC,EAAkBC,IAAiC,CACnE,MAAMC,EAAoB,CAAA,EAC1B,UAAWC,KAAQH,EACjB,GAAII,EAAAA,UAAU,cAAc,YAAYD,EAAK,WAAYF,CAAW,EAAG,CACrE,KAAM,CAAE,SAAAI,EAAU,GAAGC,CAAA,EAASH,EAC9BD,EAAO,KAAK,CACV,GAAGI,EACH,SAAU,MAAM,QAAQD,CAAQ,EAAIN,EAASM,EAAUJ,CAAW,EAAI,MAAA,CACvE,CACH,CAEF,OAAOC,CACT,EAEaK,EAAUC,EAAAA,kBAAkB,IAAM,CAC7C,MAAMC,EAAWC,EAAAA,gBAAgBN,YAAU,aAAc,EAAK,EACxD,CAAE,YAAAH,CAAA,EAAgBU,gBAAA,EAClBX,EAAQY,EAAAA,SAAoB,IAC5BR,EAAAA,UAAU,MACLL,EAASK,EAAAA,UAAU,MAAOH,EAAY,KAAK,EAE7C,CAAA,CACR,EAED,MAAO,CACL,SAAAQ,EACA,MAAAT,CAAA,CAEJ,CAAC"}
1
+ {"version":3,"file":"useMenu.cjs","sources":["../../src/hooks/useMenu.ts"],"sourcesContent":["import type { CanAccessItem } from '@/provides'\r\nimport { skyConfig, type SkyMenu } from '@/setup'\r\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\r\nimport { computed } from 'vue'\r\nimport { usePermission } from './usePermission'\r\n\r\nconst getMenus = (menus: SkyMenu[], permissions: CanAccessItem[]) => {\r\n const result: SkyMenu[] = []\r\n for (const menu of menus) {\r\n if (skyConfig.dataProvider?.canAccess?.(menu.permission, permissions)) {\r\n const { children, ...rest } = menu\r\n result.push({\r\n ...rest,\r\n children: Array.isArray(children) ? getMenus(children, permissions) : undefined,\r\n })\r\n }\r\n }\r\n return result\r\n}\r\n\r\nexport const useMenu = createGlobalState(() => {\r\n const collapse = useLocalStorage(skyConfig.collapseName, false)\r\n const { permissions } = usePermission()\r\n const menus = computed<SkyMenu[]>(() => {\r\n if (skyConfig.menus) {\r\n return getMenus(skyConfig.menus, permissions.value)\r\n }\r\n return []\r\n })\r\n\r\n return {\r\n collapse,\r\n menus,\r\n }\r\n})\r\n"],"names":["getMenus","menus","permissions","result","menu","skyConfig","children","rest","useMenu","createGlobalState","collapse","useLocalStorage","usePermission","computed"],"mappings":"kMAMMA,EAAW,CAACC,EAAkBC,IAAiC,CACnE,MAAMC,EAAoB,CAAA,EAC1B,UAAWC,KAAQH,EACjB,GAAII,EAAAA,UAAU,cAAc,YAAYD,EAAK,WAAYF,CAAW,EAAG,CACrE,KAAM,CAAE,SAAAI,EAAU,GAAGC,CAAA,EAASH,EAC9BD,EAAO,KAAK,CACV,GAAGI,EACH,SAAU,MAAM,QAAQD,CAAQ,EAAIN,EAASM,EAAUJ,CAAW,EAAI,MAAA,CACvE,CACH,CAEF,OAAOC,CACT,EAEaK,EAAUC,EAAAA,kBAAkB,IAAM,CAC7C,MAAMC,EAAWC,EAAAA,gBAAgBN,YAAU,aAAc,EAAK,EACxD,CAAE,YAAAH,CAAA,EAAgBU,gBAAA,EAClBX,EAAQY,EAAAA,SAAoB,IAC5BR,EAAAA,UAAU,MACLL,EAASK,EAAAA,UAAU,MAAOH,EAAY,KAAK,EAE7C,CAAA,CACR,EAED,MAAO,CACL,SAAAQ,EACA,MAAAT,CAAA,CAEJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMenu.mjs","sources":["../../src/hooks/useMenu.ts"],"sourcesContent":["import type { CanAccessItem } from '@/provides'\nimport { skyConfig, type SkyMenu } from '@/setup'\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\nimport { computed } from 'vue'\nimport { usePermission } from './usePermission'\n\nconst getMenus = (menus: SkyMenu[], permissions: CanAccessItem[]) => {\n const result: SkyMenu[] = []\n for (const menu of menus) {\n if (skyConfig.dataProvider?.canAccess?.(menu.permission, permissions)) {\n const { children, ...rest } = menu\n result.push({\n ...rest,\n children: Array.isArray(children) ? getMenus(children, permissions) : undefined,\n })\n }\n }\n return result\n}\n\nexport const useMenu = createGlobalState(() => {\n const collapse = useLocalStorage(skyConfig.collapseName, false)\n const { permissions } = usePermission()\n const menus = computed<SkyMenu[]>(() => {\n if (skyConfig.menus) {\n return getMenus(skyConfig.menus, permissions.value)\n }\n return []\n })\n\n return {\n collapse,\n menus,\n }\n})\n"],"names":["getMenus","menus","permissions","result","menu","skyConfig","children","rest","useMenu","createGlobalState","collapse","useLocalStorage","usePermission","computed"],"mappings":";;;;AAMA,MAAMA,IAAW,CAACC,GAAkBC,MAAiC;AACnE,QAAMC,IAAoB,CAAA;AAC1B,aAAWC,KAAQH;AACjB,QAAII,EAAU,cAAc,YAAYD,EAAK,YAAYF,CAAW,GAAG;AACrE,YAAM,EAAE,UAAAI,GAAU,GAAGC,EAAA,IAASH;AAC9B,MAAAD,EAAO,KAAK;AAAA,QACV,GAAGI;AAAA,QACH,UAAU,MAAM,QAAQD,CAAQ,IAAIN,EAASM,GAAUJ,CAAW,IAAI;AAAA,MAAA,CACvE;AAAA,IACH;AAEF,SAAOC;AACT,GAEaK,IAAUC,EAAkB,MAAM;AAC7C,QAAMC,IAAWC,EAAgBN,EAAU,cAAc,EAAK,GACxD,EAAE,aAAAH,EAAA,IAAgBU,EAAA,GAClBX,IAAQY,EAAoB,MAC5BR,EAAU,QACLL,EAASK,EAAU,OAAOH,EAAY,KAAK,IAE7C,CAAA,CACR;AAED,SAAO;AAAA,IACL,UAAAQ;AAAA,IACA,OAAAT;AAAA,EAAA;AAEJ,CAAC;"}
1
+ {"version":3,"file":"useMenu.mjs","sources":["../../src/hooks/useMenu.ts"],"sourcesContent":["import type { CanAccessItem } from '@/provides'\r\nimport { skyConfig, type SkyMenu } from '@/setup'\r\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\r\nimport { computed } from 'vue'\r\nimport { usePermission } from './usePermission'\r\n\r\nconst getMenus = (menus: SkyMenu[], permissions: CanAccessItem[]) => {\r\n const result: SkyMenu[] = []\r\n for (const menu of menus) {\r\n if (skyConfig.dataProvider?.canAccess?.(menu.permission, permissions)) {\r\n const { children, ...rest } = menu\r\n result.push({\r\n ...rest,\r\n children: Array.isArray(children) ? getMenus(children, permissions) : undefined,\r\n })\r\n }\r\n }\r\n return result\r\n}\r\n\r\nexport const useMenu = createGlobalState(() => {\r\n const collapse = useLocalStorage(skyConfig.collapseName, false)\r\n const { permissions } = usePermission()\r\n const menus = computed<SkyMenu[]>(() => {\r\n if (skyConfig.menus) {\r\n return getMenus(skyConfig.menus, permissions.value)\r\n }\r\n return []\r\n })\r\n\r\n return {\r\n collapse,\r\n menus,\r\n }\r\n})\r\n"],"names":["getMenus","menus","permissions","result","menu","skyConfig","children","rest","useMenu","createGlobalState","collapse","useLocalStorage","usePermission","computed"],"mappings":";;;;AAMA,MAAMA,IAAW,CAACC,GAAkBC,MAAiC;AACnE,QAAMC,IAAoB,CAAA;AAC1B,aAAWC,KAAQH;AACjB,QAAII,EAAU,cAAc,YAAYD,EAAK,YAAYF,CAAW,GAAG;AACrE,YAAM,EAAE,UAAAI,GAAU,GAAGC,EAAA,IAASH;AAC9B,MAAAD,EAAO,KAAK;AAAA,QACV,GAAGI;AAAA,QACH,UAAU,MAAM,QAAQD,CAAQ,IAAIN,EAASM,GAAUJ,CAAW,IAAI;AAAA,MAAA,CACvE;AAAA,IACH;AAEF,SAAOC;AACT,GAEaK,IAAUC,EAAkB,MAAM;AAC7C,QAAMC,IAAWC,EAAgBN,EAAU,cAAc,EAAK,GACxD,EAAE,aAAAH,EAAA,IAAgBU,EAAA,GAClBX,IAAQY,EAAoB,MAC5BR,EAAU,QACLL,EAASK,EAAU,OAAOH,EAAY,KAAK,IAE7C,CAAA,CACR;AAED,SAAO;AAAA,IACL,UAAAQ;AAAA,IACA,OAAAT;AAAA,EAAA;AAEJ,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"usePermission.cjs","sources":["../../src/hooks/usePermission.ts"],"sourcesContent":["import type { CanAccessItem } from '@/provides'\nimport { createGlobalState } from '@vueuse/core'\nimport { shallowRef } from 'vue'\n\nexport const usePermission = createGlobalState(() => {\n const permissions = shallowRef<CanAccessItem[]>([])\n return {\n permissions,\n }\n})\n"],"names":["usePermission","createGlobalState","shallowRef"],"mappings":"iIAIaA,EAAgBC,EAAAA,kBAAkB,KAEtC,CACL,YAFkBC,EAAAA,WAA4B,EAAE,CAEhD,EAEH"}
1
+ {"version":3,"file":"usePermission.cjs","sources":["../../src/hooks/usePermission.ts"],"sourcesContent":["import type { CanAccessItem } from '@/provides'\r\nimport { createGlobalState } from '@vueuse/core'\r\nimport { shallowRef } from 'vue'\r\n\r\nexport const usePermission = createGlobalState(() => {\r\n const permissions = shallowRef<CanAccessItem[]>([])\r\n return {\r\n permissions,\r\n }\r\n})\r\n"],"names":["usePermission","createGlobalState","shallowRef"],"mappings":"iIAIaA,EAAgBC,EAAAA,kBAAkB,KAEtC,CACL,YAFkBC,EAAAA,WAA4B,EAAE,CAEhD,EAEH"}
@@ -1 +1 @@
1
- {"version":3,"file":"usePermission.mjs","sources":["../../src/hooks/usePermission.ts"],"sourcesContent":["import type { CanAccessItem } from '@/provides'\nimport { createGlobalState } from '@vueuse/core'\nimport { shallowRef } from 'vue'\n\nexport const usePermission = createGlobalState(() => {\n const permissions = shallowRef<CanAccessItem[]>([])\n return {\n permissions,\n }\n})\n"],"names":["usePermission","createGlobalState","shallowRef"],"mappings":";;AAIO,MAAMA,IAAgBC,EAAkB,OAEtC;AAAA,EACL,aAFkBC,EAA4B,EAAE;AAEhD,EAEH;"}
1
+ {"version":3,"file":"usePermission.mjs","sources":["../../src/hooks/usePermission.ts"],"sourcesContent":["import type { CanAccessItem } from '@/provides'\r\nimport { createGlobalState } from '@vueuse/core'\r\nimport { shallowRef } from 'vue'\r\n\r\nexport const usePermission = createGlobalState(() => {\r\n const permissions = shallowRef<CanAccessItem[]>([])\r\n return {\r\n permissions,\r\n }\r\n})\r\n"],"names":["usePermission","createGlobalState","shallowRef"],"mappings":";;AAIO,MAAMA,IAAgBC,EAAkB,OAEtC;AAAA,EACL,aAFkBC,EAA4B,EAAE;AAEhD,EAEH;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useReferenceArrayField.cjs","sources":["../../src/hooks/useReferenceArrayField.ts"],"sourcesContent":["import type { GetListResult } from '@/provides'\nimport { createInjectionState } from '@vueuse/core'\nimport type { Ref } from 'vue'\n\nexport type UseProvideReferenceArrayFieldParams = {\n reference: string\n listLoading: Ref<boolean>\n listData: Ref<GetListResult | undefined>\n}\n\nexport const [useProvideReferenceArrayField, useReferenceArrayField] = createInjectionState(\n (params: UseProvideReferenceArrayFieldParams) => params,\n)\n"],"names":["useProvideReferenceArrayField","useReferenceArrayField","createInjectionState","params"],"mappings":"gHAUa,CAACA,EAA+BC,CAAsB,EAAIC,EAAAA,qBACpEC,GAAgDA,CACnD"}
1
+ {"version":3,"file":"useReferenceArrayField.cjs","sources":["../../src/hooks/useReferenceArrayField.ts"],"sourcesContent":["import type { GetListResult } from '@/provides'\r\nimport { createInjectionState } from '@vueuse/core'\r\nimport type { Ref } from 'vue'\r\n\r\nexport type UseProvideReferenceArrayFieldParams = {\r\n reference: string\r\n listLoading: Ref<boolean>\r\n listData: Ref<GetListResult | undefined>\r\n}\r\n\r\nexport const [useProvideReferenceArrayField, useReferenceArrayField] = createInjectionState(\r\n (params: UseProvideReferenceArrayFieldParams) => params,\r\n)\r\n"],"names":["useProvideReferenceArrayField","useReferenceArrayField","createInjectionState","params"],"mappings":"gHAUa,CAACA,EAA+BC,CAAsB,EAAIC,EAAAA,qBACpEC,GAAgDA,CACnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"useReferenceArrayField.mjs","sources":["../../src/hooks/useReferenceArrayField.ts"],"sourcesContent":["import type { GetListResult } from '@/provides'\nimport { createInjectionState } from '@vueuse/core'\nimport type { Ref } from 'vue'\n\nexport type UseProvideReferenceArrayFieldParams = {\n reference: string\n listLoading: Ref<boolean>\n listData: Ref<GetListResult | undefined>\n}\n\nexport const [useProvideReferenceArrayField, useReferenceArrayField] = createInjectionState(\n (params: UseProvideReferenceArrayFieldParams) => params,\n)\n"],"names":["useProvideReferenceArrayField","useReferenceArrayField","createInjectionState","params"],"mappings":";AAUO,MAAM,CAACA,GAA+BC,CAAsB,IAAIC;AAAA,EACrE,CAACC,MAAgDA;AACnD;"}
1
+ {"version":3,"file":"useReferenceArrayField.mjs","sources":["../../src/hooks/useReferenceArrayField.ts"],"sourcesContent":["import type { GetListResult } from '@/provides'\r\nimport { createInjectionState } from '@vueuse/core'\r\nimport type { Ref } from 'vue'\r\n\r\nexport type UseProvideReferenceArrayFieldParams = {\r\n reference: string\r\n listLoading: Ref<boolean>\r\n listData: Ref<GetListResult | undefined>\r\n}\r\n\r\nexport const [useProvideReferenceArrayField, useReferenceArrayField] = createInjectionState(\r\n (params: UseProvideReferenceArrayFieldParams) => params,\r\n)\r\n"],"names":["useProvideReferenceArrayField","useReferenceArrayField","createInjectionState","params"],"mappings":";AAUO,MAAM,CAACA,GAA+BC,CAAsB,IAAIC;AAAA,EACrE,CAACC,MAAgDA;AACnD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useReferenceArrayInput.cjs","sources":["../../src/hooks/useReferenceArrayInput.ts"],"sourcesContent":["import type { GetListResult } from '@/provides'\nimport { createInjectionState } from '@vueuse/core'\nimport type { Ref } from 'vue'\n\nexport type UseProvideReferenceArrayInputParams = {\n reference: string\n getList: (filter?: Record<string, unknown>) => Promise<GetListResult | undefined>\n listLoading: Ref<boolean>\n listData: Ref<GetListResult | undefined>\n}\n\nexport const [useProvideReferenceArrayInput, useReferenceArrayInput] = createInjectionState(\n (params: UseProvideReferenceArrayInputParams) => params,\n)\n"],"names":["useProvideReferenceArrayInput","useReferenceArrayInput","createInjectionState","params"],"mappings":"gHAWa,CAACA,EAA+BC,CAAsB,EAAIC,EAAAA,qBACpEC,GAAgDA,CACnD"}
1
+ {"version":3,"file":"useReferenceArrayInput.cjs","sources":["../../src/hooks/useReferenceArrayInput.ts"],"sourcesContent":["import type { GetListResult } from '@/provides'\r\nimport { createInjectionState } from '@vueuse/core'\r\nimport type { Ref } from 'vue'\r\n\r\nexport type UseProvideReferenceArrayInputParams = {\r\n reference: string\r\n getList: (filter?: Record<string, unknown>) => Promise<GetListResult | undefined>\r\n listLoading: Ref<boolean>\r\n listData: Ref<GetListResult | undefined>\r\n}\r\n\r\nexport const [useProvideReferenceArrayInput, useReferenceArrayInput] = createInjectionState(\r\n (params: UseProvideReferenceArrayInputParams) => params,\r\n)\r\n"],"names":["useProvideReferenceArrayInput","useReferenceArrayInput","createInjectionState","params"],"mappings":"gHAWa,CAACA,EAA+BC,CAAsB,EAAIC,EAAAA,qBACpEC,GAAgDA,CACnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"useReferenceArrayInput.mjs","sources":["../../src/hooks/useReferenceArrayInput.ts"],"sourcesContent":["import type { GetListResult } from '@/provides'\nimport { createInjectionState } from '@vueuse/core'\nimport type { Ref } from 'vue'\n\nexport type UseProvideReferenceArrayInputParams = {\n reference: string\n getList: (filter?: Record<string, unknown>) => Promise<GetListResult | undefined>\n listLoading: Ref<boolean>\n listData: Ref<GetListResult | undefined>\n}\n\nexport const [useProvideReferenceArrayInput, useReferenceArrayInput] = createInjectionState(\n (params: UseProvideReferenceArrayInputParams) => params,\n)\n"],"names":["useProvideReferenceArrayInput","useReferenceArrayInput","createInjectionState","params"],"mappings":";AAWO,MAAM,CAACA,GAA+BC,CAAsB,IAAIC;AAAA,EACrE,CAACC,MAAgDA;AACnD;"}
1
+ {"version":3,"file":"useReferenceArrayInput.mjs","sources":["../../src/hooks/useReferenceArrayInput.ts"],"sourcesContent":["import type { GetListResult } from '@/provides'\r\nimport { createInjectionState } from '@vueuse/core'\r\nimport type { Ref } from 'vue'\r\n\r\nexport type UseProvideReferenceArrayInputParams = {\r\n reference: string\r\n getList: (filter?: Record<string, unknown>) => Promise<GetListResult | undefined>\r\n listLoading: Ref<boolean>\r\n listData: Ref<GetListResult | undefined>\r\n}\r\n\r\nexport const [useProvideReferenceArrayInput, useReferenceArrayInput] = createInjectionState(\r\n (params: UseProvideReferenceArrayInputParams) => params,\r\n)\r\n"],"names":["useProvideReferenceArrayInput","useReferenceArrayInput","createInjectionState","params"],"mappings":";AAWO,MAAM,CAACA,GAA+BC,CAAsB,IAAIC;AAAA,EACrE,CAACC,MAAgDA;AACnD;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useRouteKeepAlive.cjs","sources":["../../src/hooks/useRouteKeepAlive.ts"],"sourcesContent":["import { createGlobalState } from '@vueuse/core'\nimport { ref } from 'vue'\n\nexport const useRouteKeepAlive = createGlobalState(() => {\n const includeList = ref<string[]>([])\n const addKeepAlive = (name: string) => {\n const i = includeList.value.indexOf(name)\n if (i === -1) {\n includeList.value.push(name)\n }\n }\n const removeKeepAlive = (name: string) => {\n const i = includeList.value.indexOf(name)\n if (i > -1) {\n includeList.value.splice(i, 1)\n }\n }\n return {\n includeList,\n addKeepAlive,\n removeKeepAlive,\n }\n})\n"],"names":["useRouteKeepAlive","createGlobalState","includeList","ref","name","i"],"mappings":"iIAGaA,EAAoBC,EAAAA,kBAAkB,IAAM,CACvD,MAAMC,EAAcC,EAAAA,IAAc,EAAE,EAapC,MAAO,CACL,YAAAD,EACA,aAdoBE,GAAiB,CAC3BF,EAAY,MAAM,QAAQE,CAAI,IAC9B,IACRF,EAAY,MAAM,KAAKE,CAAI,CAE/B,EAUE,gBATuBA,GAAiB,CACxC,MAAMC,EAAIH,EAAY,MAAM,QAAQE,CAAI,EACpCC,EAAI,IACNH,EAAY,MAAM,OAAOG,EAAG,CAAC,CAEjC,CAIE,CAEJ,CAAC"}
1
+ {"version":3,"file":"useRouteKeepAlive.cjs","sources":["../../src/hooks/useRouteKeepAlive.ts"],"sourcesContent":["import { createGlobalState } from '@vueuse/core'\r\nimport { ref } from 'vue'\r\n\r\nexport const useRouteKeepAlive = createGlobalState(() => {\r\n const includeList = ref<string[]>([])\r\n const addKeepAlive = (name: string) => {\r\n const i = includeList.value.indexOf(name)\r\n if (i === -1) {\r\n includeList.value.push(name)\r\n }\r\n }\r\n const removeKeepAlive = (name: string) => {\r\n const i = includeList.value.indexOf(name)\r\n if (i > -1) {\r\n includeList.value.splice(i, 1)\r\n }\r\n }\r\n return {\r\n includeList,\r\n addKeepAlive,\r\n removeKeepAlive,\r\n }\r\n})\r\n"],"names":["useRouteKeepAlive","createGlobalState","includeList","ref","name","i"],"mappings":"iIAGaA,EAAoBC,EAAAA,kBAAkB,IAAM,CACvD,MAAMC,EAAcC,EAAAA,IAAc,EAAE,EAapC,MAAO,CACL,YAAAD,EACA,aAdoBE,GAAiB,CAC3BF,EAAY,MAAM,QAAQE,CAAI,IAC9B,IACRF,EAAY,MAAM,KAAKE,CAAI,CAE/B,EAUE,gBATuBA,GAAiB,CACxC,MAAMC,EAAIH,EAAY,MAAM,QAAQE,CAAI,EACpCC,EAAI,IACNH,EAAY,MAAM,OAAOG,EAAG,CAAC,CAEjC,CAIE,CAEJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useRouteKeepAlive.mjs","sources":["../../src/hooks/useRouteKeepAlive.ts"],"sourcesContent":["import { createGlobalState } from '@vueuse/core'\nimport { ref } from 'vue'\n\nexport const useRouteKeepAlive = createGlobalState(() => {\n const includeList = ref<string[]>([])\n const addKeepAlive = (name: string) => {\n const i = includeList.value.indexOf(name)\n if (i === -1) {\n includeList.value.push(name)\n }\n }\n const removeKeepAlive = (name: string) => {\n const i = includeList.value.indexOf(name)\n if (i > -1) {\n includeList.value.splice(i, 1)\n }\n }\n return {\n includeList,\n addKeepAlive,\n removeKeepAlive,\n }\n})\n"],"names":["useRouteKeepAlive","createGlobalState","includeList","ref","name","i"],"mappings":";;AAGO,MAAMA,IAAoBC,EAAkB,MAAM;AACvD,QAAMC,IAAcC,EAAc,EAAE;AAapC,SAAO;AAAA,IACL,aAAAD;AAAA,IACA,cAdmB,CAACE,MAAiB;AAErC,MADUF,EAAY,MAAM,QAAQE,CAAI,MAC9B,MACRF,EAAY,MAAM,KAAKE,CAAI;AAAA,IAE/B;AAAA,IAUE,iBATsB,CAACA,MAAiB;AACxC,YAAMC,IAAIH,EAAY,MAAM,QAAQE,CAAI;AACxC,MAAIC,IAAI,MACNH,EAAY,MAAM,OAAOG,GAAG,CAAC;AAAA,IAEjC;AAAA,EAIE;AAEJ,CAAC;"}
1
+ {"version":3,"file":"useRouteKeepAlive.mjs","sources":["../../src/hooks/useRouteKeepAlive.ts"],"sourcesContent":["import { createGlobalState } from '@vueuse/core'\r\nimport { ref } from 'vue'\r\n\r\nexport const useRouteKeepAlive = createGlobalState(() => {\r\n const includeList = ref<string[]>([])\r\n const addKeepAlive = (name: string) => {\r\n const i = includeList.value.indexOf(name)\r\n if (i === -1) {\r\n includeList.value.push(name)\r\n }\r\n }\r\n const removeKeepAlive = (name: string) => {\r\n const i = includeList.value.indexOf(name)\r\n if (i > -1) {\r\n includeList.value.splice(i, 1)\r\n }\r\n }\r\n return {\r\n includeList,\r\n addKeepAlive,\r\n removeKeepAlive,\r\n }\r\n})\r\n"],"names":["useRouteKeepAlive","createGlobalState","includeList","ref","name","i"],"mappings":";;AAGO,MAAMA,IAAoBC,EAAkB,MAAM;AACvD,QAAMC,IAAcC,EAAc,EAAE;AAapC,SAAO;AAAA,IACL,aAAAD;AAAA,IACA,cAdmB,CAACE,MAAiB;AAErC,MADUF,EAAY,MAAM,QAAQE,CAAI,MAC9B,MACRF,EAAY,MAAM,KAAKE,CAAI;AAAA,IAE/B;AAAA,IAUE,iBATsB,CAACA,MAAiB;AACxC,YAAMC,IAAIH,EAAY,MAAM,QAAQE,CAAI;AACxC,MAAIC,IAAI,MACNH,EAAY,MAAM,OAAOG,GAAG,CAAC;AAAA,IAEjC;AAAA,EAIE;AAEJ,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useShow.cjs","sources":["../../src/hooks/useShow.ts"],"sourcesContent":["import type { GetOneResult } from '@/provides'\nimport { createInjectionState } from '@vueuse/core'\nimport type { Ref } from 'vue'\n\nexport type UseProvideShowParams = {\n data: Ref<GetOneResult | undefined>\n}\n\nexport const [useProvideShow, useShow] = createInjectionState(\n (params: UseProvideShowParams) => params,\n)\n"],"names":["useProvideShow","useShow","createInjectionState","params"],"mappings":"gHAQa,CAACA,EAAgBC,CAAO,EAAIC,EAAAA,qBACtCC,GAAiCA,CACpC"}
1
+ {"version":3,"file":"useShow.cjs","sources":["../../src/hooks/useShow.ts"],"sourcesContent":["import type { GetOneResult } from '@/provides'\r\nimport { createInjectionState } from '@vueuse/core'\r\nimport type { Ref } from 'vue'\r\n\r\nexport type UseProvideShowParams = {\r\n data: Ref<GetOneResult | undefined>\r\n}\r\n\r\nexport const [useProvideShow, useShow] = createInjectionState(\r\n (params: UseProvideShowParams) => params,\r\n)\r\n"],"names":["useProvideShow","useShow","createInjectionState","params"],"mappings":"gHAQa,CAACA,EAAgBC,CAAO,EAAIC,EAAAA,qBACtCC,GAAiCA,CACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useShow.mjs","sources":["../../src/hooks/useShow.ts"],"sourcesContent":["import type { GetOneResult } from '@/provides'\nimport { createInjectionState } from '@vueuse/core'\nimport type { Ref } from 'vue'\n\nexport type UseProvideShowParams = {\n data: Ref<GetOneResult | undefined>\n}\n\nexport const [useProvideShow, useShow] = createInjectionState(\n (params: UseProvideShowParams) => params,\n)\n"],"names":["useProvideShow","useShow","createInjectionState","params"],"mappings":";AAQO,MAAM,CAACA,GAAgBC,CAAO,IAAIC;AAAA,EACvC,CAACC,MAAiCA;AACpC;"}
1
+ {"version":3,"file":"useShow.mjs","sources":["../../src/hooks/useShow.ts"],"sourcesContent":["import type { GetOneResult } from '@/provides'\r\nimport { createInjectionState } from '@vueuse/core'\r\nimport type { Ref } from 'vue'\r\n\r\nexport type UseProvideShowParams = {\r\n data: Ref<GetOneResult | undefined>\r\n}\r\n\r\nexport const [useProvideShow, useShow] = createInjectionState(\r\n (params: UseProvideShowParams) => params,\r\n)\r\n"],"names":["useProvideShow","useShow","createInjectionState","params"],"mappings":";AAQO,MAAM,CAACA,GAAgBC,CAAO,IAAIC;AAAA,EACvC,CAACC,MAAiCA;AACpC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSize.cjs","sources":["../../src/hooks/useSize.ts"],"sourcesContent":["import { skyConfig } from '@/setup'\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\nimport { ref } from 'vue'\n\nexport type SizeConfigType = keyof (typeof SizeConfig)['options']\n\nexport const SizeConfig = {\n options: {\n default: { value: 'default', label: 'size.default' },\n large: { value: 'large', label: 'size.large' },\n small: { value: 'small', label: 'size.small' },\n },\n iconMap: {\n default: 'var(--el-font-size-base)',\n large: 'var(--el-font-size-medium)',\n small: 'var(--el-font-size-extra-small)',\n },\n}\n\nexport const useSize = createGlobalState(() => {\n const enabled = ref(false)\n const size = useLocalStorage<SizeConfigType>(skyConfig.sizeName, 'default')\n const select = (v: SizeConfigType) => (size.value = v)\n const reset = () => {\n enabled.value = false\n size.value = 'default'\n }\n return {\n enabled,\n size,\n select,\n reset,\n }\n})\n"],"names":["SizeConfig","useSize","createGlobalState","enabled","ref","size","useLocalStorage","skyConfig","v"],"mappings":"iKAMaA,EAAa,CACxB,QAAS,CACP,QAAS,CAAE,MAAO,UAAW,MAAO,cAAA,EACpC,MAAO,CAAE,MAAO,QAAS,MAAO,YAAA,EAChC,MAAO,CAAE,MAAO,QAAS,MAAO,YAAA,CAAa,EAE/C,QAAS,CACP,QAAS,2BACT,MAAO,6BACP,MAAO,iCAAA,CAEX,EAEaC,EAAUC,EAAAA,kBAAkB,IAAM,CAC7C,MAAMC,EAAUC,EAAAA,IAAI,EAAK,EACnBC,EAAOC,EAAAA,gBAAgCC,YAAU,SAAU,SAAS,EAM1E,MAAO,CACL,QAAAJ,EACA,KAAAE,EACA,OARcG,GAAuBH,EAAK,MAAQG,EASlD,MARY,IAAM,CAClBL,EAAQ,MAAQ,GAChBE,EAAK,MAAQ,SACf,CAKE,CAEJ,CAAC"}
1
+ {"version":3,"file":"useSize.cjs","sources":["../../src/hooks/useSize.ts"],"sourcesContent":["import { skyConfig } from '@/setup'\r\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\r\nimport { ref } from 'vue'\r\n\r\nexport type SizeConfigType = keyof (typeof SizeConfig)['options']\r\n\r\nexport const SizeConfig = {\r\n options: {\r\n default: { value: 'default', label: 'size.default' },\r\n large: { value: 'large', label: 'size.large' },\r\n small: { value: 'small', label: 'size.small' },\r\n },\r\n iconMap: {\r\n default: 'var(--el-font-size-base)',\r\n large: 'var(--el-font-size-medium)',\r\n small: 'var(--el-font-size-extra-small)',\r\n },\r\n}\r\n\r\nexport const useSize = createGlobalState(() => {\r\n const enabled = ref(false)\r\n const size = useLocalStorage<SizeConfigType>(skyConfig.sizeName, 'default')\r\n const select = (v: SizeConfigType) => (size.value = v)\r\n const reset = () => {\r\n enabled.value = false\r\n size.value = 'default'\r\n }\r\n return {\r\n enabled,\r\n size,\r\n select,\r\n reset,\r\n }\r\n})\r\n"],"names":["SizeConfig","useSize","createGlobalState","enabled","ref","size","useLocalStorage","skyConfig","v"],"mappings":"iKAMaA,EAAa,CACxB,QAAS,CACP,QAAS,CAAE,MAAO,UAAW,MAAO,cAAA,EACpC,MAAO,CAAE,MAAO,QAAS,MAAO,YAAA,EAChC,MAAO,CAAE,MAAO,QAAS,MAAO,YAAA,CAAa,EAE/C,QAAS,CACP,QAAS,2BACT,MAAO,6BACP,MAAO,iCAAA,CAEX,EAEaC,EAAUC,EAAAA,kBAAkB,IAAM,CAC7C,MAAMC,EAAUC,EAAAA,IAAI,EAAK,EACnBC,EAAOC,EAAAA,gBAAgCC,YAAU,SAAU,SAAS,EAM1E,MAAO,CACL,QAAAJ,EACA,KAAAE,EACA,OARcG,GAAuBH,EAAK,MAAQG,EASlD,MARY,IAAM,CAClBL,EAAQ,MAAQ,GAChBE,EAAK,MAAQ,SACf,CAKE,CAEJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSize.mjs","sources":["../../src/hooks/useSize.ts"],"sourcesContent":["import { skyConfig } from '@/setup'\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\nimport { ref } from 'vue'\n\nexport type SizeConfigType = keyof (typeof SizeConfig)['options']\n\nexport const SizeConfig = {\n options: {\n default: { value: 'default', label: 'size.default' },\n large: { value: 'large', label: 'size.large' },\n small: { value: 'small', label: 'size.small' },\n },\n iconMap: {\n default: 'var(--el-font-size-base)',\n large: 'var(--el-font-size-medium)',\n small: 'var(--el-font-size-extra-small)',\n },\n}\n\nexport const useSize = createGlobalState(() => {\n const enabled = ref(false)\n const size = useLocalStorage<SizeConfigType>(skyConfig.sizeName, 'default')\n const select = (v: SizeConfigType) => (size.value = v)\n const reset = () => {\n enabled.value = false\n size.value = 'default'\n }\n return {\n enabled,\n size,\n select,\n reset,\n }\n})\n"],"names":["SizeConfig","useSize","createGlobalState","enabled","ref","size","useLocalStorage","skyConfig","v"],"mappings":";;;AAMO,MAAMA,IAAa;AAAA,EACxB,SAAS;AAAA,IACP,SAAS,EAAE,OAAO,WAAW,OAAO,eAAA;AAAA,IACpC,OAAO,EAAE,OAAO,SAAS,OAAO,aAAA;AAAA,IAChC,OAAO,EAAE,OAAO,SAAS,OAAO,aAAA;AAAA,EAAa;AAAA,EAE/C,SAAS;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAEX,GAEaC,IAAUC,EAAkB,MAAM;AAC7C,QAAMC,IAAUC,EAAI,EAAK,GACnBC,IAAOC,EAAgCC,EAAU,UAAU,SAAS;AAM1E,SAAO;AAAA,IACL,SAAAJ;AAAA,IACA,MAAAE;AAAA,IACA,QARa,CAACG,MAAuBH,EAAK,QAAQG;AAAA,IASlD,OARY,MAAM;AAClB,MAAAL,EAAQ,QAAQ,IAChBE,EAAK,QAAQ;AAAA,IACf;AAAA,EAKE;AAEJ,CAAC;"}
1
+ {"version":3,"file":"useSize.mjs","sources":["../../src/hooks/useSize.ts"],"sourcesContent":["import { skyConfig } from '@/setup'\r\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\r\nimport { ref } from 'vue'\r\n\r\nexport type SizeConfigType = keyof (typeof SizeConfig)['options']\r\n\r\nexport const SizeConfig = {\r\n options: {\r\n default: { value: 'default', label: 'size.default' },\r\n large: { value: 'large', label: 'size.large' },\r\n small: { value: 'small', label: 'size.small' },\r\n },\r\n iconMap: {\r\n default: 'var(--el-font-size-base)',\r\n large: 'var(--el-font-size-medium)',\r\n small: 'var(--el-font-size-extra-small)',\r\n },\r\n}\r\n\r\nexport const useSize = createGlobalState(() => {\r\n const enabled = ref(false)\r\n const size = useLocalStorage<SizeConfigType>(skyConfig.sizeName, 'default')\r\n const select = (v: SizeConfigType) => (size.value = v)\r\n const reset = () => {\r\n enabled.value = false\r\n size.value = 'default'\r\n }\r\n return {\r\n enabled,\r\n size,\r\n select,\r\n reset,\r\n }\r\n})\r\n"],"names":["SizeConfig","useSize","createGlobalState","enabled","ref","size","useLocalStorage","skyConfig","v"],"mappings":";;;AAMO,MAAMA,IAAa;AAAA,EACxB,SAAS;AAAA,IACP,SAAS,EAAE,OAAO,WAAW,OAAO,eAAA;AAAA,IACpC,OAAO,EAAE,OAAO,SAAS,OAAO,aAAA;AAAA,IAChC,OAAO,EAAE,OAAO,SAAS,OAAO,aAAA;AAAA,EAAa;AAAA,EAE/C,SAAS;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAEX,GAEaC,IAAUC,EAAkB,MAAM;AAC7C,QAAMC,IAAUC,EAAI,EAAK,GACnBC,IAAOC,EAAgCC,EAAU,UAAU,SAAS;AAM1E,SAAO;AAAA,IACL,SAAAJ;AAAA,IACA,MAAAE;AAAA,IACA,QARa,CAACG,MAAuBH,EAAK,QAAQG;AAAA,IASlD,OARY,MAAM;AAClB,MAAAL,EAAQ,QAAQ,IAChBE,EAAK,QAAQ;AAAA,IACf;AAAA,EAKE;AAEJ,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTab.cjs","sources":["../../src/hooks/useTab.ts"],"sourcesContent":["import { skyConfig } from '@/setup'\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\nimport { computed } from 'vue'\nimport type { RouteParamsGeneric } from 'vue-router'\n\nexport interface TabItem {\n routeName: string\n routeParams?: RouteParamsGeneric\n routeKeepAliveName?: string\n title: string\n icon?: string\n closable: boolean\n}\n\nexport const useTab = createGlobalState(() => {\n const tabs = useLocalStorage<TabItem[]>(skyConfig.tabsName, [])\n const tabListStack = useLocalStorage<string[]>(skyConfig.tabListStackName, [])\n const allTabName = computed(() => tabs.value.map((tab) => tab.routeName))\n\n // 算法:\n // 1、只要经过路由的满足tab标签的历史路径 to.name 都记录: tabListStack = []\n // 2、tabListStack 去重\n // 3、获取 tabs 存在的路径,记作 allTabName = []\n // 4、保持 tabListStack 位置顺序,并且 tabListStack = tabListStack ∩ allTabName\n // 无论 tabListStack 或者 allTabName 变化,都要重新计算 2~4 步\n const _setTabListStack = (name?: string) => {\n if (name) {\n tabListStack.value.push(name)\n }\n // 去重、求交集\n // reverse 的目的就是保持栈底部数据顺序,栈靠顶重复项移除,而不是移除栈底\n tabListStack.value = [...new Set(tabListStack.value.reverse())]\n .reverse()\n .filter((name) => allTabName.value.includes(name))\n }\n\n const lastTab = computed(() => {\n if (tabListStack.value.length > 0) {\n const routeName = tabListStack.value[tabListStack.value.length - 1]\n const tab = tabs.value.find((t) => t.routeName === routeName)\n return tab\n }\n })\n\n const _resetTabClosable = () => {\n if (tabs.value.length === 1) {\n // 仅仅剩一个不能删除\n tabs.value[0]!.closable = false\n } else {\n for (const tab of tabs.value) {\n tab.closable = true\n }\n }\n }\n\n const addTab = (item: Omit<TabItem, 'closable'>) => {\n if (!item.routeName) {\n return\n }\n const tab = tabs.value.find((t) => t.routeName === item.routeName)\n if (!tab) {\n tabs.value.push({\n ...item,\n closable: tabs.value.length > 1,\n })\n _resetTabClosable()\n } else {\n // update previou\n // tab.previouPath = item.previouPath\n // tab.previouFullPath = item.previouFullPath\n // update all\n Object.assign(tab, item)\n }\n _setTabListStack(item.routeName)\n }\n\n const removeTab = (routeName: string) => {\n if (!routeName) {\n return\n }\n const index = tabs.value.findIndex((t) => t.routeName === routeName)\n if (index === -1) {\n return\n }\n if (tabs.value.length > 1) {\n const removed = tabs.value.splice(index, 1)\n _resetTabClosable()\n _setTabListStack()\n return removed[0]\n }\n }\n\n const reset = () => {\n tabs.value = []\n tabListStack.value = []\n }\n\n return {\n tabs,\n tabListStack,\n allTabName,\n lastTab,\n addTab,\n removeTab,\n reset,\n }\n})\n"],"names":["useTab","createGlobalState","tabs","useLocalStorage","skyConfig","tabListStack","allTabName","computed","tab","_setTabListStack","name","lastTab","routeName","t","_resetTabClosable","item","index","removed"],"mappings":"iKAcaA,EAASC,EAAAA,kBAAkB,IAAM,CAC5C,MAAMC,EAAOC,EAAAA,gBAA2BC,YAAU,SAAU,CAAA,CAAE,EACxDC,EAAeF,EAAAA,gBAA0BC,YAAU,iBAAkB,CAAA,CAAE,EACvEE,EAAaC,WAAS,IAAML,EAAK,MAAM,IAAKM,GAAQA,EAAI,SAAS,CAAC,EAQlEC,EAAoBC,GAAkB,CACtCA,GACFL,EAAa,MAAM,KAAKK,CAAI,EAI9BL,EAAa,MAAQ,CAAC,GAAG,IAAI,IAAIA,EAAa,MAAM,SAAS,CAAC,EAC3D,QAAA,EACA,OAAQK,GAASJ,EAAW,MAAM,SAASI,CAAI,CAAC,CACrD,EAEMC,EAAUJ,EAAAA,SAAS,IAAM,CAC7B,GAAIF,EAAa,MAAM,OAAS,EAAG,CACjC,MAAMO,EAAYP,EAAa,MAAMA,EAAa,MAAM,OAAS,CAAC,EAElE,OADYH,EAAK,MAAM,KAAMW,GAAMA,EAAE,YAAcD,CAAS,CAE9D,CACF,CAAC,EAEKE,EAAoB,IAAM,CAC9B,GAAIZ,EAAK,MAAM,SAAW,EAExBA,EAAK,MAAM,CAAC,EAAG,SAAW,OAE1B,WAAWM,KAAON,EAAK,MACrBM,EAAI,SAAW,EAGrB,EA4CA,MAAO,CACL,KAAAN,EACA,aAAAG,EACA,WAAAC,EACA,QAAAK,EACA,OA/CcI,GAAoC,CAClD,GAAI,CAACA,EAAK,UACR,OAEF,MAAMP,EAAMN,EAAK,MAAM,KAAMW,GAAMA,EAAE,YAAcE,EAAK,SAAS,EAC5DP,EAWH,OAAO,OAAOA,EAAKO,CAAI,GAVvBb,EAAK,MAAM,KAAK,CACd,GAAGa,EACH,SAAUb,EAAK,MAAM,OAAS,CAAA,CAC/B,EACDY,EAAA,GAQFL,EAAiBM,EAAK,SAAS,CACjC,EA6BE,UA3BiBH,GAAsB,CACvC,GAAI,CAACA,EACH,OAEF,MAAMI,EAAQd,EAAK,MAAM,UAAWW,GAAMA,EAAE,YAAcD,CAAS,EACnE,GAAII,IAAU,IAGVd,EAAK,MAAM,OAAS,EAAG,CACzB,MAAMe,EAAUf,EAAK,MAAM,OAAOc,EAAO,CAAC,EAC1C,OAAAF,EAAA,EACAL,EAAA,EACOQ,EAAQ,CAAC,CAClB,CACF,EAcE,MAZY,IAAM,CAClBf,EAAK,MAAQ,CAAA,EACbG,EAAa,MAAQ,CAAA,CACvB,CASE,CAEJ,CAAC"}
1
+ {"version":3,"file":"useTab.cjs","sources":["../../src/hooks/useTab.ts"],"sourcesContent":["import { skyConfig } from '@/setup'\r\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\r\nimport { computed } from 'vue'\r\nimport type { RouteParamsGeneric } from 'vue-router'\r\n\r\nexport interface TabItem {\r\n routeName: string\r\n routeParams?: RouteParamsGeneric\r\n routeKeepAliveName?: string\r\n title: string\r\n icon?: string\r\n closable: boolean\r\n}\r\n\r\nexport const useTab = createGlobalState(() => {\r\n const tabs = useLocalStorage<TabItem[]>(skyConfig.tabsName, [])\r\n const tabListStack = useLocalStorage<string[]>(skyConfig.tabListStackName, [])\r\n const allTabName = computed(() => tabs.value.map((tab) => tab.routeName))\r\n\r\n // 算法:\r\n // 1、只要经过路由的满足tab标签的历史路径 to.name 都记录: tabListStack = []\r\n // 2、tabListStack 去重\r\n // 3、获取 tabs 存在的路径,记作 allTabName = []\r\n // 4、保持 tabListStack 位置顺序,并且 tabListStack = tabListStack ∩ allTabName\r\n // 无论 tabListStack 或者 allTabName 变化,都要重新计算 2~4 步\r\n const _setTabListStack = (name?: string) => {\r\n if (name) {\r\n tabListStack.value.push(name)\r\n }\r\n // 去重、求交集\r\n // reverse 的目的就是保持栈底部数据顺序,栈靠顶重复项移除,而不是移除栈底\r\n tabListStack.value = [...new Set(tabListStack.value.reverse())]\r\n .reverse()\r\n .filter((name) => allTabName.value.includes(name))\r\n }\r\n\r\n const lastTab = computed(() => {\r\n if (tabListStack.value.length > 0) {\r\n const routeName = tabListStack.value[tabListStack.value.length - 1]\r\n const tab = tabs.value.find((t) => t.routeName === routeName)\r\n return tab\r\n }\r\n })\r\n\r\n const _resetTabClosable = () => {\r\n if (tabs.value.length === 1) {\r\n // 仅仅剩一个不能删除\r\n tabs.value[0]!.closable = false\r\n } else {\r\n for (const tab of tabs.value) {\r\n tab.closable = true\r\n }\r\n }\r\n }\r\n\r\n const addTab = (item: Omit<TabItem, 'closable'>) => {\r\n if (!item.routeName) {\r\n return\r\n }\r\n const tab = tabs.value.find((t) => t.routeName === item.routeName)\r\n if (!tab) {\r\n tabs.value.push({\r\n ...item,\r\n closable: tabs.value.length > 1,\r\n })\r\n _resetTabClosable()\r\n } else {\r\n // update previou\r\n // tab.previouPath = item.previouPath\r\n // tab.previouFullPath = item.previouFullPath\r\n // update all\r\n Object.assign(tab, item)\r\n }\r\n _setTabListStack(item.routeName)\r\n }\r\n\r\n const removeTab = (routeName: string) => {\r\n if (!routeName) {\r\n return\r\n }\r\n const index = tabs.value.findIndex((t) => t.routeName === routeName)\r\n if (index === -1) {\r\n return\r\n }\r\n if (tabs.value.length > 1) {\r\n const removed = tabs.value.splice(index, 1)\r\n _resetTabClosable()\r\n _setTabListStack()\r\n return removed[0]\r\n }\r\n }\r\n\r\n const reset = () => {\r\n tabs.value = []\r\n tabListStack.value = []\r\n }\r\n\r\n return {\r\n tabs,\r\n tabListStack,\r\n allTabName,\r\n lastTab,\r\n addTab,\r\n removeTab,\r\n reset,\r\n }\r\n})\r\n"],"names":["useTab","createGlobalState","tabs","useLocalStorage","skyConfig","tabListStack","allTabName","computed","tab","_setTabListStack","name","lastTab","routeName","t","_resetTabClosable","item","index","removed"],"mappings":"iKAcaA,EAASC,EAAAA,kBAAkB,IAAM,CAC5C,MAAMC,EAAOC,EAAAA,gBAA2BC,YAAU,SAAU,CAAA,CAAE,EACxDC,EAAeF,EAAAA,gBAA0BC,YAAU,iBAAkB,CAAA,CAAE,EACvEE,EAAaC,WAAS,IAAML,EAAK,MAAM,IAAKM,GAAQA,EAAI,SAAS,CAAC,EAQlEC,EAAoBC,GAAkB,CACtCA,GACFL,EAAa,MAAM,KAAKK,CAAI,EAI9BL,EAAa,MAAQ,CAAC,GAAG,IAAI,IAAIA,EAAa,MAAM,SAAS,CAAC,EAC3D,QAAA,EACA,OAAQK,GAASJ,EAAW,MAAM,SAASI,CAAI,CAAC,CACrD,EAEMC,EAAUJ,EAAAA,SAAS,IAAM,CAC7B,GAAIF,EAAa,MAAM,OAAS,EAAG,CACjC,MAAMO,EAAYP,EAAa,MAAMA,EAAa,MAAM,OAAS,CAAC,EAElE,OADYH,EAAK,MAAM,KAAMW,GAAMA,EAAE,YAAcD,CAAS,CAE9D,CACF,CAAC,EAEKE,EAAoB,IAAM,CAC9B,GAAIZ,EAAK,MAAM,SAAW,EAExBA,EAAK,MAAM,CAAC,EAAG,SAAW,OAE1B,WAAWM,KAAON,EAAK,MACrBM,EAAI,SAAW,EAGrB,EA4CA,MAAO,CACL,KAAAN,EACA,aAAAG,EACA,WAAAC,EACA,QAAAK,EACA,OA/CcI,GAAoC,CAClD,GAAI,CAACA,EAAK,UACR,OAEF,MAAMP,EAAMN,EAAK,MAAM,KAAMW,GAAMA,EAAE,YAAcE,EAAK,SAAS,EAC5DP,EAWH,OAAO,OAAOA,EAAKO,CAAI,GAVvBb,EAAK,MAAM,KAAK,CACd,GAAGa,EACH,SAAUb,EAAK,MAAM,OAAS,CAAA,CAC/B,EACDY,EAAA,GAQFL,EAAiBM,EAAK,SAAS,CACjC,EA6BE,UA3BiBH,GAAsB,CACvC,GAAI,CAACA,EACH,OAEF,MAAMI,EAAQd,EAAK,MAAM,UAAWW,GAAMA,EAAE,YAAcD,CAAS,EACnE,GAAII,IAAU,IAGVd,EAAK,MAAM,OAAS,EAAG,CACzB,MAAMe,EAAUf,EAAK,MAAM,OAAOc,EAAO,CAAC,EAC1C,OAAAF,EAAA,EACAL,EAAA,EACOQ,EAAQ,CAAC,CAClB,CACF,EAcE,MAZY,IAAM,CAClBf,EAAK,MAAQ,CAAA,EACbG,EAAa,MAAQ,CAAA,CACvB,CASE,CAEJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTab.mjs","sources":["../../src/hooks/useTab.ts"],"sourcesContent":["import { skyConfig } from '@/setup'\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\nimport { computed } from 'vue'\nimport type { RouteParamsGeneric } from 'vue-router'\n\nexport interface TabItem {\n routeName: string\n routeParams?: RouteParamsGeneric\n routeKeepAliveName?: string\n title: string\n icon?: string\n closable: boolean\n}\n\nexport const useTab = createGlobalState(() => {\n const tabs = useLocalStorage<TabItem[]>(skyConfig.tabsName, [])\n const tabListStack = useLocalStorage<string[]>(skyConfig.tabListStackName, [])\n const allTabName = computed(() => tabs.value.map((tab) => tab.routeName))\n\n // 算法:\n // 1、只要经过路由的满足tab标签的历史路径 to.name 都记录: tabListStack = []\n // 2、tabListStack 去重\n // 3、获取 tabs 存在的路径,记作 allTabName = []\n // 4、保持 tabListStack 位置顺序,并且 tabListStack = tabListStack ∩ allTabName\n // 无论 tabListStack 或者 allTabName 变化,都要重新计算 2~4 步\n const _setTabListStack = (name?: string) => {\n if (name) {\n tabListStack.value.push(name)\n }\n // 去重、求交集\n // reverse 的目的就是保持栈底部数据顺序,栈靠顶重复项移除,而不是移除栈底\n tabListStack.value = [...new Set(tabListStack.value.reverse())]\n .reverse()\n .filter((name) => allTabName.value.includes(name))\n }\n\n const lastTab = computed(() => {\n if (tabListStack.value.length > 0) {\n const routeName = tabListStack.value[tabListStack.value.length - 1]\n const tab = tabs.value.find((t) => t.routeName === routeName)\n return tab\n }\n })\n\n const _resetTabClosable = () => {\n if (tabs.value.length === 1) {\n // 仅仅剩一个不能删除\n tabs.value[0]!.closable = false\n } else {\n for (const tab of tabs.value) {\n tab.closable = true\n }\n }\n }\n\n const addTab = (item: Omit<TabItem, 'closable'>) => {\n if (!item.routeName) {\n return\n }\n const tab = tabs.value.find((t) => t.routeName === item.routeName)\n if (!tab) {\n tabs.value.push({\n ...item,\n closable: tabs.value.length > 1,\n })\n _resetTabClosable()\n } else {\n // update previou\n // tab.previouPath = item.previouPath\n // tab.previouFullPath = item.previouFullPath\n // update all\n Object.assign(tab, item)\n }\n _setTabListStack(item.routeName)\n }\n\n const removeTab = (routeName: string) => {\n if (!routeName) {\n return\n }\n const index = tabs.value.findIndex((t) => t.routeName === routeName)\n if (index === -1) {\n return\n }\n if (tabs.value.length > 1) {\n const removed = tabs.value.splice(index, 1)\n _resetTabClosable()\n _setTabListStack()\n return removed[0]\n }\n }\n\n const reset = () => {\n tabs.value = []\n tabListStack.value = []\n }\n\n return {\n tabs,\n tabListStack,\n allTabName,\n lastTab,\n addTab,\n removeTab,\n reset,\n }\n})\n"],"names":["useTab","createGlobalState","tabs","useLocalStorage","skyConfig","tabListStack","allTabName","computed","tab","_setTabListStack","name","lastTab","routeName","t","_resetTabClosable","item","index","removed"],"mappings":";;;AAcO,MAAMA,IAASC,EAAkB,MAAM;AAC5C,QAAMC,IAAOC,EAA2BC,EAAU,UAAU,CAAA,CAAE,GACxDC,IAAeF,EAA0BC,EAAU,kBAAkB,CAAA,CAAE,GACvEE,IAAaC,EAAS,MAAML,EAAK,MAAM,IAAI,CAACM,MAAQA,EAAI,SAAS,CAAC,GAQlEC,IAAmB,CAACC,MAAkB;AAC1C,IAAIA,KACFL,EAAa,MAAM,KAAKK,CAAI,GAI9BL,EAAa,QAAQ,CAAC,GAAG,IAAI,IAAIA,EAAa,MAAM,SAAS,CAAC,EAC3D,QAAA,EACA,OAAO,CAACK,MAASJ,EAAW,MAAM,SAASI,CAAI,CAAC;AAAA,EACrD,GAEMC,IAAUJ,EAAS,MAAM;AAC7B,QAAIF,EAAa,MAAM,SAAS,GAAG;AACjC,YAAMO,IAAYP,EAAa,MAAMA,EAAa,MAAM,SAAS,CAAC;AAElE,aADYH,EAAK,MAAM,KAAK,CAACW,MAAMA,EAAE,cAAcD,CAAS;AAAA,IAE9D;AAAA,EACF,CAAC,GAEKE,IAAoB,MAAM;AAC9B,QAAIZ,EAAK,MAAM,WAAW;AAExB,MAAAA,EAAK,MAAM,CAAC,EAAG,WAAW;AAAA;AAE1B,iBAAWM,KAAON,EAAK;AACrB,QAAAM,EAAI,WAAW;AAAA,EAGrB;AA4CA,SAAO;AAAA,IACL,MAAAN;AAAA,IACA,cAAAG;AAAA,IACA,YAAAC;AAAA,IACA,SAAAK;AAAA,IACA,QA/Ca,CAACI,MAAoC;AAClD,UAAI,CAACA,EAAK;AACR;AAEF,YAAMP,IAAMN,EAAK,MAAM,KAAK,CAACW,MAAMA,EAAE,cAAcE,EAAK,SAAS;AACjE,MAAKP,IAWH,OAAO,OAAOA,GAAKO,CAAI,KAVvBb,EAAK,MAAM,KAAK;AAAA,QACd,GAAGa;AAAA,QACH,UAAUb,EAAK,MAAM,SAAS;AAAA,MAAA,CAC/B,GACDY,EAAA,IAQFL,EAAiBM,EAAK,SAAS;AAAA,IACjC;AAAA,IA6BE,WA3BgB,CAACH,MAAsB;AACvC,UAAI,CAACA;AACH;AAEF,YAAMI,IAAQd,EAAK,MAAM,UAAU,CAACW,MAAMA,EAAE,cAAcD,CAAS;AACnE,UAAII,MAAU,MAGVd,EAAK,MAAM,SAAS,GAAG;AACzB,cAAMe,IAAUf,EAAK,MAAM,OAAOc,GAAO,CAAC;AAC1C,eAAAF,EAAA,GACAL,EAAA,GACOQ,EAAQ,CAAC;AAAA,MAClB;AAAA,IACF;AAAA,IAcE,OAZY,MAAM;AAClB,MAAAf,EAAK,QAAQ,CAAA,GACbG,EAAa,QAAQ,CAAA;AAAA,IACvB;AAAA,EASE;AAEJ,CAAC;"}
1
+ {"version":3,"file":"useTab.mjs","sources":["../../src/hooks/useTab.ts"],"sourcesContent":["import { skyConfig } from '@/setup'\r\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\r\nimport { computed } from 'vue'\r\nimport type { RouteParamsGeneric } from 'vue-router'\r\n\r\nexport interface TabItem {\r\n routeName: string\r\n routeParams?: RouteParamsGeneric\r\n routeKeepAliveName?: string\r\n title: string\r\n icon?: string\r\n closable: boolean\r\n}\r\n\r\nexport const useTab = createGlobalState(() => {\r\n const tabs = useLocalStorage<TabItem[]>(skyConfig.tabsName, [])\r\n const tabListStack = useLocalStorage<string[]>(skyConfig.tabListStackName, [])\r\n const allTabName = computed(() => tabs.value.map((tab) => tab.routeName))\r\n\r\n // 算法:\r\n // 1、只要经过路由的满足tab标签的历史路径 to.name 都记录: tabListStack = []\r\n // 2、tabListStack 去重\r\n // 3、获取 tabs 存在的路径,记作 allTabName = []\r\n // 4、保持 tabListStack 位置顺序,并且 tabListStack = tabListStack ∩ allTabName\r\n // 无论 tabListStack 或者 allTabName 变化,都要重新计算 2~4 步\r\n const _setTabListStack = (name?: string) => {\r\n if (name) {\r\n tabListStack.value.push(name)\r\n }\r\n // 去重、求交集\r\n // reverse 的目的就是保持栈底部数据顺序,栈靠顶重复项移除,而不是移除栈底\r\n tabListStack.value = [...new Set(tabListStack.value.reverse())]\r\n .reverse()\r\n .filter((name) => allTabName.value.includes(name))\r\n }\r\n\r\n const lastTab = computed(() => {\r\n if (tabListStack.value.length > 0) {\r\n const routeName = tabListStack.value[tabListStack.value.length - 1]\r\n const tab = tabs.value.find((t) => t.routeName === routeName)\r\n return tab\r\n }\r\n })\r\n\r\n const _resetTabClosable = () => {\r\n if (tabs.value.length === 1) {\r\n // 仅仅剩一个不能删除\r\n tabs.value[0]!.closable = false\r\n } else {\r\n for (const tab of tabs.value) {\r\n tab.closable = true\r\n }\r\n }\r\n }\r\n\r\n const addTab = (item: Omit<TabItem, 'closable'>) => {\r\n if (!item.routeName) {\r\n return\r\n }\r\n const tab = tabs.value.find((t) => t.routeName === item.routeName)\r\n if (!tab) {\r\n tabs.value.push({\r\n ...item,\r\n closable: tabs.value.length > 1,\r\n })\r\n _resetTabClosable()\r\n } else {\r\n // update previou\r\n // tab.previouPath = item.previouPath\r\n // tab.previouFullPath = item.previouFullPath\r\n // update all\r\n Object.assign(tab, item)\r\n }\r\n _setTabListStack(item.routeName)\r\n }\r\n\r\n const removeTab = (routeName: string) => {\r\n if (!routeName) {\r\n return\r\n }\r\n const index = tabs.value.findIndex((t) => t.routeName === routeName)\r\n if (index === -1) {\r\n return\r\n }\r\n if (tabs.value.length > 1) {\r\n const removed = tabs.value.splice(index, 1)\r\n _resetTabClosable()\r\n _setTabListStack()\r\n return removed[0]\r\n }\r\n }\r\n\r\n const reset = () => {\r\n tabs.value = []\r\n tabListStack.value = []\r\n }\r\n\r\n return {\r\n tabs,\r\n tabListStack,\r\n allTabName,\r\n lastTab,\r\n addTab,\r\n removeTab,\r\n reset,\r\n }\r\n})\r\n"],"names":["useTab","createGlobalState","tabs","useLocalStorage","skyConfig","tabListStack","allTabName","computed","tab","_setTabListStack","name","lastTab","routeName","t","_resetTabClosable","item","index","removed"],"mappings":";;;AAcO,MAAMA,IAASC,EAAkB,MAAM;AAC5C,QAAMC,IAAOC,EAA2BC,EAAU,UAAU,CAAA,CAAE,GACxDC,IAAeF,EAA0BC,EAAU,kBAAkB,CAAA,CAAE,GACvEE,IAAaC,EAAS,MAAML,EAAK,MAAM,IAAI,CAACM,MAAQA,EAAI,SAAS,CAAC,GAQlEC,IAAmB,CAACC,MAAkB;AAC1C,IAAIA,KACFL,EAAa,MAAM,KAAKK,CAAI,GAI9BL,EAAa,QAAQ,CAAC,GAAG,IAAI,IAAIA,EAAa,MAAM,SAAS,CAAC,EAC3D,QAAA,EACA,OAAO,CAACK,MAASJ,EAAW,MAAM,SAASI,CAAI,CAAC;AAAA,EACrD,GAEMC,IAAUJ,EAAS,MAAM;AAC7B,QAAIF,EAAa,MAAM,SAAS,GAAG;AACjC,YAAMO,IAAYP,EAAa,MAAMA,EAAa,MAAM,SAAS,CAAC;AAElE,aADYH,EAAK,MAAM,KAAK,CAACW,MAAMA,EAAE,cAAcD,CAAS;AAAA,IAE9D;AAAA,EACF,CAAC,GAEKE,IAAoB,MAAM;AAC9B,QAAIZ,EAAK,MAAM,WAAW;AAExB,MAAAA,EAAK,MAAM,CAAC,EAAG,WAAW;AAAA;AAE1B,iBAAWM,KAAON,EAAK;AACrB,QAAAM,EAAI,WAAW;AAAA,EAGrB;AA4CA,SAAO;AAAA,IACL,MAAAN;AAAA,IACA,cAAAG;AAAA,IACA,YAAAC;AAAA,IACA,SAAAK;AAAA,IACA,QA/Ca,CAACI,MAAoC;AAClD,UAAI,CAACA,EAAK;AACR;AAEF,YAAMP,IAAMN,EAAK,MAAM,KAAK,CAACW,MAAMA,EAAE,cAAcE,EAAK,SAAS;AACjE,MAAKP,IAWH,OAAO,OAAOA,GAAKO,CAAI,KAVvBb,EAAK,MAAM,KAAK;AAAA,QACd,GAAGa;AAAA,QACH,UAAUb,EAAK,MAAM,SAAS;AAAA,MAAA,CAC/B,GACDY,EAAA,IAQFL,EAAiBM,EAAK,SAAS;AAAA,IACjC;AAAA,IA6BE,WA3BgB,CAACH,MAAsB;AACvC,UAAI,CAACA;AACH;AAEF,YAAMI,IAAQd,EAAK,MAAM,UAAU,CAACW,MAAMA,EAAE,cAAcD,CAAS;AACnE,UAAII,MAAU,MAGVd,EAAK,MAAM,SAAS,GAAG;AACzB,cAAMe,IAAUf,EAAK,MAAM,OAAOc,GAAO,CAAC;AAC1C,eAAAF,EAAA,GACAL,EAAA,GACOQ,EAAQ,CAAC;AAAA,MAClB;AAAA,IACF;AAAA,IAcE,OAZY,MAAM;AAClB,MAAAf,EAAK,QAAQ,CAAA,GACbG,EAAa,QAAQ,CAAA;AAAA,IACvB;AAAA,EASE;AAEJ,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTreeWithDetails.cjs","sources":["../../src/hooks/useTreeWithDetails.ts"],"sourcesContent":["import type { CreateResult, DeleteManyResult, UpdateResult } from '@/provides'\nimport { createInjectionState } from '@vueuse/core'\n\nexport type UseProvideTreeWithDetailsParams = {\n createSuccess: (result: CreateResult) => Promise<void>\n editSuccess: (result: UpdateResult) => Promise<void>\n deleteSuccess: (result: DeleteManyResult) => Promise<void>\n}\n\nexport const [useProvideTreeWithDetails, useTreeWithDetails] = createInjectionState(\n (params: UseProvideTreeWithDetailsParams) => params,\n)\n"],"names":["useProvideTreeWithDetails","useTreeWithDetails","createInjectionState","params"],"mappings":"gHASa,CAACA,EAA2BC,CAAkB,EAAIC,EAAAA,qBAC5DC,GAA4CA,CAC/C"}
1
+ {"version":3,"file":"useTreeWithDetails.cjs","sources":["../../src/hooks/useTreeWithDetails.ts"],"sourcesContent":["import type { CreateResult, DeleteManyResult, UpdateResult } from '@/provides'\r\nimport { createInjectionState } from '@vueuse/core'\r\n\r\nexport type UseProvideTreeWithDetailsParams = {\r\n createSuccess: (result: CreateResult) => Promise<void>\r\n editSuccess: (result: UpdateResult) => Promise<void>\r\n deleteSuccess: (result: DeleteManyResult) => Promise<void>\r\n}\r\n\r\nexport const [useProvideTreeWithDetails, useTreeWithDetails] = createInjectionState(\r\n (params: UseProvideTreeWithDetailsParams) => params,\r\n)\r\n"],"names":["useProvideTreeWithDetails","useTreeWithDetails","createInjectionState","params"],"mappings":"gHASa,CAACA,EAA2BC,CAAkB,EAAIC,EAAAA,qBAC5DC,GAA4CA,CAC/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTreeWithDetails.mjs","sources":["../../src/hooks/useTreeWithDetails.ts"],"sourcesContent":["import type { CreateResult, DeleteManyResult, UpdateResult } from '@/provides'\nimport { createInjectionState } from '@vueuse/core'\n\nexport type UseProvideTreeWithDetailsParams = {\n createSuccess: (result: CreateResult) => Promise<void>\n editSuccess: (result: UpdateResult) => Promise<void>\n deleteSuccess: (result: DeleteManyResult) => Promise<void>\n}\n\nexport const [useProvideTreeWithDetails, useTreeWithDetails] = createInjectionState(\n (params: UseProvideTreeWithDetailsParams) => params,\n)\n"],"names":["useProvideTreeWithDetails","useTreeWithDetails","createInjectionState","params"],"mappings":";AASO,MAAM,CAACA,GAA2BC,CAAkB,IAAIC;AAAA,EAC7D,CAACC,MAA4CA;AAC/C;"}
1
+ {"version":3,"file":"useTreeWithDetails.mjs","sources":["../../src/hooks/useTreeWithDetails.ts"],"sourcesContent":["import type { CreateResult, DeleteManyResult, UpdateResult } from '@/provides'\r\nimport { createInjectionState } from '@vueuse/core'\r\n\r\nexport type UseProvideTreeWithDetailsParams = {\r\n createSuccess: (result: CreateResult) => Promise<void>\r\n editSuccess: (result: UpdateResult) => Promise<void>\r\n deleteSuccess: (result: DeleteManyResult) => Promise<void>\r\n}\r\n\r\nexport const [useProvideTreeWithDetails, useTreeWithDetails] = createInjectionState(\r\n (params: UseProvideTreeWithDetailsParams) => params,\r\n)\r\n"],"names":["useProvideTreeWithDetails","useTreeWithDetails","createInjectionState","params"],"mappings":";AASO,MAAM,CAACA,GAA2BC,CAAkB,IAAIC;AAAA,EAC7D,CAACC,MAA4CA;AAC/C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useUser.cjs","sources":["../../src/hooks/useUser.ts"],"sourcesContent":["import { skyConfig } from '@/setup'\r\nimport type { LoginResult } from '@/provides'\r\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\r\nimport { computed } from 'vue'\r\nimport { useTheme } from './useTheme'\r\nimport { useSize } from './useSize'\r\nimport { useLang } from './useLang'\r\nimport { useTab } from './useTab'\r\n\r\nexport const useUser = createGlobalState(() => {\r\n const token = useLocalStorage(skyConfig.tokenName, '')\r\n const username = useLocalStorage(skyConfig.usernameName, '')\r\n\r\n const isLogin = computed(() => Boolean(token.value))\r\n\r\n const login = (loginResult: LoginResult) => {\r\n if (loginResult.data) {\r\n token.value = loginResult.data.token\r\n username.value = loginResult.data.user.username\r\n }\r\n }\r\n\r\n const reset = () => {\r\n token.value = ''\r\n username.value = ''\r\n }\r\n\r\n const logout = () => {\r\n useTheme().reset()\r\n useSize().reset()\r\n useLang().reset()\r\n useTab().reset()\r\n reset()\r\n }\r\n\r\n return {\r\n token,\r\n username,\r\n login,\r\n isLogin,\r\n logout,\r\n reset,\r\n }\r\n})\r\n"],"names":["useUser","createGlobalState","token","useLocalStorage","skyConfig","username","isLogin","computed","login","loginResult","reset","useTheme","useSize","useLang","useTab"],"mappings":"6QASaA,EAAUC,EAAAA,kBAAkB,IAAM,CAC7C,MAAMC,EAAQC,EAAAA,gBAAgBC,YAAU,UAAW,EAAE,EAC/CC,EAAWF,EAAAA,gBAAgBC,YAAU,aAAc,EAAE,EAErDE,EAAUC,EAAAA,SAAS,IAAM,EAAQL,EAAM,KAAM,EAE7CM,EAASC,GAA6B,CACtCA,EAAY,OACdP,EAAM,MAAQO,EAAY,KAAK,MAC/BJ,EAAS,MAAQI,EAAY,KAAK,KAAK,SAE3C,EAEMC,EAAQ,IAAM,CAClBR,EAAM,MAAQ,GACdG,EAAS,MAAQ,EACnB,EAUA,MAAO,CACL,MAAAH,EACA,SAAAG,EACA,MAAAG,EACA,QAAAF,EACA,OAba,IAAM,CACnBK,EAAAA,SAAA,EAAW,MAAA,EACXC,EAAAA,QAAA,EAAU,MAAA,EACVC,EAAAA,QAAA,EAAU,MAAA,EACVC,EAAAA,OAAA,EAAS,MAAA,EACTJ,EAAA,CACF,EAQE,MAAAA,CAAA,CAEJ,CAAC"}
1
+ {"version":3,"file":"useUser.cjs","sources":["../../src/hooks/useUser.ts"],"sourcesContent":["import { skyConfig } from '@/setup'\nimport type { LoginResult } from '@/provides'\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\nimport { computed } from 'vue'\nimport { useTheme } from './useTheme'\nimport { useSize } from './useSize'\nimport { useLang } from './useLang'\nimport { useTab } from './useTab'\n\nexport const useUser = createGlobalState(() => {\n const token = useLocalStorage(skyConfig.tokenName, '')\n const username = useLocalStorage(skyConfig.usernameName, '')\n\n const isLogin = computed(() => Boolean(token.value))\n\n const login = (loginResult: LoginResult) => {\n if (loginResult.data) {\n token.value = loginResult.data.token\n username.value = loginResult.data.user.username\n }\n }\n\n const reset = () => {\n token.value = ''\n username.value = ''\n }\n\n const logout = () => {\n useTheme().reset()\n useSize().reset()\n useLang().reset()\n useTab().reset()\n reset()\n }\n\n return {\n token,\n username,\n login,\n isLogin,\n logout,\n reset,\n }\n})\n"],"names":["useUser","createGlobalState","token","useLocalStorage","skyConfig","username","isLogin","computed","login","loginResult","reset","useTheme","useSize","useLang","useTab"],"mappings":"6QASaA,EAAUC,EAAAA,kBAAkB,IAAM,CAC7C,MAAMC,EAAQC,EAAAA,gBAAgBC,YAAU,UAAW,EAAE,EAC/CC,EAAWF,EAAAA,gBAAgBC,YAAU,aAAc,EAAE,EAErDE,EAAUC,EAAAA,SAAS,IAAM,EAAQL,EAAM,KAAM,EAE7CM,EAASC,GAA6B,CACtCA,EAAY,OACdP,EAAM,MAAQO,EAAY,KAAK,MAC/BJ,EAAS,MAAQI,EAAY,KAAK,KAAK,SAE3C,EAEMC,EAAQ,IAAM,CAClBR,EAAM,MAAQ,GACdG,EAAS,MAAQ,EACnB,EAUA,MAAO,CACL,MAAAH,EACA,SAAAG,EACA,MAAAG,EACA,QAAAF,EACA,OAba,IAAM,CACnBK,EAAAA,SAAA,EAAW,MAAA,EACXC,EAAAA,QAAA,EAAU,MAAA,EACVC,EAAAA,QAAA,EAAU,MAAA,EACVC,EAAAA,OAAA,EAAS,MAAA,EACTJ,EAAA,CACF,EAQE,MAAAA,CAAA,CAEJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useUser.mjs","sources":["../../src/hooks/useUser.ts"],"sourcesContent":["import { skyConfig } from '@/setup'\r\nimport type { LoginResult } from '@/provides'\r\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\r\nimport { computed } from 'vue'\r\nimport { useTheme } from './useTheme'\r\nimport { useSize } from './useSize'\r\nimport { useLang } from './useLang'\r\nimport { useTab } from './useTab'\r\n\r\nexport const useUser = createGlobalState(() => {\r\n const token = useLocalStorage(skyConfig.tokenName, '')\r\n const username = useLocalStorage(skyConfig.usernameName, '')\r\n\r\n const isLogin = computed(() => Boolean(token.value))\r\n\r\n const login = (loginResult: LoginResult) => {\r\n if (loginResult.data) {\r\n token.value = loginResult.data.token\r\n username.value = loginResult.data.user.username\r\n }\r\n }\r\n\r\n const reset = () => {\r\n token.value = ''\r\n username.value = ''\r\n }\r\n\r\n const logout = () => {\r\n useTheme().reset()\r\n useSize().reset()\r\n useLang().reset()\r\n useTab().reset()\r\n reset()\r\n }\r\n\r\n return {\r\n token,\r\n username,\r\n login,\r\n isLogin,\r\n logout,\r\n reset,\r\n }\r\n})\r\n"],"names":["useUser","createGlobalState","token","useLocalStorage","skyConfig","username","isLogin","computed","login","loginResult","reset","useTheme","useSize","useLang","useTab"],"mappings":";;;;;;;AASO,MAAMA,IAAUC,EAAkB,MAAM;AAC7C,QAAMC,IAAQC,EAAgBC,EAAU,WAAW,EAAE,GAC/CC,IAAWF,EAAgBC,EAAU,cAAc,EAAE,GAErDE,IAAUC,EAAS,MAAM,EAAQL,EAAM,KAAM,GAE7CM,IAAQ,CAACC,MAA6B;AAC1C,IAAIA,EAAY,SACdP,EAAM,QAAQO,EAAY,KAAK,OAC/BJ,EAAS,QAAQI,EAAY,KAAK,KAAK;AAAA,EAE3C,GAEMC,IAAQ,MAAM;AAClB,IAAAR,EAAM,QAAQ,IACdG,EAAS,QAAQ;AAAA,EACnB;AAUA,SAAO;AAAA,IACL,OAAAH;AAAA,IACA,UAAAG;AAAA,IACA,OAAAG;AAAA,IACA,SAAAF;AAAA,IACA,QAba,MAAM;AACnB,MAAAK,EAAA,EAAW,MAAA,GACXC,EAAA,EAAU,MAAA,GACVC,EAAA,EAAU,MAAA,GACVC,EAAA,EAAS,MAAA,GACTJ,EAAA;AAAA,IACF;AAAA,IAQE,OAAAA;AAAA,EAAA;AAEJ,CAAC;"}
1
+ {"version":3,"file":"useUser.mjs","sources":["../../src/hooks/useUser.ts"],"sourcesContent":["import { skyConfig } from '@/setup'\nimport type { LoginResult } from '@/provides'\nimport { createGlobalState, useLocalStorage } from '@vueuse/core'\nimport { computed } from 'vue'\nimport { useTheme } from './useTheme'\nimport { useSize } from './useSize'\nimport { useLang } from './useLang'\nimport { useTab } from './useTab'\n\nexport const useUser = createGlobalState(() => {\n const token = useLocalStorage(skyConfig.tokenName, '')\n const username = useLocalStorage(skyConfig.usernameName, '')\n\n const isLogin = computed(() => Boolean(token.value))\n\n const login = (loginResult: LoginResult) => {\n if (loginResult.data) {\n token.value = loginResult.data.token\n username.value = loginResult.data.user.username\n }\n }\n\n const reset = () => {\n token.value = ''\n username.value = ''\n }\n\n const logout = () => {\n useTheme().reset()\n useSize().reset()\n useLang().reset()\n useTab().reset()\n reset()\n }\n\n return {\n token,\n username,\n login,\n isLogin,\n logout,\n reset,\n }\n})\n"],"names":["useUser","createGlobalState","token","useLocalStorage","skyConfig","username","isLogin","computed","login","loginResult","reset","useTheme","useSize","useLang","useTab"],"mappings":";;;;;;;AASO,MAAMA,IAAUC,EAAkB,MAAM;AAC7C,QAAMC,IAAQC,EAAgBC,EAAU,WAAW,EAAE,GAC/CC,IAAWF,EAAgBC,EAAU,cAAc,EAAE,GAErDE,IAAUC,EAAS,MAAM,EAAQL,EAAM,KAAM,GAE7CM,IAAQ,CAACC,MAA6B;AAC1C,IAAIA,EAAY,SACdP,EAAM,QAAQO,EAAY,KAAK,OAC/BJ,EAAS,QAAQI,EAAY,KAAK,KAAK;AAAA,EAE3C,GAEMC,IAAQ,MAAM;AAClB,IAAAR,EAAM,QAAQ,IACdG,EAAS,QAAQ;AAAA,EACnB;AAUA,SAAO;AAAA,IACL,OAAAH;AAAA,IACA,UAAAG;AAAA,IACA,OAAAG;AAAA,IACA,SAAAF;AAAA,IACA,QAba,MAAM;AACnB,MAAAK,EAAA,EAAW,MAAA,GACXC,EAAA,EAAU,MAAA,GACVC,EAAA,EAAU,MAAA,GACVC,EAAA,EAAS,MAAA,GACTJ,EAAA;AAAA,IACF;AAAA,IAQE,OAAAA;AAAA,EAAA;AAEJ,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"en.cjs","sources":["../../../src/i18n/locales/en.ts"],"sourcesContent":["export default {\n resource: {\n defaultListName: 'List',\n defaultCreateName: 'Create',\n defaultEditName: 'Edit',\n defaultShowName: 'Show',\n },\n theme: {\n light: 'Light',\n dark: 'Dark',\n auto: 'Auto',\n },\n size: {\n default: 'Default',\n large: 'Large',\n small: 'Small',\n },\n lang: {\n zhCn: '简体中文',\n en: 'English',\n },\n user: {\n edit: 'Edit',\n logout: 'Logout',\n },\n button: {\n show: 'Show',\n edit: 'Edit',\n add: 'Add',\n remove: 'Remove',\n submit: 'Save',\n query: 'Query',\n export: 'Export',\n },\n submit: {\n success: 'Save Successfully',\n },\n selectedItems: 'items selected',\n popconfirm: {\n remove: 'Are you sure to delete this?',\n },\n treeRootNode: 'Root',\n notPermission: 'Not Permission',\n notFound: 'Not Found',\n upload: {\n drop: 'Drop file here or',\n click: 'click to upload',\n },\n}\n"],"names":["en"],"mappings":"4GAAA,MAAAA,EAAe,CACb,SAAU,CACR,gBAAiB,OACjB,kBAAmB,SACnB,gBAAiB,OACjB,gBAAiB,MAAA,EAEnB,MAAO,CACL,MAAO,QACP,KAAM,OACN,KAAM,MAAA,EAER,KAAM,CACJ,QAAS,UACT,MAAO,QACP,MAAO,OAAA,EAET,KAAM,CACJ,KAAM,OACN,GAAI,SAAA,EAEN,KAAM,CACJ,KAAM,OACN,OAAQ,QAAA,EAEV,OAAQ,CACN,KAAM,OACN,KAAM,OACN,IAAK,MACL,OAAQ,SACR,OAAQ,OACR,MAAO,QACP,OAAQ,QAAA,EAEV,OAAQ,CACN,QAAS,mBAAA,EAEX,cAAe,iBACf,WAAY,CACV,OAAQ,8BAAA,EAEV,aAAc,OACd,cAAe,iBACf,SAAU,YACV,OAAQ,CACN,KAAM,oBACN,MAAO,iBAAA,CAEX"}
1
+ {"version":3,"file":"en.cjs","sources":["../../../src/i18n/locales/en.ts"],"sourcesContent":["export default {\r\n resource: {\r\n defaultListName: 'List',\r\n defaultCreateName: 'Create',\r\n defaultEditName: 'Edit',\r\n defaultShowName: 'Show',\r\n },\r\n theme: {\r\n light: 'Light',\r\n dark: 'Dark',\r\n auto: 'Auto',\r\n },\r\n size: {\r\n default: 'Default',\r\n large: 'Large',\r\n small: 'Small',\r\n },\r\n lang: {\r\n zhCn: '简体中文',\r\n en: 'English',\r\n },\r\n user: {\r\n edit: 'Edit',\r\n logout: 'Logout',\r\n },\r\n button: {\r\n show: 'Show',\r\n edit: 'Edit',\r\n add: 'Add',\r\n remove: 'Remove',\r\n submit: 'Save',\r\n query: 'Query',\r\n export: 'Export',\r\n },\r\n submit: {\r\n success: 'Save Successfully',\r\n },\r\n selectedItems: 'items selected',\r\n popconfirm: {\r\n remove: 'Are you sure to delete this?',\r\n },\r\n treeRootNode: 'Root',\r\n notPermission: 'Not Permission',\r\n notFound: 'Not Found',\r\n upload: {\r\n drop: 'Drop file here or',\r\n click: 'click to upload',\r\n },\r\n}\r\n"],"names":["en"],"mappings":"4GAAA,MAAAA,EAAe,CACb,SAAU,CACR,gBAAiB,OACjB,kBAAmB,SACnB,gBAAiB,OACjB,gBAAiB,MAAA,EAEnB,MAAO,CACL,MAAO,QACP,KAAM,OACN,KAAM,MAAA,EAER,KAAM,CACJ,QAAS,UACT,MAAO,QACP,MAAO,OAAA,EAET,KAAM,CACJ,KAAM,OACN,GAAI,SAAA,EAEN,KAAM,CACJ,KAAM,OACN,OAAQ,QAAA,EAEV,OAAQ,CACN,KAAM,OACN,KAAM,OACN,IAAK,MACL,OAAQ,SACR,OAAQ,OACR,MAAO,QACP,OAAQ,QAAA,EAEV,OAAQ,CACN,QAAS,mBAAA,EAEX,cAAe,iBACf,WAAY,CACV,OAAQ,8BAAA,EAEV,aAAc,OACd,cAAe,iBACf,SAAU,YACV,OAAQ,CACN,KAAM,oBACN,MAAO,iBAAA,CAEX"}
@@ -1 +1 @@
1
- {"version":3,"file":"en.mjs","sources":["../../../src/i18n/locales/en.ts"],"sourcesContent":["export default {\n resource: {\n defaultListName: 'List',\n defaultCreateName: 'Create',\n defaultEditName: 'Edit',\n defaultShowName: 'Show',\n },\n theme: {\n light: 'Light',\n dark: 'Dark',\n auto: 'Auto',\n },\n size: {\n default: 'Default',\n large: 'Large',\n small: 'Small',\n },\n lang: {\n zhCn: '简体中文',\n en: 'English',\n },\n user: {\n edit: 'Edit',\n logout: 'Logout',\n },\n button: {\n show: 'Show',\n edit: 'Edit',\n add: 'Add',\n remove: 'Remove',\n submit: 'Save',\n query: 'Query',\n export: 'Export',\n },\n submit: {\n success: 'Save Successfully',\n },\n selectedItems: 'items selected',\n popconfirm: {\n remove: 'Are you sure to delete this?',\n },\n treeRootNode: 'Root',\n notPermission: 'Not Permission',\n notFound: 'Not Found',\n upload: {\n drop: 'Drop file here or',\n click: 'click to upload',\n },\n}\n"],"names":["en"],"mappings":"AAAA,MAAAA,IAAe;AAAA,EACb,UAAU;AAAA,IACR,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,EAAA;AAAA,EAEnB,OAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,EAAA;AAAA,EAER,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,IAAI;AAAA,EAAA;AAAA,EAEN,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,SAAS;AAAA,EAAA;AAAA,EAEX,eAAe;AAAA,EACf,YAAY;AAAA,IACV,QAAQ;AAAA,EAAA;AAAA,EAEV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,UAAU;AAAA,EACV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAEX;"}
1
+ {"version":3,"file":"en.mjs","sources":["../../../src/i18n/locales/en.ts"],"sourcesContent":["export default {\r\n resource: {\r\n defaultListName: 'List',\r\n defaultCreateName: 'Create',\r\n defaultEditName: 'Edit',\r\n defaultShowName: 'Show',\r\n },\r\n theme: {\r\n light: 'Light',\r\n dark: 'Dark',\r\n auto: 'Auto',\r\n },\r\n size: {\r\n default: 'Default',\r\n large: 'Large',\r\n small: 'Small',\r\n },\r\n lang: {\r\n zhCn: '简体中文',\r\n en: 'English',\r\n },\r\n user: {\r\n edit: 'Edit',\r\n logout: 'Logout',\r\n },\r\n button: {\r\n show: 'Show',\r\n edit: 'Edit',\r\n add: 'Add',\r\n remove: 'Remove',\r\n submit: 'Save',\r\n query: 'Query',\r\n export: 'Export',\r\n },\r\n submit: {\r\n success: 'Save Successfully',\r\n },\r\n selectedItems: 'items selected',\r\n popconfirm: {\r\n remove: 'Are you sure to delete this?',\r\n },\r\n treeRootNode: 'Root',\r\n notPermission: 'Not Permission',\r\n notFound: 'Not Found',\r\n upload: {\r\n drop: 'Drop file here or',\r\n click: 'click to upload',\r\n },\r\n}\r\n"],"names":["en"],"mappings":"AAAA,MAAAA,IAAe;AAAA,EACb,UAAU;AAAA,IACR,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,EAAA;AAAA,EAEnB,OAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,EAAA;AAAA,EAER,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,IAAI;AAAA,EAAA;AAAA,EAEN,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,SAAS;AAAA,EAAA;AAAA,EAEX,eAAe;AAAA,EACf,YAAY;AAAA,IACV,QAAQ;AAAA,EAAA;AAAA,EAEV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,UAAU;AAAA,EACV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAEX;"}
@@ -1 +1 @@
1
- {"version":3,"file":"zh-cn.cjs","sources":["../../../src/i18n/locales/zh-cn.ts"],"sourcesContent":["export default {\n resource: {\n defaultListName: '列表',\n defaultCreateName: '创建',\n defaultEditName: '编辑',\n defaultShowName: '查看',\n },\n theme: {\n light: '亮色模式',\n dark: '暗色模式',\n auto: '跟随系统',\n },\n size: {\n default: '默认',\n large: '较大',\n small: '较小',\n },\n lang: {\n zhCn: '简体中文',\n en: 'English',\n },\n user: {\n edit: '修改信息',\n logout: '退出登录',\n },\n button: {\n show: '查看',\n edit: '编辑',\n add: '新增',\n remove: '删除',\n submit: '保存',\n query: '查询',\n export: '导出',\n },\n submit: {\n success: '保存成功',\n },\n selectedItems: '项被选中',\n popconfirm: {\n remove: '确定要删除吗?',\n },\n treeRootNode: '顶层节点',\n notPermission: '无权限',\n notFound: '找不到对应页面',\n upload: {\n drop: '文件拖拽此处或者',\n click: '点击上传',\n },\n}\n"],"names":["zhCn"],"mappings":"4GAAA,MAAAA,EAAe,CACb,SAAU,CACR,gBAAiB,KACjB,kBAAmB,KACnB,gBAAiB,KACjB,gBAAiB,IAAA,EAEnB,MAAO,CACL,MAAO,OACP,KAAM,OACN,KAAM,MAAA,EAER,KAAM,CACJ,QAAS,KACT,MAAO,KACP,MAAO,IAAA,EAET,KAAM,CACJ,KAAM,OACN,GAAI,SAAA,EAEN,KAAM,CACJ,KAAM,OACN,OAAQ,MAAA,EAEV,OAAQ,CACN,KAAM,KACN,KAAM,KACN,IAAK,KACL,OAAQ,KACR,OAAQ,KACR,MAAO,KACP,OAAQ,IAAA,EAEV,OAAQ,CACN,QAAS,MAAA,EAEX,cAAe,OACf,WAAY,CACV,OAAQ,SAAA,EAEV,aAAc,OACd,cAAe,MACf,SAAU,UACV,OAAQ,CACN,KAAM,WACN,MAAO,MAAA,CAEX"}
1
+ {"version":3,"file":"zh-cn.cjs","sources":["../../../src/i18n/locales/zh-cn.ts"],"sourcesContent":["export default {\r\n resource: {\r\n defaultListName: '列表',\r\n defaultCreateName: '创建',\r\n defaultEditName: '编辑',\r\n defaultShowName: '查看',\r\n },\r\n theme: {\r\n light: '亮色模式',\r\n dark: '暗色模式',\r\n auto: '跟随系统',\r\n },\r\n size: {\r\n default: '默认',\r\n large: '较大',\r\n small: '较小',\r\n },\r\n lang: {\r\n zhCn: '简体中文',\r\n en: 'English',\r\n },\r\n user: {\r\n edit: '修改信息',\r\n logout: '退出登录',\r\n },\r\n button: {\r\n show: '查看',\r\n edit: '编辑',\r\n add: '新增',\r\n remove: '删除',\r\n submit: '保存',\r\n query: '查询',\r\n export: '导出',\r\n },\r\n submit: {\r\n success: '保存成功',\r\n },\r\n selectedItems: '项被选中',\r\n popconfirm: {\r\n remove: '确定要删除吗?',\r\n },\r\n treeRootNode: '顶层节点',\r\n notPermission: '无权限',\r\n notFound: '找不到对应页面',\r\n upload: {\r\n drop: '文件拖拽此处或者',\r\n click: '点击上传',\r\n },\r\n}\r\n"],"names":["zhCn"],"mappings":"4GAAA,MAAAA,EAAe,CACb,SAAU,CACR,gBAAiB,KACjB,kBAAmB,KACnB,gBAAiB,KACjB,gBAAiB,IAAA,EAEnB,MAAO,CACL,MAAO,OACP,KAAM,OACN,KAAM,MAAA,EAER,KAAM,CACJ,QAAS,KACT,MAAO,KACP,MAAO,IAAA,EAET,KAAM,CACJ,KAAM,OACN,GAAI,SAAA,EAEN,KAAM,CACJ,KAAM,OACN,OAAQ,MAAA,EAEV,OAAQ,CACN,KAAM,KACN,KAAM,KACN,IAAK,KACL,OAAQ,KACR,OAAQ,KACR,MAAO,KACP,OAAQ,IAAA,EAEV,OAAQ,CACN,QAAS,MAAA,EAEX,cAAe,OACf,WAAY,CACV,OAAQ,SAAA,EAEV,aAAc,OACd,cAAe,MACf,SAAU,UACV,OAAQ,CACN,KAAM,WACN,MAAO,MAAA,CAEX"}
@@ -1 +1 @@
1
- {"version":3,"file":"zh-cn.mjs","sources":["../../../src/i18n/locales/zh-cn.ts"],"sourcesContent":["export default {\n resource: {\n defaultListName: '列表',\n defaultCreateName: '创建',\n defaultEditName: '编辑',\n defaultShowName: '查看',\n },\n theme: {\n light: '亮色模式',\n dark: '暗色模式',\n auto: '跟随系统',\n },\n size: {\n default: '默认',\n large: '较大',\n small: '较小',\n },\n lang: {\n zhCn: '简体中文',\n en: 'English',\n },\n user: {\n edit: '修改信息',\n logout: '退出登录',\n },\n button: {\n show: '查看',\n edit: '编辑',\n add: '新增',\n remove: '删除',\n submit: '保存',\n query: '查询',\n export: '导出',\n },\n submit: {\n success: '保存成功',\n },\n selectedItems: '项被选中',\n popconfirm: {\n remove: '确定要删除吗?',\n },\n treeRootNode: '顶层节点',\n notPermission: '无权限',\n notFound: '找不到对应页面',\n upload: {\n drop: '文件拖拽此处或者',\n click: '点击上传',\n },\n}\n"],"names":["zhCn"],"mappings":"AAAA,MAAAA,IAAe;AAAA,EACb,UAAU;AAAA,IACR,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,EAAA;AAAA,EAEnB,OAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,EAAA;AAAA,EAER,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,IAAI;AAAA,EAAA;AAAA,EAEN,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,SAAS;AAAA,EAAA;AAAA,EAEX,eAAe;AAAA,EACf,YAAY;AAAA,IACV,QAAQ;AAAA,EAAA;AAAA,EAEV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,UAAU;AAAA,EACV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAEX;"}
1
+ {"version":3,"file":"zh-cn.mjs","sources":["../../../src/i18n/locales/zh-cn.ts"],"sourcesContent":["export default {\r\n resource: {\r\n defaultListName: '列表',\r\n defaultCreateName: '创建',\r\n defaultEditName: '编辑',\r\n defaultShowName: '查看',\r\n },\r\n theme: {\r\n light: '亮色模式',\r\n dark: '暗色模式',\r\n auto: '跟随系统',\r\n },\r\n size: {\r\n default: '默认',\r\n large: '较大',\r\n small: '较小',\r\n },\r\n lang: {\r\n zhCn: '简体中文',\r\n en: 'English',\r\n },\r\n user: {\r\n edit: '修改信息',\r\n logout: '退出登录',\r\n },\r\n button: {\r\n show: '查看',\r\n edit: '编辑',\r\n add: '新增',\r\n remove: '删除',\r\n submit: '保存',\r\n query: '查询',\r\n export: '导出',\r\n },\r\n submit: {\r\n success: '保存成功',\r\n },\r\n selectedItems: '项被选中',\r\n popconfirm: {\r\n remove: '确定要删除吗?',\r\n },\r\n treeRootNode: '顶层节点',\r\n notPermission: '无权限',\r\n notFound: '找不到对应页面',\r\n upload: {\r\n drop: '文件拖拽此处或者',\r\n click: '点击上传',\r\n },\r\n}\r\n"],"names":["zhCn"],"mappings":"AAAA,MAAAA,IAAe;AAAA,EACb,UAAU;AAAA,IACR,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,EAAA;AAAA,EAEnB,OAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,EAAA;AAAA,EAER,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,IAAI;AAAA,EAAA;AAAA,EAEN,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,SAAS;AAAA,EAAA;AAAA,EAEX,eAAe;AAAA,EACf,YAAY;AAAA,IACV,QAAQ;AAAA,EAAA;AAAA,EAEV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,UAAU;AAAA,EACV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAEX;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EpDelete.cjs","sources":["../../src/icons/EpDelete.tsx"],"sourcesContent":["import { defineComponent } from 'vue'\n\nexport const EpDelete = defineComponent({\n name: 'EpDelete',\n setup() {\n return () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\n <path\n fill=\"currentColor\"\n d=\"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32\"\n />\n </svg>\n )\n },\n})\n"],"names":["EpDelete","defineComponent","name","setup","_createVNode"],"mappings":"uGAEaA,EAAWC,EAAAA,gBAAgB,CACtCC,KAAM,WACNC,OAAQ,CACN,MAAO,IAAAC,EAAAA,YAAA,MAAA,CAAA,MAAA,6BAAA,QAAA,eAAA,EAAA,CAAAA,EAAAA,YAAA,OAAA,CAAA,KAAA,eAAA,EAAA,6UAAA,IAAA,CAAA,CAAA,CAQT,CACF,CAAC"}
1
+ {"version":3,"file":"EpDelete.cjs","sources":["../../src/icons/EpDelete.tsx"],"sourcesContent":["import { defineComponent } from 'vue'\r\n\r\nexport const EpDelete = defineComponent({\r\n name: 'EpDelete',\r\n setup() {\r\n return () => (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\r\n <path\r\n fill=\"currentColor\"\r\n d=\"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32\"\r\n />\r\n </svg>\r\n )\r\n },\r\n})\r\n"],"names":["EpDelete","defineComponent","name","setup","_createVNode"],"mappings":"uGAEaA,EAAWC,EAAAA,gBAAgB,CACtCC,KAAM,WACNC,OAAQ,CACN,MAAO,IAAAC,EAAAA,YAAA,MAAA,CAAA,MAAA,6BAAA,QAAA,eAAA,EAAA,CAAAA,EAAAA,YAAA,OAAA,CAAA,KAAA,eAAA,EAAA,6UAAA,IAAA,CAAA,CAAA,CAQT,CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"EpDelete.mjs","sources":["../../src/icons/EpDelete.tsx"],"sourcesContent":["import { defineComponent } from 'vue'\n\nexport const EpDelete = defineComponent({\n name: 'EpDelete',\n setup() {\n return () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\n <path\n fill=\"currentColor\"\n d=\"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32\"\n />\n </svg>\n )\n },\n})\n"],"names":["EpDelete","defineComponent","name","setup","_createVNode"],"mappings":";AAEO,MAAMA,IAAWC,gBAAAA,EAAgB;AAAA,EACtCC,MAAM;AAAA,EACNC,QAAQ;AACN,WAAO,MAAAC,EAAA,OAAA;AAAA,MAAA,OAAA;AAAA,MAAA,SAAA;AAAA,IAAA,GAAA,CAAAA,EAAA,QAAA;AAAA,MAAA,MAAA;AAAA,MAAA,GAAA;AAAA,OAAA,IAAA,CAAA,CAAA;AAAA,EAQT;AACF,CAAC;"}
1
+ {"version":3,"file":"EpDelete.mjs","sources":["../../src/icons/EpDelete.tsx"],"sourcesContent":["import { defineComponent } from 'vue'\r\n\r\nexport const EpDelete = defineComponent({\r\n name: 'EpDelete',\r\n setup() {\r\n return () => (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\r\n <path\r\n fill=\"currentColor\"\r\n d=\"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32\"\r\n />\r\n </svg>\r\n )\r\n },\r\n})\r\n"],"names":["EpDelete","defineComponent","name","setup","_createVNode"],"mappings":";AAEO,MAAMA,IAAWC,gBAAAA,EAAgB;AAAA,EACtCC,MAAM;AAAA,EACNC,QAAQ;AACN,WAAO,MAAAC,EAAA,OAAA;AAAA,MAAA,OAAA;AAAA,MAAA,SAAA;AAAA,IAAA,GAAA,CAAAA,EAAA,QAAA;AAAA,MAAA,MAAA;AAAA,MAAA,GAAA;AAAA,OAAA,IAAA,CAAA,CAAA;AAAA,EAQT;AACF,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EpDocumentAdd.cjs","sources":["../../src/icons/EpDocumentAdd.tsx"],"sourcesContent":["import { defineComponent } from 'vue'\n\nexport const EpDocumentAdd = defineComponent({\n name: 'EpDocumentAdd',\n setup() {\n return () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\n <path\n fill=\"currentColor\"\n d=\"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m320 512V448h64v128h128v64H544v128h-64V640H352v-64z\"\n />\n </svg>\n )\n },\n})\n"],"names":["EpDocumentAdd","defineComponent","name","setup","_createVNode"],"mappings":"uGAEaA,EAAgBC,EAAAA,gBAAgB,CAC3CC,KAAM,gBACNC,OAAQ,CACN,MAAO,IAAAC,EAAAA,YAAA,MAAA,CAAA,MAAA,6BAAA,QAAA,eAAA,EAAA,CAAAA,EAAAA,YAAA,OAAA,CAAA,KAAA,eAAA,EAAA,oMAAA,IAAA,CAAA,CAAA,CAQT,CACF,CAAC"}
1
+ {"version":3,"file":"EpDocumentAdd.cjs","sources":["../../src/icons/EpDocumentAdd.tsx"],"sourcesContent":["import { defineComponent } from 'vue'\r\n\r\nexport const EpDocumentAdd = defineComponent({\r\n name: 'EpDocumentAdd',\r\n setup() {\r\n return () => (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\r\n <path\r\n fill=\"currentColor\"\r\n d=\"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m320 512V448h64v128h128v64H544v128h-64V640H352v-64z\"\r\n />\r\n </svg>\r\n )\r\n },\r\n})\r\n"],"names":["EpDocumentAdd","defineComponent","name","setup","_createVNode"],"mappings":"uGAEaA,EAAgBC,EAAAA,gBAAgB,CAC3CC,KAAM,gBACNC,OAAQ,CACN,MAAO,IAAAC,EAAAA,YAAA,MAAA,CAAA,MAAA,6BAAA,QAAA,eAAA,EAAA,CAAAA,EAAAA,YAAA,OAAA,CAAA,KAAA,eAAA,EAAA,oMAAA,IAAA,CAAA,CAAA,CAQT,CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"EpDocumentAdd.mjs","sources":["../../src/icons/EpDocumentAdd.tsx"],"sourcesContent":["import { defineComponent } from 'vue'\n\nexport const EpDocumentAdd = defineComponent({\n name: 'EpDocumentAdd',\n setup() {\n return () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\n <path\n fill=\"currentColor\"\n d=\"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m320 512V448h64v128h128v64H544v128h-64V640H352v-64z\"\n />\n </svg>\n )\n },\n})\n"],"names":["EpDocumentAdd","defineComponent","name","setup","_createVNode"],"mappings":";AAEO,MAAMA,IAAgBC,gBAAAA,EAAgB;AAAA,EAC3CC,MAAM;AAAA,EACNC,QAAQ;AACN,WAAO,MAAAC,EAAA,OAAA;AAAA,MAAA,OAAA;AAAA,MAAA,SAAA;AAAA,IAAA,GAAA,CAAAA,EAAA,QAAA;AAAA,MAAA,MAAA;AAAA,MAAA,GAAA;AAAA,OAAA,IAAA,CAAA,CAAA;AAAA,EAQT;AACF,CAAC;"}
1
+ {"version":3,"file":"EpDocumentAdd.mjs","sources":["../../src/icons/EpDocumentAdd.tsx"],"sourcesContent":["import { defineComponent } from 'vue'\r\n\r\nexport const EpDocumentAdd = defineComponent({\r\n name: 'EpDocumentAdd',\r\n setup() {\r\n return () => (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\r\n <path\r\n fill=\"currentColor\"\r\n d=\"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m320 512V448h64v128h128v64H544v128h-64V640H352v-64z\"\r\n />\r\n </svg>\r\n )\r\n },\r\n})\r\n"],"names":["EpDocumentAdd","defineComponent","name","setup","_createVNode"],"mappings":";AAEO,MAAMA,IAAgBC,gBAAAA,EAAgB;AAAA,EAC3CC,MAAM;AAAA,EACNC,QAAQ;AACN,WAAO,MAAAC,EAAA,OAAA;AAAA,MAAA,OAAA;AAAA,MAAA,SAAA;AAAA,IAAA,GAAA,CAAAA,EAAA,QAAA;AAAA,MAAA,MAAA;AAAA,MAAA,GAAA;AAAA,OAAA,IAAA,CAAA,CAAA;AAAA,EAQT;AACF,CAAC;"}