利用Vue.js重写IView

Iview.js的组件,使用起来方便,美观。但不方便的是网上的资料基本上基于WebPack上开发的。
由于IVIEW.js本身就是基于VUE.js开发的,就利用vue.js重新将Iview的例子重写了一下,能在非webPack下可以运行。
首先,去网上找能脱离webPack的js和CSS文件

这里写图片描述
以TimeLine为例

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="../iviewjs/iview.css" rel="stylesheet" />
    <link href="../iviewjs/css/ionicons.css" rel="stylesheet" />
</head>
<body>
    <div id="template">
        <Timeline>
            <Timeline-item color="green"><Icon type="trophy" slot="dot"></Icon>发布1.0版本</Timeline-item>
            <Timeline-item color="green">发布2.0版本</Timeline-item>
            <Timeline-item color="red">严重故障</Timeline-item>
            <Timeline-item color="blue">发布3.0版本</Timeline-item>
        </Timeline>

    </div>


    <script src="../iviewjs/vue.min.js"></script>
    <script src="../iviewjs/iview.js"></script>
    <script>
        var app = new Vue({
            el: '#template'
        });
    </script>
</body>
</html>

运行的效果:
这里写图片描述
完全能显示所要达到的效果
需要代码的到https://download.csdn.net/download/hwhone/10580149下载

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值