mirror of
https://github.com/analyticsjs/vue-baidu-analytics.git
synced 2025-04-05 19:41:42 +08:00
Added support for Vue3.
This commit is contained in:
parent
a3044c8e27
commit
bec6096098
@ -4,8 +4,8 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>vue baidu analytics demo</title>
|
<title>vue baidu analytics demo</title>
|
||||||
<script src="https://unpkg.com/vue/dist/vue.js"></script>
|
<script src="https://unpkg.com/vue@2.6.12/dist/vue.js"></script>
|
||||||
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
|
<script src="https://unpkg.com/vue-router@3.4.9/dist/vue-router.js"></script>
|
||||||
<style>
|
<style>
|
||||||
#app,
|
#app,
|
||||||
.section {
|
.section {
|
||||||
|
@ -42,6 +42,8 @@ Vue.use(baiduAnalytics, {
|
|||||||
isDebug: true
|
isDebug: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log('baiduAnalytics', baiduAnalytics);
|
||||||
|
|
||||||
// 初始化Vue
|
// 初始化Vue
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
@ -59,7 +61,8 @@ const app = new Vue({
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
pv () {
|
pv () {
|
||||||
this.$pushBAIDU.pv(this.pageUrl);
|
// this.$pushBAIDU.pv(this.pageUrl);
|
||||||
|
console.log(baiduAnalytics.pushBAIDU);
|
||||||
},
|
},
|
||||||
event () {
|
event () {
|
||||||
this.$pushBAIDU.event(this.category, this.action, this.label, this.value);
|
this.$pushBAIDU.event(this.category, this.action, this.label, this.value);
|
||||||
|
2
dist/modules/getVueVersion.d.ts
vendored
Normal file
2
dist/modules/getVueVersion.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
declare const getVueVersion: (Vue: Vue) => number;
|
||||||
|
export default getVueVersion;
|
24
dist/vue-baidu-analytics.js
vendored
24
dist/vue-baidu-analytics.js
vendored
@ -1,12 +1,12 @@
|
|||||||
/**
|
/**
|
||||||
* name: vue-baidu-analytics
|
* name: vue-baidu-analytics
|
||||||
* version: v1.1.0
|
* version: v2.0.0
|
||||||
* author: chengpeiquan
|
* author: chengpeiquan
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||||
typeof define === 'function' && define.amd ? define(factory) :
|
typeof define === 'function' && define.amd ? define(factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.baiduAnalytics = factory());
|
(global = global || self, global.baiduAnalytics = factory());
|
||||||
}(this, (function () { 'use strict';
|
}(this, (function () { 'use strict';
|
||||||
|
|
||||||
var BAIDU = (function () {
|
var BAIDU = (function () {
|
||||||
@ -92,6 +92,18 @@
|
|||||||
return PushBAIDU;
|
return PushBAIDU;
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
var getVueVersion = function (Vue) {
|
||||||
|
var version = 2;
|
||||||
|
var VUE_VERSION = String(Vue.version);
|
||||||
|
if (VUE_VERSION.slice(0, 2) === '2.') {
|
||||||
|
version = 2;
|
||||||
|
}
|
||||||
|
if (VUE_VERSION.slice(0, 2) === '3.') {
|
||||||
|
version = 3;
|
||||||
|
}
|
||||||
|
return version;
|
||||||
|
};
|
||||||
|
|
||||||
function install(Vue, _a) {
|
function install(Vue, _a) {
|
||||||
var router = _a.router, siteIdList = _a.siteIdList, _b = _a.isDebug, isDebug = _b === void 0 ? false : _b;
|
var router = _a.router, siteIdList = _a.siteIdList, _b = _a.isDebug, isDebug = _b === void 0 ? false : _b;
|
||||||
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
||||||
@ -104,7 +116,13 @@
|
|||||||
throw new Error('[vue-baidu-analytics] Missing tracking domain ID, add at least one of baidu analytics.');
|
throw new Error('[vue-baidu-analytics] Missing tracking domain ID, add at least one of baidu analytics.');
|
||||||
}
|
}
|
||||||
var pushBAIDU = new PushBAIDU(siteIdList, isDebug);
|
var pushBAIDU = new PushBAIDU(siteIdList, isDebug);
|
||||||
Vue.prototype.$pushBAIDU = pushBAIDU;
|
var VUE_VERSION = getVueVersion(Vue) || 0;
|
||||||
|
if (VUE_VERSION === 2) {
|
||||||
|
Vue.prototype.$pushBAIDU = pushBAIDU;
|
||||||
|
}
|
||||||
|
if (VUE_VERSION === 3) {
|
||||||
|
Vue.config.globalProperties.$pushBAIDU = pushBAIDU;
|
||||||
|
}
|
||||||
if (siteIdList) {
|
if (siteIdList) {
|
||||||
pushBAIDU.init();
|
pushBAIDU.init();
|
||||||
}
|
}
|
||||||
|
2
dist/vue-baidu-analytics.js.map
vendored
2
dist/vue-baidu-analytics.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/vue-baidu-analytics.min.js
vendored
4
dist/vue-baidu-analytics.min.js
vendored
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* name: vue-baidu-analytics
|
* name: vue-baidu-analytics
|
||||||
* version: v1.1.0
|
* version: v2.0.0
|
||||||
* author: chengpeiquan
|
* author: chengpeiquan
|
||||||
*/
|
*/
|
||||||
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t="undefined"!=typeof globalThis?globalThis:t||self).baiduAnalytics=i()}(this,(function(){"use strict";var t=function(){function t(t,i){void 0===t&&(t=""),void 0===i&&(i=!1),this.siteId=t,this.isDebug=i}return t.prototype.init=function(){window._hmt=window._hmt?window._hmt:[];var t=document.createElement("script");t.async=!0,t.src="https://hm.baidu.com/hm.js?"+this.siteId,document.querySelector("head").appendChild(t),this.isDebug&&console.log("[vue-baidu-analytics] siteId load done.\nsiteId: "+this.siteId)},t.prototype.setAccount=function(){window._hmt.push(["_setAccount",this.siteId])},t.prototype.trackPageview=function(t){if(t&&"string"==typeof t||(t="/"),t.includes("http")){var i=t.split("/"),e=i[0]+"//"+i[2];t=t.replace(e,"")}this.setAccount(),window._hmt.push(["_trackPageview",t]),this.isDebug&&console.log("[vue-baidu-analytics] track pv done.\nsiteId: "+this.siteId+"\npageUrl: "+t)},t.prototype.trackEvent=function(t,i,e,n){if("string"!=typeof t||"string"!=typeof i||!t||!i)throw new Error("[vue-baidu-analytics] Missing necessary category and operation information, and must be of type string.");e&&"string"==typeof e||(e=""),Number(n)||(n=1),this.setAccount(),window._hmt.push(["_trackEvent",t,i,e,n]),this.isDebug&&console.log("[vue-baidu-analytics] track event done.\nsiteId: "+this.siteId+"\ncategory: "+t+"\naction: "+i+"\nlabel: "+e+"\nvalue: "+n)},t}(),i=function(){function i(t,i){this.siteIdList=t,this.isDebug=i}return i.prototype.init=function(){var i=this;this.siteIdList.forEach((function(e){new t(e,i.isDebug).init()}))},i.prototype.pv=function(i){var e=this;this.siteIdList.forEach((function(n){new t(n,e.isDebug).trackPageview(i)}))},i.prototype.event=function(i,e,n,o){var s=this;this.siteIdList.forEach((function(a){new t(a,s.isDebug).trackEvent(i,e,n,o)}))},i}();return function(t,e){var n=e.router,o=e.siteIdList,s=e.isDebug,a=void 0!==s&&s;if("undefined"==typeof document||"undefined"==typeof window)return!1;if(!n)throw new Error("[vue-baidu-analytics] Must pass a Vue-Router instance to vue-baidu-analytics.");if(!o)throw new Error("[vue-baidu-analytics] Missing tracking domain ID, add at least one of baidu analytics.");var u=new i(o,a);t.prototype.$pushBAIDU=u,o&&u.init(),n.afterEach((function(t){var i=window.location.pathname.split("/").length,e=window.location.pathname.split("/").slice(0,i-1).join("/"),o="hash"===n.mode?e+"/#"+t.fullPath:""+e+t.fullPath;u.pv(o)}))}}));
|
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t=t||self).baiduAnalytics=i()}(this,(function(){"use strict";var t=function(){function t(t,i){void 0===t&&(t=""),void 0===i&&(i=!1),this.siteId=t,this.isDebug=i}return t.prototype.init=function(){window._hmt=window._hmt?window._hmt:[];var t=document.createElement("script");t.async=!0,t.src="https://hm.baidu.com/hm.js?"+this.siteId,document.querySelector("head").appendChild(t),this.isDebug&&console.log("[vue-baidu-analytics] siteId load done.\nsiteId: "+this.siteId)},t.prototype.setAccount=function(){window._hmt.push(["_setAccount",this.siteId])},t.prototype.trackPageview=function(t){if(t&&"string"==typeof t||(t="/"),t.includes("http")){var i=t.split("/"),e=i[0]+"//"+i[2];t=t.replace(e,"")}this.setAccount(),window._hmt.push(["_trackPageview",t]),this.isDebug&&console.log("[vue-baidu-analytics] track pv done.\nsiteId: "+this.siteId+"\npageUrl: "+t)},t.prototype.trackEvent=function(t,i,e,n){if("string"!=typeof t||"string"!=typeof i||!t||!i)throw new Error("[vue-baidu-analytics] Missing necessary category and operation information, and must be of type string.");e&&"string"==typeof e||(e=""),Number(n)||(n=1),this.setAccount(),window._hmt.push(["_trackEvent",t,i,e,n]),this.isDebug&&console.log("[vue-baidu-analytics] track event done.\nsiteId: "+this.siteId+"\ncategory: "+t+"\naction: "+i+"\nlabel: "+e+"\nvalue: "+n)},t}(),i=function(){function i(t,i){this.siteIdList=t,this.isDebug=i}return i.prototype.init=function(){var i=this;this.siteIdList.forEach((function(e){new t(e,i.isDebug).init()}))},i.prototype.pv=function(i){var e=this;this.siteIdList.forEach((function(n){new t(n,e.isDebug).trackPageview(i)}))},i.prototype.event=function(i,e,n,o){var s=this;this.siteIdList.forEach((function(a){new t(a,s.isDebug).trackEvent(i,e,n,o)}))},i}();return function(t,e){var n=e.router,o=e.siteIdList,s=e.isDebug,a=void 0!==s&&s;if("undefined"==typeof document||"undefined"==typeof window)return!1;if(!n)throw new Error("[vue-baidu-analytics] Must pass a Vue-Router instance to vue-baidu-analytics.");if(!o)throw new Error("[vue-baidu-analytics] Missing tracking domain ID, add at least one of baidu analytics.");var r=new i(o,a),u=function(t){var i=2,e=String(t.version);return"2."===e.slice(0,2)&&(i=2),"3."===e.slice(0,2)&&(i=3),i}(t)||0;2===u&&(t.prototype.$pushBAIDU=r),3===u&&(t.config.globalProperties.$pushBAIDU=r),o&&r.init(),n.afterEach((function(t){var i=window.location.pathname.split("/").length,e=window.location.pathname.split("/").slice(0,i-1).join("/"),o="hash"===n.mode?e+"/#"+t.fullPath:""+e+t.fullPath;r.pv(o)}))}}));
|
||||||
//# sourceMappingURL=vue-baidu-analytics.min.js.map
|
//# sourceMappingURL=vue-baidu-analytics.min.js.map
|
||||||
|
2
dist/vue-baidu-analytics.min.js.map
vendored
2
dist/vue-baidu-analytics.min.js.map
vendored
File diff suppressed because one or more lines are too long
15
node_modules/.bin/browserslist
generated
vendored
Normal file
15
node_modules/.bin/browserslist
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
|
case `uname` in
|
||||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -x "$basedir/node" ]; then
|
||||||
|
"$basedir/node" "$basedir/../browserslist/cli.js" "$@"
|
||||||
|
ret=$?
|
||||||
|
else
|
||||||
|
node "$basedir/../browserslist/cli.js" "$@"
|
||||||
|
ret=$?
|
||||||
|
fi
|
||||||
|
exit $ret
|
17
node_modules/.bin/browserslist.cmd
generated
vendored
Normal file
17
node_modules/.bin/browserslist.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@ECHO off
|
||||||
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
|
) ELSE (
|
||||||
|
SET "_prog=node"
|
||||||
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\browserslist\cli.js" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
18
node_modules/.bin/browserslist.ps1
generated
vendored
Normal file
18
node_modules/.bin/browserslist.ps1
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../browserslist/cli.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
15
node_modules/.bin/jsesc
generated
vendored
Normal file
15
node_modules/.bin/jsesc
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
|
case `uname` in
|
||||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -x "$basedir/node" ]; then
|
||||||
|
"$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@"
|
||||||
|
ret=$?
|
||||||
|
else
|
||||||
|
node "$basedir/../jsesc/bin/jsesc" "$@"
|
||||||
|
ret=$?
|
||||||
|
fi
|
||||||
|
exit $ret
|
17
node_modules/.bin/jsesc.cmd
generated
vendored
Normal file
17
node_modules/.bin/jsesc.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@ECHO off
|
||||||
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
|
) ELSE (
|
||||||
|
SET "_prog=node"
|
||||||
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\jsesc\bin\jsesc" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
18
node_modules/.bin/jsesc.ps1
generated
vendored
Normal file
18
node_modules/.bin/jsesc.ps1
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../jsesc/bin/jsesc" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
15
node_modules/.bin/json5
generated
vendored
Normal file
15
node_modules/.bin/json5
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
|
case `uname` in
|
||||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -x "$basedir/node" ]; then
|
||||||
|
"$basedir/node" "$basedir/../json5/lib/cli.js" "$@"
|
||||||
|
ret=$?
|
||||||
|
else
|
||||||
|
node "$basedir/../json5/lib/cli.js" "$@"
|
||||||
|
ret=$?
|
||||||
|
fi
|
||||||
|
exit $ret
|
17
node_modules/.bin/json5.cmd
generated
vendored
Normal file
17
node_modules/.bin/json5.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@ECHO off
|
||||||
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
|
) ELSE (
|
||||||
|
SET "_prog=node"
|
||||||
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\json5\lib\cli.js" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
18
node_modules/.bin/json5.ps1
generated
vendored
Normal file
18
node_modules/.bin/json5.ps1
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
15
node_modules/.bin/parser
generated
vendored
Normal file
15
node_modules/.bin/parser
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
|
case `uname` in
|
||||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -x "$basedir/node" ]; then
|
||||||
|
"$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
|
||||||
|
ret=$?
|
||||||
|
else
|
||||||
|
node "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
|
||||||
|
ret=$?
|
||||||
|
fi
|
||||||
|
exit $ret
|
17
node_modules/.bin/parser.cmd
generated
vendored
Normal file
17
node_modules/.bin/parser.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@ECHO off
|
||||||
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
|
) ELSE (
|
||||||
|
SET "_prog=node"
|
||||||
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\@babel\parser\bin\babel-parser.js" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
18
node_modules/.bin/parser.ps1
generated
vendored
Normal file
18
node_modules/.bin/parser.ps1
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
15
node_modules/.bin/regjsparser
generated
vendored
Normal file
15
node_modules/.bin/regjsparser
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
|
case `uname` in
|
||||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -x "$basedir/node" ]; then
|
||||||
|
"$basedir/node" "$basedir/../regjsparser/bin/parser" "$@"
|
||||||
|
ret=$?
|
||||||
|
else
|
||||||
|
node "$basedir/../regjsparser/bin/parser" "$@"
|
||||||
|
ret=$?
|
||||||
|
fi
|
||||||
|
exit $ret
|
17
node_modules/.bin/regjsparser.cmd
generated
vendored
Normal file
17
node_modules/.bin/regjsparser.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@ECHO off
|
||||||
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
|
) ELSE (
|
||||||
|
SET "_prog=node"
|
||||||
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\regjsparser\bin\parser" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
18
node_modules/.bin/regjsparser.ps1
generated
vendored
Normal file
18
node_modules/.bin/regjsparser.ps1
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../regjsparser/bin/parser" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../regjsparser/bin/parser" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
15
node_modules/.bin/semver
generated
vendored
Normal file
15
node_modules/.bin/semver
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
|
case `uname` in
|
||||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -x "$basedir/node" ]; then
|
||||||
|
"$basedir/node" "$basedir/../semver/bin/semver" "$@"
|
||||||
|
ret=$?
|
||||||
|
else
|
||||||
|
node "$basedir/../semver/bin/semver" "$@"
|
||||||
|
ret=$?
|
||||||
|
fi
|
||||||
|
exit $ret
|
17
node_modules/.bin/semver.cmd
generated
vendored
Normal file
17
node_modules/.bin/semver.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@ECHO off
|
||||||
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
|
) ELSE (
|
||||||
|
SET "_prog=node"
|
||||||
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\semver\bin\semver" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
18
node_modules/.bin/semver.ps1
generated
vendored
Normal file
18
node_modules/.bin/semver.ps1
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../semver/bin/semver" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../semver/bin/semver" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
15
node_modules/.bin/terser
generated
vendored
Normal file
15
node_modules/.bin/terser
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
|
||||||
|
case `uname` in
|
||||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -x "$basedir/node" ]; then
|
||||||
|
"$basedir/node" "$basedir/../terser/bin/terser" "$@"
|
||||||
|
ret=$?
|
||||||
|
else
|
||||||
|
node "$basedir/../terser/bin/terser" "$@"
|
||||||
|
ret=$?
|
||||||
|
fi
|
||||||
|
exit $ret
|
17
node_modules/.bin/terser.cmd
generated
vendored
Normal file
17
node_modules/.bin/terser.cmd
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@ECHO off
|
||||||
|
SETLOCAL
|
||||||
|
CALL :find_dp0
|
||||||
|
|
||||||
|
IF EXIST "%dp0%\node.exe" (
|
||||||
|
SET "_prog=%dp0%\node.exe"
|
||||||
|
) ELSE (
|
||||||
|
SET "_prog=node"
|
||||||
|
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
|
)
|
||||||
|
|
||||||
|
"%_prog%" "%dp0%\..\terser\bin\terser" %*
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /b %errorlevel%
|
||||||
|
:find_dp0
|
||||||
|
SET dp0=%~dp0
|
||||||
|
EXIT /b
|
18
node_modules/.bin/terser.ps1
generated
vendored
Normal file
18
node_modules/.bin/terser.ps1
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||||
|
# Fix case when both the Windows and Linux builds of Node
|
||||||
|
# are installed in the same directory
|
||||||
|
$exe=".exe"
|
||||||
|
}
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path "$basedir/node$exe") {
|
||||||
|
& "$basedir/node$exe" "$basedir/../terser/bin/terser" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
& "node$exe" "$basedir/../terser/bin/terser" $args
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
exit $ret
|
@ -0,0 +1 @@
|
|||||||
|
{"code":"import PushBAIDU from '@m/pushBAIDU';\r\nimport getVueVersion from '@m/getVueVersion';\r\nexport default function install(Vue, _a) {\r\n var router = _a.router, siteIdList = _a.siteIdList, _b = _a.isDebug, isDebug = _b === void 0 ? false : _b;\r\n if (typeof document === 'undefined' || typeof window === 'undefined') {\r\n return false;\r\n }\r\n if (!router) {\r\n throw new Error('[vue-baidu-analytics] Must pass a Vue-Router instance to vue-baidu-analytics.');\r\n }\r\n if (!siteIdList) {\r\n throw new Error('[vue-baidu-analytics] Missing tracking domain ID, add at least one of baidu analytics.');\r\n }\r\n var pushBAIDU = new PushBAIDU(siteIdList, isDebug);\r\n var VUE_VERSION = getVueVersion(Vue) || 0;\r\n if (VUE_VERSION === 2) {\r\n Vue.prototype.$pushBAIDU = pushBAIDU;\r\n }\r\n if (VUE_VERSION === 3) {\r\n Vue.config.globalProperties.$pushBAIDU = pushBAIDU;\r\n }\r\n if (siteIdList) {\r\n pushBAIDU.init();\r\n }\r\n router.afterEach(function (to) {\r\n var PAGE_PATH_DIR_COUNT = window.location.pathname.split('/').length;\r\n var PAGE_PATH = window.location.pathname.split('/').slice(0, PAGE_PATH_DIR_COUNT - 1).join('/');\r\n var PAGE_URL = router.mode === 'hash' ? PAGE_PATH + \"/#\" + to.fullPath : \"\" + PAGE_PATH + to.fullPath;\r\n pushBAIDU.pv(PAGE_URL);\r\n });\r\n}\r\n//# sourceMappingURL=main.js.map","references":["E:/Project/npm-project/vue-baidu-analytics/src/modules/pushBAIDU.ts","E:/Project/npm-project/vue-baidu-analytics/src/modules/getVueVersion.ts"],"map":"{\"version\":3,\"file\":\"main.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/main.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,SAAS,MAAM,cAAc,CAAA;AACpC,OAAO,aAAa,MAAM,kBAAkB,CAAA;AAK5C,MAAM,CAAC,OAAO,UAAU,OAAO,CAAE,GAAQ,EAAE,EAAyD;QAAvD,MAAM,YAAA,EAAE,UAAU,gBAAA,EAAE,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA;IAK9E,IAAK,OAAO,QAAQ,KAAK,WAAW,IAAI,OAAO,MAAM,KAAK,WAAW,EAAG;QACtE,OAAO,KAAK,CAAC;KACd;IAED,IAAK,CAAC,MAAM,EAAG;QACb,MAAM,IAAI,KAAK,CAAC,+EAA+E,CAAC,CAAC;KAClG;IAED,IAAK,CAAC,UAAU,EAAG;QACjB,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAC;KAC3G;IAKD,IAAM,SAAS,GAAQ,IAAI,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAG1D,IAAM,WAAW,GAAW,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAGpD,IAAK,WAAW,KAAK,CAAC,EAAG;QACvB,GAAG,CAAC,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;KACtC;IAGD,IAAK,WAAW,KAAK,CAAC,EAAG;QACvB,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,UAAU,GAAG,SAAS,CAAC;KACpD;IAKD,IAAK,UAAU,EAAG;QAChB,SAAS,CAAC,IAAI,EAAE,CAAC;KAClB;IAKD,MAAM,CAAC,SAAS,CAAE,UAAC,EAAM;QACvB,IAAM,mBAAmB,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;QACvE,IAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,mBAAmB,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClG,IAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAI,SAAS,UAAK,EAAE,CAAC,QAAU,CAAC,CAAC,CAAC,KAAG,SAAS,GAAG,EAAE,CAAC,QAAU,CAAC;QAExG,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC\"}","dts":{"name":"E:/Project/npm-project/vue-baidu-analytics/main.d.ts","writeByteOrderMark":false,"text":"export default function install(Vue: Vue, { router, siteIdList, isDebug }: Partial<Options>): boolean;\r\n"}}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
{"code":"import BAIDU from '@m/baidu';\r\nvar PushBAIDU = (function () {\r\n function PushBAIDU(siteIdList, isDebug) {\r\n this.siteIdList = siteIdList;\r\n this.isDebug = isDebug;\r\n }\r\n PushBAIDU.prototype.init = function () {\r\n var _this = this;\r\n this.siteIdList.forEach(function (siteId) {\r\n var SITE = new BAIDU(siteId, _this.isDebug);\r\n SITE.init();\r\n });\r\n };\r\n PushBAIDU.prototype.pv = function (pageUrl) {\r\n var _this = this;\r\n this.siteIdList.forEach(function (siteId) {\r\n var SITE = new BAIDU(siteId, _this.isDebug);\r\n SITE.trackPageview(pageUrl);\r\n });\r\n };\r\n PushBAIDU.prototype.event = function (category, action, label, value) {\r\n var _this = this;\r\n this.siteIdList.forEach(function (siteId) {\r\n var SITE = new BAIDU(siteId, _this.isDebug);\r\n SITE.trackEvent(category, action, label, value);\r\n });\r\n };\r\n return PushBAIDU;\r\n}());\r\nexport default PushBAIDU;\r\n//# sourceMappingURL=pushBAIDU.js.map","references":["E:/Project/npm-project/vue-baidu-analytics/src/modules/baidu.ts"],"map":"{\"version\":3,\"file\":\"pushBAIDU.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../src/modules/pushBAIDU.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,KAAK,MAAM,UAAU,CAAA;AAK5B;IAIE,mBAAa,UAAoB,EAAE,OAAgB;QACjD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAKD,wBAAI,GAAJ;QAAA,iBAKC;QAJC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,UAAC,MAAc;YACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IAKD,sBAAE,GAAF,UAAI,OAAe;QAAnB,iBAKC;QAJC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,UAAC,MAAc;YACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;IACL,CAAC;IAKD,yBAAK,GAAL,UAAO,QAAgB,EAAE,MAAc,EAAE,KAAa,EAAE,KAAa;QAArE,iBAKC;QAJC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,UAAC,MAAc;YACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC;IAEH,gBAAC;AAAD,CAAC,AAvCD,IAuCC;AAED,eAAe,SAAS,CAAC\"}","dts":{"name":"E:/Project/npm-project/vue-baidu-analytics/modules/pushBAIDU.d.ts","writeByteOrderMark":false,"text":"declare class PushBAIDU {\r\n siteIdList: string[];\r\n isDebug: boolean;\r\n constructor(siteIdList: string[], isDebug: boolean);\r\n init(): void;\r\n pv(pageUrl: string): void;\r\n event(category: string, action: string, label: string, value: number): void;\r\n}\r\nexport default PushBAIDU;\r\n"}}
|
@ -0,0 +1 @@
|
|||||||
|
{"code":"var getVueVersion = function (Vue) {\r\n var version = 2;\r\n var VUE_VERSION = String(Vue.version);\r\n if (VUE_VERSION.slice(0, 2) === '2.') {\r\n version = 2;\r\n }\r\n if (VUE_VERSION.slice(0, 2) === '3.') {\r\n version = 3;\r\n }\r\n return version;\r\n};\r\nexport default getVueVersion;\r\n//# sourceMappingURL=getVueVersion.js.map","references":[],"map":"{\"version\":3,\"file\":\"getVueVersion.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../src/modules/getVueVersion.ts\"],\"names\":[],\"mappings\":\"AAIA,IAAM,aAAa,GAAG,UAAC,GAAQ;IAC7B,IAAI,OAAO,GAAW,CAAC,CAAC;IAGxB,IAAM,WAAW,GAAW,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAGhD,IAAK,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,EAAG;QACtC,OAAO,GAAG,CAAC,CAAC;KACb;IAGD,IAAK,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,EAAG;QACtC,OAAO,GAAG,CAAC,CAAC;KACb;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAA;AAED,eAAe,aAAa,CAAC\"}","dts":{"name":"E:/Project/npm-project/vue-baidu-analytics/modules/getVueVersion.d.ts","writeByteOrderMark":false,"text":"declare const getVueVersion: (Vue: Vue) => number;\r\nexport default getVueVersion;\r\n"}}
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
{"code":"import BAIDU from '@m/baidu';\r\nvar PushBAIDU = (function () {\r\n function PushBAIDU(siteIdList, isDebug) {\r\n this.siteIdList = siteIdList;\r\n this.isDebug = isDebug;\r\n }\r\n PushBAIDU.prototype.init = function () {\r\n var _this = this;\r\n this.siteIdList.forEach(function (siteId) {\r\n var SITE = new BAIDU(siteId, _this.isDebug);\r\n SITE.init();\r\n });\r\n };\r\n PushBAIDU.prototype.pv = function (pageUrl) {\r\n var _this = this;\r\n this.siteIdList.forEach(function (siteId) {\r\n var SITE = new BAIDU(siteId, _this.isDebug);\r\n SITE.trackPageview(pageUrl);\r\n });\r\n };\r\n PushBAIDU.prototype.event = function (category, action, label, value) {\r\n var _this = this;\r\n this.siteIdList.forEach(function (siteId) {\r\n var SITE = new BAIDU(siteId, _this.isDebug);\r\n SITE.trackEvent(category, action, label, value);\r\n });\r\n };\r\n return PushBAIDU;\r\n}());\r\nexport default PushBAIDU;\r\n//# sourceMappingURL=pushBAIDU.js.map","references":["E:/Project/npm-project/vue-baidu-analytics/src/modules/baidu.ts"],"map":"{\"version\":3,\"file\":\"pushBAIDU.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../src/modules/pushBAIDU.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,KAAK,MAAM,UAAU,CAAA;AAK5B;IAIE,mBAAa,UAAoB,EAAE,OAAgB;QACjD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAKD,wBAAI,GAAJ;QAAA,iBAKC;QAJC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,UAAC,MAAc;YACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IAKD,sBAAE,GAAF,UAAI,OAAe;QAAnB,iBAKC;QAJC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,UAAC,MAAc;YACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;IACL,CAAC;IAKD,yBAAK,GAAL,UAAO,QAAgB,EAAE,MAAc,EAAE,KAAa,EAAE,KAAa;QAArE,iBAKC;QAJC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,UAAC,MAAc;YACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC;IAEH,gBAAC;AAAD,CAAC,AAvCD,IAuCC;AAED,eAAe,SAAS,CAAC\"}","dts":{"name":"E:/Project/npm-project/vue-baidu-analytics/modules/pushBAIDU.d.ts","writeByteOrderMark":false,"text":"declare class PushBAIDU {\r\n siteIdList: string[];\r\n isDebug: boolean;\r\n constructor(siteIdList: string[], isDebug: boolean);\r\n init(): void;\r\n pv(pageUrl: string): void;\r\n event(category: string, action: string, label: string, value: number): void;\r\n}\r\nexport default PushBAIDU;\r\n"}}
|
@ -0,0 +1 @@
|
|||||||
|
{"code":"import { isVue2, isVue3 } from 'vue-demi';\r\nimport PushBAIDU from '@m/pushBAIDU';\r\nexport var pushBAIDU = null;\r\nconsole.log({\r\n 'isVue2': isVue2,\r\n 'isVue3': isVue3\r\n});\r\nexport default function install(Vue, _a) {\r\n var router = _a.router, siteIdList = _a.siteIdList, _b = _a.isDebug, isDebug = _b === void 0 ? false : _b;\r\n if (typeof document === 'undefined' || typeof window === 'undefined') {\r\n return false;\r\n }\r\n if (!router) {\r\n throw new Error('[vue-baidu-analytics] Must pass a Vue-Router instance to vue-baidu-analytics.');\r\n }\r\n if (!siteIdList) {\r\n throw new Error('[vue-baidu-analytics] Missing tracking domain ID, add at least one of baidu analytics.');\r\n }\r\n pushBAIDU = new PushBAIDU(siteIdList, isDebug);\r\n if (isVue2) {\r\n Vue.prototype.$pushBAIDU = pushBAIDU;\r\n }\r\n if (siteIdList) {\r\n pushBAIDU.init();\r\n }\r\n router.afterEach(function (to) {\r\n var PAGE_PATH_DIR_COUNT = window.location.pathname.split('/').length;\r\n var PAGE_PATH = window.location.pathname.split('/').slice(0, PAGE_PATH_DIR_COUNT - 1).join('/');\r\n var PAGE_URL = router.mode === 'hash' ? PAGE_PATH + \"/#\" + to.fullPath : \"\" + PAGE_PATH + to.fullPath;\r\n pushBAIDU.pv(PAGE_URL);\r\n });\r\n}\r\n//# sourceMappingURL=main.js.map","references":["E:/Project/npm-project/vue-baidu-analytics/node_modules/vue-demi/lib/index.d.ts","E:/Project/npm-project/vue-baidu-analytics/src/modules/pushBAIDU.ts"],"map":"{\"version\":3,\"file\":\"main.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/main.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,SAAS,MAAM,cAAc,CAAA;AAKpC,MAAM,CAAC,IAAI,SAAS,GAAQ,IAAI,CAAC;AAEjC,OAAO,CAAC,GAAG,CAAC;IACV,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,MAAM;CACjB,CAAC,CAAC;AAGH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAE,GAAQ,EAAE,EAAyD;QAAvD,MAAM,YAAA,EAAE,UAAU,gBAAA,EAAE,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA;IAK9E,IAAK,OAAO,QAAQ,KAAK,WAAW,IAAI,OAAO,MAAM,KAAK,WAAW,EAAG;QACtE,OAAO,KAAK,CAAC;KACd;IAED,IAAK,CAAC,MAAM,EAAG;QACb,MAAM,IAAI,KAAK,CAAC,+EAA+E,CAAC,CAAC;KAClG;IAED,IAAK,CAAC,UAAU,EAAG;QACjB,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAC;KAC3G;IAKD,SAAS,GAAG,IAAI,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,IAAK,MAAM,EAAG;QACZ,GAAG,CAAC,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;KACtC;IAKD,IAAK,UAAU,EAAG;QAChB,SAAS,CAAC,IAAI,EAAE,CAAC;KAClB;IAKD,MAAM,CAAC,SAAS,CAAE,UAAC,EAAM;QACvB,IAAM,mBAAmB,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;QACvE,IAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,mBAAmB,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClG,IAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAI,SAAS,UAAK,EAAE,CAAC,QAAU,CAAC,CAAC,CAAC,KAAG,SAAS,GAAG,EAAE,CAAC,QAAU,CAAC;QAExG,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC\"}","dts":{"name":"E:/Project/npm-project/vue-baidu-analytics/main.d.ts","writeByteOrderMark":false,"text":"export declare let pushBAIDU: any;\r\nexport default function install(Vue: Vue, { router, siteIdList, isDebug }: Partial<Options>): boolean;\r\n"}}
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
{"code":"import PushBAIDU from '@m/pushBAIDU';\r\nexport var pushBAIDU = null;\r\nexport default function install(Vue, _a) {\r\n var router = _a.router, siteIdList = _a.siteIdList, _b = _a.isDebug, isDebug = _b === void 0 ? false : _b;\r\n if (typeof document === 'undefined' || typeof window === 'undefined') {\r\n return false;\r\n }\r\n if (!router) {\r\n throw new Error('[vue-baidu-analytics] Must pass a Vue-Router instance to vue-baidu-analytics.');\r\n }\r\n if (!siteIdList) {\r\n throw new Error('[vue-baidu-analytics] Missing tracking domain ID, add at least one of baidu analytics.');\r\n }\r\n pushBAIDU = new PushBAIDU(siteIdList, isDebug);\r\n try {\r\n Vue.prototype.$pushBAIDU = pushBAIDU;\r\n }\r\n catch (e) {\r\n console.log(e);\r\n }\r\n console.log(Vue);\r\n if ('version' in Vue) {\r\n console.log(Vue.version);\r\n }\r\n if (siteIdList) {\r\n pushBAIDU.init();\r\n }\r\n router.afterEach(function (to) {\r\n var PAGE_PATH_DIR_COUNT = window.location.pathname.split('/').length;\r\n var PAGE_PATH = window.location.pathname.split('/').slice(0, PAGE_PATH_DIR_COUNT - 1).join('/');\r\n var PAGE_URL = router.mode === 'hash' ? PAGE_PATH + \"/#\" + to.fullPath : \"\" + PAGE_PATH + to.fullPath;\r\n pushBAIDU.pv(PAGE_URL);\r\n });\r\n}\r\n//# sourceMappingURL=main.js.map","references":["E:/Project/npm-project/vue-baidu-analytics/src/modules/pushBAIDU.ts"],"map":"{\"version\":3,\"file\":\"main.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/main.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,SAAS,MAAM,cAAc,CAAA;AAKpC,MAAM,CAAC,IAAI,SAAS,GAAQ,IAAI,CAAC;AAEjC,MAAM,CAAC,OAAO,UAAU,OAAO,CAAE,GAAQ,EAAE,EAAyD;QAAvD,MAAM,YAAA,EAAE,UAAU,gBAAA,EAAE,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA;IAK9E,IAAK,OAAO,QAAQ,KAAK,WAAW,IAAI,OAAO,MAAM,KAAK,WAAW,EAAG;QACtE,OAAO,KAAK,CAAC;KACd;IAED,IAAK,CAAC,MAAM,EAAG;QACb,MAAM,IAAI,KAAK,CAAC,+EAA+E,CAAC,CAAC;KAClG;IAED,IAAK,CAAC,UAAU,EAAG;QACjB,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAC;KAC3G;IAKD,SAAS,GAAG,IAAI,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,IAAI;QACF,GAAG,CAAC,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;KACtC;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KAChB;IAED,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,IAAK,SAAS,IAAI,GAAG,EAAG;QACtB,OAAO,CAAC,GAAG,CAAE,GAAW,CAAC,OAAO,CAAC,CAAC;KACnC;IAKD,IAAK,UAAU,EAAG;QAChB,SAAS,CAAC,IAAI,EAAE,CAAC;KAClB;IAKD,MAAM,CAAC,SAAS,CAAE,UAAC,EAAM;QACvB,IAAM,mBAAmB,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;QACvE,IAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,mBAAmB,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClG,IAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAI,SAAS,UAAK,EAAE,CAAC,QAAU,CAAC,CAAC,CAAC,KAAG,SAAS,GAAG,EAAE,CAAC,QAAU,CAAC;QAExG,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC\"}","dts":{"name":"E:/Project/npm-project/vue-baidu-analytics/main.d.ts","writeByteOrderMark":false,"text":"export declare let pushBAIDU: any;\r\nexport default function install(Vue: Vue, { router, siteIdList, isDebug }: Partial<Options>): boolean;\r\n"}}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
{"code":"import BAIDU from '@m/baidu';\r\nvar PushBAIDU = (function () {\r\n function PushBAIDU(siteIdList, isDebug) {\r\n this.siteIdList = siteIdList;\r\n this.isDebug = isDebug;\r\n }\r\n PushBAIDU.prototype.init = function () {\r\n var _this = this;\r\n this.siteIdList.forEach(function (siteId) {\r\n var SITE = new BAIDU(siteId, _this.isDebug);\r\n SITE.init();\r\n });\r\n };\r\n PushBAIDU.prototype.pv = function (pageUrl) {\r\n var _this = this;\r\n this.siteIdList.forEach(function (siteId) {\r\n var SITE = new BAIDU(siteId, _this.isDebug);\r\n SITE.trackPageview(pageUrl);\r\n });\r\n };\r\n PushBAIDU.prototype.event = function (category, action, label, value) {\r\n var _this = this;\r\n this.siteIdList.forEach(function (siteId) {\r\n var SITE = new BAIDU(siteId, _this.isDebug);\r\n SITE.trackEvent(category, action, label, value);\r\n });\r\n };\r\n return PushBAIDU;\r\n}());\r\nexport default PushBAIDU;\r\n//# sourceMappingURL=pushBAIDU.js.map","references":["E:/Project/npm-project/vue-baidu-analytics/src/modules/baidu.ts"],"map":"{\"version\":3,\"file\":\"pushBAIDU.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../src/modules/pushBAIDU.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,KAAK,MAAM,UAAU,CAAA;AAK5B;IAIE,mBAAa,UAAoB,EAAE,OAAgB;QACjD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAKD,wBAAI,GAAJ;QAAA,iBAKC;QAJC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,UAAC,MAAc;YACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IAKD,sBAAE,GAAF,UAAI,OAAe;QAAnB,iBAKC;QAJC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,UAAC,MAAc;YACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;IACL,CAAC;IAKD,yBAAK,GAAL,UAAO,QAAgB,EAAE,MAAc,EAAE,KAAa,EAAE,KAAa;QAArE,iBAKC;QAJC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,UAAC,MAAc;YACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC;IAEH,gBAAC;AAAD,CAAC,AAvCD,IAuCC;AAED,eAAe,SAAS,CAAC\"}","dts":{"name":"E:/Project/npm-project/vue-baidu-analytics/modules/pushBAIDU.d.ts","writeByteOrderMark":false,"text":"declare class PushBAIDU {\r\n siteIdList: string[];\r\n isDebug: boolean;\r\n constructor(siteIdList: string[], isDebug: boolean);\r\n init(): void;\r\n pv(pageUrl: string): void;\r\n event(category: string, action: string, label: string, value: number): void;\r\n}\r\nexport default PushBAIDU;\r\n"}}
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
{"code":"import BAIDU from '@m/baidu';\r\nvar PushBAIDU = (function () {\r\n function PushBAIDU(siteIdList, isDebug) {\r\n this.siteIdList = siteIdList;\r\n this.isDebug = isDebug;\r\n }\r\n PushBAIDU.prototype.init = function () {\r\n var _this = this;\r\n this.siteIdList.forEach(function (siteId) {\r\n var SITE = new BAIDU(siteId, _this.isDebug);\r\n SITE.init();\r\n });\r\n };\r\n PushBAIDU.prototype.pv = function (pageUrl) {\r\n var _this = this;\r\n this.siteIdList.forEach(function (siteId) {\r\n var SITE = new BAIDU(siteId, _this.isDebug);\r\n SITE.trackPageview(pageUrl);\r\n });\r\n };\r\n PushBAIDU.prototype.event = function (category, action, label, value) {\r\n var _this = this;\r\n this.siteIdList.forEach(function (siteId) {\r\n var SITE = new BAIDU(siteId, _this.isDebug);\r\n SITE.trackEvent(category, action, label, value);\r\n });\r\n };\r\n return PushBAIDU;\r\n}());\r\nexport default PushBAIDU;\r\n//# sourceMappingURL=pushBAIDU.js.map","references":["E:/Project/npm-project/vue-baidu-analytics/src/modules/baidu.ts"],"map":"{\"version\":3,\"file\":\"pushBAIDU.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../src/modules/pushBAIDU.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,KAAK,MAAM,UAAU,CAAA;AAK5B;IAIE,mBAAa,UAAoB,EAAE,OAAgB;QACjD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAKD,wBAAI,GAAJ;QAAA,iBAKC;QAJC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,UAAC,MAAc;YACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IAKD,sBAAE,GAAF,UAAI,OAAe;QAAnB,iBAKC;QAJC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,UAAC,MAAc;YACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;IACL,CAAC;IAKD,yBAAK,GAAL,UAAO,QAAgB,EAAE,MAAc,EAAE,KAAa,EAAE,KAAa;QAArE,iBAKC;QAJC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAE,UAAC,MAAc;YACtC,IAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE,KAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC;IAEH,gBAAC;AAAD,CAAC,AAvCD,IAuCC;AAED,eAAe,SAAS,CAAC\"}","dts":{"name":"E:/Project/npm-project/vue-baidu-analytics/modules/pushBAIDU.d.ts","writeByteOrderMark":false,"text":"declare class PushBAIDU {\r\n siteIdList: string[];\r\n isDebug: boolean;\r\n constructor(siteIdList: string[], isDebug: boolean);\r\n init(): void;\r\n pv(pageUrl: string): void;\r\n event(category: string, action: string, label: string, value: number): void;\r\n}\r\nexport default PushBAIDU;\r\n"}}
|
@ -0,0 +1 @@
|
|||||||
|
{"code":"var getVueVersion = function (Vue) {\r\n var version = 2;\r\n var VUE_VERSION = String(Vue.version);\r\n if (VUE_VERSION.slice(0, 2) === '2.') {\r\n version = 2;\r\n }\r\n if (VUE_VERSION.slice(0, 2) === '3.') {\r\n version = 3;\r\n }\r\n return version;\r\n};\r\nexport default getVueVersion;\r\n//# sourceMappingURL=getVueVersion.js.map","references":[],"map":"{\"version\":3,\"file\":\"getVueVersion.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../../src/modules/getVueVersion.ts\"],\"names\":[],\"mappings\":\"AAIA,IAAM,aAAa,GAAG,UAAC,GAAQ;IAC7B,IAAI,OAAO,GAAW,CAAC,CAAC;IAGxB,IAAM,WAAW,GAAW,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAGhD,IAAK,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,EAAG;QACtC,OAAO,GAAG,CAAC,CAAC;KACb;IAGD,IAAK,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,EAAG;QACtC,OAAO,GAAG,CAAC,CAAC;KACb;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAA;AAED,eAAe,aAAa,CAAC\"}","dts":{"name":"E:/Project/npm-project/vue-baidu-analytics/modules/getVueVersion.d.ts","writeByteOrderMark":false,"text":"declare const getVueVersion: (Vue: Vue) => number;\r\nexport default getVueVersion;\r\n"}}
|
@ -0,0 +1 @@
|
|||||||
|
{"code":"import PushBAIDU from '@m/pushBAIDU';\r\nimport getVueVersion from '@m/getVueVersion';\r\nexport var pushBAIDU = null;\r\nfunction install(Vue, _a) {\r\n var router = _a.router, siteIdList = _a.siteIdList, _b = _a.isDebug, isDebug = _b === void 0 ? false : _b;\r\n if (typeof document === 'undefined' || typeof window === 'undefined') {\r\n return false;\r\n }\r\n if (!router) {\r\n throw new Error('[vue-baidu-analytics] Must pass a Vue-Router instance to vue-baidu-analytics.');\r\n }\r\n if (!siteIdList) {\r\n throw new Error('[vue-baidu-analytics] Missing tracking domain ID, add at least one of baidu analytics.');\r\n }\r\n pushBAIDU = new PushBAIDU(siteIdList, isDebug);\r\n var VUE_VERSION = getVueVersion(Vue) || 0;\r\n if (VUE_VERSION === 2) {\r\n Vue.prototype.$pushBAIDU = pushBAIDU;\r\n }\r\n if (VUE_VERSION === 3) {\r\n Vue.config.globalProperties.$pushBAIDU = pushBAIDU;\r\n }\r\n if (siteIdList) {\r\n pushBAIDU.init();\r\n }\r\n router.afterEach(function (to) {\r\n var PAGE_PATH_DIR_COUNT = window.location.pathname.split('/').length;\r\n var PAGE_PATH = window.location.pathname.split('/').slice(0, PAGE_PATH_DIR_COUNT - 1).join('/');\r\n var PAGE_URL = router.mode === 'hash' ? PAGE_PATH + \"/#\" + to.fullPath : \"\" + PAGE_PATH + to.fullPath;\r\n pushBAIDU.pv(PAGE_URL);\r\n });\r\n}\r\nexport default install;\r\n//# sourceMappingURL=main.js.map","references":["E:/Project/npm-project/vue-baidu-analytics/src/modules/pushBAIDU.ts","E:/Project/npm-project/vue-baidu-analytics/src/modules/getVueVersion.ts"],"map":"{\"version\":3,\"file\":\"main.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/main.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,SAAS,MAAM,cAAc,CAAA;AACpC,OAAO,aAAa,MAAM,kBAAkB,CAAA;AAK5C,MAAM,CAAC,IAAI,SAAS,GAAQ,IAAI,CAAC;AAKjC,SAAS,OAAO,CAAE,GAAQ,EAAE,EAAyD;QAAvD,MAAM,YAAA,EAAE,UAAU,gBAAA,EAAE,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA;IAK/D,IAAK,OAAO,QAAQ,KAAK,WAAW,IAAI,OAAO,MAAM,KAAK,WAAW,EAAG;QACtE,OAAO,KAAK,CAAC;KACd;IAED,IAAK,CAAC,MAAM,EAAG;QACb,MAAM,IAAI,KAAK,CAAC,+EAA+E,CAAC,CAAC;KAClG;IAED,IAAK,CAAC,UAAU,EAAG;QACjB,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAC;KAC3G;IAKD,SAAS,GAAG,IAAI,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAG/C,IAAM,WAAW,GAAW,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAGpD,IAAK,WAAW,KAAK,CAAC,EAAG;QACvB,GAAG,CAAC,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;KACtC;IAGD,IAAK,WAAW,KAAK,CAAC,EAAG;QACvB,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,UAAU,GAAG,SAAS,CAAC;KACpD;IAKD,IAAK,UAAU,EAAG;QAChB,SAAS,CAAC,IAAI,EAAE,CAAC;KAClB;IAKD,MAAM,CAAC,SAAS,CAAE,UAAC,EAAM;QACvB,IAAM,mBAAmB,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;QACvE,IAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,mBAAmB,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClG,IAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAI,SAAS,UAAK,EAAE,CAAC,QAAU,CAAC,CAAC,CAAC,KAAG,SAAS,GAAG,EAAE,CAAC,QAAU,CAAC;QAExG,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,eAAe,OAAO,CAAC\"}","dts":{"name":"E:/Project/npm-project/vue-baidu-analytics/main.d.ts","writeByteOrderMark":false,"text":"export declare let pushBAIDU: any;\r\ndeclare function install(Vue: Vue, { router, siteIdList, isDebug }: Partial<Options>): boolean;\r\nexport default install;\r\n"}}
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
@ -0,0 +1 @@
|
|||||||
|
[]
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user