@xilonglab/vue-main 1.3.13 → 1.3.16
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/package.json
CHANGED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineOptions({ name: "XlDateTime" })
|
|
3
|
+
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
const emits = defineEmits(['change', 'update:modelValue'])
|
|
8
|
+
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
modelValue: {
|
|
11
|
+
default: "",
|
|
12
|
+
},
|
|
13
|
+
placeholder: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "选择日期时间",
|
|
16
|
+
},
|
|
17
|
+
disabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
width: {
|
|
22
|
+
default: 100,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const value = computed({
|
|
27
|
+
get() {
|
|
28
|
+
return props.modelValue;
|
|
29
|
+
},
|
|
30
|
+
set(data) {
|
|
31
|
+
emits('change', data)
|
|
32
|
+
emits('update:modelValue', data)
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<el-date-picker class="xl-datetime xl-form-item" v-model="value" type="datetime" :placeholder="placeholder"
|
|
40
|
+
:style="{ width: `${width}px` }" :disabled="disabled" clearable value-format="YYYY-MM-DD HH:mm:ss" />
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
<style lang="less">
|
|
45
|
+
.xl-datetime {
|
|
46
|
+
.el-input__prefix {
|
|
47
|
+
display: none !important;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
</style>
|
|
51
|
+
|
package/packages/form/XlTime.vue
CHANGED
|
@@ -36,13 +36,13 @@ const value = computed({
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
<template>
|
|
39
|
-
<el-
|
|
40
|
-
:style="{ width: `${width}px` }" :disabled="disabled" clearable value-format="
|
|
39
|
+
<el-time-picker class="xl-time xl-form-item" v-model="value" :placeholder="placeholder"
|
|
40
|
+
:style="{ width: `${width}px` }" :disabled="disabled" clearable format="HH:mm" value-format="HH:mm" />
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
<style lang="less">
|
|
45
|
-
.
|
|
45
|
+
.xl-time {
|
|
46
46
|
.el-input__prefix {
|
|
47
47
|
display: none !important;
|
|
48
48
|
}
|