Skip to content

Commit

Permalink
fix(bubble-plugin): fix bubble.bubble is not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
xcyeye committed Dec 21, 2021
1 parent 09b0d9b commit ca2582d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 37 deletions.
5 changes: 3 additions & 2 deletions Aurora-plugin/vuepress-plugin-bubble/lib/AuroraBubble.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ export default {
}
},
mounted() {
const bubble = import("./bubble")
bubble.bubble(bubbleNumber,bubbleAlpha,alphaChangeSpeed,size,sizeChangeSpeed,riseSpeed,color)
import("./bubble").then(module => {
module.bubble(bubbleNumber,bubbleAlpha,alphaChangeSpeed,size,sizeChangeSpeed,riseSpeed,color)
})
}
}
</script>
Expand Down
23 changes: 11 additions & 12 deletions Aurora-plugin/vuepress-plugin-bubble/lib/bubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,14 @@ function Bubble() {
}


export default {
bubble: function (aurora_bubbleNumber,aurora_bubbleAlpha,aurora_alphaChangeSpeed,aurora_size,aurora_sizeChangeSpeed,aurora_riseSpeed,aurora_color) {
bubbleNumber = aurora_bubbleNumber
bubbleAlpha = aurora_bubbleAlpha
alphaChangeSpeed = aurora_alphaChangeSpeed
size = aurora_size
sizeChangeSpeed = aurora_sizeChangeSpeed
riseSpeed = aurora_riseSpeed
color = aurora_color
initHeader();
}
}

export function bubble(aurora_bubbleNumber,aurora_bubbleAlpha,aurora_alphaChangeSpeed,aurora_size,aurora_sizeChangeSpeed,aurora_riseSpeed,aurora_color) {
bubbleNumber = aurora_bubbleNumber
bubbleAlpha = aurora_bubbleAlpha
alphaChangeSpeed = aurora_alphaChangeSpeed
size = aurora_size
sizeChangeSpeed = aurora_sizeChangeSpeed
riseSpeed = aurora_riseSpeed
color = aurora_color
initHeader();
}
29 changes: 6 additions & 23 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
},

//在这里配置插件
/* plugins: [
plugins: [
"@vuepress/plugin-search",
{
locales: {
Expand All @@ -19,29 +19,12 @@ module.exports = {
},
},
},
/!*[
//'vuepress-plugin-coze',//你如果不是克隆我仓库项目,那么将此注释打开,并注释path.resolve(__dirname, "../../Aurora-plugin/vuepress-plugin-coze/lib/node/index.js"),
path.resolve(__dirname, "../../Aurora-plugin/vuepress-plugin-coze/lib/node/index.js"),
{
appId: 'leanCloud中得到的appId',
appKey: 'leanCloud中得到的appKey',
masterKey: 'leanCloud中得到的masterKey',
//下面这些是可选的
avatarPath: 'https://ooszy.cco.vin/img/blog-note/avatar-aurora.png',//说说头像url
registerPath: '/aurora-register', //自定义插件默认提供的注册页面路由,请在前面加上/
onlyAdministrator: false //是否运行其他注册的用户发布说说,true表示只有管理员可以发布
}
],*!/
[
path.resolve(__dirname, "../../Aurora-plugin/vuepress-plugin-coze/lib/node/index.js"),
{
/!*appId: '2A2Dyd2AffrnldhwftlEddVn-MdYXbMMI',
appId: '2A2Dyd2AffrnldhwftlEddVn-MdYXbMMI',
appKey: 'qHYTbb91iOPLelyC9lpbXxLH',
masterKey: 'eUwfvS3luIPnPiHS5SpEhDYr',*!/
appId: '83KY2mbDWyIVxyIpjCSl3Ywg-MdYXbMMI',
appKey: 'rNtp1g2lyfxhPG5E1S4z1DfP',
masterKey: 'Acab5WLWaCbTuFe5V210SBiY',
masterKey: 'eUwfvS3luIPnPiHS5SpEhDYr',
//下面这些是可选的
avatarPath: '/avatar.jpg',//说说头像url
registerPath: '/aurora-register', //自定义插件默认提供的注册页面路由,请在前面加上/
Expand Down Expand Up @@ -92,10 +75,10 @@ module.exports = {
}
}
],
/!*"vuepress-plugin-archive",{
/*"vuepress-plugin-archive",{
excludes: ['/footer.html','/404.html','/about/','/mood/','/link/','/tag/','/photo/'],
noTitle: '暂时没有标题配置'
}*!/
}*/

[
path.resolve(__dirname, "../../Aurora-plugin/vuepress-plugin-bubble/lib/node/index.js"),
Expand Down Expand Up @@ -124,7 +107,7 @@ module.exports = {
zIndex: -2
}
],
],*/
],
//设置head 一定要加入<script src="https://at.alicdn.com/t/font_2849934_v6y652peian.js"></script>项配置,否则一些图标不能正常显示
head: [
[
Expand Down

0 comments on commit ca2582d

Please sign in to comment.