diff --git a/ui/src/components/card-box/index.vue b/ui/src/components/card-box/index.vue index 47e329cd9..ea585791f 100644 --- a/ui/src/components/card-box/index.vue +++ b/ui/src/components/card-box/index.vue @@ -22,7 +22,9 @@ - +
+ +
@@ -52,12 +54,21 @@ const props = withDefaults( ) const show = ref(false) +// card上面存在dropdown菜单 +const subHovered = ref(false) function cardEnter() { show.value = true + subHovered.value = false } + function cardLeave() { - show.value = false + show.value = subHovered.value; } + +function subHoveredEnter() { + subHovered.value = true +} + diff --git a/ui/src/components/dynamics-form/constructor/items/SingleSelectConstructor.vue b/ui/src/components/dynamics-form/constructor/items/SingleSelectConstructor.vue new file mode 100644 index 000000000..615414795 --- /dev/null +++ b/ui/src/components/dynamics-form/constructor/items/SingleSelectConstructor.vue @@ -0,0 +1,79 @@ + + + diff --git a/ui/src/components/dynamics-form/constructor/items/SliderConstructor.vue b/ui/src/components/dynamics-form/constructor/items/SliderConstructor.vue index 490a7744d..974914ef3 100644 --- a/ui/src/components/dynamics-form/constructor/items/SliderConstructor.vue +++ b/ui/src/components/dynamics-form/constructor/items/SliderConstructor.vue @@ -60,11 +60,11 @@ const getData = () => { } defineExpose({ getData }) onBeforeMount(() => { - formValue.value.min = 0 - formValue.value.max = 20 - formValue.value.step = 0.1 - formValue.value.precision = 1 - formValue.value.default_value = 1 + formValue.value.min = props.modelValue.attrs?.min || 0 + formValue.value.max = props.modelValue.attrs?.max || 20 + formValue.value.step = props.modelValue.attrs?.step || 0.1 + formValue.value.precision = props.modelValue.attrs?.precision || 1 + formValue.value.default_value = props.modelValue.default_value || 1 }) diff --git a/ui/src/components/dynamics-form/constructor/items/SwitchInputConstructor.vue b/ui/src/components/dynamics-form/constructor/items/SwitchInputConstructor.vue index 15ced36ad..4ef9e5142 100644 --- a/ui/src/components/dynamics-form/constructor/items/SwitchInputConstructor.vue +++ b/ui/src/components/dynamics-form/constructor/items/SwitchInputConstructor.vue @@ -33,7 +33,7 @@ const getData = () => { } defineExpose({ getData }) onMounted(() => { - formValue.value.default_value = false + formValue.value.default_value = formValue.value.default_value || false }) diff --git a/ui/src/components/dynamics-form/constructor/items/TextInputConstructor.vue b/ui/src/components/dynamics-form/constructor/items/TextInputConstructor.vue index 7675ceea0..4f01dd4fa 100644 --- a/ui/src/components/dynamics-form/constructor/items/TextInputConstructor.vue +++ b/ui/src/components/dynamics-form/constructor/items/TextInputConstructor.vue @@ -50,9 +50,10 @@ const getData = () => { } defineExpose({ getData }) onMounted(() => { - formValue.value.min_length = 0 - formValue.value.max_length = 20 - formValue.value.default_value = '' + formValue.value.required = props.modelValue.required + formValue.value.min_length = props.modelValue.attrs?.min_length || 0 + formValue.value.max_length = props.modelValue.attrs?.max_length || 20 + formValue.value.default_value = props.modelValue.default_value || '' }) diff --git a/ui/src/views/template/component/AddParamDrawer.vue b/ui/src/views/template/component/AddParamDrawer.vue new file mode 100644 index 000000000..3bda9f304 --- /dev/null +++ b/ui/src/views/template/component/AddParamDrawer.vue @@ -0,0 +1,75 @@ + + + + + + \ No newline at end of file diff --git a/ui/src/views/template/component/ModelCard.vue b/ui/src/views/template/component/ModelCard.vue index 3a572dc1f..bf72bbcc4 100644 --- a/ui/src/views/template/component/ModelCard.vue +++ b/ui/src/views/template/component/ModelCard.vue @@ -87,14 +87,25 @@ - - - + + + - + + + + + \ No newline at end of file