elunez / eladmin

eladmin jpa 版本:项目基于 Spring Boot 2.6.4、 Jpa、 Spring Security、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由

Home Page:https://eladmin.vip/demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue 页面错误

3792274 opened this issue · comments

大佬,请问一下,你🈶️解决嘛?这个BUG

element-ui版本更新导致的,可以回退到2.15.6版本就不报错了

感谢感谢 ,我试试

element-ui版本更新导致的,可以回退到2.15.6版本就不报错了

我的就是2.15.6,访问user页面也同样有这个warning

参考21905
// ElemeFE/element#21905
// 解决 Instead, use a data or computed property based on the prop's value. Prop being mutated: "placement"
main.js 添加如下即可解决

function RepairProps(cmp) {
  (cmp.mixins || []).forEach(mixin => {
    if (mixin.props && mixin.props.placement) {
      const defaultValue = mixin.props.placement.default
      mixin.data = new Proxy(mixin.data, {
        apply(target, thisArg, argArray) {
          const res = Reflect.apply(target, thisArg, argArray)
          return {
            ...(res || {}),
            placement: defaultValue
          }
        }
      })
      delete mixin.props.placement
    }
    if (mixin.mixins && mixin.mixins.length > 0) {
      RepairProps(mixin)
    }
  })
}

RepairProps(Element.DatePicker)
RepairProps(Element.TimePicker)
RepairProps(Element.TimeSelect)