vue 3 CDN 模版代码

DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Documenttitle>
      <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css" />
    
    <script src="https://unpkg.com/vue@3">script>
    
    <script src="https://unpkg.com/element-plus">script>
  head>
  <body>
    <div id="app">
      <el-card>
      ***
      el-card>
    div>

    <script>
      const { createApp, ref, reactive, watch, computed } = Vue
      const App = {
        setup() {
          const state = reactive({
            status: '1',
            name: ''
          })

          return {
            state
          }
        }
      }
      const app = createApp(App)
      app.use(ElementPlus)
      app.mount('#app')
    script>
  body>
html>

你可能感兴趣的:(vue,vue.js,前端,javascript)