el-plus-crud 0.0.38 → 0.0.39
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/.eslintrc.js +78 -78
- package/.prettierrc.js +39 -39
- package/CHANGELOG.md +7 -5
- package/build.js +31 -31
- package/dist/el-plus-crud.mjs +2750 -2722
- package/dist/el-plus-crud.umd.js +14 -14
- package/dist/style.css +1 -1
- package/example/App.vue +67 -67
- package/example/main.js +18 -18
- package/index.html +13 -13
- package/lib/components/el-plus-form/ElPlusForm.vue +774 -772
- package/lib/components/el-plus-form/ElPlusFormDialog.vue +90 -90
- package/lib/components/el-plus-form/ElPlusFormGroup.vue +116 -116
- package/lib/components/el-plus-form/components/ElPlusFormArea.vue +61 -61
- package/lib/components/el-plus-form/components/ElPlusFormAutocomplete.vue +49 -49
- package/lib/components/el-plus-form/components/ElPlusFormBtn.vue +102 -102
- package/lib/components/el-plus-form/components/ElPlusFormBtns.vue +133 -133
- package/lib/components/el-plus-form/components/ElPlusFormCascader.vue +63 -63
- package/lib/components/el-plus-form/components/ElPlusFormCascaderPanel.vue +53 -51
- package/lib/components/el-plus-form/components/ElPlusFormCheckbox.vue +44 -42
- package/lib/components/el-plus-form/components/ElPlusFormCheckboxButton.vue +44 -42
- package/lib/components/el-plus-form/components/ElPlusFormColor.vue +38 -38
- package/lib/components/el-plus-form/components/ElPlusFormDate.vue +39 -39
- package/lib/components/el-plus-form/components/ElPlusFormDaterange.vue +46 -44
- package/lib/components/el-plus-form/components/ElPlusFormDatetime.vue +40 -38
- package/lib/components/el-plus-form/components/ElPlusFormDatetimerange.vue +3 -1
- package/lib/components/el-plus-form/components/ElPlusFormFile.vue +47 -47
- package/lib/components/el-plus-form/components/ElPlusFormImage.vue +113 -113
- package/lib/components/el-plus-form/components/ElPlusFormInput.vue +3 -1
- package/lib/components/el-plus-form/components/ElPlusFormLink.vue +281 -281
- package/lib/components/el-plus-form/components/ElPlusFormLkuser.vue +489 -489
- package/lib/components/el-plus-form/components/ElPlusFormNbinput.vue +53 -51
- package/lib/components/el-plus-form/components/ElPlusFormNumber.vue +146 -144
- package/lib/components/el-plus-form/components/ElPlusFormPassword.vue +3 -1
- package/lib/components/el-plus-form/components/ElPlusFormQuickInput.vue +94 -92
- package/lib/components/el-plus-form/components/ElPlusFormRadio.vue +42 -42
- package/lib/components/el-plus-form/components/ElPlusFormRate.vue +38 -38
- package/lib/components/el-plus-form/components/ElPlusFormSelect.vue +161 -161
- package/lib/components/el-plus-form/components/ElPlusFormSlider.vue +38 -38
- package/lib/components/el-plus-form/components/ElPlusFormSwitch.vue +38 -38
- package/lib/components/el-plus-form/components/ElPlusFormTag.vue +78 -78
- package/lib/components/el-plus-form/components/ElPlusFormText.vue +99 -99
- package/lib/components/el-plus-form/components/ElPlusFormTextarea.vue +49 -47
- package/lib/components/el-plus-form/components/ElPlusFormTransfer.vue +44 -44
- package/lib/components/el-plus-form/components/ElPlusFormTree.vue +76 -76
- package/lib/components/el-plus-form/components/ElPlusFormTreeSelect.vue +59 -59
- package/lib/components/el-plus-form/components/ElPlusFormUpload.vue +368 -368
- package/lib/components/el-plus-form/components/components/file-icons/FileIcons.vue +135 -135
- package/lib/components/el-plus-form/components/components/file-icons/data/index.ts +27 -27
- package/lib/components/el-plus-form/components/components/file-icons/images/doc.svg +12 -12
- package/lib/components/el-plus-form/components/components/file-icons/images/file.svg +18 -18
- package/lib/components/el-plus-form/components/components/file-icons/images/jpg.svg +13 -13
- package/lib/components/el-plus-form/components/components/file-icons/images/pdf.svg +12 -12
- package/lib/components/el-plus-form/components/components/file-icons/images/png.svg +12 -12
- package/lib/components/el-plus-form/components/components/file-icons/images/ppt.svg +12 -12
- package/lib/components/el-plus-form/components/components/file-icons/images/xls.svg +12 -12
- package/lib/components/el-plus-form/components/index.ts +17 -17
- package/lib/components/el-plus-form/data/file.ts +74 -74
- package/lib/components/el-plus-form/mixins/index.ts +113 -113
- package/lib/components/el-plus-form/util/index.ts +257 -257
- package/lib/components/el-plus-form/util/validate.ts +332 -332
- package/lib/components/el-plus-table/components/columnItem.vue +205 -205
- package/lib/components/el-plus-table/components/header.vue +240 -240
- package/lib/components/el-plus-table/components/statisticInfo.vue +47 -47
- package/lib/components/el-plus-table/util/index.ts +147 -147
- package/lib/config/index.ts +30 -30
- package/lib/index.d.ts +4 -4
- package/lib/index.ts +51 -51
- package/package.json +1 -1
- package/types/axios.d.ts +13 -13
- package/types/formList.d.ts +440 -440
- package/types/layout.d.ts +57 -57
- package/types/mitt.d.ts +38 -38
- package/types/pinia.d.ts +149 -149
- package/types/views.d.ts +329 -329
- package/vite.config.ts +78 -78
|
@@ -1,51 +1,53 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-cascader-panel class="ElPlusFormCascaderPanel-panel" v-bind="attrs" v-on="onEvents" :options="props.desc.options" v-model="currentValue">
|
|
3
|
-
<!-- 非作用域插槽 -->
|
|
4
|
-
<template v-for="(item, key, index) in slots" #[key]="data" :key="index">
|
|
5
|
-
<slot :name="key" :data="data" />
|
|
6
|
-
</template>
|
|
7
|
-
</el-cascader-panel>
|
|
8
|
-
</template>
|
|
9
|
-
<script lang="ts">
|
|
10
|
-
export default {
|
|
11
|
-
name: 'ElPlusFormCascaderPanel',
|
|
12
|
-
inheritAttrs: false,
|
|
13
|
-
typeName: 'cascaderPanel',
|
|
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?: string | number | '' | null
|
|
23
|
-
field: string
|
|
24
|
-
desc: { [key: string]: any }
|
|
25
|
-
formData: { [key: string]: any }
|
|
26
|
-
}>()
|
|
27
|
-
|
|
28
|
-
const emits = defineEmits(['update:modelValue'])
|
|
29
|
-
const currentValue = ref(props.modelValue)
|
|
30
|
-
emits('update:modelValue', currentValue)
|
|
31
|
-
|
|
32
|
-
const slots = ref(Object.assign({}, useSlots(), props.desc.slots))
|
|
33
|
-
const attrs = ref({} as any)
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<el-cascader-panel v-if="isInit" class="ElPlusFormCascaderPanel-panel" v-bind="attrs" v-on="onEvents" :options="props.desc.options" v-model="currentValue">
|
|
3
|
+
<!-- 非作用域插槽 -->
|
|
4
|
+
<template v-for="(item, key, index) in slots" #[key]="data" :key="index">
|
|
5
|
+
<slot :name="key" :data="data" />
|
|
6
|
+
</template>
|
|
7
|
+
</el-cascader-panel>
|
|
8
|
+
</template>
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
export default {
|
|
11
|
+
name: 'ElPlusFormCascaderPanel',
|
|
12
|
+
inheritAttrs: false,
|
|
13
|
+
typeName: 'cascaderPanel',
|
|
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?: string | number | '' | null
|
|
23
|
+
field: string
|
|
24
|
+
desc: { [key: string]: any }
|
|
25
|
+
formData: { [key: string]: any }
|
|
26
|
+
}>()
|
|
27
|
+
|
|
28
|
+
const emits = defineEmits(['update:modelValue'])
|
|
29
|
+
const currentValue = ref(props.modelValue)
|
|
30
|
+
emits('update:modelValue', currentValue)
|
|
31
|
+
|
|
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
|
+
onBeforeMount(async () => {
|
|
38
|
+
attrs.value = await getAttrs(props, {
|
|
39
|
+
props: { value: 'value', label: 'label', children: 'children' },
|
|
40
|
+
fetchSuggestions(s: any, cb: Function) {
|
|
41
|
+
const res: any[] = []
|
|
42
|
+
cb(res)
|
|
43
|
+
},
|
|
44
|
+
...useAttrs()
|
|
45
|
+
})
|
|
46
|
+
isInit.value = true
|
|
47
|
+
})
|
|
48
|
+
</script>
|
|
49
|
+
<style lang="scss" scoped>
|
|
50
|
+
.ElPlusFormCascaderPanel-panel {
|
|
51
|
+
display: flex;
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-checkbox-group class="ElPlusFormCheckbox-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue">
|
|
3
|
-
<el-checkbox v-for="option of desc.options" :key="option.value" :label="option.value" v-bind="option.attrs">
|
|
4
|
-
{{ option.text }}
|
|
5
|
-
</el-checkbox>
|
|
6
|
-
</el-checkbox-group>
|
|
7
|
-
</template>
|
|
8
|
-
<script lang="ts">
|
|
9
|
-
export default {
|
|
10
|
-
name: 'ElPlusFormCheckbox',
|
|
11
|
-
inheritAttrs: false,
|
|
12
|
-
typeName: 'checkbox',
|
|
13
|
-
customOptions: {}
|
|
14
|
-
}
|
|
15
|
-
</script>
|
|
16
|
-
<script lang="ts" setup>
|
|
17
|
-
import { ref, useAttrs, onBeforeMount } from 'vue'
|
|
18
|
-
import { getAttrs, getEvents } from '../mixins'
|
|
19
|
-
|
|
20
|
-
const props = defineProps<{
|
|
21
|
-
modelValue?: string | number | '' | null
|
|
22
|
-
field: string
|
|
23
|
-
desc: { [key: string]: any }
|
|
24
|
-
formData: { [key: string]: any }
|
|
25
|
-
}>()
|
|
26
|
-
|
|
27
|
-
const emits = defineEmits(['update:modelValue'])
|
|
28
|
-
const currentValue = ref(props.modelValue)
|
|
29
|
-
emits('update:modelValue', currentValue)
|
|
30
|
-
|
|
31
|
-
const attrs = ref({} as any)
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<el-checkbox-group v-if="isInit" class="ElPlusFormCheckbox-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue">
|
|
3
|
+
<el-checkbox v-for="option of desc.options" :key="option.value" :label="option.value" v-bind="option.attrs">
|
|
4
|
+
{{ option.text }}
|
|
5
|
+
</el-checkbox>
|
|
6
|
+
</el-checkbox-group>
|
|
7
|
+
</template>
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
export default {
|
|
10
|
+
name: 'ElPlusFormCheckbox',
|
|
11
|
+
inheritAttrs: false,
|
|
12
|
+
typeName: 'checkbox',
|
|
13
|
+
customOptions: {}
|
|
14
|
+
}
|
|
15
|
+
</script>
|
|
16
|
+
<script lang="ts" setup>
|
|
17
|
+
import { ref, useAttrs, onBeforeMount } from 'vue'
|
|
18
|
+
import { getAttrs, getEvents } from '../mixins'
|
|
19
|
+
|
|
20
|
+
const props = defineProps<{
|
|
21
|
+
modelValue?: string | number | '' | null
|
|
22
|
+
field: string
|
|
23
|
+
desc: { [key: string]: any }
|
|
24
|
+
formData: { [key: string]: any }
|
|
25
|
+
}>()
|
|
26
|
+
|
|
27
|
+
const emits = defineEmits(['update:modelValue'])
|
|
28
|
+
const currentValue = ref(props.modelValue)
|
|
29
|
+
emits('update:modelValue', currentValue)
|
|
30
|
+
|
|
31
|
+
const attrs = ref({} as any)
|
|
32
|
+
const isInit = ref(false)
|
|
33
|
+
const onEvents = ref(getEvents(props))
|
|
34
|
+
|
|
35
|
+
onBeforeMount(async () => {
|
|
36
|
+
attrs.value = await getAttrs(props, { ...useAttrs() })
|
|
37
|
+
isInit.value = true
|
|
38
|
+
})
|
|
39
|
+
</script>
|
|
40
|
+
<style lang="scss" scoped>
|
|
41
|
+
.ElPlusFormCheckbox-panel {
|
|
42
|
+
display: flex;
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-checkbox-group class="ElPlusFormCheckboxButton-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue">
|
|
3
|
-
<el-checkbox-button v-for="option of desc.options" :key="option.value" :label="option.value" v-bind="option.attrs">
|
|
4
|
-
{{ option.text }}
|
|
5
|
-
</el-checkbox-button>
|
|
6
|
-
</el-checkbox-group>
|
|
7
|
-
</template>
|
|
8
|
-
<script lang="ts">
|
|
9
|
-
export default {
|
|
10
|
-
name: 'ElPlusFormCheckboxButton',
|
|
11
|
-
inheritAttrs: false,
|
|
12
|
-
typeName: 'checkboxButton',
|
|
13
|
-
customOptions: {}
|
|
14
|
-
}
|
|
15
|
-
</script>
|
|
16
|
-
<script lang="ts" setup>
|
|
17
|
-
import { ref, useAttrs, onBeforeMount } from 'vue'
|
|
18
|
-
import { getAttrs, getEvents } from '../mixins'
|
|
19
|
-
|
|
20
|
-
const props = defineProps<{
|
|
21
|
-
modelValue?: string | number | '' | null
|
|
22
|
-
field: string
|
|
23
|
-
desc: { [key: string]: any }
|
|
24
|
-
formData: { [key: string]: any }
|
|
25
|
-
}>()
|
|
26
|
-
|
|
27
|
-
const emits = defineEmits(['update:modelValue'])
|
|
28
|
-
const currentValue = ref(props.modelValue)
|
|
29
|
-
emits('update:modelValue', currentValue)
|
|
30
|
-
|
|
31
|
-
const attrs = ref({} as any)
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<el-checkbox-group v-if="isInit" class="ElPlusFormCheckboxButton-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue">
|
|
3
|
+
<el-checkbox-button v-for="option of desc.options" :key="option.value" :label="option.value" v-bind="option.attrs">
|
|
4
|
+
{{ option.text }}
|
|
5
|
+
</el-checkbox-button>
|
|
6
|
+
</el-checkbox-group>
|
|
7
|
+
</template>
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
export default {
|
|
10
|
+
name: 'ElPlusFormCheckboxButton',
|
|
11
|
+
inheritAttrs: false,
|
|
12
|
+
typeName: 'checkboxButton',
|
|
13
|
+
customOptions: {}
|
|
14
|
+
}
|
|
15
|
+
</script>
|
|
16
|
+
<script lang="ts" setup>
|
|
17
|
+
import { ref, useAttrs, onBeforeMount } from 'vue'
|
|
18
|
+
import { getAttrs, getEvents } from '../mixins'
|
|
19
|
+
|
|
20
|
+
const props = defineProps<{
|
|
21
|
+
modelValue?: string | number | '' | null
|
|
22
|
+
field: string
|
|
23
|
+
desc: { [key: string]: any }
|
|
24
|
+
formData: { [key: string]: any }
|
|
25
|
+
}>()
|
|
26
|
+
|
|
27
|
+
const emits = defineEmits(['update:modelValue'])
|
|
28
|
+
const currentValue = ref(props.modelValue)
|
|
29
|
+
emits('update:modelValue', currentValue)
|
|
30
|
+
|
|
31
|
+
const attrs = ref({} as any)
|
|
32
|
+
const isInit = ref(false)
|
|
33
|
+
const onEvents = ref(getEvents(props))
|
|
34
|
+
|
|
35
|
+
onBeforeMount(async () => {
|
|
36
|
+
attrs.value = await getAttrs(props, { ...useAttrs() })
|
|
37
|
+
isInit.value = true
|
|
38
|
+
})
|
|
39
|
+
</script>
|
|
40
|
+
<style lang="scss" scoped>
|
|
41
|
+
.ElPlusFormCheckboxButton-panel {
|
|
42
|
+
display: flex;
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-color-picker class="ElPlusFormColor-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue" />
|
|
3
|
-
</template>
|
|
4
|
-
<script lang="ts">
|
|
5
|
-
export default {
|
|
6
|
-
name: 'ElPlusFormColor',
|
|
7
|
-
inheritAttrs: false,
|
|
8
|
-
typeName: 'color',
|
|
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
|
-
}>()
|
|
22
|
-
|
|
23
|
-
const emits = defineEmits(['update:modelValue'])
|
|
24
|
-
const currentValue = ref(props.modelValue)
|
|
25
|
-
const attrs = ref({} as any)
|
|
26
|
-
const onEvents = ref(getEvents(props))
|
|
27
|
-
// const { attrs, slots, onEvents } = useMixins({ modelValue: props.modelValue, field: props.field, desc: props.desc, formData: props.formData, useAttrs, useSlots })
|
|
28
|
-
emits('update:modelValue', currentValue)
|
|
29
|
-
|
|
30
|
-
onBeforeMount(async () => {
|
|
31
|
-
attrs.value = await getAttrs(props, { ...useAttrs() })
|
|
32
|
-
})
|
|
33
|
-
</script>
|
|
34
|
-
<style lang="scss" scoped>
|
|
35
|
-
.ElPlusFormColor-panel {
|
|
36
|
-
display: flex;
|
|
37
|
-
}
|
|
38
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-color-picker class="ElPlusFormColor-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue" />
|
|
3
|
+
</template>
|
|
4
|
+
<script lang="ts">
|
|
5
|
+
export default {
|
|
6
|
+
name: 'ElPlusFormColor',
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
typeName: 'color',
|
|
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
|
+
}>()
|
|
22
|
+
|
|
23
|
+
const emits = defineEmits(['update:modelValue'])
|
|
24
|
+
const currentValue = ref(props.modelValue)
|
|
25
|
+
const attrs = ref({} as any)
|
|
26
|
+
const onEvents = ref(getEvents(props))
|
|
27
|
+
// const { attrs, slots, onEvents } = useMixins({ modelValue: props.modelValue, field: props.field, desc: props.desc, formData: props.formData, useAttrs, useSlots })
|
|
28
|
+
emits('update:modelValue', currentValue)
|
|
29
|
+
|
|
30
|
+
onBeforeMount(async () => {
|
|
31
|
+
attrs.value = await getAttrs(props, { ...useAttrs() })
|
|
32
|
+
})
|
|
33
|
+
</script>
|
|
34
|
+
<style lang="scss" scoped>
|
|
35
|
+
.ElPlusFormColor-panel {
|
|
36
|
+
display: flex;
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-date-picker v-if="isInit" class="ElPlusFormDate-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue" />
|
|
3
|
-
</template>
|
|
4
|
-
<script lang="ts">
|
|
5
|
-
export default {
|
|
6
|
-
name: 'ElPlusFormDate',
|
|
7
|
-
inheritAttrs: false,
|
|
8
|
-
typeName: 'date',
|
|
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
|
-
}>()
|
|
22
|
-
|
|
23
|
-
const emits = defineEmits(['update:modelValue'])
|
|
24
|
-
const isInit = ref(false)
|
|
25
|
-
const attrs = ref({} as any)
|
|
26
|
-
const onEvents = ref(getEvents(props))
|
|
27
|
-
const currentValue = ref(props.modelValue)
|
|
28
|
-
emits('update:modelValue', currentValue)
|
|
29
|
-
|
|
30
|
-
onBeforeMount(async () => {
|
|
31
|
-
attrs.value = await getAttrs(props, { valueFormat: 'YYYY-MM-DD HH:mm:ss', editable: false, ...useAttrs() })
|
|
32
|
-
isInit.value = true
|
|
33
|
-
})
|
|
34
|
-
</script>
|
|
35
|
-
<style lang="scss" scoped>
|
|
36
|
-
.ElPlusFormDate-panel {
|
|
37
|
-
display: flex;
|
|
38
|
-
}
|
|
39
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-date-picker v-if="isInit" class="ElPlusFormDate-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue" />
|
|
3
|
+
</template>
|
|
4
|
+
<script lang="ts">
|
|
5
|
+
export default {
|
|
6
|
+
name: 'ElPlusFormDate',
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
typeName: 'date',
|
|
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
|
+
}>()
|
|
22
|
+
|
|
23
|
+
const emits = defineEmits(['update:modelValue'])
|
|
24
|
+
const isInit = ref(false)
|
|
25
|
+
const attrs = ref({} as any)
|
|
26
|
+
const onEvents = ref(getEvents(props))
|
|
27
|
+
const currentValue = ref(props.modelValue)
|
|
28
|
+
emits('update:modelValue', currentValue)
|
|
29
|
+
|
|
30
|
+
onBeforeMount(async () => {
|
|
31
|
+
attrs.value = await getAttrs(props, { valueFormat: 'YYYY-MM-DD HH:mm:ss', editable: false, ...useAttrs() })
|
|
32
|
+
isInit.value = true
|
|
33
|
+
})
|
|
34
|
+
</script>
|
|
35
|
+
<style lang="scss" scoped>
|
|
36
|
+
.ElPlusFormDate-panel {
|
|
37
|
+
display: flex;
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-date-picker class="el-plusF-form-daterange-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue">
|
|
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
|
-
}>()
|
|
27
|
-
|
|
28
|
-
const emits = defineEmits(['update:modelValue'])
|
|
29
|
-
const currentValue = ref(props.modelValue)
|
|
30
|
-
const slots = ref(Object.assign({}, useSlots(), props.desc.slots))
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<el-date-picker v-if="isInit" class="el-plusF-form-daterange-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue">
|
|
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
|
+
}>()
|
|
27
|
+
|
|
28
|
+
const emits = defineEmits(['update:modelValue'])
|
|
29
|
+
const currentValue = ref(props.modelValue)
|
|
30
|
+
const slots = ref(Object.assign({}, useSlots(), props.desc.slots))
|
|
31
|
+
const isInit = ref(false)
|
|
32
|
+
const attrs = ref({} as any)
|
|
33
|
+
const onEvents = ref(getEvents(props))
|
|
34
|
+
|
|
35
|
+
emits('update:modelValue', currentValue)
|
|
36
|
+
|
|
37
|
+
onBeforeMount(async () => {
|
|
38
|
+
attrs.value = await getAttrs(props, { type: 'daterange', format: 'YYYY-MM-DD', valueFormat: 'x', editable: false, ...useAttrs() })
|
|
39
|
+
isInit.value = true
|
|
40
|
+
})
|
|
41
|
+
</script>
|
|
42
|
+
<style lang="scss" scoped>
|
|
43
|
+
.el-plusF-form-daterange-panel {
|
|
44
|
+
display: flex;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -1,38 +1,40 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-date-picker class="ElPlusFormDatetime-panel" v-bind="attrs" v-on="onEvents" type="datetime" v-model="currentValue" />
|
|
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
|
-
}>()
|
|
22
|
-
|
|
23
|
-
const emits = defineEmits(['update:modelValue'])
|
|
24
|
-
const currentValue = ref(props.modelValue)
|
|
25
|
-
const attrs = ref({} as any)
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<el-date-picker v-if="isInit" class="ElPlusFormDatetime-panel" v-bind="attrs" v-on="onEvents" type="datetime" v-model="currentValue" />
|
|
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
|
+
}>()
|
|
22
|
+
|
|
23
|
+
const emits = defineEmits(['update:modelValue'])
|
|
24
|
+
const currentValue = ref(props.modelValue)
|
|
25
|
+
const attrs = ref({} as any)
|
|
26
|
+
const isInit = ref(false)
|
|
27
|
+
const onEvents = ref(getEvents(props))
|
|
28
|
+
|
|
29
|
+
emits('update:modelValue', currentValue)
|
|
30
|
+
|
|
31
|
+
onBeforeMount(async () => {
|
|
32
|
+
attrs.value = await getAttrs(props, { valueFormat: 'YYYY-MM-DD HH:mm:ss', ...useAttrs() })
|
|
33
|
+
isInit.value = true
|
|
34
|
+
})
|
|
35
|
+
</script>
|
|
36
|
+
<style lang="scss" scoped>
|
|
37
|
+
.ElPlusFormDatetime-panel {
|
|
38
|
+
display: flex;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-date-picker class="el-plusF-form-datetimerange-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue">
|
|
2
|
+
<el-date-picker v-if="isInit" class="el-plusF-form-datetimerange-panel" v-bind="attrs" v-on="onEvents" v-model="currentValue">
|
|
3
3
|
<!-- 非作用域插槽 -->
|
|
4
4
|
<template v-for="(item, key, index) in slots" #[key]="data" :key="index">
|
|
5
5
|
<slot :name="key" :data="data" />
|
|
@@ -29,12 +29,14 @@ const emits = defineEmits(['update:modelValue'])
|
|
|
29
29
|
const currentValue = ref(props.modelValue)
|
|
30
30
|
const slots = ref(Object.assign({}, useSlots(), props.desc.slots))
|
|
31
31
|
const attrs = ref({} as any)
|
|
32
|
+
const isInit = ref(false)
|
|
32
33
|
const onEvents = ref(getEvents(props))
|
|
33
34
|
|
|
34
35
|
emits('update:modelValue', currentValue)
|
|
35
36
|
|
|
36
37
|
onBeforeMount(async () => {
|
|
37
38
|
attrs.value = await getAttrs(props, { type: 'datetimerange', format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', editable: false, ...useAttrs() })
|
|
39
|
+
isInit.value = true
|
|
38
40
|
})
|
|
39
41
|
</script>
|
|
40
42
|
<style lang="scss" scoped>
|