03 2023 档案
摘要:参考: https://juejin.cn/post/7009441745301667853 方法一:配置alias //app.vue <img src="/images/logo.png" alt="" /> //vite.config.js import { defineConfig } fr
阅读全文
摘要:父组件 <template> <h3>父组件</h3> <div>{{ num }}</div> <div ref="box">使用ref获取dom</div> <div>watch监听数据-{{ watchVal }}</div> <about-view ref="child" :datas="n
阅读全文
摘要:store.js //vuex import { createStore } from 'vuex' export default createStore({ state: { num:1 }, mutations: { /** * @description: 修改num成新的num * @pa
阅读全文
摘要:在vue2中是使用this.refs.子组件名称.xxx方法,即可拿到子组件定义的值或者方法,在vue3中没办法这么拿取,必须子组件暴露后父组件才可以拿取到 //子组件 <template> <div class="child"> {{val}} </div> </template> <script
阅读全文
摘要://子组件 <template> <div class="child"> 我是子组件 </div> </template> <script setup> import {defineEmits,onMounted} from 'vue' const emit = defineEmits() onMo
阅读全文
摘要:父元素传递给子元素的数据,子元素使用defineProps进行接收 //父元素 <template> <div class="box"> <!-- 子组件引用 --> <v-child msg='我给子元素带的一段话'></v-child> </div> </template> //子元素
阅读全文
摘要:一个接口允许存在任意的属性 interface IPerson { name: string; age: number; userBio?: string; [propName: string]: any; } let wangzz: IPerson = { name: 'wangzz', age:
阅读全文
摘要:.menu-box overflow-y: scroll height 100% .menu-box::-webkit-scrollbar { display: none; } 参考连接: https://www.cnblogs.com/heleiya/p/13125946.html
阅读全文
摘要:const programmerOutput = [ { name: "Wangzz", outPrice: 112.23, }, { name: "Wangxx", outPrice: 431.223, }, { name: "Wangio", outPrice: 10.23, }, { name
阅读全文
摘要:参考:https://blog.csdn.net/Amnesiac666/article/details/122060057 ~(波浪号):A ~ B表示选择A标签后的所有B标签,但是A和B标签必须有相同的父元素。 ~(加号)加号又被称作兄弟选择器。A+B表示选择紧邻在A后面的B元素,且A和B必须拥
阅读全文
摘要:import React, { Component } from 'react' import ReactDOM from 'react-dom/client' import { nanoid } from 'nanoid' const root = ReactDOM.createRoot(docu
阅读全文
摘要:let userList = [ { name: "wangzz", code: '001', age: 24 }, { name: "wangxx", code: "002", age: 25 }, { name: "wangdd", code: "003", age: 26 }, { name:
阅读全文
摘要:=> 要么 .abc, .xyz { margin-left:20px; width: 100px; height: 100px; } => 要么 a.abc, a.xyz { margin-left:20px; width: 100px; height: 100px; } => 要么 a { ma
阅读全文
摘要:// 导入React、React-DOM // React负责创建React元素 - 虚拟DOM // ReactDOM负责渲染React元素 // JSX - 插值表达式 // 表达式 // 1. 变量 // 2. 基本数据类型:string、number、boolean、undefined、nu
阅读全文
摘要:import './index.css' import avatar from './images/avatar.png' import React from 'react' import { v4 as uuid } from 'uuid' // 时间格式化 function formatDate
阅读全文
摘要:nanoid生成唯一ID uuid生成唯一ID nanoid VS uuid 参考连接:https://blog.csdn.net/Cr1556648487/article/details/127012165
阅读全文
摘要:
阅读全文
摘要:切割数组得到头部 > let a = [1, 2, 3, 4, 5, 6] > a.slice(2) [3, 4, 5, 6] > a.splice(2) [3, 4, 5, 6] 根据索引切取指定范围内的数组 > let arr = [1, 2, 3, 4, 5, 6] > arr.slice(2
阅读全文
摘要:parentNdrcApprovalDate: [{ required: true, message: '请输入审批日期', trigger: 'blur' }], 将上面代码修改为 parentNdrcApprovalDate: [{ required: true, message: '请输入审批
阅读全文
摘要:参考: https://www.cnblogs.com/shayloyuki/p/16916054.html 核心代码 <div class='add-main-content' ref='addMainContent'> <a-button style='margin-left: 10px' ty
阅读全文
摘要:业务效果图 核心代码 <template> <a-date-picker v-model='record.payTime' show-time autoclear placeholder='请选择付款时间' valueFormat='YYYY-MM-DD HH:mm:ss' /> </templat
阅读全文
摘要:import lodash from 'lodash' getOfficeTreeDebounce: lodash.debounce(function() { this.getOfficeTree() }, 300), https://www.cnblogs.com/zhongxu6868/arti
阅读全文
摘要:路由配置 { path: '/manage/detailgovproject', key: 'detailgovproject', name: 'DetailGovProject', component: DetailGovProject }, fromPage.vue this.$router.p
阅读全文
摘要:业务效果 业务代码 参考ant design内Table表头日期字段排序 moment方法,仅用于处理日期格式 import moment from 'moment' sorter为组件内字段 { title: '计划日期', dataIndex: 'parentPlanApprovalDate',
阅读全文
摘要:1,有一个默认参数(event)" 2,有多个默认参数(queryString,cb为默认参数,index为自定义参数) @select="((queryString,cb)=>{queryU
阅读全文
摘要:参考: http://t.csdn.cn/g4aDZ 业务效果图 核心代码 <a-form-model-item label='付款详情' prop='rate'> <a-table :columns='current08Form.payColumns' :data-source='current0
阅读全文
摘要:<br><br>.title { position: relative; padding-left: 13px; margin: 24px 0px; } .title:before { content: ''; background-color: #3796EC; width: 4px; heigh
阅读全文
摘要:参考 https://juejin.cn/post/6995015040805896200 在utils文件夹中创建bus.js文件 import Vue from 'vue'; export const Bus = new Vue(); 在需要的地方使用 // Fisrt import { Bus
阅读全文
摘要:<style lang="scss" scoped> :deep(.ant-checkbox-group) { height: 200px !important; overflow-y: scroll; } </style>
阅读全文