-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4636cf
commit bf4f0d3
Showing
30 changed files
with
267 additions
and
277 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,74 @@ | ||
import React from "react"; | ||
|
||
export const InputIcon = (<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"> | ||
<defs> | ||
<style>{`.cls-1{fill:#a83b94;}.cls-2{fill:#fff;}`}</style> | ||
</defs> | ||
<g id="图层_2" data-name="图层 2"> | ||
<g id="图层_1-2" data-name="图层 1"> | ||
<rect | ||
className="cls-1" width="500" height="500" rx="88.05"/> | ||
<path className="cls-2" | ||
d="M224.84,406.18a12,12,0,0,1-3.13-.41c-20.19-5.46-43.17-17.7-63-33.59-20.69-16.55-35.29-34.64-41.11-50.94-8.6-24.07-7.49-40.35-7-44.49,1.49-38.29,32-67.14,74.85-103.65,9.77-8.33,19.11-21.26,26.32-36.42,6.52-13.73,8.86-24.4,8.69-27.21a13,13,0,0,1,5.67-13.36c5.09-3.33,11.72-3,21.48,1a117,117,0,0,1,21.61,12.16c12.22,8.57,29.25,23.35,41,45.14a104.33,104.33,0,0,1,11.87,36.48c3.23-2.9,4.92-3.57,5.91-4a12,12,0,0,1,13.67,3.49c2,2.37,48,58.68,48.1,107.81,0,30-13.83,56.52-40.08,76.85-25,19.39-54.57,28-66.11,30.78A12,12,0,0,1,270.5,388c19.16-31.56,11-46.61,10.66-47.24-3.67-6.45-8.86-11.4-14.86-17.13s-13-12.42-19.46-21.72c-4-5.77-7.75-16.61-8.42-28.3-13.81,12.08-25.7,29.27-30.15,43.07-8.79,27.23,7.45,57.62,23,67.41a12,12,0,0,1-6.39,22.1Zm31.82-169.33a12,12,0,0,1,9.26,19.58c-7,8.46-2.48,27.4.58,31.79,5.09,7.32,10.81,12.79,16.35,18.08,6.74,6.44,13.72,13.1,19.12,22.6,2.81,4.93,9.33,20.21,1.3,45.26,26.59-11.09,62.57-33.88,62.52-75.92,0-29.46-22.34-64.78-34.66-82-3.19,3.81-7.52,9.34-13.26,17.31a12,12,0,0,1-21.37-9.74c5.65-24.09,1.25-46.7-13.06-67.2a115.57,115.57,0,0,0-40.68-35.42c-4.85,21-20.56,52.08-41.8,70.18-39.57,33.71-65.58,58-66.46,86.77a8.33,8.33,0,0,1-.13,1.42c-.11,1-1.35,13.73,5.76,33.67,5.74,16.06,25.07,35.62,47.38,50.29-6.2-16.86-7.85-36.13-2-54.16,8.7-27,37.9-62.29,67.5-71.89A12.09,12.09,0,0,1,256.66,236.85ZM122.53,277.73h0Zm97.93-168.12a.15.15,0,0,1,0,.07Z"/> | ||
</g> | ||
</g> | ||
</svg>) | ||
export const InputIcon = ( | ||
<svg className="icon" viewBox="0 0 2680 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" | ||
p-id="1869" data-spm-anchor-id="a313x.manage_type_myprojects.0.i0.54a33a81DXD9fs" | ||
xmlnsXlink="http://www.w3.org/1999/xlink" width="523.4375" height="200"> | ||
<path | ||
d="M2524.505169 92.044944A64.316404 64.316404 0 0 1 2588.764045 156.30382v711.39236A64.316404 64.316404 0 0 1 2524.505169 931.955056H156.30382A64.316404 64.316404 0 0 1 92.044944 867.69618V156.30382A64.316404 64.316404 0 0 1 156.30382 92.044944h2368.201349m0-92.044944H156.30382A156.246292 156.246292 0 0 0 0 156.30382v711.39236A156.246292 156.246292 0 0 0 156.30382 1024h2368.201349A156.246292 156.246292 0 0 0 2680.808989 867.69618V156.30382A156.246292 156.246292 0 0 0 2524.505169 0z" | ||
p-id="1870"></path> | ||
<path | ||
d="M362.426966 788.134831a46.022472 46.022472 0 0 1-46.022472-46.022471V258.876404a46.022472 46.022472 0 0 1 92.044944 0v483.235956a46.022472 46.022472 0 0 1-46.022472 46.022471z" | ||
fill="#2c2c2c" p-id="1871" data-spm-anchor-id="a313x.manage_type_myprojects.0.i1.54a33a81DXD9fs" | ||
className="selected"></path> | ||
</svg> | ||
) | ||
|
||
export const TextAreaIcon = ( | ||
<svg className="icon" viewBox="0 0 1096 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" | ||
p-id="2037" xmlnsXlink="http://www.w3.org/1999/xlink" width="214.0625" height="200"> | ||
<path | ||
d="M134.17931 331.917241a23.54023 23.54023 0 0 1-23.54023-23.54023V110.63908a23.54023 23.54023 0 0 1 47.08046 0v197.737931a23.54023 23.54023 0 0 1-23.54023 23.54023z" | ||
fill="#2c2c2c" p-id="2038" data-spm-anchor-id="a313x.manage_type_myprojects.0.i3.54a33a81DXD9fs" | ||
className="selected"></path> | ||
<path | ||
d="M1033.015908 37.664368A26.317977 26.317977 0 0 1 1059.310345 63.958805v896.08239A26.317977 26.317977 0 0 1 1033.015908 986.335632H63.958805A26.317977 26.317977 0 0 1 37.664368 960.041195V63.958805A26.317977 26.317977 0 0 1 63.958805 37.664368h969.057103m0-37.664368H63.958805A63.935264 63.935264 0 0 0 0 63.958805v896.08239A63.935264 63.935264 0 0 0 63.958805 1024h969.057103A63.935264 63.935264 0 0 0 1096.974713 960.041195V63.958805A63.935264 63.935264 0 0 0 1033.015908 0z" | ||
p-id="2039"></path> | ||
<path | ||
d="M739.163218 998.105747a18.832184 18.832184 0 0 1-13.32377-32.155954l324.855173-324.855172a18.832184 18.832184 0 0 1 26.64754 26.64754l-324.855172 324.855172A18.832184 18.832184 0 0 1 739.163218 998.105747z" | ||
p-id="2040"></path> | ||
</svg> | ||
) | ||
|
||
export const SelectIcon = ( | ||
<svg className="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" | ||
p-id="1783" xmlnsXlink="http://www.w3.org/1999/xlink" width="200" height="200"> | ||
<path | ||
d="M924.83584 98.304a22.89664 22.89664 0 0 1 22.87616 22.87616v779.59168A22.89664 22.89664 0 0 1 924.83584 923.648H81.75616a22.89664 22.89664 0 0 1-22.87616-22.87616V121.18016A22.89664 22.89664 0 0 1 81.75616 98.304h843.07968m0-32.768H81.75616a55.64416 55.64416 0 0 0-55.64416 55.64416v779.59168A55.64416 55.64416 0 0 0 81.75616 956.416h843.07968a55.62368 55.62368 0 0 0 55.64416-55.64416V121.18016A55.62368 55.62368 0 0 0 924.83584 65.536z" | ||
p-id="1784"></path> | ||
<path | ||
d="M950.784 362.496h-894.976a16.384 16.384 0 0 1 0-32.768h894.976a16.384 16.384 0 0 1 0 32.768zM600.064 241.664H180.224a16.384 16.384 0 0 1 0-32.768h419.84a16.384 16.384 0 0 1 0 32.768zM815.104 526.336H180.224a16.384 16.384 0 0 1 0-32.768h634.88a16.384 16.384 0 0 1 0 32.768zM815.104 774.144H180.224a16.384 16.384 0 0 1 0-32.768h634.88a16.384 16.384 0 0 1 0 32.768zM826.6752 268.288a6.144 6.144 0 0 1-4.75136-2.2528l-48.45568-59.392a6.144 6.144 0 0 1 9.54368-7.7824l43.60192 53.47328 42.35264-53.39136a6.144 6.144 0 1 1 9.6256 7.61856l-47.104 59.392a6.144 6.144 0 0 1-4.77184 2.33472z" | ||
p-id="1785"></path> | ||
<path d="M1024 1024H0V0h1024zM2.048 1021.952h1019.904V2.048H2.048z" p-id="1786"></path> | ||
</svg> | ||
) | ||
|
||
export const PasswordIcon = ( | ||
<svg className="icon" viewBox="0 0 2680 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" | ||
p-id="1920" xmlnsXlink="http://www.w3.org/1999/xlink" width="523.4375" height="200"> | ||
<path | ||
d="M2524.505169 92.044944A64.316404 64.316404 0 0 1 2588.764045 156.30382v711.39236A64.316404 64.316404 0 0 1 2524.505169 931.955056H156.30382A64.316404 64.316404 0 0 1 92.044944 867.69618V156.30382A64.316404 64.316404 0 0 1 156.30382 92.044944h2368.201349m0-92.044944H156.30382A156.246292 156.246292 0 0 0 0 156.30382v711.39236A156.246292 156.246292 0 0 0 156.30382 1024h2368.201349A156.246292 156.246292 0 0 0 2680.808989 867.69618V156.30382A156.246292 156.246292 0 0 0 2524.505169 0z" | ||
p-id="1921"></path> | ||
<path | ||
d="M1559.011236 522.815281m-97.797753 0a97.797753 97.797753 0 1 0 195.595506 0 97.797753 97.797753 0 1 0-195.595506 0Z" | ||
p-id="1922"></path> | ||
<path | ||
d="M1177.427416 522.815281m-97.797753 0a97.797753 97.797753 0 1 0 195.595506 0 97.797753 97.797753 0 1 0-195.595506 0Z" | ||
p-id="1923"></path> | ||
<path | ||
d="M795.786067 522.815281m-97.797752 0a97.797753 97.797753 0 1 0 195.595505 0 97.797753 97.797753 0 1 0-195.595505 0Z" | ||
p-id="1924"></path> | ||
<path | ||
d="M414.202247 522.815281m-97.797753 0a97.797753 97.797753 0 1 0 195.595506 0 97.797753 97.797753 0 1 0-195.595506 0Z" | ||
p-id="1925"></path> | ||
<path | ||
d="M2214.831461 837.033708a155.325843 155.325843 0 1 1 155.325842-155.325843 155.325843 155.325843 0 0 1-155.325842 155.325843z m0-218.606742a63.280899 63.280899 0 1 0 63.280899 63.280899 63.280899 63.280899 0 0 0-63.280899-63.280899z" | ||
p-id="1926"></path> | ||
<path | ||
d="M2122.786517 618.426966a46.022472 46.022472 0 0 1-39.924495-23.011236l-195.595505-339.41573a46.022472 46.022472 0 1 1 79.733932-46.022472l195.595506 339.41573a46.022472 46.022472 0 0 1-16.798202 62.878203 45.332135 45.332135 0 0 1-23.011236 6.155505z" | ||
p-id="1927"></path> | ||
<path | ||
d="M2082.516854 474.606742a46.022472 46.022472 0 0 1-25.6-84.33618l51.775281-34.516854a46.022472 46.022472 0 1 1 51.084944 76.627416l-51.775281 34.516854A46.022472 46.022472 0 0 1 2082.516854 474.606742zM2024.988764 336.539326a46.022472 46.022472 0 0 1-26.232809-83.875955l74.786517-51.775281a46.022472 46.022472 0 1 1 52.350562 75.706966l-74.786517 51.775281A45.619775 45.619775 0 0 1 2024.988764 336.539326z" | ||
p-id="1928"></path> | ||
</svg> | ||
) |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import {DesignerCore, TdFC} from "@trionesdev/form-designer-react"; | ||
import {Password as FormilyPassword} from '@formily/antd-v5' | ||
import createResource = DesignerCore.createResource; | ||
import React from "react"; | ||
|
||
export const Password: TdFC<React.ComponentProps<typeof FormilyPassword>> = | ||
FormilyPassword | ||
|
||
Password.Resource = createResource([ | ||
{ | ||
name: 'Password', | ||
icon: 'PasswordIcon', | ||
title: '密码输入', | ||
componentName: 'Field', | ||
schema: { | ||
title: '密码输入', | ||
'x-decorator': 'FormItem', | ||
'x-component': 'Password', | ||
}, | ||
designerProps: { | ||
propsSchema: { | ||
type: 'object', | ||
properties: { | ||
title: { | ||
type: 'string', | ||
title: '标题', | ||
'x-decorator': 'FormItem', | ||
'x-component': 'Input', | ||
}, | ||
required: { | ||
type: 'string', | ||
title: '是否必填', | ||
'x-decorator': 'FormItem', | ||
'x-component': 'Switch', | ||
}, | ||
} | ||
} | ||
} | ||
} | ||
]) |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "./Input" | ||
export * from "./Form" | ||
export * from "./Select" | ||
export * from "./Select" | ||
export * from "./Password" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
import React, {FC} from "react"; | ||
import {PCSimulator} from "../simulator"; | ||
import {MobileSimulator, PCSimulator} from "../simulator"; | ||
import {observer} from "@formily/react"; | ||
import {requestIdle} from "../request-idle"; | ||
import {useFormDesigner} from "../hooks"; | ||
|
||
type SimulatorProps = { | ||
children: React.ReactNode; | ||
} | ||
export const Simulator: FC<SimulatorProps> = observer(({children}) => { | ||
return <PCSimulator>{children}</PCSimulator> | ||
const {type} = useFormDesigner() | ||
if (type == 'PC'){ | ||
return <PCSimulator>{children}</PCSimulator> | ||
}else if (type == 'MOBILE'){ | ||
return <MobileSimulator>{children}</MobileSimulator> | ||
} | ||
}, { | ||
scheduler: requestIdle | ||
}) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.