Commit 8bd9ec06 authored by 田翔's avatar 田翔

修复编码报错问题

parent 77d09c60
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "2.0.2", "version": "2.0.3",
"description": "2.0.2: 自动计算属性增加控制规则函数", "description": "2.0.3: 修复编码报错问题",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -709,13 +709,13 @@ const textWidgets = [ ...@@ -709,13 +709,13 @@ const textWidgets = [
} }
} }
}, },
// disabled: { disabled: {
// title: '只读', title: '只读',
// type: 'boolean', type: 'boolean',
// widget: 'checkbox', widget: 'checkbox',
// default: true, default: true,
// width: '30%', width: '30%',
// }, },
hidden: { hidden: {
title: '隐藏', title: '隐藏',
type: 'boolean', type: 'boolean',
...@@ -1202,6 +1202,9 @@ const selectWidgets = [ ...@@ -1202,6 +1202,9 @@ const selectWidgets = [
default: '手动输入', default: '手动输入',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
props: {
disabled: true
}
}, },
options: { options: {
title: '', title: '',
......
...@@ -17,7 +17,10 @@ const SoruceType = (props) => { ...@@ -17,7 +17,10 @@ const SoruceType = (props) => {
if ('下拉框' === name) { if ('下拉框' === name) {
return initOptions return initOptions
} }
return initOptions.splice(0, 2) return [
{ label: '手动输入', value: '手动输入' },
{ label: '数据字典', value: '数据字典' },
]
}, [name]) }, [name])
const selectChange = (e) => { const selectChange = (e) => {
......
...@@ -20,7 +20,6 @@ function toUtf8(str) { ...@@ -20,7 +20,6 @@ function toUtf8(str) {
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3f)); out += String.fromCharCode(0x80 | ((c >> 0) & 0x3f));
} }
} }
console.log('out', out)
return out; return out;
} }
...@@ -44,6 +43,10 @@ const Coding = (props) => { ...@@ -44,6 +43,10 @@ const Coding = (props) => {
// onChange(codeValue) // onChange(codeValue)
// }, [prefixion, codingType]) // }, [prefixion, codingType])
const inputChange = (e) => {
onChange(e.target.value)
}
const content = ( const content = (
<div> <div>
<QRcode value={value} /> <QRcode value={value} />
...@@ -53,11 +56,11 @@ const Coding = (props) => { ...@@ -53,11 +56,11 @@ const Coding = (props) => {
return ( return (
<div className={`${prefixCls}-input`} isdisabled={JSON.stringify(disabled)}> <div className={`${prefixCls}-input`} isdisabled={JSON.stringify(disabled)}>
<Input <Input
// onChange={inputChange} onChange={inputChange}
value={value} value={value}
disabled={disabled} disabled={disabled}
addonAfter={ addonAfter={
<Popover content={content}> <Popover content={value ? content : null}>
<QrcodeOutlined /> <QrcodeOutlined />
</Popover> </Popover>
} }
......
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