简介 插槽:简单理解就是组件内部留一个或多个的插槽位置,可供组件传对应的模板代码进去。插槽的出现,让组件变的更加灵活。 一、匿名插槽 // 组件(父) <my-component> <p>hello,world!</p> </my-component> // 组件内部(子) <div class=" ...
分类:
其他好文 时间:
2019-12-25 11:35:08
阅读次数:
113
方法1:绑定对象bean调用 1、在application.properties或者application.yml里面添加我们的配置项: 2、创建一个配置类(该类和我们上面配置项的属性一一对应): import org.springframework.boot.context.properties. ...
分类:
移动开发 时间:
2019-12-24 23:33:17
阅读次数:
115
1 import React, { Component } from 'react' 2 3 export default class todolist extends Component { 4 constructor(props) { 5 super() 6 this.state = { 7 n ...
分类:
其他好文 时间:
2019-12-24 20:24:18
阅读次数:
96
React 路由 一 、 认识路由/配置环境 1. BrowserRouter和HashRouter的区别 1)BrowserRouter as Router表示使用Router就是使用BrowserRouter 2)<Route exact path="/" component={Landing} ...
分类:
其他好文 时间:
2019-12-24 18:28:46
阅读次数:
82
首先<router-view/>里定义了跳转规则 再去router.js,默认路径“/”,所以跳转到名为Login的组件里 routes: [ { path: '/', name: 'Login', component: Login, hidden: true } ] 在Vue项目中元素名字一般叫r ...
分类:
其他好文 时间:
2019-12-23 22:27:45
阅读次数:
83
1.语法:Vue.component("组件名字",{data,template}),代码如下: a. data: 必须是一个函数,有一个返回值。和vue里面的使用方法一样 b. template: 用来标示这个组件的渲染后的具体的代码 <div id='app'> <button-count></ ...
分类:
其他好文 时间:
2019-12-23 14:55:54
阅读次数:
85
encodeURI()不会对本身属于URI的特殊字符进行编码,例如冒号、正斜杠、问号和井字号;而encodeURIComponent()则会对它发现的任何非标准字符进行编码。 Fetch 请求body encodeURI参数会自动解码一次,需要再body传递的时候进行编码。 Fetch 'Conte ...
分类:
其他好文 时间:
2019-12-23 13:11:53
阅读次数:
68
第一种 第二种 第三种 render 函数,以字符串(网上太多,故没写),要么以component对象作为参数创建。 ...
分类:
其他好文 时间:
2019-12-23 00:42:57
阅读次数:
125
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.js"></script> <title>具名插槽 ...
分类:
其他好文 时间:
2019-12-22 16:07:32
阅读次数:
91
Description Find the number Weak Connected Component in the directed graph. Each node in the graph contains a label and a list of its neighbors. (a we ...
分类:
其他好文 时间:
2019-12-22 00:56:39
阅读次数:
123