Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
田翔
xform
Commits
ae5505b3
Commit
ae5505b3
authored
Dec 11, 2023
by
田翔
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://g.civnet.cn:8443/tianxiang/xform
parents
f87fa266
e1dbab74
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
174 additions
and
77 deletions
+174
-77
otherSettings.js
src/core/FormDesigner/config/otherSettings.js
+2
-2
settings.js
src/core/FormDesigner/config/settings.js
+70
-71
index.js
src/core/widgets/settings/RadioGroup/index.js
+6
-2
index.js
src/core/widgets/settings/RadioGroupW/index.js
+70
-0
index.js
src/core/widgets/settings/groupStyle/Formatting/index.js
+9
-0
index.js
src/core/widgets/settings/index.js
+4
-1
index.js
src/core/widgets/text/NumberInput/index.js
+13
-1
No files found.
src/core/FormDesigner/config/otherSettings.js
View file @
ae5505b3
...
@@ -125,7 +125,7 @@ const globalSettings = {
...
@@ -125,7 +125,7 @@ const globalSettings = {
enumNames
:
[
'左右'
,
'上下'
],
enumNames
:
[
'左右'
,
'上下'
],
widget
:
'select'
,
widget
:
'select'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
type: 'number',
type: 'number',
widget: 'slider',
widget: 'slider',
...
@@ -134,7 +134,7 @@ const globalSettings = {
...
@@ -134,7 +134,7 @@ const globalSettings = {
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
}
}
...
...
src/core/FormDesigner/config/settings.js
View file @
ae5505b3
...
@@ -14,9 +14,9 @@ const groupStyle = {
...
@@ -14,9 +14,9 @@ const groupStyle = {
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -26,7 +26,7 @@ const groupStyle = {
...
@@ -26,7 +26,7 @@ const groupStyle = {
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
}
}
const
layoutWidgets
=
[
const
layoutWidgets
=
[
...
@@ -257,11 +257,11 @@ const textWidgets = [
...
@@ -257,11 +257,11 @@ const textWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
disabled
:
disabled
,
disabled
:
disabled
,
dependencies
:
[
'tableTypeParent'
,
'IsSystemField'
],
dependencies
:
[
'tableTypeParent'
,
'IsSystemField'
],
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -273,7 +273,7 @@ const textWidgets = [
...
@@ -273,7 +273,7 @@ const textWidgets = [
},
},
disabled: disabled,
disabled: disabled,
dependencies: ['tableTypeParent', 'IsSystemField'],
dependencies: ['tableTypeParent', 'IsSystemField'],
},
},
*/
},
},
},
},
{
{
...
@@ -379,10 +379,10 @@ const textWidgets = [
...
@@ -379,10 +379,10 @@ const textWidgets = [
title
:
'元素宽度'
,
title
:
'元素宽度'
,
description
:
'默认值100%'
,
description
:
'默认值100%'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
default
:
'100%'
,
default
:
'100%'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -392,7 +392,7 @@ const textWidgets = [
...
@@ -392,7 +392,7 @@ const textWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
{
{
...
@@ -538,9 +538,9 @@ const textWidgets = [
...
@@ -538,9 +538,9 @@ const textWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -550,7 +550,7 @@ const textWidgets = [
...
@@ -550,7 +550,7 @@ const textWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
{
{
...
@@ -619,9 +619,9 @@ const textWidgets = [
...
@@ -619,9 +619,9 @@ const textWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -631,7 +631,7 @@ const textWidgets = [
...
@@ -631,7 +631,7 @@ const textWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
{
{
...
@@ -725,11 +725,11 @@ const textWidgets = [
...
@@ -725,11 +725,11 @@ const textWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
disabled
:
disabled
,
disabled
:
disabled
,
dependencies
:
[
'tableTypeParent'
,
'IsSystemField'
],
dependencies
:
[
'tableTypeParent'
,
'IsSystemField'
],
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -741,7 +741,7 @@ const textWidgets = [
...
@@ -741,7 +741,7 @@ const textWidgets = [
},
},
disabled: disabled,
disabled: disabled,
dependencies: ['tableTypeParent', 'IsSystemField'],
dependencies: ['tableTypeParent', 'IsSystemField'],
},
},
*/
},
},
},
},
{
{
...
@@ -815,9 +815,9 @@ const textWidgets = [
...
@@ -815,9 +815,9 @@ const textWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -827,7 +827,7 @@ const textWidgets = [
...
@@ -827,7 +827,7 @@ const textWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
]
]
...
@@ -988,9 +988,9 @@ const selectWidgets = [
...
@@ -988,9 +988,9 @@ const selectWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -1000,7 +1000,7 @@ const selectWidgets = [
...
@@ -1000,7 +1000,7 @@ const selectWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
}
}
},
},
{
{
...
@@ -1114,9 +1114,9 @@ const selectWidgets = [
...
@@ -1114,9 +1114,9 @@ const selectWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -1126,7 +1126,7 @@ const selectWidgets = [
...
@@ -1126,7 +1126,7 @@ const selectWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
}
}
},
},
{
{
...
@@ -1240,9 +1240,9 @@ const selectWidgets = [
...
@@ -1240,9 +1240,9 @@ const selectWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -1252,7 +1252,7 @@ const selectWidgets = [
...
@@ -1252,7 +1252,7 @@ const selectWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
}
}
},
},
{
{
...
@@ -1327,9 +1327,9 @@ const selectWidgets = [
...
@@ -1327,9 +1327,9 @@ const selectWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -1339,7 +1339,7 @@ const selectWidgets = [
...
@@ -1339,7 +1339,7 @@ const selectWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
{
{
...
@@ -1514,9 +1514,9 @@ const selectWidgets = [
...
@@ -1514,9 +1514,9 @@ const selectWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -1526,9 +1526,8 @@ const selectWidgets = [
...
@@ -1526,9 +1526,8 @@ const selectWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
}, */
}
},}
},
]
]
const
businessWidgets
=
[
const
businessWidgets
=
[
...
@@ -1638,9 +1637,9 @@ const businessWidgets = [
...
@@ -1638,9 +1637,9 @@ const businessWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -1650,7 +1649,7 @@ const businessWidgets = [
...
@@ -1650,7 +1649,7 @@ const businessWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
}
}
},
},
{
{
...
@@ -1734,9 +1733,9 @@ const businessWidgets = [
...
@@ -1734,9 +1733,9 @@ const businessWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -1746,7 +1745,7 @@ const businessWidgets = [
...
@@ -1746,7 +1745,7 @@ const businessWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
}
}
},
},
{
{
...
@@ -1952,9 +1951,9 @@ const dateWidgets = [
...
@@ -1952,9 +1951,9 @@ const dateWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -1964,7 +1963,7 @@ const dateWidgets = [
...
@@ -1964,7 +1963,7 @@ const dateWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
{
{
...
@@ -2048,9 +2047,9 @@ const dateWidgets = [
...
@@ -2048,9 +2047,9 @@ const dateWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -2060,7 +2059,7 @@ const dateWidgets = [
...
@@ -2060,7 +2059,7 @@ const dateWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
}
}
},
},
]
]
...
@@ -2181,9 +2180,9 @@ const fileWidgets = [
...
@@ -2181,9 +2180,9 @@ const fileWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -2193,7 +2192,7 @@ const fileWidgets = [
...
@@ -2193,7 +2192,7 @@ const fileWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
]
]
...
@@ -2283,9 +2282,9 @@ const mapWidgets = [
...
@@ -2283,9 +2282,9 @@ const mapWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -2295,7 +2294,7 @@ const mapWidgets = [
...
@@ -2295,7 +2294,7 @@ const mapWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
{
{
...
@@ -2377,9 +2376,9 @@ const mapWidgets = [
...
@@ -2377,9 +2376,9 @@ const mapWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -2389,7 +2388,7 @@ const mapWidgets = [
...
@@ -2389,7 +2388,7 @@ const mapWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
{
{
...
@@ -2464,9 +2463,9 @@ const mapWidgets = [
...
@@ -2464,9 +2463,9 @@ const mapWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -2476,7 +2475,7 @@ const mapWidgets = [
...
@@ -2476,7 +2475,7 @@ const mapWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
{
{
...
@@ -2551,9 +2550,9 @@ const mapWidgets = [
...
@@ -2551,9 +2550,9 @@ const mapWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值110',
description: '默认值110',
default: 110,
default: 110,
...
@@ -2563,7 +2562,7 @@ const mapWidgets = [
...
@@ -2563,7 +2562,7 @@ const mapWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
]
]
...
@@ -2671,9 +2670,9 @@ const advancedWidgets = [
...
@@ -2671,9 +2670,9 @@ const advancedWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
description: '默认值10',
description: '默认值10',
default: 10,
default: 10,
...
@@ -2683,7 +2682,7 @@ const advancedWidgets = [
...
@@ -2683,7 +2682,7 @@ const advancedWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
{
{
...
@@ -2748,9 +2747,9 @@ const advancedWidgets = [
...
@@ -2748,9 +2747,9 @@ const advancedWidgets = [
width
:
{
width
:
{
title
:
'元素宽度'
,
title
:
'元素宽度'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'
percentSlider
'
,
widget
:
'
RadioGroupW
'
,
},
},
labelWidth
:
{
/*
labelWidth: {
title: '标签宽度',
title: '标签宽度',
default: 110,
default: 110,
type: 'number',
type: 'number',
...
@@ -2759,7 +2758,7 @@ const advancedWidgets = [
...
@@ -2759,7 +2758,7 @@ const advancedWidgets = [
props: {
props: {
hideNumber: true,
hideNumber: true,
},
},
},
},
*/
},
},
},
},
]
]
...
...
src/core/widgets/settings/RadioGroup/index.js
View file @
ae5505b3
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 634665781 634665781@qq.com
* @Author: 634665781 634665781@qq.com
* @Date: 2023-12-06 17:55:24
* @Date: 2023-12-06 17:55:24
* @LastEditors: 634665781 634665781@qq.com
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2023-12-
06 18:12:16
* @LastEditTime: 2023-12-
11 15:54:35
* @FilePath: \xform\src\core\widgets\settings\RadioGroup\index.js
* @FilePath: \xform\src\core\widgets\settings\RadioGroup\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -20,12 +20,16 @@ const TableNames = (props) => {
...
@@ -20,12 +20,16 @@ const TableNames = (props) => {
const
onSelect
=
(
value
)
=>
{
const
onSelect
=
(
value
)
=>
{
setvalues
(
value
)
setvalues
(
value
)
onChange
(
value
)
onChange
(
value
)
sessionStorage
.
setItem
(
'RadioButtonValue'
,
value
.
target
.
value
)
}
}
return
(
return
(
<
Radio
.
Group
onChange
=
{
onSelect
}
defaultValue
=
{
value
}
buttonStyle
=
"solid"
>
<
Radio
.
Group
onChange
=
{
onSelect
}
defaultValue
=
{
value
}
buttonStyle
=
"solid"
>
{
schema
.
enum
.
map
((
v
,
i
)
=>
{
{
schema
?.
enum
?
.
map
((
v
,
i
)
=>
{
return
<
Radio
.
Button
value
=
{
v
}
>
{
schema
.
enumNames
[
i
]
return
<
Radio
.
Button
value
=
{
v
}
>
{
schema
.
enumNames
[
i
]
}
<
/Radio.Button
>
}
<
/Radio.Button
>
})
})
...
...
src/core/widgets/settings/RadioGroupW/index.js
0 → 100644
View file @
ae5505b3
/*
* @Author: 634665781 634665781@qq.com
* @Date: 2023-12-06 17:55:24
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2023-12-11 16:31:35
* @FilePath: \xform\src\core\widgets\settings\RadioGroup\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%堵
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Radio
}
from
'antd'
const
TableNames
=
(
props
)
=>
{
console
.
log
(
props
,
sessionStorage
.
getItem
(
'RadioButtonValue'
),
'props布局内容宽度。。。。'
);
let
num
=
sessionStorage
.
getItem
(
'RadioButtonValue'
)
||
3
const
{
value
,
schema
,
onChange
}
=
props
let
val
=
'33.3%'
if
(
num
==
4
)
val
=
'25%'
if
(
num
==
5
)
val
=
'20%'
const
[
values
,
setvalues
]
=
useState
(
value
||
val
)
const
onSelect
=
(
value
)
=>
{
setvalues
(
value
)
onChange
(
value
)
}
const
getHtml
=
()
=>
{
if
(
num
==
3
){
let
val
=
[
'33.3%'
,
'66.6%'
,
'100%'
]
// let width=['50px','100px','150px']
return
[
'1/3'
,
'2/3'
,
'1'
].
map
((
v
,
i
)
=>
{
return
<
Radio
.
Button
style
=
{{
textAlign
:
'center'
}}
value
=
{
val
[
i
]}
>
{
v
}
<
/Radio.Button
>
})
}
if
(
num
==
4
){
let
val
=
[
'25%'
,
'50%'
,
'75%'
,
'100%'
]
// let width=['50px','100px','150px','200px']
return
[
'1/4'
,
'1/2'
,
'3/4'
,
'1'
].
map
((
v
,
i
)
=>
{
return
<
Radio
.
Button
style
=
{{
textAlign
:
'center'
}}
value
=
{
val
[
i
]}
>
{
v
}
<
/Radio.Button
>
})
}
if
(
num
==
5
){
let
val
=
[
'20%'
,
'40%'
,
'60%'
,
'80%'
,
'100%'
]
//let width=['50px','100px','150px','200px','250px']
return
[
'1/5'
,
'2/5'
,
'3/5'
,
'4/5'
,
'1'
].
map
((
v
,
i
)
=>
{
return
<
Radio
.
Button
style
=
{{
textAlign
:
'center'
}}
value
=
{
val
[
i
]}
>
{
v
}
<
/Radio.Button
>
})
}}
return
(
<
Radio
.
Group
onChange
=
{
onSelect
}
defaultValue
=
{
values
}
buttonStyle
=
"solid"
>
{
getHtml
()
}
<
/Radio.Group
>
)
}
export
default
TableNames
\ No newline at end of file
src/core/widgets/settings/groupStyle/Formatting/index.js
View file @
ae5505b3
/*
* @Author: 634665781 634665781@qq.com
* @Date: 2023-12-06 09:16:37
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2023-12-11 16:46:25
* @FilePath: \xform\src\core\widgets\settings\groupStyle\Formatting\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
React
from
'react'
import
React
from
'react'
import
{
Input
,
Dropdown
,
Menu
,
Select
}
from
'antd'
import
{
Input
,
Dropdown
,
Menu
,
Select
}
from
'antd'
import
{
PlusOutlined
}
from
'@ant-design/icons'
import
{
PlusOutlined
}
from
'@ant-design/icons'
...
@@ -8,6 +16,7 @@ const options = [
...
@@ -8,6 +16,7 @@ const options = [
{
label
:
'小数'
,
value
:
'${小数}'
},
{
label
:
'小数'
,
value
:
'${小数}'
},
{
label
:
'货币'
,
value
:
'${货币}'
},
{
label
:
'货币'
,
value
:
'${货币}'
},
{
label
:
'百分比'
,
value
:
'${百分比}'
},
{
label
:
'百分比'
,
value
:
'${百分比}'
},
{
label
:
'科学计数法'
,
value
:
'${科学计数法}'
}
]
]
const
Formatting
=
(
props
)
=>
{
const
Formatting
=
(
props
)
=>
{
...
...
src/core/widgets/settings/index.js
View file @
ae5505b3
...
@@ -6,6 +6,7 @@ import groupStyle from './groupStyle'
...
@@ -6,6 +6,7 @@ import groupStyle from './groupStyle'
import
BooleanSwitch
from
'./BooleanSwitch'
import
BooleanSwitch
from
'./BooleanSwitch'
import
InputAddon
from
'./InputAddon'
import
InputAddon
from
'./InputAddon'
import
RadioGroup
from
'./RadioGroup'
import
RadioGroup
from
'./RadioGroup'
import
RadioGroupW
from
'./RadioGroupW'
const
settings
=
{
const
settings
=
{
...
form
,
...
form
,
...
groupBase
,
...
groupBase
,
...
@@ -14,7 +15,8 @@ const settings = {
...
@@ -14,7 +15,8 @@ const settings = {
...
groupStyle
,
...
groupStyle
,
BooleanSwitch
,
BooleanSwitch
,
InputAddon
,
InputAddon
,
RadioGroup
RadioGroup
,
RadioGroupW
}
}
export
default
settings
export
default
settings
\ No newline at end of file
src/core/widgets/text/NumberInput/index.js
View file @
ae5505b3
/*
* @Author: 634665781 634665781@qq.com
* @Date: 2023-12-06 09:16:37
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2023-12-11 17:07:06
* @FilePath: \xform\src\core\widgets\text\NumberInput\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
React
,
{
useEffect
,
useMemo
,
useState
}
from
'react'
import
React
,
{
useEffect
,
useMemo
,
useState
}
from
'react'
import
{
InputNumber
}
from
'antd'
import
{
InputNumber
}
from
'antd'
import
styles
from
'./index.less'
import
styles
from
'./index.less'
...
@@ -48,7 +56,11 @@ const NumberInput = (props) => {
...
@@ -48,7 +56,11 @@ const NumberInput = (props) => {
return
`
${
parseInt
(
value
)}
`
return
`
${
parseInt
(
value
)}
`
}
else
if
(
formatter
===
'${小数}'
)
{
}
else
if
(
formatter
===
'${小数}'
)
{
return
Number
(
value
).
toFixed
(
Number
(
decimalDigits
))
return
Number
(
value
).
toFixed
(
Number
(
decimalDigits
))
}
else
if
(
formatter
)
{
}
else
if
(
formatter
===
'${科学计数法}'
){
return
Number
(
value
).
toExponential
()
}
else
if
(
formatter
)
{
return
`
${
value
}${
formatter
}
`
return
`
${
value
}${
formatter
}
`
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment