| | |
| | | {value: 'show', label: '显示'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'position', |
| | | label: '位置', |
| | | initval: wrap.position || 'relative', |
| | | tooltip: '相对定位是相对其正常位置的偏移;绝对定位是相对于原组件的偏移,原组件高度可视为0;固定定位是相对于窗口的位置,定位效果测试环境中查看。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'relative', label: '相对定位'}, |
| | | {value: 'absolute', label: '绝对定位'}, |
| | | {value: 'fixed', label: '固定定位'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'quick', values: ['fixed']}, |
| | | {field: 'realwidth', values: ['fixed', 'absolute']}, |
| | | {field: 'transform', values: ['fixed', 'absolute']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | field: 'quick', |
| | | label: '快捷选择', |
| | | initval: '', |
| | | required: false, |
| | | subFields: ['top', 'left', 'right', 'bottom', 'transform'], |
| | | options: [ |
| | | {value: 'top', label: '上', top: '0px', left: '0px', right: '0px', bottom: '', transform: ''}, |
| | | {value: 'top-left', label: '左上', top: '0px', left: '0px', right: '', bottom: '', transform: ''}, |
| | | {value: 'top-right', label: '右上', top: '0px', left: '', right: '0px', bottom: '', transform: ''}, |
| | | {value: 'left-middle', label: '左中', top: '50%', left: '0px', right: '', bottom: '', transform: 'translateY(-50%)'}, |
| | | {value: 'right-middle', label: '右中', top: '50%', left: '', right: '0px', bottom: '', transform: 'translateY(-50%)'}, |
| | | {value: 'bottom-left', label: '左下', top: '', left: '0px', right: '', bottom: '0px', transform: ''}, |
| | | {value: 'bottom-right', label: '右下', top: '', left: '', right: '0px', bottom: '0px', transform: ''}, |
| | | {value: 'bottom', label: '下', top: '', left: '0px', right: '0px', bottom: '0px', transform: ''}, |
| | | {value: 'middle', label: '中间', top: '50%', left: '50%', right: '', bottom: '', transform: 'translate(-50%, -50%)'} |
| | | ] |
| | | }, |
| | | { |
| | | type: 'styleInput', |
| | | field: 'top', |
| | | label: '距上', |
| | | initval: wrap.top || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'styleInput', |
| | | field: 'right', |
| | | label: '距右', |
| | | initval: wrap.right || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'styleInput', |
| | | field: 'bottom', |
| | | label: '距下', |
| | | initval: wrap.bottom || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'styleInput', |
| | | field: 'left', |
| | | label: '距左', |
| | | initval: wrap.left || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'styleInput', |
| | | field: 'realwidth', |
| | | label: '实际宽度', |
| | | initval: wrap.realwidth || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | field: 'transform', |
| | | label: '变换', |
| | | initval: wrap.transform || '', |
| | | required: false, |
| | | options: [ |
| | | {value: 'translateY(-50%)', label: '上移50%'}, |
| | | {value: 'translateY(50%)', label: '下移50%'}, |
| | | {value: 'translateX(-50%)', label: '左移50%'}, |
| | | {value: 'translateX(50%)', label: '右移50%'}, |
| | | {value: 'translate(-50%, -50%)', label: '左上移50%'}, |
| | | {value: 'translate(-50%, 50%)', label: '左下移50%'}, |
| | | {value: 'translate(50%, -50%)', label: '右上移50%'}, |
| | | {value: 'translate(50%, 50%)', label: '右下移50%'}, |
| | | ] |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // field: 'position', |
| | | // label: '位置', |
| | | // initval: wrap.position || 'relative', |
| | | // tooltip: '相对定位是相对其正常位置的偏移;绝对定位是相对于原组件的偏移,原组件高度可视为0;固定定位是相对于窗口的位置,定位效果测试环境中查看。', |
| | | // required: false, |
| | | // options: [ |
| | | // {value: 'relative', label: '相对定位'}, |
| | | // {value: 'absolute', label: '绝对定位'}, |
| | | // {value: 'fixed', label: '固定定位'}, |
| | | // ], |
| | | // controlFields: [ |
| | | // {field: 'quick', values: ['fixed']}, |
| | | // {field: 'realwidth', values: ['fixed', 'absolute']}, |
| | | // {field: 'transform', values: ['fixed', 'absolute']}, |
| | | // ] |
| | | // }, |
| | | // { |
| | | // type: 'select', |
| | | // field: 'quick', |
| | | // label: '快捷选择', |
| | | // initval: '', |
| | | // required: false, |
| | | // subFields: ['top', 'left', 'right', 'bottom', 'transform'], |
| | | // options: [ |
| | | // {value: 'top', label: '上', top: '0px', left: '0px', right: '0px', bottom: '', transform: ''}, |
| | | // {value: 'top-left', label: '左上', top: '0px', left: '0px', right: '', bottom: '', transform: ''}, |
| | | // {value: 'top-right', label: '右上', top: '0px', left: '', right: '0px', bottom: '', transform: ''}, |
| | | // {value: 'left-middle', label: '左中', top: '50%', left: '0px', right: '', bottom: '', transform: 'translateY(-50%)'}, |
| | | // {value: 'right-middle', label: '右中', top: '50%', left: '', right: '0px', bottom: '', transform: 'translateY(-50%)'}, |
| | | // {value: 'bottom-left', label: '左下', top: '', left: '0px', right: '', bottom: '0px', transform: ''}, |
| | | // {value: 'bottom-right', label: '右下', top: '', left: '', right: '0px', bottom: '0px', transform: ''}, |
| | | // {value: 'bottom', label: '下', top: '', left: '0px', right: '0px', bottom: '0px', transform: ''}, |
| | | // {value: 'middle', label: '中间', top: '50%', left: '50%', right: '', bottom: '', transform: 'translate(-50%, -50%)'} |
| | | // ] |
| | | // }, |
| | | // { |
| | | // type: 'styleInput', |
| | | // field: 'top', |
| | | // label: '距上', |
| | | // initval: wrap.top || '', |
| | | // required: false |
| | | // }, |
| | | // { |
| | | // type: 'styleInput', |
| | | // field: 'right', |
| | | // label: '距右', |
| | | // initval: wrap.right || '', |
| | | // required: false |
| | | // }, |
| | | // { |
| | | // type: 'styleInput', |
| | | // field: 'bottom', |
| | | // label: '距下', |
| | | // initval: wrap.bottom || '', |
| | | // required: false |
| | | // }, |
| | | // { |
| | | // type: 'styleInput', |
| | | // field: 'left', |
| | | // label: '距左', |
| | | // initval: wrap.left || '', |
| | | // required: false |
| | | // }, |
| | | // { |
| | | // type: 'styleInput', |
| | | // field: 'realwidth', |
| | | // label: '实际宽度', |
| | | // initval: wrap.realwidth || '', |
| | | // required: false |
| | | // }, |
| | | // { |
| | | // type: 'select', |
| | | // field: 'transform', |
| | | // label: '变换', |
| | | // initval: wrap.transform || '', |
| | | // required: false, |
| | | // options: [ |
| | | // {value: 'translateY(-50%)', label: '上移50%'}, |
| | | // {value: 'translateY(50%)', label: '下移50%'}, |
| | | // {value: 'translateX(-50%)', label: '左移50%'}, |
| | | // {value: 'translateX(50%)', label: '右移50%'}, |
| | | // {value: 'translate(-50%, -50%)', label: '左上移50%'}, |
| | | // {value: 'translate(-50%, 50%)', label: '左下移50%'}, |
| | | // {value: 'translate(50%, -50%)', label: '右上移50%'}, |
| | | // {value: 'translate(50%, 50%)', label: '右下移50%'}, |
| | | // ] |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | field: 'empty', |