|
|
@@ -61,20 +61,25 @@ export const actionOptions = [
|
|
|
{ label: 'Height', value: 'height', valueType: 'number', defaultValue: 100 },
|
|
|
{ label: 'Text', value: 'text', valueType: 'string', defaultValue: 'default' },
|
|
|
{ label: 'Font Size', value: 'font_size', valueType: 'number', defaultValue: 12 },
|
|
|
- { label: 'Add Flag', value: 'add_flag', valueType: 'select', options: flagOptions },
|
|
|
- { label: 'Remove Flag', value: 'remove_flag', valueType: 'select', options: flagOptions },
|
|
|
+ {
|
|
|
+ label: 'Add Flag',
|
|
|
+ value: 'add_flag',
|
|
|
+ valueType: 'select',
|
|
|
+ multiple: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'Remove Flag',
|
|
|
+ value: 'remove_flag',
|
|
|
+ valueType: 'select',
|
|
|
+ multiple: true
|
|
|
+ },
|
|
|
{ label: 'Background Color', value: 'bg_color', valueType: 'color' },
|
|
|
{ label: 'Background Alpha', value: 'bg_alpha', valueType: 'number', min: 0, max: 255 },
|
|
|
{ label: 'Gradient Color', value: 'bg_grad_color', valueType: 'color' },
|
|
|
{
|
|
|
label: 'Gradient Direction',
|
|
|
- value: '',
|
|
|
- valueType: 'select',
|
|
|
- options: [
|
|
|
- { label: 'None', value: 'none' },
|
|
|
- { label: 'Vertical', value: 'vertical' },
|
|
|
- { label: 'Horizontal', value: 'horizontal' }
|
|
|
- ]
|
|
|
+ value: 'grad_dir',
|
|
|
+ valueType: 'select'
|
|
|
},
|
|
|
{ label: 'Background Image Alpha', value: 'bg_img_alpha', valueType: 'number', min: 0, max: 255 },
|
|
|
{ label: 'Background Image Render Color', value: 'bg_img_render_color', valueType: 'color' },
|
|
|
@@ -85,15 +90,7 @@ export const actionOptions = [
|
|
|
{
|
|
|
label: 'Border',
|
|
|
value: 'border_type',
|
|
|
- valueType: 'select',
|
|
|
- options: [
|
|
|
- { label: 'None', value: 'none' },
|
|
|
- { label: 'All', value: 'all' },
|
|
|
- { label: 'Top', value: 'top' },
|
|
|
- { label: 'Bottom', value: 'bottom' },
|
|
|
- { label: 'Left', value: 'left' },
|
|
|
- { label: 'Right', value: 'right' }
|
|
|
- ]
|
|
|
+ valueType: 'select'
|
|
|
},
|
|
|
{ label: 'Border Size', value: 'border_width', valueType: 'number', defaultValue: 1 },
|
|
|
{ label: 'Border Alpha', value: 'border_alpha', valueType: 'number', min: 0, max: 255 },
|
|
|
@@ -102,10 +99,51 @@ export const actionOptions = [
|
|
|
{ label: 'Color', value: 'led_color', valueType: 'color' },
|
|
|
{ label: 'Radius', value: 'radius', valueType: 'number' },
|
|
|
{ label: 'Visible', value: 'visible', valueType: 'boolean' },
|
|
|
- { label: 'Add State', value: 'add_state', valueType: 'select', options: stateOptions },
|
|
|
- { label: 'Remove State', value: 'remove_state', valueType: 'select', options: stateOptions },
|
|
|
- { label: 'Rotate', value: 'rotate', valueType: 'rotate' },
|
|
|
+ { label: 'Add State', value: 'add_state', valueType: 'select' },
|
|
|
+ { label: 'Remove State', value: 'remove_state', valueType: 'select' },
|
|
|
+ {
|
|
|
+ label: 'Rotate',
|
|
|
+ value: 'rotate',
|
|
|
+ valueType: 'rotate',
|
|
|
+ defaultValue: {
|
|
|
+ x: 0,
|
|
|
+ y: 0,
|
|
|
+ angle: 0
|
|
|
+ }
|
|
|
+ },
|
|
|
{ label: 'Zoom', value: 'zoom', valueType: 'number' },
|
|
|
{ label: 'Widget Value', value: 'widget_value', valueType: 'string' },
|
|
|
- { label: 'Play Animation', value: 'play_animation', valueType: 'animation' }
|
|
|
+ {
|
|
|
+ label: 'Play Animation',
|
|
|
+ value: 'play_animation',
|
|
|
+ valueType: 'animation',
|
|
|
+ defaultValue: {
|
|
|
+ animation: undefined,
|
|
|
+ before: undefined,
|
|
|
+ after: undefined
|
|
|
+ }
|
|
|
+ }
|
|
|
]
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description: 选项map
|
|
|
+ */
|
|
|
+export const optionMap = {
|
|
|
+ add_flag: flagOptions,
|
|
|
+ remove_flag: flagOptions,
|
|
|
+ add_state: stateOptions,
|
|
|
+ remove_state: stateOptions,
|
|
|
+ grid_dir: [
|
|
|
+ { label: 'None', value: 'none' },
|
|
|
+ { label: 'Vertical', value: 'vertical' },
|
|
|
+ { label: 'Horizontal', value: 'horizontal' }
|
|
|
+ ],
|
|
|
+ border_type: [
|
|
|
+ { label: 'None', value: 'none' },
|
|
|
+ { label: 'All', value: 'all' },
|
|
|
+ { label: 'Top', value: 'top' },
|
|
|
+ { label: 'Bottom', value: 'bottom' },
|
|
|
+ { label: 'Left', value: 'left' },
|
|
|
+ { label: 'Right', value: 'right' }
|
|
|
+ ]
|
|
|
+}
|