- 博客(7)
- 收藏
- 关注
原创 typescript的? ?? ?.
和||的意思有点相似,但是又有点区别,?相较||比较严谨,当值等于0的时候||就把他给排除了,但是?是指可选参数,可以理解为参数自动加上undefined。
2022-07-29 16:48:57
297
原创 简单粗暴的解决内存泄漏问题
Vue.mixin({ destroyed() { // 混入释放资源,解决内存泄漏问题 this._watcher = null; this._watchers = null; this.$options = null; this._computedWatchers = null; this.$vnode = null; this.$children = null; this._vnode = null; this._props
2021-06-03 18:34:24
286
原创 Ant Design组件table key 问题
没有设置的key时,会出现以下警告Warning: [antd: Table] Each record in dataSource of table should have a unique `key` prop, or set `rowKey` of Table to an unique primary key设置key<a-table bordered :columns="columns" :data-source="tableData" :
2021-05-17 10:38:36
1439
原创 vue.use()与vue.install()
关于vue.use()与vue.install()vue官方文档官网是这样写的:https://cn.vuejs.org/v2/guide/plugins.html应用可对http进行一下封装将get 和post 方法作为vue 的实例方法const createHttpPlugin = () => { return { install(Vue) { Vue.prototype.$post = axios.post; Vue.prototype.$get
2021-04-30 10:24:14
1093
原创 json与xml互相转化问题、插件fast-xml-parser
使用插件: fast-xml-parser使用说明:https://www.npmjs.com/package/fast-xml-parserjson转xmlvar Parser = require("fast-xml-parser").j2xParser;//default options need not to setvar options = { attributeNamePrefix : "@_", attrNodeName: "@", //default is false
2021-04-29 18:17:18
3535
1
原创 白屏问题--热更新(vue.config.js配置)-form表单(ant)
由于登录后,将用户信息写入到本地文件,导致项目热更新,因此导致白屏问题,解决方案:在vue.config.js配置文件中 ,设置忽略此文件 resolve(’./electronStore.json’) devServer: { watchOptions: { ignored: ['**/node_modules', resolve('./public'), resolve('./projects'), resolve('./electronStore.json')], }
2021-04-20 17:25:38
885
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅