181219 how mpvue achieves the effect of native storage through vuex

Two ways of using vuex in mpvue Troublesome Edition Create the store.js file in the src directory import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = new Vuex.Store({ state: { str: 'in store', num: 521 } }) export default store Import the index.vue file of the page import store from '../../sto ...

Added by matty on Thu, 05 Dec 2019 04:17:42 +0200

vue realizes animation effect among multiple elements or components

Transition of multiple elements <style>   .v-enter,.v-leave-to{     opacity: 0;   }   .v-enter-acitve,.v-leave-active{     opacity: opacity 1s;   } </style> <div id='app'>   <transition>     <div v-if='show'>hello world</div>     <div v-else>bye world</div>   </trans ...

Added by jpaloyo on Tue, 03 Dec 2019 17:14:59 +0200

The use of submit bar component in Vant Weapp

This paper introduces some problems that should be paid attention to when using the submit bar component in the development of Vant Weapp applet. Pit to pit, first on the sample code bar, from simple to complex order. main.js code main.json code index.vue code <template> <view> <van-panel title="Basic usage"> &l ...

Added by joeysarsenal on Sun, 01 Dec 2019 19:46:46 +0200

Applet development: pull up to load data

Introducer The requirement is to pull up and load data, which is actually to obtain paging data. The background is the normal ajax request paging data. The small program part is a little more complex. I checked some data, but I couldn't find the link to the data, so I can't put it for reference. Applet page When it comes to data loops, here's a ...

Added by sharyn on Sun, 01 Dec 2019 13:45:43 +0200

Smooth transition from jQuery to vue - 2

We continue a sharing last year. Recently, we have started many new sharing series. It is easy and enthusiastic to open up new ones. We all like to try new ones. This is the essence of human nature and the source of human progress. But we need to care about the existing rationally and maintain the existing. So stop and maintain som ...

Added by 8ennett on Sat, 30 Nov 2019 17:58:45 +0200

get request of axios - Code section

get method request of vue + elemetUI + axios bug code example: I. < script > · some codes data() { return { resumes :[], xss: [], dialogShareFormVisible: false, // Pop up box: new share will not be displayed by default } }, // =========================================================== ...

Added by Brink Kale on Sat, 30 Nov 2019 07:44:43 +0200

Using Vue's parent-child components to communicate to realize the function of todolist

First up code <body> <div id="root"> <div> <input v-model="inputValue" /> <button @click="handleClick">submit</button> </div> <ul> <todolist v-for="(item,index) of list" :key="index" :con ...

Added by Kardall on Fri, 29 Nov 2019 17:41:52 +0200

Vue source notes - data driven - Mount Vue instance

Vue version: 2.5.17-beta.0 Before analyzing the mounting method vm.$mount() of Vue instance, we have to mention two versions of Vue: Runtime + compiler Include only runtime The official Vue documentation also describes the differences between the two versions( Runtime + compiler vs. contains only runtime ), vm.$mount() is implemented in diffe ...

Added by pr0x on Wed, 27 Nov 2019 12:20:41 +0200

Learning record of vuex source code

First look vuex Source directory The source code is all in the src directory, and the entry file is index.js (or index. ESM. JS). When importing vuex from 'vuex', the entry is index.esm.js(esm: es6 module). Look inside import { Store, install } from './store' import { mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers } fr ...

Added by stanleycwb on Mon, 25 Nov 2019 16:07:47 +0200

Native table implements polling + css to modify the default scroll bar style

There are two requirements in the recent project (vue Series). Here is a record to share with you. Polling by native Table list Demand: Do not poll when the number of table lists is small, and only poll when the number exceeds a certain height; Move the mouse in to pause polling, move out to continue polling First, the prototype is as follows ...

Added by wizhippo on Thu, 21 Nov 2019 19:58:29 +0200