Several ways of Vue loading components and dynamic loading components

Component is one of the most powerful features of Vue.js. Components can extend HTML elements and encapsulate reusable code. This article introduces several ways of Vue loading component and dynamic loading component through the example code. Please refer to it for your reference What is a component: Component is one of the most powerful feat ...

Posted by RiBlanced on Sun, 08 Dec 2019 11:51:19 -0800

How to create a wonderful rainbow loading effect with pure CSS

Effect preview Online demo Press the "click preview" button on the right to preview on the current page, and click the link to preview in full screen. https://codepen.io/comehope/pen/vjvoow Interactive video tutorial This video is interactive. You can pause the video at any time and edit the code in the video. Please use chrome, safa ...

Posted by goa103 on Sun, 08 Dec 2019 05:58:25 -0800

CSS selector -- Handling parent element height and outer margin overflow of pseudo element selector

1. The height of the parent element is not enough due to the floating of the child element Problem Description: a parent element with a minimum height of 100px is nested with a child element with a height of 300px. When the child element floats, the height of the parent element does not increase.Question view:Desired view: Code to be solved: & ...

Posted by YodaOfCamarilla on Sun, 08 Dec 2019 05:17:04 -0800

Small program voice synthesis tts docking multi platform (iFLYTEK, Spitzer, Baidu)

Features of applet functions Text to speech Multi platform and multi pronunciation Adjustable speech speed Audio download available Conscience products without advertisement Small program code Connected to online voice recognition service Sibi dui platform (more than 40 free speakers) IFLYTEK open platform (5 free speakers) Baidu voice ( ...

Posted by RW on Sun, 08 Dec 2019 04:19:19 -0800

Define your own chart echart component based on vue2

First install the echarts cnpm i echarts -S, and then define the parent component <template> <div> <echarts :option="echartOpion"></echarts> </div> </template> <script> import echarts from './echarts.vue' // Introduce subcomponents export default { data() { return ...

Posted by keyurjbhatt on Sat, 07 Dec 2019 23:57:48 -0800

Some wonderful date conversion in javascript

1. Get today's 0:0:0:0 seconds (usually used to get the start date) new Date(new Date().toLocaleDateString()); // Mon Nov 12 2018 00:00:00 GMT+0800 (China standard time) 2. Get the date one month ago new Date(new Date().setMonth(new Date().getMonth()-1)); //Fri Oct 12 2018 17:20:07 GMT+0800 (China standard time) 3. Get 0:00:00 of a month ag ...

Posted by phisher1 on Sat, 07 Dec 2019 22:09:00 -0800

Building a project with gulp

I. environmental preparation 1.1 introduction to gulp gulp is a front-end automatic construction tool based on the file flow of node.js. It can be used to build automatic workflow and simplify workload Official definition: build system based on file flow Core files: gulpfile.js and package.json gulpfile.js: task script package.json: task con ...

Posted by wee_eric on Sat, 07 Dec 2019 20:45:11 -0800

Style writing of CSS3

In many projects, the function of grid display needs to be realized. There is a gray dividing line in the middle, but not on both sides. As shown in the picture: According to the general idea, set the width of li, and add style to li label by nth of type (n) {}. Set the width of each Li to 33.33%, but when we add 1px border, the rightmost cont ...

Posted by Kiubbo on Sat, 07 Dec 2019 16:55:09 -0800

Using central event bus in vue

In vue, props is used to transfer values from the parent component to the child component, and event bus can be used to transfer values between non parent and child components, or vuex can be used to see the following event bus examples. Code on, as follows: 1,vue-bus.js     List-1 vue-bus.js const install = function (Vue) { const Bus = ...

Posted by lli2k5 on Sat, 07 Dec 2019 13:33:09 -0800

Asynchronous programming using Hooks

This excerpt is from Rax's official website rax.js.org introduce Javascript is a single-threaded programming language. A single-threaded feature is that it can only handle one thing at a time, and the time-consuming execution of the current code task can block subsequent code execution.Asynchronous programming is an event-driven program ...

Posted by Trafalger on Sat, 07 Dec 2019 04:19:10 -0800