Browse Source

fix: "v-model不支持"

master
xuesinan 4 years ago
parent
commit
ffa87084f1
  1. 1
      .eslintrc.js
  2. 4
      src/views/user/SignIn.vue

1
.eslintrc.js

@ -27,6 +27,7 @@ module.exports = {
'no-unused-expressions': 'off',
'vue/no-mutating-props': 'off',
'vue/no-multiple-template-root': 'off',
'vue/no-v-model-argument': 'off',
'no-shadow': ['error', { builtinGlobals: false, hoist: 'functions', allow: [] }],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',

4
src/views/user/SignIn.vue

@ -7,11 +7,11 @@
<a-form ref="signInFormRef" :model="signInForm" :rules="rules">
<a-form-item name="username">
<label style="font-size: 16px"><span style="color: #ff5353; margin-right: 5px">*</span>用户名</label>
<a-input :model:value="signInForm.username" placeholder="请输入用户名" />
<a-input v-model:value="signInForm.username" placeholder="请输入用户名" />
</a-form-item>
<a-form-item name="password">
<label style="font-size: 16px"><span style="color: #ff5353; margin-right: 5px">*</span>密码</label>
<a-input :model:value="signInForm.password" type="password" placeholder="请输入密码" />
<a-input v-model:value="signInForm.password" type="password" placeholder="请输入密码" />
</a-form-item>
<a-form-item>
<a-button type="primary" html-type="submit" @click="handleSingIn">登录</a-button>

Loading…
Cancel
Save