@xuekl/cli-components 1.5.3 → 1.5.5

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/XklForm.vue CHANGED
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <el-form ref="XklFormRef" :model="form" :label-width="opts.labelWidth">
2
+ <el-form ref="XklFormRef" :model="form" :label-width="opts.labelWidth" @keyup.enter.native="enterSubmit()">
3
3
  <div class="hide-input">
4
4
  <input type="text" />
5
5
  <input type="password" />
@@ -78,6 +78,7 @@ import XklDatePicker from './XklDatePicker.vue'
78
78
  import { componentGlobal } from '@xuekl/cli-base/global'
79
79
 
80
80
  const props = defineProps(['form'])
81
+ const emit = defineEmits(['enter'])
81
82
  const XklFormRef = ref(null)
82
83
  const { form } = props
83
84
  const sourceFormList: FormItem[] = []
@@ -88,6 +89,9 @@ if (typeof opts.defaultCollapse !== 'undefined') {
88
89
  isCollapse.value = opts.defaultCollapse
89
90
  }
90
91
 
92
+ const enterSubmit = () => {
93
+ emit('enter')
94
+ }
91
95
  // 获取符合mode的字段
92
96
  const modeFields: any = {}
93
97
  Object.keys(form).forEach(prop => {
package/XklSelect.vue CHANGED
@@ -13,7 +13,7 @@ import { onBeforeMount, ref, Ref, watch, computed } from 'vue'
13
13
  import { SelectItem } from '@xuekl/cli-base/type.d'
14
14
  import http from "@/utils/httpRequest"
15
15
  const props = defineProps(['config', 'list', 'modelValue'])
16
- const emit = defineEmits(['update:label', 'loaded', 'update:modelValue'])
16
+ const emit = defineEmits(['update:label', 'loaded', 'update:modelValue', 'itemChange'])
17
17
  const { config, list } = props
18
18
 
19
19
  const dataList: Ref<SelectItem[]> = ref([])
@@ -31,6 +31,7 @@ const changeHandle = (val: string) => {
31
31
  const item = dataList.value.find(res => res.value === val)
32
32
  if (item) {
33
33
  emit('update:label', item.label)
34
+ emit('itemChange', item)
34
35
  }
35
36
  }
36
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuekl/cli-components",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {