Tag:father and son

  • Slots in Vue3

    Time:2022-8-25

    Today, I will discuss with you the concept of slot in Vue. Friends who are familiar with Vue know that parent and child components can transfer data to each other, but when passing the DOM structure, it is a bit troublesome to pass attributes. Let's first look at an example of a parent-child component. const […]

  • Summary of communication modes between Vue components (5 kinds)

    Time:2022-2-15

    Method 1: use props \ $emit to transfer values between parent and child components firstName:{{firstName}}

  • Slot in vue3

    Time:2022-1-14

    Xiao Bian will discuss the concept of slot in Vue with you today. All the partners who are familiar with Vue know that parent-child components can transfer data to each other, but it is troublesome to transfer DOM structure through attributes. Let’s take a look at an example of parent-child components const app= Vue.createApp({ template: […]

  • $emit events and in Vue Sync modifier

    Time:2022-1-13

    1. Knowledge points of this chapter Event naming is separated by “-“. (hump is not used because html is case insensitive) .syncUse of modifiers 2. $emit function and syntax It is usually used for child components to call parent component methods to enable child components to actively communicate with parent components. <!—html–> <div> <my-component @my-fun=’parentFun’></my-component> […]

  • Value transfer between non parent and child components (bus / bus / publish subscribe mode / observer mode)

    Time:2021-11-21

    <!doctype html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0″> <meta http-equiv=”X-UA-Compatible” content=”ie=edge”> < title > non parent-child component value transfer (bus / bus / publish subscribe mode / observer mode) < / Title > <link rel=”stylesheet” href=”../node_modules/bootstrap/dist/css/bootstrap.min.css”> </head> <body> <!– Use vuex or bus mechanism to solve the problem of […]

  • Fork analysis of Linux process creation

    Time:2021-7-8

       inLinuxIn the kernel, processes are maintained all the time. From process creation to process destruction, every environment has complex details. IntroductionLinuxHow does the kernel create processesforkThe creation of functions and subprocesses is also crucial for understanding multi process development. catalogue Fork() function Fork() example Virtual address space of parent-child process Fork() function First, let’s […]

  • The best way of state synchronization of Vue parent-child components

    Time:2021-6-15

    hello everyone! I am papaya, too fragrant! A front-end engineer, I wrote an article beforeThe best way to synchronize the state of Vue parent child componentsThis article describes the best way to synchronize parent-child components in most cases. It is also recommended by open source China. Thank you! As a continuation, this is a supplement […]

  • A question about updating database (classical parent-child ID Association)

    Time:2021-4-15

    Yesterday, a colleague sent a database topic, which is the classic parent-child ID design type in the same database table. You need to add a field to the original table. At the same time, you need to insert the parent-child details of the node into a new field in the original table. The specific effect […]

  • The development of Hadoop API

    Time:2021-3-27

    Error information Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/hadoop/tracing/SpanReceiverHos Reference link Simple use of Hadoop Java API Personal solutions: Due to the use of the parent-child Maven fileBoth add the corresponding jar version dependency

  • Vue component — input word limit

    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 }, […]

  • BFC (block formatting context) block level formatting context

    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 […]

  • How to center CSS horizontally and vertically

    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: […]