el-plus-crud 0.0.74 → 0.0.76
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/CHANGELOG.md +4 -0
- package/dist/el-plus-crud.mjs +10 -10
- package/example/App.vue +69 -68
- package/lib/components/el-plus-form/ElPlusForm.vue +2 -1
- package/lib/components/el-plus-form/ElPlusFormDialog.vue +90 -89
- package/lib/components/el-plus-form/ElPlusFormGroup.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormBtn.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormBtns.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormFile.vue +49 -48
- package/lib/components/el-plus-form/components/ElPlusFormInput.vue +64 -63
- package/lib/components/el-plus-form/components/ElPlusFormLink.vue +284 -283
- package/lib/components/el-plus-form/components/ElPlusFormLkuser.vue +492 -491
- package/lib/components/el-plus-form/components/ElPlusFormNumber.vue +149 -148
- package/lib/components/el-plus-form/components/ElPlusFormPassword.vue +46 -45
- package/lib/components/el-plus-form/components/ElPlusFormQuickInput.vue +98 -97
- package/lib/components/el-plus-form/components/ElPlusFormSelect.vue +164 -163
- package/lib/components/el-plus-form/components/ElPlusFormTextarea.vue +52 -51
- package/lib/components/el-plus-form/components/ElPlusFormUpbtn.vue +146 -145
- package/lib/components/el-plus-form/components/ElPlusFormUpload.vue +371 -370
- package/lib/components/el-plus-form/components/components/file-icons/FileIcons.vue +137 -136
- package/lib/components/el-plus-table/ElPlusTable.vue +2 -1
- package/lib/components/el-plus-table/components/columnItem.vue +214 -213
- package/lib/components/el-plus-table/components/header.vue +2 -1
- package/lib/components/el-plus-table/components/settingColumn.vue +180 -179
- package/lib/components/el-plus-table/util/index.ts +148 -148
- package/lib/config/index.ts +32 -32
- package/lib/index.ts +52 -52
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/types/global.d.ts +13 -13
- package/types/{formList.d.ts → index.d.ts} +1 -0
|
@@ -1,63 +1,64 @@
|
|
|
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
|
|
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>
|
|
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'
|
|
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>
|
|
64
|
+
types
|