vue picture preload
Objective: Picture preloading can make users browse the following pages without half of the loading of the picture leading to poor browsing.
Method 1
Pictures should be preloaded when the project opens, and pre-loaders should be added to beforeCreate in App.vue
App.vue
beforeCreate(){
let count = 0;
let imgs = [
//use requi ...
Posted by patelp7 on Thu, 03 Oct 2019 04:03:46 -0700
Noejs console printing color and using koa to realize port and ip printing
I. Console Color Printing
Download console-color-mr
npm install console-color-mr --save-dev
The first usage:
Direct introduction of require('console-color-mr');
Modified the default color. console.info will output red directly
//use color
console.info('------------ default color--------');
conso ...
Posted by Anarking on Wed, 02 Oct 2019 13:22:07 -0700
vue-ztree-2.0 realizes tree structure
Reference resources: Official documents
Install vue-ztree:
npm install vue-ztree-2.0
main.js introduces vue-ztree:
import vueztree from 'vue-ztree-2.0/dist/vue-ztree-2.0.umd.min.js'
import 'vue-ztree-2.0/dist/vue-ztree-2.0.css'
Vue.use(vueztree)
app.js implements vue-ztree:
<template>
< ...
Posted by Lee W on Wed, 02 Oct 2019 08:23:48 -0700
Realization of Rongyun Live Chat Room (vue)
Recently, the company asked to do live video broadcasting function with chat room to record today First introduce the required Js Cloud Melting Technical Documentation https://www.rongcloud.cn/docs...
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="https://sdk-release.qnsdk.com/qiniu-web- ...
Posted by bearqst on Wed, 02 Oct 2019 08:05:49 -0700
Configuration of axios based on Vue
1, background
ajax requests are indispensable in project development
Some ajax requests do not require loading or request time is less than how much is not shown loading
Assimilation of requests in projects (error handling, return data formatting, loading, token processing)
Configuration is based on a ...
Posted by hoppyite on Wed, 02 Oct 2019 06:27:46 -0700
render rendering function of Vue and application of JSX
I. Template Defects
The greatest feature of template is that it is difficult to expand and difficult to expand. May cause logical redundancy
<Level :type="1">Ha-ha</Level>
<Level :type="2">Ha-ha</Level>
<Level :type="3">Ha-ha</Level>
Level components need to generate different labels for different type s
&l ...
Posted by sharey on Wed, 02 Oct 2019 02:33:06 -0700
The use of svg format font icon in vector vector library project
First, login to Aliyun Vector Icon Library and add the font icon to your project.
Two, Ali cloud icon four ways (recommended third ways to introduce, if you do not consider the network problem can be introduced online)
After entering the project, you will see that Aliyun can choose three ways to import ...
Posted by footiemadman007 on Tue, 01 Oct 2019 12:22:31 -0700
Application of axios interceptor - loading data before returning
axios is a Promise-based HTTP library, and the return value is the Promise object.
The front end requests data from the back end through axios, and we can intercept them through Axios interceptors before requests or responses are made by the then or catch.
Basic knowledge of axios interceptors:
// r ...
Posted by fareforce on Mon, 30 Sep 2019 04:13:15 -0700
uniapp Custom Bullet Window Component | Modal Modal Box | Loading Loading Load Box
uni-app Customized Modal Bullet Window Template uniPop, uniapp Imitated Wechat, android, ios Bullet Window Effect
uniPop has built-in animation effects, optional ios/android, customizable pop-up window style/customizable multi-button and event/pop-up window display location, auto-closing seconds, transparency of the mask layer, and whether or n ...
Posted by Domestics on Mon, 30 Sep 2019 01:07:58 -0700
Custom tabbar for fast applications (including show and jump tabs)
There is no native bottom tabbar in the fast application, if you have to implement it, you have to simulate it yourself. But if you do, there are some problems. For example, the component introduced in the custom tabbar can not trigger the onShow life cycle of the custom component, so you need to trigger it manually. Moreover, when you want to ...
Posted by chelerblondi on Mon, 30 Sep 2019 00:13:22 -0700