大飞_dafei

导航

随笔分类 -  Vue

1 2 3 4 下一页

ant-design-vue 之表格宽度,空白列
摘要:ant-design-vue 之表格宽度,空白列, 解决办法: 官方: 建议指定 scroll.x 为大于表格宽度的固定值或百分比。注意,且非固定列宽度之和不要超过 scroll.x。最终结果: 给每个列设置宽度 最右边的剩下一个列不设置宽度,来自适应 给最右边的列设置fixed:right,来保证 阅读全文

posted @ 2025-12-10 15:53 大飞_dafei 阅读(35) 评论(0) 推荐(0)

禁用vue.js <template>中段落的eslint规则最大行长度
摘要:禁用vue.js <template>中段落的eslint规则最大行长度 使用 eslint,后配置了 extends: [ // 这个破玩意,好讨厌,配置了这个后,template属性多余2个就开始换行 'plugin:vue/vue3-recommended' ], 解决方法: 'vue/max 阅读全文

posted @ 2023-02-13 11:23 大飞_dafei 阅读(632) 评论(0) 推荐(0)

JavaScript禁止在网页中右键和选取功能
摘要:JavaScript禁止在网页中右键和选取功能 document.oncontextmenu = new Function('event.returnValue=false;') document.onselectstart = new Function('event.returnValue=fal 阅读全文

posted @ 2022-10-21 16:51 大飞_dafei 阅读(44) 评论(0) 推荐(0)

树形插件 vue-treeselect 基本使用
摘要:树形插件 vue-treeselect 基本使用 vue-treeselect 是一个多选组件,具有对 Vue.js嵌套选项支持。 支持嵌套选项的单选和多选 模糊匹配 异步搜索 延迟加载(仅在需要时加载深度选项的数据) 键盘支持(使用Arrow Up & Arrow Down键导航,使用键选择选项E 阅读全文

posted @ 2022-07-22 18:57 大飞_dafei 阅读(3822) 评论(1) 推荐(0)

Vue router在history模式下提示 Uncaught SyntaxError: Unexpected token '<'
摘要:Vue router在history模式下提示 Uncaught SyntaxError: Unexpected token '<' Vue router在history模式下提示 Uncaught SyntaxError: Unexpected token '<' 阅读全文

posted @ 2022-01-19 11:37 大飞_dafei 阅读(390) 评论(0) 推荐(0)

传统项目项目引入Vue.js
摘要:传统项目项目引入Vue.js 传统项目项目引入Vue.js element-ui axios jQ Vue <div id="app"> {{ message }} <button type="button" @click="foo()">提交</button> </div> <script src 阅读全文

posted @ 2021-12-29 15:48 大飞_dafei 阅读(382) 评论(0) 推荐(0)

Vue + ECharts实现中国地图背景色
摘要:Vue + ECharts实现中国地图背景色 Vue + ECharts实现中国地图背景色 01) 使用 dataRange <template> <div> <h3>vue + echarts实现地图背景色</h3> <div id="daFeiMap" /> </div> </template> 阅读全文

posted @ 2021-12-08 23:31 大飞_dafei 阅读(1028) 评论(0) 推荐(0)

Element-ui 中 Backtop 回到顶部
摘要:Element-ui 中 Backtop 回到顶部 <div style="width: 100%;height: 100%;"> <el-backtop></el-backtop> <div> 注意:01) 放到代码顶部 02)放到代码最外层的一个div 就是这么简单使用 阅读全文

posted @ 2021-11-08 23:55 大飞_dafei 阅读(155) 评论(0) 推荐(0)

Vite 搭建Vue 开发环境
摘要:Vite 搭建Vue 开发环境 npm init @vitejs/app --template vue 或者 npm init vite-app <project-name> cd xxx npm install (or `yarn`) npm run dev (or `yarn dev`) Vit 阅读全文

posted @ 2021-06-27 22:12 大飞_dafei 阅读(162) 评论(0) 推荐(0)

一图看懂Vue3 新增可复用组合式API(Reusability & Composition)
摘要:Vue2 和 Vue3 对比 一图看懂Vue3 新增可复用组合式API(Reusability & Composition) Vue2 和 Vue3 对比Vue3 支持大多数Vue特性Vue3中设计了一套更强大的组合API代替了Vue2中的Option API,复用性更强了更好的支持TS最主要: V 阅读全文

posted @ 2021-06-27 16:22 大飞_dafei 阅读(196) 评论(0) 推荐(0)

插件:better-scroll的参数和方法
摘要:插件:better-scroll的参数和方法 格式:let obj = new BScroll(object,{[option1,],.,.}); 注意,如果在某一个组件内创建了一个BScroll的实例,在组件生命周期结束前要注意调用destroy方法,否则在滑动过程中切换页面会导致一直触发scro 阅读全文

posted @ 2021-06-22 18:19 大飞_dafei 阅读(161) 评论(0) 推荐(0)

Vue vue-cli webpack 多入口
摘要:Vue vue-cli webpack 多入口 把项目分为多个模块,分别从2个入口进入,减少集中在一个包中容量, 主要步骤如下: 01)主要文件结构目录 02)build/webpack.base.conf.js 03)build/webpack.dev.conf.js 04)build/webpa 阅读全文

posted @ 2021-06-06 23:42 大飞_dafei 阅读(160) 评论(0) 推荐(0)

Vant 中 底部弹窗(picker)选择数据
摘要:Vant 中 底部弹窗(picker)选择数据 {bookId: "01", text: "论语"}, 数据中必须有 text 属性 <template> <div> <van-cell is-link @click="getBook">Vant 展示弹出层(fei)</van-cell> <van 阅读全文

posted @ 2021-06-01 17:11 大飞_dafei 阅读(1638) 评论(0) 推荐(1)

Vue 和 浏览器 之Vue项目在浏览器中运行并使用debug
摘要:Vue 和 浏览器 之Vue项目在浏览器中运行并使用debug 01) Vue 和 Chrome 02)Vue 和 Firefox 其他: Vue 和 webstorm(02) 之Vue项目在webstorm中运行并使用debug 阅读全文

posted @ 2021-04-28 14:15 大飞_dafei 阅读(703) 评论(0) 推荐(0)

Vue 自定义指令简单使用
摘要:Vue 自定义指令简单使用 main.js //指令--1 Vue.directive('my-fei-directive', { inserted: function (el, binging, vnode, oldVnode) { el.focus(); el.style.borderColor 阅读全文

posted @ 2021-03-17 16:21 大飞_dafei 阅读(95) 评论(0) 推荐(0)

Vue 之 v-model 修饰符
摘要:Vue 之 v-model 修饰符 .lazy - 取代 input 监听 change 事件 .number - 输入字符串转为有效的数字 .trim - 输入首尾空格过滤 demo: 首尾空格过滤 <template> <div> <p> <input v-model.trim="message 阅读全文

posted @ 2021-02-19 19:53 大飞_dafei 阅读(136) 评论(0) 推荐(0)

Vue 中mixins,extends,class简单使用
摘要:Vue 中mixins,extends,class简单使用 demo: index.vue, feiMixins,feiExtends,feiClass 四个文件 index.vue <template> <div id="index"> <div>{{foo}}</div> <div>{{bar} 阅读全文

posted @ 2021-01-04 09:08 大飞_dafei 阅读(936) 评论(0) 推荐(0)

Vue 中计算属性(computed)和侦听器(watch)
摘要:Vue 中计算属性(computed)和侦听器(watch) <template> <div> <p>原始字符串: {{ message }}</p> <p>计算后反转字符串: {{ reversedMessage }}</p> <input type="text" v-model="foo" st 阅读全文

posted @ 2021-01-04 05:33 大飞_dafei 阅读(114) 评论(0) 推荐(0)

Vue 组件选项顺序--声明周期---代码风格
摘要:Vue 组件选项顺序--声明周期 代码风格 组件选项应该有统一的顺序。 export default { name: '', mixins: [], components: {}, props: {}, data() {}, computed: {}, watch: {}, created() {} 阅读全文

posted @ 2020-12-31 16:38 大飞_dafei 阅读(192) 评论(0) 推荐(0)

Vue 中样式穿透 /deep/
摘要:Vue 中样式穿透 /deep/ 样式穿透使用2中场景 [ IE11可以使用,火狐83可以使用,chrome87可以使用] 01) 父组件样式影响到子组件 02) 组件内css影响到引入第三方样式 [ 以引入 Ant-Design-Vue 为例] 父组件demo: <template> <div i 阅读全文

posted @ 2020-12-17 10:25 大飞_dafei 阅读(3126) 评论(0) 推荐(0)

1 2 3 4 下一页