8.27-一口气全念对

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>

 

8.27-一口气全念对

上一篇:创建对象的过程以及实例的概念


下一篇:深拷贝(4种)