core icon indicating copy to clipboard operation
core copied to clipboard

[FEATURE] configuration 对象配置支持 additionalProperties

Open winjo opened this issue 10 months ago • 0 comments

如果你的需求与问题相关,请在下面描述一下(Is your feature request related to a problem? Please describe.) vscode configuration type 为 object,如果 additionalProperties 为 false,会渲染对象的属性 如下图示例 截屏2024-12-30 10 25 56 目前 opensumi 不支持渲染对象属性,而是在 settings.json 配置 截屏2024-12-30 10 31 14 配置:

      {
        "title": "配置示例",
        "properties": {
          "object-config1": {
            "type": "object",
            "default": {
							"key1": true,
							"key2": true,
							"key3": false
						},
						"additionalProperties": false,
            "description": "对象配置",
						"properties": {
							"key1": {
								"type": "boolean",
								"description": "key1"
							},
							"key2": {
								"type": "boolean",
								"description": "key2"
							},
              "key3": {
                "type": "boolean",
                "description": "key3"
							}
						}
          },
					"object-config2": {
            "type": "object",
            "default": {
							"key1": "value1",
							"key2": true,
							"key3": "中文"
						},
						"additionalProperties": false,
            "description": "对象配置2",
						"properties": {
							"key1": {
								"type": "string",
								"description": "字符串属性"
							},
							"key2": {
								"type": "boolean",
								"description": "布尔属性"
							},
              "key3": {
                "type": "string",
                "description": "枚举属性",
                "enum": [
                  "中文",
                  "English"
              	]
							}
						}
          }
        }
      }

描述你预期的功能表现(Describe the solution you'd like) additionalProperties 配置为 false,同 vscode 渲染对象属性

描述你考虑过的替代方案(Describe alternatives you've considered)

补充信息(Additional context)

winjo avatar Dec 30 '24 02:12 winjo