网站名是域名吗,虚拟主机 wordpress,网站建设规划结构,中装建设股票有潜力吗目录
外观
组件库#xff08;无法满足-接口#xff1f;-自定义/封装#xff09;
兼容
不同尺寸#xff08;包裹#xff0c;height:100%#xff09;
不同 浏览器 隐藏滚动条 的 不同属性名
重排-重绘
不显示 display:none-禁用disable
性能
导航…目录
外观
组件库无法满足-接口-自定义/封装
兼容
不同尺寸包裹height:100%
不同 浏览器 隐藏滚动条 的 不同属性名
重排-重绘
不显示 display:none-禁用disable
性能
导航重复修改原型push、replace方法
搜索防抖 import { debounce } from lodash
严谨性
少用any类型
路由参数query和params 外观
组件库无法满足-接口-自定义/封装
无论是ele/martix的tabsdisplay:none都无效但组件库很少有问题
默认样式不行的时候先看文档有没有提供接口如果没有提供接口并且需要手动修改的地方较多就自定义/封装如果需要重复使用
兼容
不同尺寸包裹height:100% .workbench-create {height: 100%;display: flex;
}
不同 浏览器 隐藏滚动条 的 不同属性名
.left-wrap {height: 100%;overflow: auto;flex: 1;padding-left: 40px;//隐藏元素的滚动条。这通常用于自定义滚动条样式。scrollbar-width: none;/* Firefox */-ms-overflow-style: none;/* IE 10 */::-webkit-scrollbar {//伪元素选择器用于选择Webkit浏览器如Chrome、Safari等中的滚动条。display: none;/* Chrome Safari */}
重排-重绘
不显示 display:none-禁用disable
性能
导航重复修改原型push、replace方法 push将新的路由添加到浏览器的历史记录中这样用户就可以通过浏览器的后退按钮回到之前的路由。 this.$router.push(/about) replace不会在浏览器的历史记录中留下新的条目而是直接替换当前的历史记录条目。 this.$router.replace(/contact) 比如在处理登录页面时登录成功后可能会用replace方法替换当前路由以防止用户通过后退按钮回到登录页面。 修改 VueRouter 的原型方法 push 和 replace用来捕获导航重复错误并进行处理
而不会在控制台中抛出错误从而避免了不必要的错误提示和潜在的问题。
import Vue from vue;
import VueRouter from vue-router;Vue.use(VueRouter);const originalPush VueRouter.prototype.push;
VueRouter.prototype.push function push(location) {return originalPush.call(this, location).catch(err {if (err.name ! NavigationDuplicated) {throw err;}});
};const originalReplace VueRouter.prototype.replace;
VueRouter.prototype.replace function replace(location) {return originalReplace.call(this, location).catch(err {if (err.name ! NavigationDuplicated) {throw err;}});
};const router new VueRouter({// 路由配置...
});export default router;搜索防抖 import { debounce } from lodash mds-selectstylewidth: 480pxv-modelformData.applyOa:multipletrueplaceholder选择或搜索OAfilterable:remotetrue:remote-methodsearchOA:disabledshowDetailclearablechangechangeOAmds-optionclassselect-oaAndDeptv-foritem in OAoptions:keyitem.oa:valueitem.empOa:labelitem.empNmAndOadiv classselect-name{{ item.empNmAndOa }}div classselect-dept{{ item.deptNm }}/div/div/mds-option/mds-select
import { debounce } from lodash//防抖
// OA listOAoptions: any []searchOA debounce(this.searchOaAPi, 500)searchOaAPI(val: any) {bspUserInfoFuzzyQueryOaList({empOaOrNm: val,partitionDt: }).then((res: any) {if (res res.code 200) {this.OAoptions res.data} else {this.$message.error(res.msg || 系统错误)}}).catch((e: any) {this.$message.error(e.msg)})}
严谨性
少用any类型
路由参数query和params
判断后端数据时才用