💪 新手训练营
🛠️ 实用工具
🌟 实战经验
🧩 疑难杂症
🏗️ 项目模板
深浅模式
<!-- 数据导出弹窗 --> <export-table ref="export" :open-move="moveTrue" :export-name="exportName"></export-table> <!-- 工单详情弹窗 --> <workorderCom ref="workOrderCom" :open-move="moveWorkorder" :woid="workOrderId" :can-edit-btn="hasEdit" :team-id="teamDataInfo.tid" @workorderReturn="workorderFunc" ></workorderCom> ... <!--审批详情--> <workReportDetail ref="approvalRef" @opDetail="openSlider" :is-done="isDone" :can-edit-btn="hasEdit" @appvoalReturn="approvalFunc" />
/** * JavaScript模块注释示例 * 防抖函数,确保只有在一段时间的不活动后才执行 * @param {function|string} fn - 需要防抖的函数。如果是字符串,则假设该字符串是调用对象的方法。 * @param {number} [wait=600] - 执行防抖函数之前等待的毫秒数。 * @return {function} - 防抖函数。 */ export function debounce(fn, wait = 600){ //函数体 } /* 普通组件中 */ // 表格分页 handlePageSize({ page, size }) { //函数体 }, //日期format getDateFormatYMD,
/* 报表内容 */ // 表格上的功能栏:如放大镜查询、添加、打印、导入导出等 .table-toolbar { ... .el-button { ... span { ... } } } /* 统一表格样式 使用clss="table-wrapper"包裹表格主体(u-table)并设置clss="table-main" */ .table-main{ .el-table{ ... } }
✍️ 注释规范
html注释示例
2
3
4
5
6
7
8
9
10
11
12
13
14
javascript注释示例
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
css注释示例
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19