Commit 1c25160bd3064722d48a4066ea6e01eb61b2a4c8
1 parent
7fe6408f
chore: set default width value of work for service-api
Showing
1 changed file
with
1 additions
and
0 deletions
back-end/h5-api/api/work/controllers/Work.js
| ... | ... | @@ -31,6 +31,7 @@ module.exports = { |
| 31 | 31 | // 非预览模式, 查看不到内容 |
| 32 | 32 | const canRender = view_mode === VIEW_MODE.PREVIEW || work.is_publish; |
| 33 | 33 | if (!canRender) work.pages = []; |
| 34 | + work.width = work.width || 320; | |
| 34 | 35 | return ctx.render('engine', { work }); |
| 35 | 36 | }, |
| 36 | 37 | renderCoreEditor: async (ctx) => { | ... | ... |