新增样式组件-流光直线

chenxg 1 year ago
parent 8a484723d5
commit 93c5781397

@ -39,6 +39,14 @@ export const widgetDecorateFlowLine = {
], ],
value: 'left' value: 'left'
}, },
{
type: 'el-input-number',
label: '旋转角度',
name: 'rotationAngle',
required: false,
placeholder: '',
value: '0'
},
], ],
// 数据 // 数据
data: [], data: [],

@ -18,7 +18,8 @@ export default ({
optionsSetup: {}, optionsSetup: {},
direction: 'left', // : 'left' 'right' direction: 'left', // : 'left' 'right'
background: 'red', // background: 'red', //
containerWidth: '400px' containerWidth: '400px',
rotationAngle: 0, //
} }
}, },
props: { props: {
@ -66,7 +67,8 @@ export default ({
height: '4px', height: '4px',
position: 'relative', position: 'relative',
overflow: 'hidden', overflow: 'hidden',
flexDirection: this.direction === 'left' ? 'row-reverse' : 'row' // flexDirection: this.direction === 'left' ? 'row-reverse' : 'row', //
transform: `rotate(${this.rotationAngle}deg)` //
} }
}, },
flowingLightStyle() { flowingLightStyle() {
@ -85,6 +87,7 @@ export default ({
const optionsStyle = this.optionsStyle; const optionsStyle = this.optionsStyle;
this.background = optionsSetup.background; this.background = optionsSetup.background;
this.direction = optionsSetup.flowDirection; this.direction = optionsSetup.flowDirection;
this.rotationAngle = optionsSetup.rotationAngle;
this.containerWidth = optionsStyle.width; this.containerWidth = optionsStyle.width;
}, },
} }
@ -96,7 +99,7 @@ export default ({
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: #282c34; background: transparent;
} }
.progress-bar { .progress-bar {

Loading…
Cancel
Save