Compare commits
1 Commits
mvp_step2_
...
feature-ap
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
994a0174f5 |
68
frontend/src/components/right/ColorPicker.vue
Normal file
68
frontend/src/components/right/ColorPicker.vue
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<div class="">
|
||||||
|
<q-field v-model="color" :label="displayName" bottom-slots labelColor="primary">
|
||||||
|
<template v-slot:control>
|
||||||
|
<q-chip text-color="black" color="white">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4">
|
||||||
|
<q-avatar class="shadow-1" :style="{ background: color }" size="xs"></q-avatar>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
{{ color }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-chip>
|
||||||
|
</template>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon name="colorize" class="cursor-pointer">
|
||||||
|
<q-popup-proxy cover transition-show="scale" transition-hide="scale">
|
||||||
|
<q-color no-header default-view="palette" v-model="color" />
|
||||||
|
</q-popup-proxy>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
<template v-slot:hint>
|
||||||
|
{{ placeholder }}
|
||||||
|
</template>
|
||||||
|
</q-field>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { computed, defineComponent, ref } from 'vue';
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'ColorPicker',
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
displayName: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
hint: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
modelValue: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
setup(props, { emit }) {
|
||||||
|
const color = ref("#ffffff");
|
||||||
|
return {
|
||||||
|
color,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
48
frontend/src/components/right/NumInput.vue
Normal file
48
frontend/src/components/right/NumInput.vue
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<template>
|
||||||
|
<div class="">
|
||||||
|
<q-input v-model.number="numValue" type="number" :label="displayName" label-color="primary" bottom-slots>
|
||||||
|
<template v-slot:hint>
|
||||||
|
{{ placeholder }}
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { defineComponent, ref } from 'vue';
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'NumInput',
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
displayName: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
hint: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
modelValue: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
setup(props, { emit }) {
|
||||||
|
const numValue = ref(0);
|
||||||
|
|
||||||
|
return {
|
||||||
|
numValue,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -19,6 +19,8 @@ import AppFieldSelect from './AppFieldSelect.vue';
|
|||||||
import MuiltInputText from '../right/MuiltInputText.vue';
|
import MuiltInputText from '../right/MuiltInputText.vue';
|
||||||
import ConditionInput from '../right/ConditionInput.vue';
|
import ConditionInput from '../right/ConditionInput.vue';
|
||||||
import EventSetter from '../right/EventSetter.vue';
|
import EventSetter from '../right/EventSetter.vue';
|
||||||
|
import ColorPicker from './ColorPicker.vue';
|
||||||
|
import NumInput from './NumInput.vue';
|
||||||
import { IActionNode,IActionProperty,IProp } from 'src/types/ActionTypes';
|
import { IActionNode,IActionProperty,IProp } from 'src/types/ActionTypes';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -31,7 +33,9 @@ export default defineComponent({
|
|||||||
AppFieldSelect,
|
AppFieldSelect,
|
||||||
MuiltInputText,
|
MuiltInputText,
|
||||||
ConditionInput,
|
ConditionInput,
|
||||||
EventSetter
|
EventSetter,
|
||||||
|
ColorPicker,
|
||||||
|
NumInput
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
nodeProps: {
|
nodeProps: {
|
||||||
|
|||||||
Reference in New Issue
Block a user