|
@@ -1,27 +1,29 @@
|
|
|
<template>
|
|
|
- <el-date-picker
|
|
|
- style="width: 100%"
|
|
|
- :type="type"
|
|
|
- v-bind="$attrs"
|
|
|
- v-model="state.paramVal"
|
|
|
- clearable
|
|
|
- :placeholder="
|
|
|
- (typeof $attrs.disabled !== 'undefined' && $attrs.disabled !== false) ||
|
|
|
- state.formView
|
|
|
- ? ''
|
|
|
- : $attrs.placeholder
|
|
|
- ? $attrs.placeholder
|
|
|
- : `请选择${label}`
|
|
|
- "
|
|
|
- :valueFormat="valueFormatCpt"
|
|
|
- :format="formatCpt"
|
|
|
- unlink-panels
|
|
|
- :disabled="isValue($attrs.disabled) ? $attrs.disabled : state.formView"
|
|
|
- >
|
|
|
- <template #default="cell">
|
|
|
- <slot name="default" :cell="cell"></slot>
|
|
|
- </template>
|
|
|
- </el-date-picker>
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-date-picker
|
|
|
+ style="width: 100%; height: 100%"
|
|
|
+ :type="type"
|
|
|
+ v-bind="$attrs"
|
|
|
+ v-model="state.paramVal"
|
|
|
+ clearable
|
|
|
+ :placeholder="
|
|
|
+ (typeof $attrs.disabled !== 'undefined' && $attrs.disabled !== false) ||
|
|
|
+ state.formView
|
|
|
+ ? ''
|
|
|
+ : $attrs.placeholder
|
|
|
+ ? $attrs.placeholder
|
|
|
+ : `请选择${label}`
|
|
|
+ "
|
|
|
+ :valueFormat="valueFormatCpt"
|
|
|
+ :format="formatCpt"
|
|
|
+ unlink-panels
|
|
|
+ :disabled="isValue($attrs.disabled) ? $attrs.disabled : state.formView"
|
|
|
+ >
|
|
|
+ <template #default="cell">
|
|
|
+ <slot name="default" :cell="cell"></slot>
|
|
|
+ </template>
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
@@ -105,4 +107,13 @@ const valueFormatCpt = computed(() => {
|
|
|
})
|
|
|
</script>
|
|
|
|
|
|
-<style scoped lang="scss"></style>
|
|
|
+<style scoped lang="scss">
|
|
|
+:deep(.el-range-editor) {
|
|
|
+ .el-range-input {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ .el-range-separator {
|
|
|
+ flex: unset !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|