w-ui-v1 1.0.99 → 1.1.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-ui-v1",
3
- "version": "1.0.99",
3
+ "version": "1.1.1",
4
4
  "description": "w-ui",
5
5
  "author": "wgxshh",
6
6
  "license": "ISC",
@@ -4,7 +4,9 @@ import {
4
4
  computed,
5
5
  ref,
6
6
  defineProps,
7
- watch
7
+ watch,
8
+ defineEmits,
9
+ defineExpose
8
10
  } from 'vue'
9
11
  import {
10
12
  getPageData,
@@ -36,6 +38,7 @@ const props = defineProps({
36
38
  default:true
37
39
  }
38
40
  })
41
+ const emits=defineEmits(['loadData'])
39
42
  const query = ref('')
40
43
  const sourceId = ref('')
41
44
  const mainCode = ref('')
@@ -105,6 +108,7 @@ async function queryList(pageNo: number, pageSize: number) {
105
108
  const data = await getPageData(key.data?.key, pageNo, pageSize)// 获取数据
106
109
  // const count = await getPageTotal(key.data?.key)// 获取总数
107
110
  paging.value.complete&&paging.value.complete(data.data.entities)
111
+ emits('loadData',data.data.entities)
108
112
  }
109
113
  catch (error) {
110
114
  paging.value.complete&&paging.value&&paging.value.complete(false)
@@ -119,6 +123,12 @@ function add() {
119
123
  })
120
124
  }
121
125
 
126
+ //你暴露方法
127
+
128
+ defineExpose({
129
+ load:paging.value.reload()
130
+ })
131
+
122
132
  </script>
123
133
 
124
134
  <template>