Update style & rename fecha.js to date.js

pull/2/head
qingwei.li 2016-08-17 11:11:54 +08:00
parent e0a6241675
commit 62bd4b2b85
3 changed files with 33 additions and 20 deletions

View File

@ -1,9 +1,9 @@
<script> <script>
import fecha from 'packages/date-picker/src/util/fecha.js' import dateUtil from 'main/utils/date'
export default { export default {
data() { data() {
return { return {
currentDate: fecha.format(new Date(), 'yyyy-MM-dd HH:mm') currentDate: dateUtil.format(new Date(), 'yyyy-MM-dd HH:mm')
}; };
} }
} }
@ -17,8 +17,11 @@
.time { .time {
font-size: 13px; font-size: 13px;
color: #999; color: #999;
display: block; }
.bottom {
margin-top: 13px; margin-top: 13px;
line-height: 12px;
} }
.item { .item {
@ -27,6 +30,16 @@
.button { .button {
padding: 0; padding: 0;
float: right;
}
.image {
width: 100%;
display: block;
}
.clearfix {
@utils-clearfix;
} }
</style> </style>
@ -36,9 +49,9 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-card> <el-card>
<div slot="header" style="display: flex; align-items: center;"> <div slot="header" class="clearfix">
<div style="flex: 1; color: #20a0ff;">卡片名称</div> <span style="line-height: 36px;">卡片名称</span>
<el-button type="primary">操作按钮</el-button> <el-button style="float: right;" type="primary">操作按钮</el-button>
</div> </div>
<div v-for="o in 4" class="text item"> <div v-for="o in 4" class="text item">
{{'列表内容 ' + o }} {{'列表内容 ' + o }}
@ -49,9 +62,9 @@
```html ```html
<el-card> <el-card>
<div slot="header" style="display: flex; align-items: center;"> <div slot="header" class="clearfix">
<div style="flex: 1; color: #20a0ff;">卡片名称</div> <span style="line-height: 36px;">卡片名称</span>
<el-button type="primary">操作按钮</el-button> <el-button style="float: right;" type="primary">操作按钮</el-button>
</div> </div>
<div v-for="o in 4" class="text item"> <div v-for="o in 4" class="text item">
{{'列表内容 ' + o }} {{'列表内容 ' + o }}
@ -87,13 +100,13 @@
<el-row> <el-row>
<el-col :span="8" v-for="(o, index) in 2" :offset="index > 0 ? 2 : 0"> <el-col :span="8" v-for="(o, index) in 2" :offset="index > 0 ? 2 : 0">
<el-card :body-style="{ padding: '0px' }"> <el-card :body-style="{ padding: '0px' }">
<img src="~examples/assets/images/hamburger.png" width="100%" style="display: block;"> <img src="~examples/assets/images/hamburger.png" class="image">
<div style="padding: 14px; display: flex; align-items: flex-end;"> <div style="padding: 14px;">
<div style="flex: 1"> <span>好吃的汉堡</span>
<span>好吃的汉堡</span> <div class="bottom clearfix">
<time class="time">{{ currentDate }}</time> <time class="time">{{ currentDate }}</time>
<el-button type="text" class="button">操作按钮</el-button>
</div> </div>
<el-button type="text" class="button">操作按钮</el-button>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
@ -101,13 +114,13 @@
```html ```html
<el-card :body-style="{ padding: '0px' }"> <el-card :body-style="{ padding: '0px' }">
<img src="~examples/assets/images/hamburger.png" width="100%" style="display: block;"> <img src="~examples/assets/images/hamburger.png" class="image">
<div style="padding: 14px; display: flex; align-items: flex-end;"> <div style="padding: 14px;">
<div style="flex: 1"> <span>好吃的汉堡</span>
<span>好吃的汉堡</span> <div class="bottom clearfix">
<time class="time">{{ currentDate }}</time> <time class="time">{{ currentDate }}</time>
<el-button type="text" class="button">操作按钮</el-button>
</div> </div>
<el-button type="text" class="button">操作按钮</el-button>
</div> </div>
</el-card> </el-card>
``` ```

View File

@ -1,4 +1,4 @@
import dateUtil from './fecha'; import dateUtil from 'main/utils/date';
const newArray = function(start, end) { const newArray = function(start, end) {
let result = []; let result = [];