常用问题记录(更新中)

1、elementui table 合计行不显示
 

# 第一种解决方法 
 /deep/
 .el-table__footer-wrapper{
   position: fixed;
}

# 第二种解决方法,我是加在 :summary-method="getSummaries"  getSummaries这个函数体内。

this.$nextTick(() => {
        this.$refs.table.doLayout();
});

# 两种方法都试过,有效(2019-10-16)

2、Support for the experimental syntax 'decorators-legacy' isn't currently

// babel < 7
babel-plugin-transform-decorators-legacy
/package.json
"plugins": ["transform-decorators-legacy"// babel > 7
@babel/plugin-proposal-decorators

"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
//...
]

// 使用的是creat-react-app 创建的,babel 7+ 使用以上方案仍然报错
// 最终解决方案:
yarn add customize-cra @babel/plugin-proposal-decorators react-app-rewired
// 修改package.json
"scripts": {
"start": "react-scripts start",
"start": "react-app-rewired start",
//...
}
// 根目录新建/config-overrides.js
const { override,addDecoratorsLegacy } = require("customize-cra");
  module.exports = override(
    addDecoratorsLegacy(),
  );
 

--

原文地址:https://www.cnblogs.com/jldiary/p/11686905.html