• Data communication between Vue components


    Props configuration item Function: let the component accept the data from the outside Transfer data: Accept data: admit of only interpretation props: [“name”], Limit type acceptance props: { name: String, }, Restriction type, necessity restriction, specify default value, accept props: { name: { type: String, required: true, Default: “Hu xiansen” }, }, Note: props is […]

  • Slot difference between Vue and react


    Vue has a slot, but react is not called a slot. His name is children Class slot in react class Title extends Component{   render (){     return( //Children slot. Insert the required value with children //Class is to use this props。 The function is to use props       <div> Title: {this. Props. Children}   </div>) }} Instantiate object export default class App extends Component {   render() {     return ( […]

  • Vue recursive component scope slot


    Personal websitehttps://kuangyx.cnRealization effectParent component call: <template> <div> <Tree :data=”data”> <template #default=”{ title }”> <div class=”prent”> {{title + “+ custom”}} </div> </template> </Tree> </div> </template> <script> import Tree from “./tree.vue”; export default { components: { Tree, }, data() { return { data: [{ Title: “parent 1”, children: [{ Title: “sub”, Children:[{title: “sun”,}] }], },{ Title: “parent […]

  • How to buy four screen or multi screen stock trading computer motherboard?


    The four screen or multi screen motherboard application display of double likes has gradually penetrated into the use of users in all walks of life. For example, for programmer users, one screen is used to browse information and one screen is used to debug code; For personal entertainment, one screen browsing the web and one […]

  • Implementation of LRU cache (clock-2-hand) in nodejs


    Please indicate the source of Reprint: the official website of grape city. Grape city provides developers with professional development tools, solutions and services to empower developers. At the beginning of this article, we need to know what is caching? Caching is to prepare some important data according to the data list in advance. If there […]

  • How do I use JSX in Vue projects?


    Author:ManStruggling What is JSX? JSX is a combination of JavaScript and XML, that is, Javascript + XML = JSX. JSX comes from Facebook and can write XML in JavaScript. Because of this feature, it has the flexibility of JavaScript and the semantics and intuition of HTML Why use JSX? JSX is more readable than createElement […]

  • Vue component development – > (personal learning notes)


    @ catalogue Vue 1. Component development 1.1 basic use process 1.2 global and local components 1.3 parent and child components 1.4 syntax of registered components 1.5 formwork extraction 1.6 data in components 1.7 parent child component communication Father to son props Son to father Parent child component communication case Watch monitor changes Access method of […]

  • 13. Use of slots


    Know slot During development, we often encapsulate reusable components: We’ll passpropsPass some to the componentdata, let components display; But in order to make this component more universal, we can’tContent in componentLimited to fixeddiv、spanAnd so on; For example, in some cases, we use the component and want the component to display a button. In some cases, […]

  • Learn about V8 (I) what strategies are adopted in V8 to improve the access speed of object attributes


    From the perspective of JavaScript language, JavaScript objects are like a dictionary. Strings are used as key names, and any object can be used as key values. You can read and write key values through key names. However, when implementing object storage in V8, the dictionary storage mode is not completely adopted, which is mainly […]

  • vue3 + typescript


    1、 Vue3 1. Life cycle The hook function of the life cycle is prefixed with on, and the method of destroying components is changed beforeDestroy -> beforeUnmountdestroyed -> unmouted 2. Global variable Vue.prototype.$http = ” //vue3 const app = createApp({}); app.config.globalProperties.$http = ” 3. Vue instantiation //Vue3 creates Vue instantiation through createapp createApp(App, {}).use(store).use(router).mount(‘#app’) //vue2 […]

  • Summary of high frequency front-end interview questions Vue


    Vue consensus:In Vue, we are used to calling virtual DOM vnode, which can represent either a vnode node or a vnode tree.The core of the component is that it can produce a pile of vnodes.For Vue, the core of a component is its rendering function. The essence of component mounting is to execute the rendering […]

  • vue3. 0 disruptive changes – functional components


    Functional components can only be created through simple functions, and the functional option is discarded. Functional components vary greatly, mainly in the following aspects: Performance in vue3 The promotion of 0 can be basically ignored, so the state component is recommended in vue3 Functional components can only be declared and received in the form of […]