vue+pinia+VueDemi示例代码

代码语言:html

所属分类:其他

代码描述:vue+pinia+VueDemi示例代码

代码标签: vue pinia 示例 代码 VueDemi

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="UTF-8">





</head>

<body>
    <div id="app"></div>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue3.2.22.js"></script>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/VueDemi.js"></script>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/pinia.js"></script>
    <script>
        const useStore = Pinia.defineStore('main', {
          state: () => {
            return {
              title: "Pinia - Hello World",
              counter: 0 };
        
          } });
        
        
        const HeaderComponent = {
          template: '<h1 class="title">{{ title }}</h1>',
          props: ["title"] };
        
        
        const ContentComponent = {
          template: `
            <p class="content">
              Demonstrates basic usage of Pinia
            </p>  
            <p class="content">
            C.........完整代码请登录后点击上方下载按钮下载查看

网友评论0