demo.html 1.21 KB
<div id="countpanel" class="page out" data-title="统计面板">
	<div id="countpanel-header"></div>
	<div id="countpanel-a"></div>
	<div id="countpanel-b"></div>
</div>
<script>
require(["NavHeader", "CountPanel"], function(NavHeader, CountPanel) {
	var _u = require("mUtil");
	var hasClsPicker = typeof clsPicker !== "undefined";
	if(!hasClsPicker) {
		new NavHeader({
			el: "countpanel-header",
			option: {
				title:"统计面板", 
				smallTitle:"countpanel"
			}
		}).render();
	}
	new CountPanel({
		el: "countpanel-a",
		option: {
			items: [
				{text: "商品收藏", content: "9"},
				{text: "店铺收藏", content: "0"},
				{text: "内容收藏", content: "0"},
				{text: "足迹", content: "12"}
			]
		}
	}).render().then(function(){
		if (!hasClsPicker) return;
		_u.vetically("#countpanel-a");
		clsPicker.golalSetting({
			container: "#countpanel-a",
			type: "Countpanel"
		});
		new clsPicker({
			selector: ".wev-comp-CountPanel",
			text: ".wev-comp-CountPanel",
			skew: [10, 0],
			lineYSkew: 60,
			position: "bottom right"
		});
		new clsPicker({
			selector: ".wev-comp-CountPanel>a",
			text: ".wev-comp-CountPanel>a",
			skew: [2, 4],
			lineYSkew: 30,
			position: "bottom right"
		});
	});
});
</script>