RRW Development Log - Month 1 Week 3
4974 ワード
この文章は「完全販売」から「財務計画」までの覆盆子米酒の開発過程で書かれた.
In this week, I have focused on implementing the script editor. Now the basic functionalities of the script editor are working. This includes adding/editing scripts, adding fields, editing the name and the value of fields. Although some features like swapping the order of scripts, removing fields, and locking fields(duplicated to the newly created script), I'm mostly satisfied with this week's progress.
Actually, I should have finished implementing the layout system before implementing the editor since I left the tab content rendering part incomplete. The panel content is declared inside the slot, and the
I have faced two issues while working on this part. The first one was about dynamically rendering VNodes inside the template of the
The second issue was about
After resolving all issues in the layout system, I have started implementing the script editor. The script editor component,
I'm mostly satisfied with this week's progress, as now I have something related to the core functionality working. It'd be better to implement more features, but I have failed to achieve it because of the issues mentioned above. Next week I want to finish the remaining features and start implementing some hotkey system for speedy titling.
In this week, I have focused on implementing the script editor. Now the basic functionalities of the script editor are working. This includes adding/editing scripts, adding fields, editing the name and the value of fields. Although some features like swapping the order of scripts, removing fields, and locking fields(duplicated to the newly created script), I'm mostly satisfied with this week's progress.
Actually, I should have finished implementing the layout system before implementing the editor since I left the tab content rendering part incomplete. The panel content is declared inside the slot, and the
PanelWrapper
component directly generates tab objects from it. The title of the tab is retrieved from the title
property of the VNode. And the VNode becomes the content of the tab.I have faced two issues while working on this part. The first one was about dynamically rendering VNodes inside the template of the
Panel
component. I tried <component :is="vnode" />
first but then realized that it is not being updated even when I update the vnode
. I solved this issue by creating a VNodeRenderer
component that receives a VNode as a prop and then renders it using render()
, not template.The second issue was about
watch
ing the slot content change. Since the PanelWrapper
component uses dynamically created slot names ( `${row}-${col}`
format), I needed to watch every existing slot. I have ended with this:const currSlot = slots[`${i}-${j}`]
if (currSlot) {
watch(
() => currSlot(),
(v) => {
// handle the change
},
{ immediate: true, deep: true }
)
}
I'm not sure if this works well when the number of rows/cols changes, but I have ignored that part because handling that case would also require lots of work on other parts of the layout system.After resolving all issues in the layout system, I have started implementing the script editor. The script editor component,
ScriptSetEditor
, currently has two subcomponents(displayed as tabs), ScriptList
and ScriptEditor
. ScriptList
handles selecting the script to edit, and adding new scripts. Then ScriptEditor
is used for editing the selected script. It's currently possible to edit existing fields' values and to add new fields in the script. As mentioned before, more features are needed to be implemented, like swapping the order of scripts, locking fields, and more.I'm mostly satisfied with this week's progress, as now I have something related to the core functionality working. It'd be better to implement more features, but I have failed to achieve it because of the issues mentioned above. Next week I want to finish the remaining features and start implementing some hotkey system for speedy titling.
Reference
この問題について(RRW Development Log - Month 1 Week 3), 我々は、より多くの情報をここで見つけました https://velog.io/@xiniha/RRW-Development-Log-Month-1-Week-3テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol