[前端] html直接引用vue和element-ui的方法

1770 0
黑夜隐士 2022-10-19 15:39:03 | 显示全部楼层 |阅读模式
代码如下所示:
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  6.     <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  7.     <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  8. </head>
  9. <body>
  10.     <div id="app">
  11.         <el-button round @click="visible = true">圆角按钮</el-button>
  12.         <br>
  13.         <el-dialog :visible.sync="visible" title="Hello world">
  14.             <p>Try Element</p>
  15.         </el-dialog>
  16.         <br>
  17.         <el-switch v-model="value1" active-text="按月付费" inactive-text="按年付费">
  18.         </el-switch>
  19.         <el-switch style="display: block" v-model="value2" active-color="#13ce66" inactive-color="#ff4949"
  20.             active-text="按月付费" inactive-text="按年付费">
  21.         </el-switch>
  22.         <br>
  23.         <el-time-picker is-range v-model="value1" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间"
  24.             placeholder="选择时间范围">
  25.         </el-time-picker>
  26.         <el-time-picker is-range arrow-control v-model="value2" range-separator="至" start-placeholder="开始时间"
  27.             end-placeholder="结束时间" placeholder="选择时间范围">
  28.         </el-time-picker>
  29.         <br>
  30.         <el-progress type="circle" :percentage="0"></el-progress>
  31.         <el-progress type="circle" :percentage="25"></el-progress>
  32.         <el-progress type="circle" :percentage="100" status="success"></el-progress>
  33.         <el-progress type="circle" :percentage="70" status="warning"></el-progress>
  34.         <el-progress type="circle" :percentage="50" status="exception"></el-progress>
  35.         <br>
  36.         <el-row>
  37.             <el-button icon="el-icon-search" circle></el-button>
  38.             <el-button type="primary" icon="el-icon-edit" circle></el-button>
  39.             <el-button type="success" icon="el-icon-check" circle></el-button>
  40.             <el-button type="info" icon="el-icon-message" circle></el-button>
  41.             <el-button type="warning" icon="el-icon-star-off" circle></el-button>
  42.             <el-button type="danger" icon="el-icon-delete" circle></el-button>
  43.         </el-row>
  44.         <br>
  45.         <el-steps :active="1" finish-status="success">
  46.             <el-step title="已付款"></el-step>
  47.             <el-step title="退款中"></el-step>
  48.             <el-step title="已退款"></el-step>
  49.             <el-step title="待结算"></el-step>
  50.             <el-step title="已结算"></el-step>
  51.         </el-steps>
  52.     </div>
  53. </body>
  54. <script>
  55.     new Vue({
  56.         el: '#app',
  57.         data: function () {
  58.             return { visible: false }
  59.         }
  60.     })
  61. </script>
  62. </html>
复制代码
效果如图:


总结
到此这篇关于html直接引用vue和element-ui的方法的文章就介绍到这了,更多相关html引用vue和element-ui内容请搜索中国红客联盟以前的文章或继续浏览下面的相关文章,希望大家以后多多支持中国红客联盟!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2025 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行