【问题标题】:changing on click to web page点击网页更改
【发布时间】:2020-10-20 21:43:19
【问题描述】:

我真的对 Typescript 感到困惑。现在我想在点击按钮上进行事件以更改谷歌网站。 但如果按下按钮,控制台显示下方会显示错误消息。 [控制台上的错误消息] DevTools 无法加载 SourceMap:无法加载 chrome-extension://fheoggkfdfchfphceeifdbepaooicaho/sourceMap/chrome/content.map 的内容:HTTP 错误:状态代码 404,net::ERR_UNKNOWN_URL_SCHEME

我的开发环境是 Nuxt.js,使用 vue.js、vuetify.js 和 Typescript。 我是初学者工程师,几个月前我加入了这家 IT 公司。 但我的新项目是基于 Nuxt.js 和 Typescript。 请在下面告诉我我的代码。

<template>
    <v-card>
        <v-text-filed><v-btn @click="onClickButton">google</v-btn></v-text-filed>
    </v-card>
</template>
<script lang="ts">
import {Component,Vue} from'nuxt-property-decorator'
import axios from 'axios'

@Component
export default class typeI scriptLesson extends Vue{
    public google:any="";
    onClickButton(){
        this.google='https://google.com';
    }
}
</script>

【问题讨论】:

  • v-text-filed 可能是错字
  • 感谢您的评论!这绝对是错字。非常感谢!!
  • 解决了吗?
  • 是的,修复它。谢谢!!

标签: typescript vue.js vuetify.js nuxt.js


【解决方案1】:

v-text-filed 是错字。我在下面修复了我的代码。谢谢无聊的香蕉!!

    <template>
    <v-card>
        <v-text-field><v-btn @click="onClickButton">google</v-btn></v-text-field>
    </v-card>
</template>
<script lang="ts">
import {Component,Vue} from'nuxt-property-decorator'
import axios from 'axios'

@Component
export default class typeI scriptLesson extends Vue{
    public google:any="";
    onClickButton(){
        this.google='https://google.com';
    }
}
</script>

【讨论】:

    猜你喜欢
    • 2015-06-24
    • 2018-04-11
    • 1970-01-01
    • 2021-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-11
    • 1970-01-01
    相关资源
    最近更新 更多