cool-team-official / cool-admin-vue

🔥 cool-admin一个很酷的后台权限管理框架,模块化、插件化、CRUD极速开发,永久开源免费,基于midway.js 3.0、typeorm、mysql、jwt、element-ui、vuex、vue-router、vue等构建
https://cool-js.com
MIT License
1.78k stars 490 forks source link

老版本Upsert组件监听on: {open,close,submit}无效 #123

Closed cyh15812914549 closed 2 weeks ago

cyh15812914549 commented 3 months ago

老项目使用的版本是"@cool-vue/crud": "^1.0.4" // 新增、编辑配置 const upsert = reactive({ items: [ { label: "商品名字", prop: "goods_name", component: { name: "el-input" }, required: true }, { label: "封面地址", prop: "goods_cover", component: { name: "cl-upload", props: { accept: "image/*", } }, required: true } ], on: { open(form: any, event: FormOpenEvent) { console.log("open===================>") }, close(done: Function) { console.log("关闭") done() }, submit(data: any, event: FormSubmitEvent) { console.log("submit===================>") } }

    });
icssoa commented 3 months ago

老的应该是 onOpen 方法

cyh15812914549 commented 2 months ago

onOpen可以了

cyh15812914549 commented 2 months ago

Proxy(Object) {goods_name: undefined, goods_cover: undefined, dealeruser_id: undefined, style_id: undefined, classify_id: undefined, …}

classify_id: 1 createTime: "2023-03-05 16:04:12" dealeruser_id: 6 detail_info: null detail_info_img: null goods_cover: "http://khdimg.fshongfangyin.com/d6e8b90f-b-a340a7c1-e870-4125-95fc-56133f5ea19d.png" goods_name: "香奈儿" id: 4 img_video: "http://khdimg.fshongfangyin.com/9b8e9e77-c-8ea31279-ec83-4b5b-a853-28804d1b039f.png,http://khdimg.fshongfangyin.com/70d02c7f-9-dbfaa397-48f2-456e-b43f-cd6c7f53e0a9.png" norms: null style_id: 2 updateTime: "2023-03-05 16:04:16" userId: 1

icssoa commented 2 months ago

Proxy(Object) {goods_name: undefined, goods_cover: undefined, dealeruser_id: undefined, style_id: undefined, classify_id: undefined, …} [[Handler]]: Object [[Target]]: Object classify_id: 1 createTime: "2023-03-05 16:04:12" dealeruser_id: 6 detail_info: null detail_info_img: null goods_cover: "http://khdimg.fshongfangyin.com/d6e8b90f-b-a340a7c1-e870-4125-95fc-56133f5ea19d.png" goods_name: "香奈儿" id: 4 img_video: "http://khdimg.fshongfangyin.com/9b8e9e77-c-8ea31279-ec83-4b5b-a853-28804d1b039f.png,http://khdimg.fshongfangyin.com/70d02c7f-9-dbfaa397-48f2-456e-b43f-cd6c7f53e0a9.png" norms: null style_id: 2 updateTime: "2023-03-05 16:04:16" userId: 1 [[Prototype]]: Object [[IsRevoked]]: false。为什么[[Target]]: Object展开后是这样的

这个是你编辑的数据