VYE操作
@{ ViewBag.Title = "AddCustomerView"; } <script src="~/Scripts/vue.js"></script> <script src="~/Scripts/axios.js"></script> <h2>新增客户</h2> <div id="app"> <ul> <li><a href="/Employee/Index">员工显示</a></li> <li><a href="/Employee/AddEmployeeView">员工添加</a></li> <li><a href="/Customer/AddCustomerView">客户添加</a></li> </ul> 对接人: <input type="text" name="name" v-model="EName" value="" v-on:click="openEmpList" /> </div> <script> let app = new Vue({ el: "#app", data() { return { CustomerData: { EId: ‘‘, }, EName: ‘‘ } }, methods: { openEmpList() { location.href = ‘/Employee/Index‘ } }, created() { var id = localStorage.getItem("id") var name = localStorage.getItem("name") this.CustomerData.EId =id; this.EName = name; localStorage.removeItem("id"); localStorage.removeItem("name"); } }) </script>