@xizs/nuxt-antui 0.0.46 → 0.0.47

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.
@@ -194,6 +194,8 @@ export default defineComponent({
194
194
  total:10
195
195
  })
196
196
 
197
+ let exportLoading = ref(false)
198
+
197
199
 
198
200
  let _isInitLoad = props.isInitLoad
199
201
  const tableData = asyncReactive<any[]>(async () => {
@@ -253,17 +255,14 @@ export default defineComponent({
253
255
  <div class="flex gap-2">
254
256
  {props.form?.option?.search !== false && <AButton type="primary" onClick={()=>tableData.load()}>{$t('搜索')}</AButton>}
255
257
  {props.form?.option?.reset !== false && <AButton onClick={() => patch(metaForm,form.value,true)}>{$t('重置')}</AButton>}
256
- {props.form?.option?.export === true && <AButton type="primary" onClick={()=>{
257
- // props.form.export?.(form.value)
258
+ {props.form?.option?.export === true && <AButton type="primary" loading={exportLoading.value} onClick={()=>{
259
+ exportLoading.value=true
258
260
  exportExcel(props.title??'导出', props.table.columns,async (page,pageSize)=>{
259
261
  let res = await props.data?.({ ...form.value, ...{page,pageSize} })
260
262
  return res.list??res
261
-
262
- // let subName = subList.value.find(item => item.value == attribute?.form.subId)?.label
263
- // let res = await req.get('/system/live-record/variety/list', { query: {page,pageSize,...form.value} })
264
- // return res.list
263
+ }).finally(()=>{
264
+ exportLoading.value=false
265
265
  })
266
-
267
266
  }}>{$t('导出')}</AButton>}
268
267
  </div>
269
268
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xizs/nuxt-antui",
3
3
  "type": "module",
4
- "version": "0.0.46",
4
+ "version": "0.0.47",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",