admin 发布的文章

::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-track { -webkit-box-shadow: inset006pxrgba(255,0,0,.3); background: hsla(0,0%,100%,.1) } ::-webkit-scrollbar-thumb { border-radius: 4px; background: rgba(0,0,0,.2); -webkit-box-shadow: inset006pxrgba(0,0,0,.5- 阅读剩余部分 -

icon 自定义图标(1.14.0 新增) string|()=>VNode 一、利用自带的icon赋值个默认的icon名字就可以了,但是有时候我们需要用到实底风格的icon,所以只能用()=>VNodethis.$confirm({ title: '确认设置当前位置为出险地点?', content: this.infoWindow.contents, icon: 'exclamation-circle', onOk: () => { this.onMapClose(); c- 阅读剩余部分 -

Warning: [antdv: Each record in table should have a unique key prop,or set rowKey to an unique primary key.] 使用 Ant Design的时候报key警告,这由于columns中定义的默认key值在返回的数据中没有当前的这个字段造成的,一个是使用rowKey默认指定一个对应的键值对,或者使用类似v-for循环中的下标index来代替:rowKey="(record,index)=>{return index}"

最近试了下 Vue.extend 方法,写好后发现访问会报如下错误vue.runtime.esm.js?2b0e:619 [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.接下来我们分析下报错的原因在哪里和解决办法原因vue有两种形式的代码 c- 阅读剩余部分 -

先附一张官网上的vue实例的生命周期图,每个Vue实例在被创建的时候都需要经过一系列的初始化过程,例如需要设置数据监听,编译模板,将实例挂载到DOM并在数据变化时更新DOM等。同时在这个过程中也会运行一些叫做生命周期钩子的函数(回调函数),这给了用户在不同阶段添加自己代码的机会。1、vue的生命周期图在vue实例的整个生命周期的各个阶段,会提供不同的钩子函数以供我们进行不同的操作。先列出vue官网上对各个钩子函数的详细解析。生命周期钩子详细beforeCreate在实例初始化之后,数据观测(data observer) 和 event/watcher 事件配置之前被调用。c- 阅读剩余部分 -