@xilonglab/vue-main 1.1.10 → 1.1.15

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": "@xilonglab/vue-main",
3
- "version": "1.1.10",
3
+ "version": "1.1.15",
4
4
  "description": "xilong vue main",
5
5
  "main": "packages/index.js",
6
6
  "scripts": {
@@ -11,12 +11,30 @@ const props = defineProps({
11
11
  disabled: {},
12
12
  loading: {},
13
13
  icon: {},
14
+ trigger: {
15
+ type: Function,
16
+ default: null
17
+ }
14
18
  });
19
+
20
+ function handleClick(event) {
21
+ if (props.trigger) {
22
+ props.trigger();
23
+ }
24
+ }
15
25
  </script>
16
26
 
17
27
 
18
28
  <template>
19
- <el-button class="xl-button" :size="size" :type="type" :disabled="disabled" :loading="loading" :icon="icon">
29
+ <el-button
30
+ class="xl-button"
31
+ :size="size"
32
+ :type="type"
33
+ :disabled="disabled"
34
+ :loading="loading"
35
+ :icon="icon"
36
+ @click="handleClick"
37
+ >
20
38
  <span>{{ l }}</span>
21
39
  <slot />
22
40
  </el-button>
@@ -18,7 +18,7 @@ const props = defineProps({
18
18
  labelWidth: {
19
19
  default: 70
20
20
  },
21
- callback: {
21
+ handler: {
22
22
  type: Function,
23
23
  default: () => { },
24
24
  }
@@ -63,7 +63,7 @@ defineExpose({
63
63
 
64
64
  <template>
65
65
  <xl-dialog class="xl-data-form-dialog" :ref="refs.dialog" :title="chinese" :width="width" :validate="validate"
66
- :callback="callback" @finish="emits('finish')">
66
+ :handler="handler" @finish="emits('finish')">
67
67
  <el-form :ref="refs.form" :model="obj" :rules="rules" :label-width="`${labelWidth}px`">
68
68
  <el-row>
69
69
  <template v-for="col in columns" :key="col.prop">