<!DOCTYPE html>
<html>

	<head style="visibility:hidden;">
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
		<title>记事本</title>
		<link rel="stylesheet" type="text/css" href="../css/mui.css" />
	</head>
	
	<body style="visibility:hidden;">
		<div class="header">
			<div class="header_con">
				<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
				<!--<img src="../img/title_news.png" class="oc_logo" />-->
				<p class="title">记事本</p>
			</div>
		</div>
		<div class="z"></div>
		<div class="block" id="app" v-cloak>
			<div class="row clearfix" v-for="(each, index) in noteData" :data-id="each.id">
				<div class="left" v-if="!each.currentDelete" @click="edit(index)">
					<div class="title">{{each.name}}</div>
					<div class="created_time">创建时间：{{each.created_at}}</div>
					<div class="updated_time">更改时间：{{each.updated_at}}</div>
				</div>
				<div class="left" v-else>
					<div class="title" style="color: red;font-weight: bolder;">你确定要删除么？</div>
					<div class="small_title">{{each.name}}</div>
				</div>
				<div class="right" v-if="!each.currentDelete">
					<div class="operation edit" @click.stop.prevent="edit(index)">编辑</div>
					<div class="delete operation" @click.stop.prevent="triggerDelete(index)">删除</div>
				</div>
				<div class="right" v-else>
					<div class="operation delete confirm" @click.stop.prevent="confirmDelete(index)">确认</div>
					<div class="operation edit cancel" @click.stop.prevent="cancelDelete(index)">取消</div>
				</div>
			</div>
		</div>
		<div class="footer">
			新增记事
		</div>
	</body>
	<script src="../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/common.js" type="text/javascript" charset="utf-8"></script>
	<script src="../lib/vue/vue.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		mui.plusReady(function() {
			var element;
			var parent = document.body;
			element = document.createElement('script');
			element.src = localStorage.getItem("jsUrl") + 'common.js?ver=' + localStorage.getItem('version');
			parent.appendChild(element);		
			element.onload = function() {
				var style = [JZL.getCssUrl('notepad.css'), JZL.getCssUrl("global.css"), JZL.getCssUrl("header.css")];
				JZL.css_init(style);
				var script = [JZL.getJsUrl('notepad.js')];
				JZL.js_init(script);
				setTimeout(function() {
					parent.style.visibility = "visible";
				}, 100);
			};
		})
		
	</script>
</html>
