0.1.0 • Published 5 years ago

goyee v0.1.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

Vue2

Usage

import Vue from 'vue';
import goyee from 'goyee';

Vue.use(goyee);

Filters & Methods

// sum      =======================
{{ [1,2,3] | sum }}
// => 6
this.$goyee.sum([2,3])
// => 5

{{ [{num:2}, {num:3}] | sum('num') }}
// => 5

// uppercase =======================
{{ 'abc' | uppercase }}
// => ABC

// date      =======================
{{ 1508143679588 | date}}
// =>  2017-10-16

{{ 1508143679588 | date('year')}}
// =>  2017

{{ 1508143679588 | date('month')}}
// =>  2017-10

{{ 1508143679588 | date('dateTime')}}
// =>  2017-10-16 16:47

{{ 1508143679588 | date('longDateTime')}}
// =>  2017-10-16 16:47:59

{{ 1508143679588 | date('date-en')}}
// =>  Oct 16, 2017

// custom format
{{ 1508143679588 | date('YYYY / MM / DD')}}
// =>  2017 / 10 / 16

this.$goyee.date(new date(), 'timestamp')
// => 1508143679588 转成毫秒级时间戳

单独使用里面的方法

import {util} from 'goyee'
util.sum([2,3,4])
// => 9
0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

6 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago