br-dionysus 0.7.10 → 0.7.11

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/README.md CHANGED
@@ -271,6 +271,7 @@ const test = ref<number>(0)
271
271
 
272
272
  <script setup lang="ts">
273
273
  import { ref } from 'vue'
274
+ import { Page } from '../../../docs/packages/typings/class'
274
275
 
275
276
  const code = ref<string>('')
276
277
  const options = ref<Option[]>()
@@ -310,7 +311,8 @@ const mockData = [{
310
311
  createdTimeStr: '2024-05-06'
311
312
  }]
312
313
 
313
- const remoteMethod = async (query: string = '') => {
314
+ const remoteMethod = async (query: string = '', page: Page) => {
315
+ console.log('page', page)
314
316
  options.value = mockData.map(item => ({
315
317
  label: item.fileName,
316
318
  value: item.sn,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "br-dionysus",
3
- "version": "0.7.10",
3
+ "version": "0.7.11",
4
4
  "scripts": {
5
5
  "dev": "vite --config ./build/base.config.ts",
6
6
  "build:doc": "vue-tsc --noEmit && vite build --config ./build/doc.config.ts && node script/copyDir.js",
@@ -13,6 +13,7 @@
13
13
 
14
14
  <script setup lang="ts">
15
15
  import { ref } from 'vue'
16
+ import { Page } from '../../../docs/packages/typings/class'
16
17
 
17
18
  const code = ref<string>('')
18
19
  const options = ref<Option[]>()
@@ -52,7 +53,8 @@ const mockData = [{
52
53
  createdTimeStr: '2024-05-06'
53
54
  }]
54
55
 
55
- const remoteMethod = async (query: string = '') => {
56
+ const remoteMethod = async (query: string = '', page: Page) => {
57
+ console.log('page', page)
56
58
  options.value = mockData.map(item => ({
57
59
  label: item.fileName,
58
60
  value: item.sn,
@@ -6,7 +6,7 @@
6
6
  :class="_this.inputClass"
7
7
  :size="props.size"
8
8
  :placeholder="props.placeholder"
9
- @input="remoteMethod($event);_this.showPanel = true"
9
+ @input="props.remoteMethod($event, page);_this.showPanel = true"
10
10
  @focus="focus"
11
11
  @keyup.enter="addRowData"
12
12
  :disabled="props.disabled"
@@ -40,7 +40,7 @@
40
40
  :ref="mTableRef"
41
41
  class="m-table s-table"
42
42
  :data="optionsMap"
43
- size="small"
43
+ :size="props.size"
44
44
  @currentChange="handleCurrentChange"
45
45
  :rowClassName="tableRowClassName"
46
46
  @selectionChange="handleSelectionChange"
@@ -76,7 +76,7 @@
76
76
  v-model:currentPage="page.currentPage"
77
77
  v-model:pageSize="page.pageSize"
78
78
  hideOnSinglePage
79
- small
79
+ :small="props.size === 'small'"
80
80
  :pageSizes="page.pageSizesOptions"
81
81
  layout="total, prev, pager, next, sizes"
82
82
  :total="page.total"
@@ -176,7 +176,7 @@ const optionsMap = computed(() => {
176
176
 
177
177
  // 分页
178
178
  const page = reactive<Page>(new Page({
179
- total: 0,
179
+ total: props.total,
180
180
  pageSize: 5,
181
181
  currentPage: 1,
182
182
  pageSizesOptions: [5, 10, 20]