@xizs/nuxt-antui 0.0.51 → 0.0.53

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.
@@ -120,7 +120,7 @@ const FormItems:Record<string, (form: any, item: TableFormLabelsItemType) => any
120
120
 
121
121
  export const FormTableProps = {
122
122
  title:{
123
- type:String,
123
+ type:[String,Function]
124
124
  },
125
125
  form: {
126
126
  type: Object as () => TableParamsType['form'],
@@ -265,8 +265,13 @@ export default defineComponent({
265
265
  }}>{$t('重置')}</AButton>}
266
266
  {props.form?.option?.export === true && <AButton type="primary" loading={exportLoading.value} onClick={()=>{
267
267
  exportLoading.value=true
268
- exportExcel(props.title??'导出', props.table.columns,async (page,pageSize)=>{
269
- let res = await props.data?.({ ...form.value, ...{page,pageSize} })
268
+
269
+ let title = props.title
270
+ if(typeof title =="function"){
271
+ title = title()
272
+ }
273
+ exportExcel(title??'导出', props.table.columns,async (page,pageSize)=>{
274
+ let res = await props.data?.({ ...form.value, ...{page,pageSize} },{isExport:true})
270
275
  return res.list??res
271
276
  }).finally(()=>{
272
277
  exportLoading.value=false
@@ -36,23 +36,14 @@ export const useRouteInfo = (menuItems: any[]) =>
36
36
  () => route.fullPath,
37
37
  () => {
38
38
  let path = route.path
39
+ console.log(path)
39
40
  if (path.endsWith('/')) {
40
41
  path = path.slice(0, -1)
41
42
  }
42
43
  const match = findPath(menuItems, path)
43
- if (match) {
44
- info.value = {
45
- name: match.titles.at(-1) || '',
46
- names: match.titles,
47
- paths: match.paths,
48
- }
49
- } else {
50
- info.value = {
51
- name: '',
52
- names: [],
53
- paths: [],
54
- }
55
- }
44
+ info.value.name= match?.titles?.at(-1) ?? ''
45
+ info.value.names= match?.titles??[]
46
+ info.value.paths= match?.paths??[]
56
47
  },
57
48
  { immediate: true }
58
49
  )
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xizs/nuxt-antui",
3
3
  "type": "module",
4
- "version": "0.0.51",
4
+ "version": "0.0.53",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",