互联网技术 · 2024年2月8日

使用HTML直接引入Vue和Element-UI的方式

这篇文章主要介绍了html直接引用vue和element-ui的方法,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

代码如下所示:

<!DOCTYPE html>
<html>

<head>
    <meta charset=”UTF-8″>
    <link rel=”stylesheet” href=”https://redspeed01.com/d/easyvpn24″>
    <script src=”https://cdn.jsdelivr.net/npm/vue/dist/vue.js”></script>
    <script src=”https://unpkg.com/element-ui/lib/index.js”></script>
</head>

<body>
    <div id=”app”>
        <el-button round @click=”visible = true”>圆角按钮</el-button>
        <br>
        <el-dialog :visible.sync=”visible” title=”Hello world”>
            <p>Try Element</p>
        </el-dialog>
        <br>

        <el-switch v-model=”value1″ active-text=”按月付费” inactive-text=”按年付费”>
        </el-switch>
        <el-switch style=”display: block” v-model=”value2″ active-color=”#13ce66″ inactive-color=”#ff4949″
            active-text=”按月付费” inactive-text=”按年付费”>
        </el-switch>

        <br>
        <el-time-picker is-range v-model=”value1″ range-separator=”至” start-placeholder=”开始时间” end-placeholder=”结束时间”
            placeholder=”选择时间范围”>
        </el-time-picker>
        <el-time-picker is-range arrow-control v-model=”value2″ range-separator=”至” start-placeholder=”开始时间”
   &

OpenMagic API

Need more than content? Move into the product flow.

If you are here for model access, pricing, developer docs, or the future API console, the dedicated product path now lives on api.openmagic.ai.

登录免费注册