diff --git a/src/components/Selector.vue b/src/components/Selector.vue index b46cc47a..cd99a1b0 100644 --- a/src/components/Selector.vue +++ b/src/components/Selector.vue @@ -44,10 +44,11 @@ const props = defineProps({ type: Array as PropType, default: () => [], }, + value: { type: String, default: "" }, size: { type: String, default: "small" }, placeholder: { type: String, default: "Select a option" }, }); -const selected = ref(""); +const selected = ref(props.value); function changeSelected() { const optionSele = props.options.filter( (d: Option) => d.value === selected.value diff --git a/src/views/dashboard/New.vue b/src/views/dashboard/New.vue index 1104d7fb..e41b6639 100644 --- a/src/views/dashboard/New.vue +++ b/src/views/dashboard/New.vue @@ -26,6 +26,7 @@ limitations under the License. -->
{{ t("layer") }}
{{ t("entityType") }}
{ diff --git a/src/views/dashboard/data.ts b/src/views/dashboard/data.ts index dfdbfa27..aa7b88a4 100644 --- a/src/views/dashboard/data.ts +++ b/src/views/dashboard/data.ts @@ -33,23 +33,23 @@ export const EntityType = [ ]; export const Options = [ { - value: "Option1", - label: "Option1", + value: "layer1", + label: "layer1", }, { - value: "Option2", - label: "Option2", + value: "layer2", + label: "layer2", }, { - value: "Option3", - label: "Option3", + value: "layer3", + label: "layer3", }, { - value: "Option4", - label: "Option4", + value: "layer4", + label: "layer4", }, { - value: "Option5", - label: "Option5", + value: "layer5", + label: "layer5", }, ];