You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/docs/proposal/23011310-优化前端运行时配置获取机制的设计.md

29 lines
1.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

| 编号 | 作者 | 发表时间 | 变更时间 | 版本 | 状态 |
| ----- | ----- | ----- | ----- | ----- | ----- |
| 23011310 | 北野 | 2023-01-13 | 2023-01-13 | v0.0 | 提议 |
### 概述
目前的Web前端运行时配置是通过编译时配置[.env](../../web/.env)进行静态配置虽然能满足简单的功能需求但是非常不灵活。本提按提议一种由paopao-ce后端服务控制的前端运行时配置获取机制让前端更灵活的依据运行时配置提供产品服务。
### 场景
前端依据paopao-ce后端服务提供的运行时配置按需提供产品服务也可以扩展到按用户喜好自定义的配置提供产品服务比如用户设置的语言、Theme、功能特性等。
### 需求
* 前端依据运行时配置提供业务服务 - 前端
* 前端在启动时从paopao-ce后端服务获取运行时配置 - 前端/后端
* 用户可以自定义前端运行时配置如语言、Theme、功能特性等 - 前端/后端
* 用户自定义的前端运行时配置可以 创建/更新 - 前端/后端
* 后端服务提供默认前端运行时配置 - 后端
### 方案
TODO
### 疑问
1. 为什么要提供这种机制?
TODO
### 更新记录
#### v0.0(2023-01-13) - 北野
* 初始文档, 先占个位置