el-plus-crud 0.0.49 → 0.0.50

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 (40) hide show
  1. package/CHANGELOG.md +19 -17
  2. package/dist/el-plus-crud.mjs +3605 -3453
  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 +1 -1
  6. package/lib/components/el-plus-form/components/ElPlusFormArea.vue +62 -62
  7. package/lib/components/el-plus-form/components/ElPlusFormBtn.vue +103 -103
  8. package/lib/components/el-plus-form/components/ElPlusFormBtns.vue +140 -134
  9. package/lib/components/el-plus-form/components/ElPlusFormCascader.vue +64 -64
  10. package/lib/components/el-plus-form/components/ElPlusFormCascaderPanel.vue +54 -54
  11. package/lib/components/el-plus-form/components/ElPlusFormCheckbox.vue +45 -45
  12. package/lib/components/el-plus-form/components/ElPlusFormCheckboxButton.vue +45 -45
  13. package/lib/components/el-plus-form/components/ElPlusFormColor.vue +39 -39
  14. package/lib/components/el-plus-form/components/ElPlusFormDate.vue +40 -40
  15. package/lib/components/el-plus-form/components/ElPlusFormDaterange.vue +47 -47
  16. package/lib/components/el-plus-form/components/ElPlusFormDatetime.vue +41 -41
  17. package/lib/components/el-plus-form/components/ElPlusFormDatetimerange.vue +47 -47
  18. package/lib/components/el-plus-form/components/ElPlusFormInput.vue +62 -62
  19. package/lib/components/el-plus-form/components/ElPlusFormLink.vue +282 -282
  20. package/lib/components/el-plus-form/components/ElPlusFormLkuser.vue +490 -490
  21. package/lib/components/el-plus-form/components/ElPlusFormNbinput.vue +54 -54
  22. package/lib/components/el-plus-form/components/ElPlusFormNumber.vue +147 -147
  23. package/lib/components/el-plus-form/components/ElPlusFormPassword.vue +44 -44
  24. package/lib/components/el-plus-form/components/ElPlusFormQuickInput.vue +96 -96
  25. package/lib/components/el-plus-form/components/ElPlusFormRadio.vue +68 -68
  26. package/lib/components/el-plus-form/components/ElPlusFormRate.vue +54 -54
  27. package/lib/components/el-plus-form/components/ElPlusFormSelect.vue +162 -162
  28. package/lib/components/el-plus-form/components/ElPlusFormSlider.vue +39 -39
  29. package/lib/components/el-plus-form/components/ElPlusFormSwitch.vue +39 -39
  30. package/lib/components/el-plus-form/components/ElPlusFormTextarea.vue +50 -50
  31. package/lib/components/el-plus-form/components/ElPlusFormTransfer.vue +45 -45
  32. package/lib/components/el-plus-form/components/ElPlusFormTree.vue +77 -77
  33. package/lib/components/el-plus-form/components/ElPlusFormTreeSelect.vue +60 -60
  34. package/lib/components/el-plus-form/components/ElPlusFormUpbtn.vue +144 -0
  35. package/lib/components/el-plus-form/components/ElPlusFormUpload.vue +369 -369
  36. package/lib/components/el-plus-form/mixins/index.ts +2 -2
  37. package/lib/components/el-plus-table/components/header.vue +283 -260
  38. package/lib/components-list.ts +2 -0
  39. package/package.json +1 -1
  40. 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>
@@ -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>