样式参数微调

This commit is contained in:
ciaochaos 2020-05-05 00:22:55 +08:00
parent 4d1d8a1789
commit bb2f7ab6a1
3 changed files with 17 additions and 9 deletions

View File

@ -9,7 +9,7 @@ function listPoint(props) {
const pointList = new Array(nCount); const pointList = new Array(nCount);
let type = props.params[1]; let type = props.params[1];
let size = props.params[0]; let size = props.params[0] / 100;
let id = 0; let id = 0;
if (size <= 0) size = 1.0 if (size <= 0) size = 1.0
@ -20,7 +20,7 @@ function listPoint(props) {
if (type == 0) if (type == 0)
pointList.push(<rect width={size} height={size} key={id++} fill="black" x={row} y={col}/>) pointList.push(<rect width={size} height={size} key={id++} fill="black" x={row} y={col}/>)
else if (type == 1) else if (type == 1)
pointList.push(<circle r={size} key={id++} fill="black" cx={row} cy={col}/>) pointList.push(<circle r={size / 2} key={id++} fill="black" cx={row + 0.5} cy={col + 0.5}/>)
} }
} }
} }
@ -41,7 +41,7 @@ class QrRendererBase extends React.Component {
this.props.setParamInfo([ this.props.setParamInfo([
{ {
key: '大小', key: '大小',
default: 1 default: 100
}, },
{ {
key: '定位点样式', key: '定位点样式',

View File

@ -53,19 +53,19 @@ class QrRendererRound extends React.Component {
if (this.props.setParamInfo) { if (this.props.setParamInfo) {
this.props.setParamInfo([ this.props.setParamInfo([
{ {
key: '没有choices的文本框1', key: 'Choice 1',
default: 1 default: 1
}, },
{ {
key: '没有choices的文本框2', key: 'Choice 2',
default: 100 default: 100
}, },
{ {
key: '有choices的选择框', key: 'Select 1',
default: 0, default: 0,
choices: [ choices: [
"option1", "Option 1",
"option2" "Option 2"
] ]
} }
] ]

View File

@ -150,7 +150,7 @@ tr {
} }
td:nth-child(1) { td:nth-child(1) {
font-size: 1em; font-size: 0.9em;
white-space: nowrap; white-space: nowrap;
} }
@ -220,6 +220,14 @@ table {
color: rgba(0,0,0,0.6); color: rgba(0,0,0,0.6);
} }
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
input[type="number"]{
-moz-appearance: textfield;
}
.Qr-select { .Qr-select {
line-height: 2em; line-height: 2em;
box-sizing: border-box; box-sizing: border-box;