Skip to content

Commit

Permalink
perf: 日期format示例
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Jul 8, 2020
1 parent 9d24a9a commit 03955b5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Expand Up @@ -92,7 +92,21 @@ export const crudOptions = {
title: '日期时间',
key: 'datetime',
sortable: true,
type: 'datetime'
type: 'datetime',
form: {
component: {
props: {
format: 'yyyy-MM-dd HH:mm',
valueFormat: 'yyyy-MM-dd HH:mm'
}
}
},
component: {
props: {
// 行展示组件使用的dayjs,格式化标准与el-datepicker不一样
format: 'YYYY-MM-DD HH:mm'
}
}
},
{
title: '日期',
Expand Down
@@ -1,7 +1,6 @@
<template>
<el-switch
:value="value"
v-bind="_elProps"
@input="onInput"
@change="onChange"
:disabled="disabled"
Expand All @@ -12,6 +11,7 @@
:inactive-color="_inActive[dict.color]"
:inactive-value="_inActive[dict.value]"
:inactive-text="_inActive[dict.label]"
v-bind="_elProps"
>
</el-switch>
</template>
Expand Down

0 comments on commit 03955b5

Please sign in to comment.