diff --git a/README.md b/README.md index 44516f5..9a8085d 100644 --- a/README.md +++ b/README.md @@ -28,14 +28,7 @@ import Vue from 'vue' import XEAjax from 'xe-ajax' import VXEAjax from 'vxe-ajax' -// use: Vue.use(VXEAjax, XEAjax) - -// vue2.x: -// Vue.prototype.$ajax = XEAjax - -// vue3.x: -// app.config.globalProperties.$ajax = XEAjax ``` ```html diff --git a/gulpfile.js b/gulpfile.js index 61bca84..fa5680f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -33,12 +33,16 @@ gulp.task('build_umd', function () { })) .pipe(replace(`global.${exportModuleName} = mod.exports;`, `global.${exportModuleName} = mod.exports.default;`)) .pipe(rename({ - basename: pack.name + basename: pack.name, + suffix: '.umd', + extname: '.js' })) .pipe(gulp.dest('dist')) .pipe(uglify()) .pipe(rename({ - extname: '.min.js' + basename: pack.name, + suffix: '.umd.min', + extname: '.js' })) .pipe(gulp.dest('dist')) }) diff --git a/package.json b/package.json index 55ec14a..81a4830 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "vxe-ajax", - "version": "2.2.0", + "version": "2.2.1", "description": "用于 Vue 全局安装 xe-ajax", "main": "dist/vxe-ajax.common.js", - "unpkg": "dist/vxe-ajax.js", - "jsdelivr": "dist/vxe-ajax.js", + "unpkg": "dist/vxe-ajax.umd.min.js", + "jsdelivr": "dist/vxe-ajax.umd.min.js", "typings": "index.d.ts", "scripts": { "lib": "gulp build",