03 2022 档案

摘要:<template> <div @click="change">自由浏览</div> <component :is="CurrentCompoent[current]" ></component> </template> import { defineAsyncComponent, markRaw, 阅读全文
posted @ 2022-03-31 15:24 Life_countdown 阅读(4403) 评论(0) 推荐(0) 编辑
摘要:const arr = [1, 2, 3] // map循环 当item是简单数据类型时,不会修改原数组,复杂类型时会修改 const newArr = arr.map(item => item*2) console.log(arr, newArr); // 这种会影响源数据 const arr1 阅读全文
posted @ 2022-03-29 10:43 Life_countdown 阅读(50) 评论(0) 推荐(0) 编辑
摘要:import Test from 'Test.vue' render: h => { return h(Test,{ // 监听Test组件触发的方法 onTest() { console.log(111) } }, '') } // Test.vue组件 <template> <div class 阅读全文
posted @ 2022-03-28 15:33 Life_countdown 阅读(1521) 评论(0) 推荐(0) 编辑
摘要:<div class="tree_box"> <el-tree :data="treeData.list" node-key="id" :expand-on-click-node="false" :render-content="renderContent" /> </div> const tree 阅读全文
posted @ 2022-03-20 18:34 Life_countdown 阅读(1588) 评论(0) 推荐(0) 编辑
摘要:<el-dialog :close-on-click-modal="false" v-model="dialogFormVisible" :width="500" :before-close="handleClose" title="新增标签类别"> <el-form ref="ruleFormRe 阅读全文
posted @ 2022-03-20 15:04 Life_countdown 阅读(1320) 评论(0) 推荐(0) 编辑
摘要:// 子组件触发父组件的方法 const emit = defineEmits(["back", 'go']); const go:() => void = () => { emit('go', porps.currentPage+1) } const back:() => void = () => 阅读全文
posted @ 2022-03-18 17:20 Life_countdown 阅读(476) 评论(0) 推荐(0) 编辑
摘要::nth-child(-n+5){} 选择前5个[1, 5] :nth-child(n+5){} 选择第5可开始的 [5, +∞] :nth-child(-n+10):nth-child(n+5){} 选择5-10的包括10 [5, 10] :last-child{} 选择最后一个子元素 :nth- 阅读全文
posted @ 2022-03-16 18:48 Life_countdown 阅读(33) 评论(0) 推荐(0) 编辑
摘要:import React, { useState, useEffect } from "react"; // useState状态钩子,一个页面能有很多装填钩子(当一个函数中处理多个钩子时,只是把相同的钩子合并一个,只执行一次) import React, { useState, useEffect 阅读全文
posted @ 2022-03-14 14:45 Life_countdown 阅读(80) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示