Comparing version 1.0.4 to 1.0.5
@@ -11,3 +11,3 @@ import * as core from './src/core' | ||
*/ | ||
export function mixin (methods) { | ||
function mixin (methods) { | ||
if (methods) { | ||
@@ -27,5 +27,6 @@ Object.keys(methods).forEach(function (name) { | ||
mixin(browse) | ||
XEUtils.mixin = mixin | ||
export var constructor = XEUtils | ||
export * from './src/core' | ||
export * from './src/browse' | ||
export default XEUtils |
{ | ||
"name": "xe-utils", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "xe-utils 提供一整套实用函数式编程功能", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,3 +19,3 @@ # xe-utils 提供一整套实用函数式编程功能 | ||
``` shell | ||
import * as XEUtils from 'xe-utils' | ||
import XEUtils from 'xe-utils' | ||
@@ -29,5 +29,6 @@ let dateStr = XEUtils.dateToString(new Date()) | ||
import Vue from 'vue' | ||
import XEUtils from 'xe-utils' | ||
import VXEUtils from 'vxe-utils' | ||
Vue.use(VXEUtils) | ||
Vue.use(VXEUtils, XEUtils) | ||
@@ -37,2 +38,17 @@ // 在Vue实例中使用 | ||
``` | ||
### 支持自定义扩展 | ||
``` shell | ||
import Vue from 'vue' | ||
import XEUtils from 'xe-utils' | ||
import VXEUtils from 'vxe-utils' | ||
import customs from './customs' // ./customs.js export function custom1 () {} | ||
XEUtils.mixin(customs) | ||
Vue.use(VXEUtils, XEUtils) | ||
// 调用自定义扩展函数 | ||
this.$utils.custom1() | ||
``` | ||
## API : | ||
@@ -39,0 +55,0 @@ ### *./core/base* |
49428
1133
519