【vue3+ts】组件定义props并设置初始值


interface Props {
  filterPopVisible: boolean;
  reqType: string;
  max: string;
  error: boolean;
  isMultiple?: boolean;
  defaultKeys?: any[];
  nodeKey?: string;
}
const props = withDefaults(defineProps<Props>(), {
  isMultiple: true,
  nodeKey: "business_id",
});

你可能感兴趣的:(javascript,前端,vue.js)