el-plus-crud 0.0.49 → 0.0.51

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 (43) hide show
  1. package/CHANGELOG.md +20 -16
  2. package/dist/el-plus-crud.mjs +3801 -3606
  3. package/example/App.vue +1 -1
  4. package/lib/components/el-plus-form/ElPlusForm.vue +775 -771
  5. package/lib/components/el-plus-form/ElPlusFormDialog.vue +2 -4
  6. package/lib/components/el-plus-form/ElPlusFormGroup.vue +21 -1
  7. package/lib/components/el-plus-form/components/ElPlusFormArea.vue +62 -62
  8. package/lib/components/el-plus-form/components/ElPlusFormBtn.vue +103 -103
  9. package/lib/components/el-plus-form/components/ElPlusFormBtns.vue +140 -134
  10. package/lib/components/el-plus-form/components/ElPlusFormCascader.vue +64 -64
  11. package/lib/components/el-plus-form/components/ElPlusFormCascaderPanel.vue +71 -54
  12. package/lib/components/el-plus-form/components/ElPlusFormCheckbox.vue +76 -45
  13. package/lib/components/el-plus-form/components/ElPlusFormCheckboxButton.vue +45 -45
  14. package/lib/components/el-plus-form/components/ElPlusFormColor.vue +39 -39
  15. package/lib/components/el-plus-form/components/ElPlusFormDate.vue +40 -40
  16. package/lib/components/el-plus-form/components/ElPlusFormDaterange.vue +47 -47
  17. package/lib/components/el-plus-form/components/ElPlusFormDatetime.vue +41 -41
  18. package/lib/components/el-plus-form/components/ElPlusFormDatetimerange.vue +47 -47
  19. package/lib/components/el-plus-form/components/ElPlusFormImage.vue +4 -0
  20. package/lib/components/el-plus-form/components/ElPlusFormInput.vue +62 -62
  21. package/lib/components/el-plus-form/components/ElPlusFormLink.vue +282 -282
  22. package/lib/components/el-plus-form/components/ElPlusFormLkuser.vue +490 -490
  23. package/lib/components/el-plus-form/components/ElPlusFormNbinput.vue +54 -54
  24. package/lib/components/el-plus-form/components/ElPlusFormNumber.vue +147 -147
  25. package/lib/components/el-plus-form/components/ElPlusFormPassword.vue +44 -44
  26. package/lib/components/el-plus-form/components/ElPlusFormQuickInput.vue +96 -96
  27. package/lib/components/el-plus-form/components/ElPlusFormRadio.vue +68 -68
  28. package/lib/components/el-plus-form/components/ElPlusFormRate.vue +54 -54
  29. package/lib/components/el-plus-form/components/ElPlusFormSelect.vue +162 -162
  30. package/lib/components/el-plus-form/components/ElPlusFormSlider.vue +39 -39
  31. package/lib/components/el-plus-form/components/ElPlusFormSwitch.vue +69 -39
  32. package/lib/components/el-plus-form/components/ElPlusFormTextarea.vue +50 -50
  33. package/lib/components/el-plus-form/components/ElPlusFormTransfer.vue +45 -45
  34. package/lib/components/el-plus-form/components/ElPlusFormTree.vue +77 -77
  35. package/lib/components/el-plus-form/components/ElPlusFormTreeSelect.vue +60 -60
  36. package/lib/components/el-plus-form/components/ElPlusFormUpbtn.vue +144 -0
  37. package/lib/components/el-plus-form/components/ElPlusFormUpload.vue +369 -369
  38. package/lib/components/el-plus-form/mixins/index.ts +2 -2
  39. package/lib/components/el-plus-table/components/columnItem.vue +7 -0
  40. package/lib/components/el-plus-table/components/header.vue +283 -260
  41. package/lib/components-list.ts +2 -0
  42. package/package.json +1 -1
  43. package/types/formList.d.ts +447 -446
@@ -1,47 +1,47 @@
1
- <template>
2
- <el-date-picker v-if="isInit" class="el-plusF-form-daterange-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue" :disabled="disabled">
3
- <!-- 非作用域插槽 -->
4
- <template v-for="(item, key, index) in slots" #[key]="data" :key="index">
5
- <slot :name="key" :data="data" />
6
- </template>
7
- </el-date-picker>
8
- </template>
9
- <script lang="ts">
10
- export default {
11
- name: 'ElPlusFormDaterange',
12
- inheritAttrs: false,
13
- typeName: 'daterange',
14
- customOptions: {}
15
- }
16
- </script>
17
- <script lang="ts" setup>
18
- import { ref, useAttrs, useSlots, onBeforeMount } from 'vue'
19
- import { getAttrs, getEvents } from '../mixins'
20
-
21
- const props = defineProps<{
22
- modelValue?: Array<string> | Date
23
- field: string
24
- desc: { [key: string]: any }
25
- formData: { [key: string]: any }
26
- disabled?: boolean
27
- }>()
28
-
29
- const emits = defineEmits(['update:modelValue'])
30
- const currentValue = ref(props.modelValue)
31
- const slots = ref(Object.assign({}, useSlots(), props.desc.slots))
32
- const isInit = ref(false)
33
- const attrs = ref({} as any)
34
- const onEvents = ref(getEvents(props))
35
-
36
- emits('update:modelValue', currentValue)
37
-
38
- onBeforeMount(async () => {
39
- attrs.value = await getAttrs(props, { type: 'daterange', format: 'YYYY-MM-DD', valueFormat: 'x', editable: false, ...useAttrs() })
40
- isInit.value = true
41
- })
42
- </script>
43
- <style lang="scss" scoped>
44
- .el-plusF-form-daterange-panel {
45
- display: flex;
46
- }
47
- </style>
1
+ <template>
2
+ <el-date-picker v-if="isInit" class="el-plusF-form-daterange-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue" :disabled="disabled">
3
+ <!-- 非作用域插槽 -->
4
+ <template v-for="(item, key, index) in slots" #[key]="data" :key="index">
5
+ <slot :name="key" :data="data" />
6
+ </template>
7
+ </el-date-picker>
8
+ </template>
9
+ <script lang="ts">
10
+ export default {
11
+ name: 'ElPlusFormDaterange',
12
+ inheritAttrs: false,
13
+ typeName: 'daterange',
14
+ customOptions: {}
15
+ }
16
+ </script>
17
+ <script lang="ts" setup>
18
+ import { ref, useAttrs, useSlots, onBeforeMount } from 'vue'
19
+ import { getAttrs, getEvents } from '../mixins'
20
+
21
+ const props = defineProps<{
22
+ modelValue?: Array<string> | Date
23
+ field: string
24
+ desc: { [key: string]: any }
25
+ formData: { [key: string]: any }
26
+ disabled?: boolean
27
+ }>()
28
+
29
+ const emits = defineEmits(['update:modelValue'])
30
+ const currentValue = ref(props.modelValue)
31
+ const slots = ref(Object.assign({}, useSlots(), props.desc.slots))
32
+ const isInit = ref(false)
33
+ const attrs = ref({} as any)
34
+ const onEvents = ref(getEvents(props))
35
+
36
+ emits('update:modelValue', currentValue)
37
+
38
+ onBeforeMount(async () => {
39
+ attrs.value = await getAttrs(props, { type: 'daterange', format: 'YYYY-MM-DD', valueFormat: 'x', editable: false, ...useAttrs() })
40
+ isInit.value = true
41
+ })
42
+ </script>
43
+ <style lang="scss" scoped>
44
+ .el-plusF-form-daterange-panel {
45
+ display: flex;
46
+ }
47
+ </style>
@@ -1,41 +1,41 @@
1
- <template>
2
- <el-date-picker v-if="isInit" class="ElPlusFormDatetime-panel" v-bind="attrs" v-on="onEvents" type="datetime" v-model="currentValue" :disabled="disabled" />
3
- </template>
4
- <script lang="ts">
5
- export default {
6
- name: 'ElPlusFormDatetime',
7
- inheritAttrs: false,
8
- typeName: 'datetime',
9
- customOptions: {}
10
- }
11
- </script>
12
- <script lang="ts" setup>
13
- import { ref, useAttrs, onBeforeMount } from 'vue'
14
- import { getAttrs, getEvents } from '../mixins'
15
-
16
- const props = defineProps<{
17
- modelValue?: string | number | '' | null
18
- field: string
19
- desc: { [key: string]: any }
20
- formData: { [key: string]: any }
21
- disabled?: boolean
22
- }>()
23
-
24
- const emits = defineEmits(['update:modelValue'])
25
- const currentValue = ref(props.modelValue)
26
- const attrs = ref({} as any)
27
- const isInit = ref(false)
28
- const onEvents = ref(getEvents(props))
29
-
30
- emits('update:modelValue', currentValue)
31
-
32
- onBeforeMount(async () => {
33
- attrs.value = await getAttrs(props, { valueFormat: 'YYYY-MM-DD HH:mm:ss', ...useAttrs() })
34
- isInit.value = true
35
- })
36
- </script>
37
- <style lang="scss" scoped>
38
- .ElPlusFormDatetime-panel {
39
- display: flex;
40
- }
41
- </style>
1
+ <template>
2
+ <el-date-picker v-if="isInit" class="ElPlusFormDatetime-panel" v-bind="attrs" v-on="onEvents" type="datetime" v-model="currentValue" :disabled="disabled" />
3
+ </template>
4
+ <script lang="ts">
5
+ export default {
6
+ name: 'ElPlusFormDatetime',
7
+ inheritAttrs: false,
8
+ typeName: 'datetime',
9
+ customOptions: {}
10
+ }
11
+ </script>
12
+ <script lang="ts" setup>
13
+ import { ref, useAttrs, onBeforeMount } from 'vue'
14
+ import { getAttrs, getEvents } from '../mixins'
15
+
16
+ const props = defineProps<{
17
+ modelValue?: string | number | '' | null
18
+ field: string
19
+ desc: { [key: string]: any }
20
+ formData: { [key: string]: any }
21
+ disabled?: boolean
22
+ }>()
23
+
24
+ const emits = defineEmits(['update:modelValue'])
25
+ const currentValue = ref(props.modelValue)
26
+ const attrs = ref({} as any)
27
+ const isInit = ref(false)
28
+ const onEvents = ref(getEvents(props))
29
+
30
+ emits('update:modelValue', currentValue)
31
+
32
+ onBeforeMount(async () => {
33
+ attrs.value = await getAttrs(props, { valueFormat: 'YYYY-MM-DD HH:mm:ss', ...useAttrs() })
34
+ isInit.value = true
35
+ })
36
+ </script>
37
+ <style lang="scss" scoped>
38
+ .ElPlusFormDatetime-panel {
39
+ display: flex;
40
+ }
41
+ </style>
@@ -1,47 +1,47 @@
1
- <template>
2
- <el-date-picker v-if="isInit" class="el-plusF-form-datetimerange-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue" :disabled="disabled">
3
- <!-- 非作用域插槽 -->
4
- <template v-for="(item, key, index) in slots" #[key]="data" :key="index">
5
- <slot :name="key" :data="data" />
6
- </template>
7
- </el-date-picker>
8
- </template>
9
- <script lang="ts">
10
- export default {
11
- name: 'ElPlusFormDatetimerange',
12
- inheritAttrs: false,
13
- typeName: 'datetimerange',
14
- customOptions: {}
15
- }
16
- </script>
17
- <script lang="ts" setup>
18
- import { ref, useAttrs, useSlots, onBeforeMount } from 'vue'
19
- import { getAttrs, getEvents } from '../mixins'
20
-
21
- const props = defineProps<{
22
- modelValue?: Array<string> | Date
23
- field: string
24
- desc: { [key: string]: any }
25
- formData: { [key: string]: any }
26
- disabled?: boolean
27
- }>()
28
-
29
- const emits = defineEmits(['update:modelValue'])
30
- const currentValue = ref(props.modelValue)
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
- emits('update:modelValue', currentValue)
37
-
38
- onBeforeMount(async () => {
39
- attrs.value = await getAttrs(props, { type: 'datetimerange', format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', editable: false, ...useAttrs() })
40
- isInit.value = true
41
- })
42
- </script>
43
- <style lang="scss" scoped>
44
- .el-plusF-form-datetimerange-panel {
45
- display: flex;
46
- }
47
- </style>
1
+ <template>
2
+ <el-date-picker v-if="isInit" class="el-plusF-form-datetimerange-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue" :disabled="disabled">
3
+ <!-- 非作用域插槽 -->
4
+ <template v-for="(item, key, index) in slots" #[key]="data" :key="index">
5
+ <slot :name="key" :data="data" />
6
+ </template>
7
+ </el-date-picker>
8
+ </template>
9
+ <script lang="ts">
10
+ export default {
11
+ name: 'ElPlusFormDatetimerange',
12
+ inheritAttrs: false,
13
+ typeName: 'datetimerange',
14
+ customOptions: {}
15
+ }
16
+ </script>
17
+ <script lang="ts" setup>
18
+ import { ref, useAttrs, useSlots, onBeforeMount } from 'vue'
19
+ import { getAttrs, getEvents } from '../mixins'
20
+
21
+ const props = defineProps<{
22
+ modelValue?: Array<string> | Date
23
+ field: string
24
+ desc: { [key: string]: any }
25
+ formData: { [key: string]: any }
26
+ disabled?: boolean
27
+ }>()
28
+
29
+ const emits = defineEmits(['update:modelValue'])
30
+ const currentValue = ref(props.modelValue)
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
+ emits('update:modelValue', currentValue)
37
+
38
+ onBeforeMount(async () => {
39
+ attrs.value = await getAttrs(props, { type: 'datetimerange', format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', editable: false, ...useAttrs() })
40
+ isInit.value = true
41
+ })
42
+ </script>
43
+ <style lang="scss" scoped>
44
+ .el-plusF-form-datetimerange-panel {
45
+ display: flex;
46
+ }
47
+ </style>
@@ -90,6 +90,7 @@ const styles = computed(() => {
90
90
  display: flex;
91
91
  // justify-content: center;
92
92
  flex-wrap: wrap;
93
+ margin-bottom: 10px;
93
94
 
94
95
  .no-img-tip {
95
96
  color: #999999;
@@ -99,6 +100,9 @@ const styles = computed(() => {
99
100
  margin-left: 10px;
100
101
  margin-bottom: 10px;
101
102
  }
103
+ .el-image:first-child {
104
+ margin-left: 0px;
105
+ }
102
106
  }
103
107
 
104
108
  .ele-form-image .el-image {
@@ -1,62 +1,62 @@
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
+
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>