摘要:
接口 // 接口:对行为的 抽象 // 1对class的约束 // 接口定义 interface Iprinter{ //定义一个打印机 Printing(msg:string):string; //传的参是字符串 括号外冒号后边的string表示返回的是字符串 } interface Imessa 阅读全文
摘要:
数据类型 //**基础数据类型**/ //1.字符串类型 let email:string="22" console.log(email) //模板字符串 let msg:string=`my email is ${email}` console.log(msg) //2布尔 let isshow: 阅读全文
摘要:
var vm = new Vue({ el: '#app', data: { // 空的实例放到根组件下,所有的子组件都能调用 Bus: new Vue() }, template: '<App/>', components: { App }, }) this.$root.Bus.$emit("ex 阅读全文