feat:支持了i18n的mock的CRUD持久化,支持了预览时i18n正确使用修改后内容,移除不必要的mock json文件#1720
Draft
timtian wants to merge 1 commit intoopentiny:developfrom
Draft
feat:支持了i18n的mock的CRUD持久化,支持了预览时i18n正确使用修改后内容,移除不必要的mock json文件#1720timtian wants to merge 1 commit intoopentiny:developfrom
timtian wants to merge 1 commit intoopentiny:developfrom
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
chilingling
reviewed
Dec 18, 2025
Comment on lines
+142
to
+143
| created_at: getRandomDate(), | ||
| updated_at: getRandomDate() |
chilingling
reviewed
Dec 19, 2025
| import { getResponseData } from '../tool/Common' | ||
|
|
||
| const schemaFilePath = path.resolve(process.cwd(), './src/mock/get/app-center/v1/apps/schema/1.json') | ||
| export default class PageService { |
Member
There was a problem hiding this comment.
这里类名需要重命名一下,比如: I18nService
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
English | 简体中文
PR
PR Checklist
请检查您的 PR 是否满足以下要求:
PR 类型
这个PR的类型是?
需求背景和解决方案
当使用mock模式时,
国际化内容的保存修改。并没有持久化,导致刷新后修改内容消失,同时由于在preview时由于拉取的i18n的位置并不一致导致,预览时也无法预览国际化后的内容
持久化没月使用nodb进行持久化,而是直接针对schema/1.json进行保存修改,预览时拉取的 i18n位置也统一至 1.json.确保一致
Issue Number: N/A
修改前
修改后
此PR是否含有 breaking change?
Other information