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下载