1. Ts parameter type
export default class TabPane extends Vue {
@Prop({ default: 'CN' }) private type! : string heretype! : string andtype? Is string relative? Dispensable! Must haveCopy the code
Poke the
2. Submit form parameters
Eg1: import {Form as ElForm, Input} from'element-ui'The introduction of ElForm (this.$refs.loginForm as ElForm).validate((valid: boolean) => {Copy the code
Eg2: Define variableslet el:any = this.$refs.loginFormel.validate((valid: boolean) => {Copy the code
Poke the
3. Index type definition
statusFilter(status: string) { const statusMap: { [ids: string]: string } = { published: 'success', draft: 'info', deleted: 'danger'} ids (Personally not necessary)Copy the code
Poke the