feat 添加自定义下拉列表
This commit is contained in:
parent
d86dced42c
commit
42b86e8c51
@ -15,6 +15,8 @@
|
||||
<script lang="ts">
|
||||
import ArrowDown from "../icon/ArrowDown.vue";
|
||||
import {ref} from "vue";
|
||||
import {CHANGE_EVENT, UPDATE_MODEL_EVENT} from "../../service/constants";
|
||||
|
||||
export interface OptionItemType {
|
||||
label: string;
|
||||
value?: any;
|
||||
@ -25,7 +27,17 @@ export interface OptionItemType {
|
||||
export default {
|
||||
name: "PSelect",
|
||||
components: {ArrowDown},
|
||||
props: {},
|
||||
props: {
|
||||
placeholder: {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
emits: [
|
||||
UPDATE_MODEL_EVENT,
|
||||
CHANGE_EVENT,
|
||||
'focus',
|
||||
'blur',
|
||||
],
|
||||
setup(props) {
|
||||
const selectValue = ref(props.modelValue)
|
||||
return {
|
||||
|
3
admin-fe/src/service/constants.ts
Normal file
3
admin-fe/src/service/constants.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export const UPDATE_MODEL_EVENT = 'update:modelValue'
|
||||
export const CHANGE_EVENT = 'change'
|
||||
export const INPUT_EVENT = 'input'
|
Loading…
x
Reference in New Issue
Block a user