Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
icarusion committed Jun 24, 2022
1 parent b705f28 commit c896dae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/login/login-item.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// UserName、Password、Mobile、Mail 基于此 mixin

import { h } from 'vue';
import { h, getCurrentInstance } from 'vue';
import Input from '../input/input.vue';
import FormItem from '../form/form-item.vue';
import defaultValidateMessage from './default_validate_message.js';
Expand All @@ -11,8 +11,8 @@ export default {
props: {
rules: {
type: [Object, Array],
default (props) {
const componentName = props.name;
default () {
const componentName = getCurrentInstance().type.name
return [
{
required: true,
Expand Down

0 comments on commit c896dae

Please sign in to comment.