错误代码 

_c("el-table-column", {
            attrs: { label: "性别", align: "center", prop: "gender" },
            scopedSlots: _vm._u([
              {
                key: "default",
                fn: function (scope) {
                  return [
                    _c("dict-tag", {
                      attrs: {
                        options: _vm.dict.type.sys_user_sex,
                        value: scope.row.gender,
                      },
                    }),
                  ]
                },
              },
            ]),
          }),

错误分析  _vm.dict is undefined  未定义

export default {
  name: "Tb_user",

  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 子表选中数据
      checkedTbUserDetail: [],
      // 非单个禁用
      single: true,

少了 dicts: ['tb_user_status', 'sys_user_sex'],   但是代码是自动生成的,之前自动生成是有这行读取redis缓存的

export default {
  name: "Tb_user",
  dicts: ['tb_user_status', 'sys_user_sex'],
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 子表选中数据
      checkedTbUserDetail: [],

就是少读取redis缓存字典

Logo

快速构建 Web 应用程序

更多推荐