-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
shinetingli
committed
Jan 20, 2023
1 parent
9a61f4b
commit e9aa8a1
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<template> | ||
<div> | ||
<t-select | ||
v-model="type" | ||
:options="options" | ||
placeholder="请选择值类型" | ||
@change="handleSelectType" | ||
></t-select> | ||
<input-field v-if="type" :type="type"></input-field> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { Select as TSelect, type SelectValue } from "tdesign-vue-next"; | ||
import { ref } from "vue"; | ||
import { cascaderSelectOptions } from "@/utils/config"; | ||
import InputField from '../input-field/index.vue'; | ||
const options = ref(cascaderSelectOptions); | ||
const type = ref(""); | ||
const handleSelectType = (value: SelectValue) => { | ||
// switch(value) { | ||
// case 'Number' | ||
// } | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export const cascaderSelectOptions = [ | ||
{ label: "字符串", value: "String" }, | ||
{ label: "数值", value: "Number" }, | ||
{ label: "布尔值", value: "Boolean" }, | ||
{ label: "随机值", value: "Random" }, | ||
]; |