Tag:father and son
-
Time:2021-1-17
Vue.component(‘input-len-control’, { template: ` <div class=”input-control-wrapper”> <input type=”text” v-model=”input” @input=”inputControl($event.target.value)” :placeholder=”placeholder”> <span class=”control”>{{curLen}}/{{maxLen}}</span> </div> `, data() { return { Curren: 0, // the length of the current input value input: ” } }, //Bi directional binding of parent-child components model: { prop: ‘inputValue’, event: ‘change’ }, props: { maxLen: { type: Number, default: 16 }, […]
-
Time:2020-9-23
The problem solved by BFC? 1. Elements with BFC enabled will not be covered by floating elements 2. If BFC is not enabled, the parent-child outer margins will be merged 3. The element that opens BFC can contain sub elements (solve high collapse) How to turn on BFC? 1. Float float is not a value […]
-
Time:2020-8-27
Method one: to locate the parent phase and the son <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <title>Document</title> <style> body,div,p,ul,li { margin:0; padding:0; } .box { position: relative; width: 1000px; height: 600px; background-color: pink; margin: 100px auto 0; } .min { position: absolute; top:0; left: 0; right: 0; bottom: 0; width: […]
-
Time:2020-6-27
introduce We know that there are many ways of parent-child communication in the micro front-end, such aslocation、Cookie、LocalStorage、windowBut they all have a common problem that they can’tReal time monitoring of changesFor example, skin changing or multi language switching, if you want to apply it to a sub project, you must refresh the page, and then you […]
-
Time:2020-4-19
1. Example of margin overlap Parent child element margins overlap <section id=”sec”> <style media=”screen”> #sec{ background-color: red; } .child{ height: 100px; margin-top: 10px; background: yellow; } </style> <article class=”child”></article> </section> Question:Sometimes when we set the margin top of the child element, we find that the child element does not have the effect of the top […]
-
Time:2020-4-3
The recursive loading of provinces and cities into treeview is just a representation of recursion. Using recursion can achieve many functions, similar to our local Disk directory file loading and so on is the principle, very convenient. In the future, the directory loading, adding, deleting, modifying parent-child nodes and so on will be attached
-
Time:2020-1-26
1. Example of margin overlap Parent child element margins overlap <section id=”sec”> <style media=”screen”> #sec{ background-color: red; } .child{ height: 100px; margin-top: 10px; background: yellow; } </style> <article class=”child”></article> </section> Question:Sometimes when we set the margin top of the child element, we find that the child element does not have the effect of the top […]