摘要: // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { buildToolsVersion = "29.0.2" m 阅读全文
posted @ 2020-12-30 15:31 kemplaw 阅读(623) 评论(0) 推荐(0)
摘要: // app-routing.module.ts const routes: Route[] = [ { path: 'app', loadChildren: () => import(m => m.DemoModule) } ] @NgModule({ imports: [RouterModule 阅读全文
posted @ 2020-12-26 21:07 kemplaw 阅读(66) 评论(0) 推荐(0)
摘要: 首先请看以下代码片段,这是 Vue3 新增的一个 emits 属性,其中有一个功能是,可以添加自定义事件验证,来决定是否 emit 这个事件 app.component('custom-form', { emits: { // No validation click: null, // Valida 阅读全文
posted @ 2020-12-12 14:13 kemplaw 阅读(71) 评论(0) 推荐(0)
摘要: Vue2.x 之中,实现自定义 v-model // CheckComponent.vue <template> <input type="checkbox" :value="value" @change="$emit('input', $event.target.value)"> </templa 阅读全文
posted @ 2020-12-12 13:59 kemplaw 阅读(100) 评论(0) 推荐(0)