@~lisfan/vue-upyun-image-format
Version:
vue过滤器插件-又拍云图片处理工具:默认以指定的策略规则进行了处理优化
78 lines (54 loc) • 1.92 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>utils/get-network-type.js - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#install">install</a></li><li><a href="global.html#image-format">image-format</a></li></ul>
</nav>
<div id="main">
<h1 class="page-title">utils/get-network-type.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* @file 获取网络制式
*/
/**
* 获取网络制式
*
* [注] 检测浏览器是否支持navigator的connection API
*
* @returns {string}
*/
export default function getNetworkType() {
// 检测NetworkInformation接口是否存在,若存在
if (!navigator.connection) {
return 'unknow'
}
return navigator.connection.effectiveType
}</code></pre>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Nov 07 2017 17:34:19 GMT+0800 (CST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>