Commit 457ceecc authored by 田翔's avatar 田翔

feat: 代码优化

parent 29b8e51b
{
"name": "panda-xform",
"version": "6.0.37",
"description": "6.0.37 增加文本扫一扫功能",
"version": "6.0.38",
"description": "6.0.38 台账列表显示数值优化",
"keywords": [
"panda-xform"
],
......
import React from 'react'
const NumberView = (props) => {
const { value, formatter } = props
if (formatter === '${整数}') {
return <div>{Number(value)}</div>
}
return (
<div>{value}</div>
)
}
export default NumberView
\ No newline at end of file
......@@ -12,6 +12,7 @@ import SelectView from './components/SelectView'
import ValueEdit from './components/ValueEdit'
import IDCard from './components/IDCard'
import DateView from './components/DateView'
import NumberView from './components/NumberView'
import { isObject, isArray, getFieldInfo } from '../../../../utils'
const IconBtn = (props) => {
......@@ -156,6 +157,9 @@ const TablePack = (props, ref) => {
if (['DateTime'].includes(widget)) {
return <DateView {...props} />
}
if (['NumberInput'].includes(widget)) {
return <NumberView {...props} />
}
if (widget === 'IDCard') {
return <IDCard {...props} />
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment