el-plus-crud 0.0.95 → 0.0.97
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/.eslintignore +18 -17
- package/.eslintrc.js +78 -78
- package/.lintstagedrc +3 -3
- package/.prettierrc.js +39 -39
- package/CHANGELOG.md +113 -109
- package/LICENSE +21 -21
- package/README.md +127 -127
- package/build.js +31 -31
- package/dist/el-plus-crud.mjs +2726 -6246
- package/example/App.vue +252 -252
- package/example/main.js +18 -18
- package/example/style.css +4 -4
- package/index.html +13 -13
- package/lib/components/el-plus-form/ElPlusForm.vue +88 -74
- package/lib/components/el-plus-form/ElPlusFormDialog.vue +5 -1
- package/lib/components/el-plus-form/ElPlusFormGroup.vue +49 -26
- package/lib/components/el-plus-form/components/ElPlusFormArea.vue +61 -62
- package/lib/components/el-plus-form/components/ElPlusFormAutocomplete.vue +49 -49
- package/lib/components/el-plus-form/components/ElPlusFormBtn.vue +28 -28
- package/lib/components/el-plus-form/components/ElPlusFormBtns.vue +8 -8
- package/lib/components/el-plus-form/components/ElPlusFormCascader.vue +64 -64
- package/lib/components/el-plus-form/components/ElPlusFormCascaderPanel.vue +71 -71
- package/lib/components/el-plus-form/components/ElPlusFormCheckbox.vue +5 -5
- package/lib/components/el-plus-form/components/ElPlusFormCheckboxButton.vue +45 -45
- package/lib/components/el-plus-form/components/ElPlusFormColor.vue +38 -39
- package/lib/components/el-plus-form/components/ElPlusFormDate.vue +40 -40
- package/lib/components/el-plus-form/components/ElPlusFormDaterange.vue +47 -47
- package/lib/components/el-plus-form/components/ElPlusFormDatetime.vue +41 -41
- package/lib/components/el-plus-form/components/ElPlusFormDatetimerange.vue +47 -47
- package/lib/components/el-plus-form/components/ElPlusFormFile.vue +2 -2
- package/lib/components/el-plus-form/components/ElPlusFormImage.vue +117 -117
- package/lib/components/el-plus-form/components/ElPlusFormInput.vue +3 -3
- package/lib/components/el-plus-form/components/ElPlusFormLink.vue +6 -6
- package/lib/components/el-plus-form/components/ElPlusFormLkuser.vue +6 -6
- package/lib/components/el-plus-form/components/ElPlusFormNbinput.vue +54 -54
- package/lib/components/el-plus-form/components/ElPlusFormNumber.vue +19 -11
- package/lib/components/el-plus-form/components/ElPlusFormPassword.vue +3 -3
- package/lib/components/el-plus-form/components/ElPlusFormQuickInput.vue +5 -5
- package/lib/components/el-plus-form/components/ElPlusFormRadio.vue +68 -68
- package/lib/components/el-plus-form/components/ElPlusFormRate.vue +54 -54
- package/lib/components/el-plus-form/components/ElPlusFormSelect.vue +57 -36
- package/lib/components/el-plus-form/components/ElPlusFormSlider.vue +39 -39
- package/lib/components/el-plus-form/components/ElPlusFormStatus.vue +7 -7
- package/lib/components/el-plus-form/components/ElPlusFormSwitch.vue +4 -4
- package/lib/components/el-plus-form/components/ElPlusFormTag.vue +8 -7
- package/lib/components/el-plus-form/components/ElPlusFormText.vue +111 -99
- package/lib/components/el-plus-form/components/ElPlusFormTextarea.vue +4 -3
- package/lib/components/el-plus-form/components/ElPlusFormTime.vue +3 -3
- package/lib/components/el-plus-form/components/ElPlusFormTimerange.vue +3 -3
- package/lib/components/el-plus-form/components/ElPlusFormTransfer.vue +46 -45
- package/lib/components/el-plus-form/components/ElPlusFormTree.vue +78 -77
- package/lib/components/el-plus-form/components/ElPlusFormTreeSelect.vue +61 -60
- package/lib/components/el-plus-form/components/ElPlusFormUpbtn.vue +6 -5
- package/lib/components/el-plus-form/components/ElPlusFormUpload.vue +161 -60
- package/lib/components/el-plus-form/components/components/file-icons/FileIcons.vue +1 -2
- 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 +6 -3
- package/lib/components/el-plus-form/util/index.ts +84 -0
- package/lib/components/el-plus-form/util/validate.ts +2 -2
- package/lib/components/el-plus-table/ElPlusTable.vue +908 -897
- package/lib/components/el-plus-table/ElPlusTableColumn.vue +1 -1
- package/lib/components/el-plus-table/components/columnItem.vue +4 -2
- package/lib/components/el-plus-table/components/settingColumn.vue +172 -172
- package/lib/components/el-plus-table/components/statisticInfo.vue +47 -47
- package/lib/components/el-plus-table/util/index.ts +22 -2
- package/lib/config/index.ts +39 -7
- package/lib/index.d.ts +4 -4
- package/lib/index.ts +2 -2
- package/package-lock.json +8100 -8101
- package/package.json +70 -71
- package/tsconfig.json +78 -78
- package/types/index.d.ts +60 -11
- package/vite.config.ts +78 -78
|
@@ -1,45 +1,45 @@
|
|
|
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
|
|
23
|
-
desc: { [key: string]: any }
|
|
24
|
-
formData
|
|
25
|
-
disabled?: boolean
|
|
26
|
-
}>()
|
|
27
|
-
|
|
28
|
-
const emits = defineEmits(['update:modelValue'])
|
|
29
|
-
const currentValue = ref(props.modelValue)
|
|
30
|
-
emits('update:modelValue', currentValue)
|
|
31
|
-
|
|
32
|
-
const attrs = ref({} as any)
|
|
33
|
-
const isInit = ref(false)
|
|
34
|
-
const onEvents = ref(getEvents(props))
|
|
35
|
-
|
|
36
|
-
onBeforeMount(async () => {
|
|
37
|
-
attrs.value = await getAttrs(props, { ...useAttrs() })
|
|
38
|
-
isInit.value = true
|
|
39
|
-
})
|
|
40
|
-
</script>
|
|
41
|
-
<style lang="scss" scoped>
|
|
42
|
-
.ElPlusFormCheckboxButton-panel {
|
|
43
|
-
display: flex;
|
|
44
|
-
}
|
|
45
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-checkbox-group v-if="isInit" class="ElPlusFormCheckboxButton-panel" v-bind="attrs" :disabled="disabled" 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
|
+
disabled?: boolean
|
|
26
|
+
}>()
|
|
27
|
+
|
|
28
|
+
const emits = defineEmits(['update:modelValue'])
|
|
29
|
+
const currentValue = ref(props.modelValue)
|
|
30
|
+
emits('update:modelValue', currentValue)
|
|
31
|
+
|
|
32
|
+
const attrs = ref({} as any)
|
|
33
|
+
const isInit = ref(false)
|
|
34
|
+
const onEvents = ref(getEvents(props))
|
|
35
|
+
|
|
36
|
+
onBeforeMount(async () => {
|
|
37
|
+
attrs.value = await getAttrs(props, { ...useAttrs() })
|
|
38
|
+
isInit.value = true
|
|
39
|
+
})
|
|
40
|
+
</script>
|
|
41
|
+
<style lang="scss" scoped>
|
|
42
|
+
.ElPlusFormCheckboxButton-panel {
|
|
43
|
+
display: flex;
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
@@ -1,39 +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
|
|
19
|
-
desc: { [key: string]: any }
|
|
20
|
-
formData
|
|
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 onEvents = ref(getEvents(props))
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-color-picker class="ElPlusFormColor-panel" v-bind="attrs" :disabled="disabled" 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
|
+
disabled?: boolean
|
|
22
|
+
}>()
|
|
23
|
+
|
|
24
|
+
const emits = defineEmits(['update:modelValue'])
|
|
25
|
+
const currentValue = ref(props.modelValue)
|
|
26
|
+
const attrs = ref({} as any)
|
|
27
|
+
const onEvents = ref(getEvents(props))
|
|
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,40 +1,40 @@
|
|
|
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
|
|
19
|
-
desc: { [key: string]: any }
|
|
20
|
-
formData
|
|
21
|
-
disabled?: boolean
|
|
22
|
-
}>()
|
|
23
|
-
|
|
24
|
-
const emits = defineEmits(['update:modelValue'])
|
|
25
|
-
const isInit = ref(false)
|
|
26
|
-
const attrs = ref({} as any)
|
|
27
|
-
const onEvents = ref(getEvents(props))
|
|
28
|
-
const currentValue = ref(props.modelValue)
|
|
29
|
-
emits('update:modelValue', currentValue)
|
|
30
|
-
|
|
31
|
-
onBeforeMount(async () => {
|
|
32
|
-
attrs.value = await getAttrs(props, { valueFormat: 'YYYY-MM-DD HH:mm:ss', editable: false, ...useAttrs() })
|
|
33
|
-
isInit.value = true
|
|
34
|
-
})
|
|
35
|
-
</script>
|
|
36
|
-
<style lang="scss" scoped>
|
|
37
|
-
.ElPlusFormDate-panel {
|
|
38
|
-
display: flex;
|
|
39
|
-
}
|
|
40
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-date-picker v-if="isInit" class="ElPlusFormDate-panel" v-bind="attrs" :disabled="disabled" 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
|
+
disabled?: boolean
|
|
22
|
+
}>()
|
|
23
|
+
|
|
24
|
+
const emits = defineEmits(['update:modelValue'])
|
|
25
|
+
const isInit = ref(false)
|
|
26
|
+
const attrs = ref({} as any)
|
|
27
|
+
const onEvents = ref(getEvents(props))
|
|
28
|
+
const currentValue = ref(props.modelValue)
|
|
29
|
+
emits('update:modelValue', currentValue)
|
|
30
|
+
|
|
31
|
+
onBeforeMount(async () => {
|
|
32
|
+
attrs.value = await getAttrs(props, { valueFormat: 'YYYY-MM-DD HH:mm:ss', editable: false, ...useAttrs() })
|
|
33
|
+
isInit.value = true
|
|
34
|
+
})
|
|
35
|
+
</script>
|
|
36
|
+
<style lang="scss" scoped>
|
|
37
|
+
.ElPlusFormDate-panel {
|
|
38
|
+
display: flex;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
@@ -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"
|
|
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
|
|
24
|
-
desc: { [key: string]: any }
|
|
25
|
-
formData
|
|
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" :disabled="disabled" 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
|
+
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"
|
|
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
|
|
19
|
-
desc: { [key: string]: any }
|
|
20
|
-
formData
|
|
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" :disabled="disabled" 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
|
+
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"
|
|
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
|
|
24
|
-
desc: { [key: string]: any }
|
|
25
|
-
formData
|
|
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" :disabled="disabled" 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: '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>
|
|
@@ -20,10 +20,10 @@ import FileIcons from './components/file-icons/FileIcons.vue'
|
|
|
20
20
|
|
|
21
21
|
const props = defineProps<{
|
|
22
22
|
modelValue?: Array<IOssInfo>
|
|
23
|
-
field
|
|
23
|
+
field?: string
|
|
24
24
|
loading?: boolean
|
|
25
25
|
desc: { [key: string]: any }
|
|
26
|
-
formData
|
|
26
|
+
formData?: { [key: string]: any }
|
|
27
27
|
}>()
|
|
28
28
|
</script>
|
|
29
29
|
<style lang="scss">
|