vue
文章平均质量分 73
qypingi
这个作者很懒,什么都没留下…
展开
-
vue
v-once:v-once的作用是只会渲染对应元素一次,数据更新是不会引起视图的更新,目的是为了提高性能。原创 2021-06-01 11:04:19 · 227 阅读 · 0 评论 -
vue 父子组件的生命周期的执行顺序
parent beforeCreatedparent createdparent beforeMountchiid beforeCreatedchild createdchild beforeMountchild mountedchild activated activated在子组件mounted(全部挂载到页面)之后,父组件mounted之前触发。parent beforeUpdatechiid updatedchiid beforeUpdate(chiid deactivat原创 2020-11-06 10:52:32 · 213 阅读 · 0 评论 -
vue项目打包如何优化?
vue项目打包如何优化?dll------预先处理第三方库,以后每次就只需处理业务代码即可。原创 2020-06-03 21:25:59 · 151 阅读 · 0 评论 -
promise
new Promise((resolve, reject) => {$.ajax({url: “xxxxxxxxxxxxx”,success: res => {if (res.code == 0) {resolve(res.data)} else {reject(res.desc)}}});}).then(res => {console.log(res)...原创 2020-01-15 11:37:56 · 109 阅读 · 0 评论 -
vue 再次点击路由不走created和mounted的解决
watch: { // 利用watch方法检测路由变化: ‘$route’: function (to, from) { // 拿到目标参数 to.query.id 去再次请求数据接口// this.loadPageData(to.query.id)}},...原创 2019-12-23 17:31:10 · 5368 阅读 · 1 评论 -
vue pull-to上拉加载
js:import TopNav from ‘@/components/TopNav.vue’;import PullTo from ‘vue-pull-to’;const BOTTOM_DEFAULT_CONFIG = { pullText: '上拉加载', triggerText: '释放更新', loadingText: '加载中...', doneTe...原创 2019-12-23 17:28:15 · 1302 阅读 · 0 评论 -
vue插件实现吸顶功能
html:<div v-sticky="{ stickyTop: 0, disabled: false }" class="stickTop"> <div>content</div></div>script:import VueSticky from “vue-sticky”;directives: {sticky: VueSt...原创 2019-11-20 10:30:46 · 1628 阅读 · 0 评论