Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of displaying blank space in Android lower version of vue project

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to solve the problem of vue project display blank in Android low version machine". In daily operation, I believe many people have doubts about how to solve the problem of vue project display blank in Android low version machine. Xiaobian consulted all kinds of materials and sorted out simple and easy operation methods. I hope to help you answer the doubts of "how to solve the problem of vue project display blank in Android low version machine"! Next, please follow the small series to learn together!

Vue project in Android low version machine shows blank reason:

Possible cause 1

Check Android debug, error, there may be arrow function syntax errors, or other syntax problems, it may be ES6 syntax problems.

Babel-Pollyfill is installed.

1. Install babel-polyfill and es6-promise

npm i babel-polyfill --savenpm i es6-promise --save

2.main.js introduced

import 'babel-polyfill'import Es6Promise from 'es6-promise'Es6Promise.polyfill()

3.webpack.base.conf.js

module.exports = {entry: { "babel-polyfill":"babel-polyfill", app: './ src/main.js' //originally only this line}

At this time, if the Android machine is still blank and cannot be opened, continue to check the reason 2.

Possible reason 2:

Check whether there is a packaging error after npm run build packaging. There are some small features that may not affect the page display and use, but the packaging is also wrong. We may ignore it. As long as there is an error in the packaging, Android must not display normally. Unlike browsers, the error I see here is

Found error location is in the router folder index.js file is used es6 object merge, and template string, this time just need to go to webpack.base.conf.js

{ test: /\.js$/, loader: 'babel-loader', include: [ resolve ('src '),//indicates that js in src directory needs to be compiled], },

Add an include, resolve router directory, if you write the path directly here, it will not work.

At this point, the study on "how to solve the blank display of vue project in Android low version machine" is over, hoping to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report