在控制台内收到警告“[intlify] Detected HTML in .....”,但无法弄清楚如何禁用此特定行的此警告。我还尝试更改 eslintrc.js 文件以禁用所有 v-html 警告,但没有成功。
依赖关系
"vue": "^3.0.0",
"vue-i18n": "^9.2.0-beta.15",
Run Code Online (Sandbox Code Playgroud)
开发依赖
"@vue/cli-plugin-babel": "^4.5.14",
"@vue/cli-plugin-eslint": "^4.5.14",
"@vue/cli-service": "^4.5.14",
"@vue/compiler-sfc": "^3.0.0",
"@vue/eslint-config-standard": "^6.1.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.32.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-vue": "^7.19.1",
Run Code Online (Sandbox Code Playgroud)
Eslint 配置文件
extends: [
'standard',
'eslint:recommended',
'plugin:vue/essential',
'@vue/standard'
],
parserOptions: {
parser: 'babel-eslint',
impliedStrict: true
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-new': 'off',
'no-var': 'off',
indent: ['error', 2], …
Run Code Online (Sandbox Code Playgroud) 我有以下表格,其中列出了问题并有一个答案字段。api 循环列出的问题,所有问题都需要具有相同的字段名称。一切正常,问题是我无法提交除最后一个之外的所有表单值。有没有办法为多个字段使用表单控件名称。
move-maker-add-component.ts
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroupDirective, FormBuilder, FormGroup, NgForm, Validators } from '@angular/forms';
import { ApiService } from 'src/app/shared/services/api.service';
import { AuthService } from "src/app/shared/services/auth.service";
import { Router } from '@angular/router';
@Component({
selector: 'app-move-makers-add',
templateUrl: './move-makers-add.component.html',
styleUrls: ['./move-makers-add.component.scss']
})
export class MoveMakersAddComponent implements OnInit {
moveMakerForm: FormGroup;
moveMakerId:any;
moveMakers:any='';
answer:any;
id:string='';
constructor(public authService: AuthService,private router: Router, private api: ApiService, private formBuilder: FormBuilder) { }
ngOnInit() {
this.getMoveMaker();
this.moveMakerForm = this.formBuilder.group({
'moveMakerId' : …
Run Code Online (Sandbox Code Playgroud)