naive-ui/demo/documentation/components/time/zhCN/unix.demo.md
07akioni 487001d697 build: add changelog to site, refactor loader based on suffix
.demo.md for component demo
.demo-entry.md for demo entry
.md for common docs
2020-08-19 23:30:04 +08:00

20 lines
377 B
Markdown

# Unix 时间戳
使用 Unix 时间戳作为时间。
```html
<n-time :time="4320000000" :to="8640000000"/>
<br>
<n-time :time="4320000" :to="8640000" unix/>
<br>
<n-time :time="4320000000" format="yyyy-MM-dd hh:mm:ss"/>
<br>
<n-time :time="4320000" format="yyyy-MM-dd hh:mm:ss" unix/>
```
```js
export default {
data () {
return {
time: new Date(0)
}
}
}
```