摘要: ant-design-vue 1.x 实测有用 <template> <a-config-provider :locale="zh_CN"> <div id="app"> <router-view v-if="isRouterAlive" /> </div> </a-config-provider> 阅读全文
posted @ 2022-04-21 13:12 cx-键盘手 阅读(1225) 评论(0) 推荐(0) 编辑
摘要: data() { return { beforeScrollTop: 0, }; }, methods: { onScroll() { let scrollTop = this.$refs.rightContent.scrollTop; let scroll = scrollTop - this.b 阅读全文
posted @ 2022-03-31 14:15 cx-键盘手 阅读(401) 评论(0) 推荐(0) 编辑
摘要: const nums = [1, 2, 3, 4, 5]; 1.assign console.log(Object.assign({}, nums)); Object.assign() 方法用于将所有可枚举属性的值从一个或多个源对象分配到目标对象。它将返回目标对象。 2.JS把数组转化成新的对象ma 阅读全文
posted @ 2022-03-24 11:39 cx-键盘手 阅读(1783) 评论(0) 推荐(0) 编辑
摘要: 1.将json对象转化为json字符串,再判断该字符串是否为"{}" var data = {}; var b = (JSON.stringify(data) == "{}"); alert(b);//true 2.for in 循环判断 var obj = {}; var b = function 阅读全文
posted @ 2022-03-24 10:24 cx-键盘手 阅读(162) 评论(0) 推荐(0) 编辑
摘要: EventBus事件总线 简单使用 全局注册 import Vue from 'vue' import App from './App.vue' import router from './router' import store from './store' Vue.prototype.$Even 阅读全文
posted @ 2022-03-11 10:19 cx-键盘手 阅读(286) 评论(0) 推荐(0) 编辑