https://github.com/erguotou520/vtc
Useful vue js tools and css style when develop
https://github.com/erguotou520/vtc
js-tool stylus vue vue2
Last synced: 27 days ago
JSON representation
Useful vue js tools and css style when develop
- Host: GitHub
- URL: https://github.com/erguotou520/vtc
- Owner: erguotou520
- Created: 2017-04-19T02:14:50.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-08-12T07:41:02.000Z (over 5 years ago)
- Last Synced: 2025-03-19T23:02:17.523Z (about 1 month ago)
- Topics: js-tool, stylus, vue, vue2
- Language: CSS
- Homepage:
- Size: 80.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VTC
Vue js tools and css stylus## Js tools usage
First install it as a dependency
```
npm i vtc -S
```
then
```
import vtc from 'vtc'vtc.clone(foo, true)
```
or
```
import { clone } from 'vtc'clone(foo, true)
```### Api
- Cache(namespace): Cache class to store data in localStorage
- CacheTool: Cache tool to create and get data
- search(array, key): filter array that matched the given search key
- is\[String|Number|RegExp|Bool|Date|Array|Object|Function\](data): test given data's type is matched
- merge(to, ...origins): vue merge, just merge the inited key
- clone(data, bool): clone data, deep clone when bool is true
- param(data): param data to http request object
- resolvePath(prefix, ...path): resolve path, like nodejs
- upperCaseFirst|lowerCaseFirst|param2Pascal|pascal2Param: words utils
- sleep(time): mock sleep method## Stylus usage
```
# App.vue@import '~vtc/stylus/index.styl'
OR
@import '~vtc/css/index.css';
```