Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] vux2 模板 .vue中的<script>内容被运行了两次 #84

Closed
justfn opened this issue Jun 22, 2019 · 1 comment
Closed

Comments

@justfn
Copy link

justfn commented Jun 22, 2019

vux-loader version

1.0.56

OS/Browsers version

win10 / chrome 75.0.3770.80(正式版本)(64 位)

Vue version

2.5.20

Code

项目默认模板的 App.vue 文件内
(仅仅在项目创建后,增加了一行控制台打印代码)

<script>
console.log('123');  // 新增加的一行 
export default {
  name: 'app'
}
</script>



image

Steps to reproduce

按照官网的操作执行
npm install vue-cli -g
vue init airyland/vux2 demo1
cd demo1
npm install
npm run dev

相关包的版本
"vux": "^2.2.0",
"vue": "^2.5.2"
[email protected]
"vux-loader": "^1.0.56",
"vue-loader": "^13.3.0",
"vue-template-compiler": "^2.5.2",
"babel-core": "^6.22.1",
"babel-loader": "^7.1.1",

项目默认模板的 App.vue 文件内,新增加一行控制台打印代码

<script>
console.log('123');  // 新增加的一行 
export default {
  name: 'app'
}
</script>

What is Expected?

刷新页面时,控制台log输出 123

What is actually happening?

控制台log输出了两次 123
image

虽然并没影响网页的功能, 但出现如下代码时就会有问题了
如打开网页 window.open('http://www.baidu.com','_blank') ,
但结果将会打开两个网页

@justfn justfn changed the title [Bug Report] vux2 模板 .vue中的<script>内容被运行了两次(虽然不影响结果) [Bug Report] vux2 模板 .vue中的<script>内容被运行了两次 Jun 22, 2019
@justfn
Copy link
Author

justfn commented Jun 24, 2019

#65

@justfn justfn closed this as completed Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant