会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
病阳阳
孤独的大多数
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
下一页
2020年12月15日
函数组件与class组件
摘要: 定义javascript函数组件: function zjName (props) { return <h1>Hello, {props.name}</h1>; } 使用ES6的class定义组件: class zjName extends React.Component { render() {
阅读全文
posted @ 2020-12-15 15:12 病阳阳
阅读(84)
评论(0)
推荐(0)
2020年12月14日
Canvas
摘要: doocument.querySelector('canvas') 获取画布 var a = canvas.getContext() 生成画笔 a.moveTo(x,y) 将画笔移动到某一点 a.lineTo(x,y) 从一点到另一点画一条直线吧 a.stroke() 描边 a.closePath(
阅读全文
posted @ 2020-12-14 18:05 病阳阳
阅读(73)
评论(0)
推荐(0)
2020年12月4日
Css
摘要: css 超出部分滚动并隐藏滚动条 name::-webkit-scrollbar{ display: none; }
阅读全文
posted @ 2020-12-04 14:51 病阳阳
阅读(52)
评论(0)
推荐(0)
Vue-cli中使用VueRouter
摘要: 创建路由文件 在项目的`src`目录下,创建`router.js`文件,用来专门管理路由,接下来所有的路由都写在这个文件中。 1.在router.js中导入vue-router import Vue from "vue";import VueRouter from "vue-router";Vue.
阅读全文
posted @ 2020-12-04 14:20 病阳阳
阅读(140)
评论(0)
推荐(0)
2020年12月3日
Vue自定义指令
摘要: 注册全局自定义指令 `v-focus` Vue.directive('focus', { // 当被绑定的元素插入到 DOM 中时…… inserted: function (el) { // 聚焦元素 el.focus() }}) 注册局部指令(directives ) directives: {
阅读全文
posted @ 2020-12-03 12:04 病阳阳
阅读(38)
评论(0)
推荐(0)
2020年12月2日
Vue多组件嵌套
摘要: 注册局部组件 1 引入组件import Users from './components/Users.vue'import Header from './components/Header.vue'import Footer from './components/Footer.vue'export
阅读全文
posted @ 2020-12-02 16:44 病阳阳
阅读(138)
评论(0)
推荐(0)
Vue-router 按需加载
摘要: component: () => import() //需要babel插件 否则import报错 const App = () => import('../component/Login.vue');
阅读全文
posted @ 2020-12-02 16:39 病阳阳
阅读(79)
评论(0)
推荐(0)
Vue项目中常用的生命周期
摘要: Vue项目中常用的生命周期和参数 <script> import Confin from '@/components/sub/Confin'; export default { name: 'Fist', components: {Confin}, //注册组件,比如要插入另外一个写好的VUE文件买
阅读全文
posted @ 2020-12-02 16:38 病阳阳
阅读(123)
评论(0)
推荐(0)
2020年12月1日
Vue.use()用法:
摘要: 1.创建如下图中的文件夹和文件 2.在 Loading.vue 中定义一个组件 <template> <div class="loading-box"> Loading... </div> </template> 3.在 index.js 中 引入 Loading.vue ,并导出 // 引入组件
阅读全文
posted @ 2020-12-01 15:33 病阳阳
阅读(164)
评论(0)
推荐(0)
2020年11月30日
Es6
摘要: .babelrc:把es6转成es5
阅读全文
posted @ 2020-11-30 16:16 病阳阳
阅读(56)
评论(0)
推荐(0)
上一页
1
2
3
下一页
公告