任何想法为什么这个vue应用程序不呈现

kse8i1jr  于 2023-11-21  发布在  Vue.js
关注(0)|答案(1)|浏览(142)

这是我flask `from flask import Flask,redirect,render_template

app=Flask(__name__)

@app.route('/')
def home():
    return render_template('index.html')

if __name__=='__main__':
    app.run(debug=True)

字符串
`这是我的index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>

    
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
    <script src="{{ url_for('static', filename='js/app.js') }}"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
</head>
<body>
    <div id="app">
        count is {{count}}
        
    </div>
</body>
</html>


下面是我的Vue组件

const app = Vue.createApp({
  data() {
      return {
          count: 0
      }
  },
  methods: {
      incrementCount() {
          this.count++
      }
  }
})

app.mount('#app')


此外,我的浏览器扩展程序显示未检测到vue
我花了将近几个小时才想明白

enyaitl3

enyaitl31#

替换此

<script src="https://unpkg.com/vue@3"></script>

字符串
未检测到Vue

相关问题