el-plus-crud 0.0.72 → 0.0.75

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/el-plus-crud.mjs +12 -12
  3. package/example/App.vue +68 -67
  4. package/lib/components/el-plus-form/ElPlusForm.vue +1 -0
  5. package/lib/components/el-plus-form/ElPlusFormDialog.vue +89 -88
  6. package/lib/components/el-plus-form/ElPlusFormGroup.vue +1 -0
  7. package/lib/components/el-plus-form/components/ElPlusFormBtn.vue +1 -0
  8. package/lib/components/el-plus-form/components/ElPlusFormBtns.vue +1 -0
  9. package/lib/components/el-plus-form/components/ElPlusFormFile.vue +48 -47
  10. package/lib/components/el-plus-form/components/ElPlusFormInput.vue +63 -62
  11. package/lib/components/el-plus-form/components/ElPlusFormLink.vue +283 -282
  12. package/lib/components/el-plus-form/components/ElPlusFormLkuser.vue +491 -490
  13. package/lib/components/el-plus-form/components/ElPlusFormNumber.vue +148 -147
  14. package/lib/components/el-plus-form/components/ElPlusFormPassword.vue +45 -44
  15. package/lib/components/el-plus-form/components/ElPlusFormQuickInput.vue +97 -96
  16. package/lib/components/el-plus-form/components/ElPlusFormSelect.vue +163 -162
  17. package/lib/components/el-plus-form/components/ElPlusFormTextarea.vue +51 -50
  18. package/lib/components/el-plus-form/components/ElPlusFormUpbtn.vue +145 -144
  19. package/lib/components/el-plus-form/components/ElPlusFormUpload.vue +370 -369
  20. package/lib/components/el-plus-form/components/components/file-icons/FileIcons.vue +136 -135
  21. package/lib/components/el-plus-table/ElPlusTable.vue +1 -0
  22. package/lib/components/el-plus-table/components/columnItem.vue +213 -212
  23. package/lib/components/el-plus-table/components/header.vue +1 -0
  24. package/lib/components/el-plus-table/components/settingColumn.vue +179 -178
  25. package/lib/components/el-plus-table/util/index.ts +148 -147
  26. package/lib/config/index.ts +32 -30
  27. package/lib/index.ts +52 -51
  28. package/package-lock.json +2 -2
  29. package/package.json +1 -1
  30. package/types/formList.d.ts +98 -91
  31. package/types/global.d.ts +13 -145
  32. package/types/axios.d.ts +0 -13
  33. package/types/layout.d.ts +0 -57
  34. package/types/mitt.d.ts +0 -38
  35. package/types/pinia.d.ts +0 -149
  36. package/types/views.d.ts +0 -329
@@ -1,62 +1,63 @@
1
- <template>
2
- <el-input v-if="isInit" style="display: flex" v-bind="attrs" v-on="onEvents" :disabled="disabled" v-model="currentValue">
3
- <template v-for="(item, key, index) of slots" #[key] :key="index">
4
- <slot :name="key" />
5
- </template>
6
- </el-input>
7
- </template>
8
- <script lang="ts">
9
- export default {
10
- name: 'ElPlusFormInput',
11
- inheritAttrs: false,
12
- typeName: 'input',
13
- customOptions: {}
14
- }
15
- </script>
16
- <script lang="ts" setup>
17
- import { ref, watch, useAttrs, useSlots, onBeforeMount, inject } from 'vue'
18
- import { getAttrs, getEvents } from '../mixins'
19
-
20
- const defaultConf = inject('defaultConf') as ICRUDConfig
21
-
22
- const props = defineProps<{
23
- modelValue?: string | null
24
- field: string
25
- desc: { [key: string]: any }
26
- formData: { [key: string]: any }
27
- disabled?: boolean
28
- }>()
29
-
30
- const emits = defineEmits(['update:modelValue', 'validateThis'])
31
- const slots = ref(Object.assign({}, useSlots(), props.desc.slots))
32
- const attrs = ref({} as any)
33
- const isInit = ref(false)
34
- const onEvents = ref(getEvents(props))
35
-
36
- const currentValue = ref()
37
- emits('update:modelValue', currentValue)
38
-
39
- onBeforeMount(async () => {
40
- attrs.value = await getAttrs(props, { autocomplete: 'new-password', maxlength: defaultConf.form?.leng?.input || 0, clearable: true, ...useAttrs() })
41
- isInit.value = true
42
- })
43
-
44
- watch(
45
- () => props.modelValue,
46
- (data: string | null | undefined) => {
47
- // 这里要截取一下字符串长度
48
- if (data && data.length > attrs.value.maxlength) {
49
- data = data.substring(0, attrs.value.maxlength)
50
- }
51
- currentValue.value = data
52
- },
53
- { immediate: true }
54
- )
55
-
56
- watch(
57
- () => currentValue.value,
58
- () => {
59
- emits('validateThis')
60
- }
61
- )
62
- </script>
1
+ <template>
2
+ <el-input v-if="isInit" style="display: flex" v-bind="attrs" v-on="onEvents" :disabled="disabled" v-model="currentValue">
3
+ <template v-for="(item, key, index) of slots" #[key] :key="index">
4
+ <slot :name="key" />
5
+ </template>
6
+ </el-input>
7
+ </template>
8
+ <script lang="ts">
9
+ export default {
10
+ name: 'ElPlusFormInput',
11
+ inheritAttrs: false,
12
+ typeName: 'input',
13
+ customOptions: {}
14
+ }
15
+ </script>
16
+ <script lang="ts" setup>
17
+ import { ref, watch, useAttrs, useSlots, onBeforeMount, inject } from 'vue'
18
+ import { getAttrs, getEvents } from '../mixins'
19
+ import { ICRUDConfig } from 'types/formList'
20
+
21
+ const defaultConf = inject('defaultConf') as ICRUDConfig
22
+
23
+ const props = defineProps<{
24
+ modelValue?: string | null
25
+ field: string
26
+ desc: { [key: string]: any }
27
+ formData: { [key: string]: any }
28
+ disabled?: boolean
29
+ }>()
30
+
31
+ const emits = defineEmits(['update:modelValue', 'validateThis'])
32
+ const slots = ref(Object.assign({}, useSlots(), props.desc.slots))
33
+ const attrs = ref({} as any)
34
+ const isInit = ref(false)
35
+ const onEvents = ref(getEvents(props))
36
+
37
+ const currentValue = ref()
38
+ emits('update:modelValue', currentValue)
39
+
40
+ onBeforeMount(async () => {
41
+ attrs.value = await getAttrs(props, { autocomplete: 'new-password', maxlength: defaultConf.form?.leng?.input || 0, clearable: true, ...useAttrs() })
42
+ isInit.value = true
43
+ })
44
+
45
+ watch(
46
+ () => props.modelValue,
47
+ (data: string | null | undefined) => {
48
+ // 这里要截取一下字符串长度
49
+ if (data && data.length > attrs.value.maxlength) {
50
+ data = data.substring(0, attrs.value.maxlength)
51
+ }
52
+ currentValue.value = data
53
+ },
54
+ { immediate: true }
55
+ )
56
+
57
+ watch(
58
+ () => currentValue.value,
59
+ () => {
60
+ emits('validateThis')
61
+ }
62
+ )
63
+ </script>