Refactor(Playground): Fix the bug that unexpectedly remove styles for base

Fix the bug that unexpectedly remove styles for base when editing code
This commit is contained in:
2024-05-21 16:00:03 +08:00
parent 1306872885
commit a90e7cfdca
2 changed files with 8 additions and 5 deletions

View File

@@ -637,8 +637,10 @@ const Base = () => {
rules={[
{ required: true },
{
pattern: /\.(jsx|tsx|js|ts|css|json)$/,
message: '仅支持 *.jsx, *.tsx, *.js, *.ts, *.css, *.json 文件'
pattern:
/(\.jsx|\.tsx|\.js|\.ts|_oxygen_base_style\.css|\.json)$/,
message:
'仅支持 *.jsx, *.tsx, *.js, *.ts, *_oxygen_base_style.css, *.json 文件'
},
({ getFieldValue }) => ({
validator() {
@@ -829,9 +831,10 @@ const Base = () => {
rules={[
{ required: true },
{
pattern: /\.(jsx|tsx|js|ts|css|json)$/,
pattern:
/(\.jsx|\.tsx|\.js|\.ts|_oxygen_base_style\.css|\.json)$/,
message:
'仅支持 *.jsx, *.tsx, *.js, *.ts, *.css, *.json 文件'
'仅支持 *.jsx, *.tsx, *.js, *.ts, *_oxygen_base_style.css, *.json 文件'
},
({ getFieldValue }) => ({
validator() {