随笔分类 -  vue

摘要:一.问题:在vue项目打包跟新后,虽然js、css等文件会添加hash值确保加载最新的文件,但是只限于客户在你更新前正好未使用平台,更新后客户在使用时,可以确保访问的前端版本是最新的,但是当客户已经打开平台某个页面放置,此时你更新了版本,用户接着操作页面时会出现各种问题导致体验不好,此时提醒用户去刷 阅读全文
posted @ 2023-10-17 10:46 王希有 阅读(2905) 评论(0) 推荐(0)
摘要:一、vue-element-admin git地址 https://github.com/PanJiaChen/vue-element-admin 二、分支 master:主分支,(纯英文) il8n:中英文切换分支 三、npm install 安装报错原因: tui-editor 已更新,故造成错 阅读全文
posted @ 2023-08-09 09:21 王希有 阅读(921) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/LY__lyxka/article/details/126161103 阅读全文
posted @ 2023-06-28 09:16 王希有 阅读(163) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/weixin_46156770/article/details/122696483 阅读全文
posted @ 2023-06-28 09:14 王希有 阅读(70) 评论(0) 推荐(0)
摘要::move="onMove" onMove(e) { console.log(e); let moveName = e.draggedContext.element.name // 这个是当前拖拽的控件名 // 接下来判断该控件要不要拖进指定的容器 if(moveName == '禁止拖拽进容器的控 阅读全文
posted @ 2023-06-02 09:10 王希有 阅读(40) 评论(0) 推荐(0)
摘要:<!-- 动态组件 --> <component :is="components.get(activeKey)" /> import { defineAsyncComponent, markRaw } from 'vue'; const components = markRaw(new Map<st 阅读全文
posted @ 2022-09-16 15:25 王希有 阅读(499) 评论(0) 推荐(0)
摘要:1、axios({ method:'get', url:'http://bit.ly/2mTM3nY1233455, headers: { 'content-type': 'text/xml' },data: {} }) .then(function(response) { });2、 axios( 阅读全文
posted @ 2022-09-08 10:44 王希有 阅读(532) 评论(0) 推荐(0)
摘要:1、 import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router" function getRoutes() { const { routes } = loadRouters(); /** * rout 阅读全文
posted @ 2022-06-23 13:53 王希有 阅读(445) 评论(0) 推荐(0)
摘要:const editorConfig = { placeholder: '请输入内容...', MENU_CONF: {} } editorConfig.MENU_CONF['uploadImage'] = { async customUpload(file, insertFn) { const { 阅读全文
posted @ 2022-06-22 16:03 王希有 阅读(2466) 评论(0) 推荐(0)
摘要:官网 https://www.wangeditor.com/v5/for-frame.html#vue3 1、查看所有工具栏 const handleCreated = (editor) => { editorRef.value = editor // 记录 editor 实例,重要! // 查看所 阅读全文
posted @ 2022-06-22 16:00 王希有 阅读(12211) 评论(1) 推荐(0)
摘要:先说一下我的问题: 最近在用 v3 和 ts 做工程,但是在用户代码片段中设置了快捷键,发现是不起作用的,就很奇怪,过了一段时间, 突然想起来,我现在用的是 ts,不是js了,哈哈,虽然在用但是还没反应过来,后来改了就好了,总结如下: 1、常规(vue + js + ...) 找到文件-首选项-用户 阅读全文
posted @ 2022-05-12 13:37 王希有 阅读(806) 评论(0) 推荐(0)
摘要:1、 npm install vue3-lazy -S 2、 import lazyPlugin from 'vue3-lazy' app.use(lazyPlugin, { // loading: '', // 图片加载时默认图片 // error: '' // 图片加载失败时默认图片 }) 3、 阅读全文
posted @ 2022-05-11 18:25 王希有 阅读(474) 评论(0) 推荐(0)
摘要:<script setup lang="ts"> import { ref } from 'vue' import { useClipboard, usePermission } from '@vueuse/core' const input = ref('') const { text, isSu 阅读全文
posted @ 2022-05-10 16:33 王希有 阅读(1543) 评论(0) 推荐(0)
摘要:1.旧文档 https://vuejs.org/ 2.新文档 全新体验,通俗易懂 https://vuejs.org/translations/ 参考 https://zhuanlan.zhihu.com/p/487428288 阅读全文
posted @ 2022-05-10 09:06 王希有 阅读(160) 评论(0) 推荐(0)
摘要:1、不使用 useVModel 子组件 父组件 2、使用 useVModel 子组件 注意: 不使用 :value 而是使用 v-model 父组件 注意: 若是多层嵌套的情况 子组件不变,沿用 使用 useVModel 父组件 效果 还是很好使用的。。。666 阅读全文
posted @ 2022-05-09 20:11 王希有 阅读(6449) 评论(0) 推荐(0)
摘要:官网解释 从实现上看,defineComponent 只返回传递给它的对象。但是,就类型而言,返回的值有一个合成类型的构造函数,用于手动渲染函数、TSX 和 IDE 工具支持。 官网示例 我在自己使用发现的 在单组件中时, 1、不用 defineComponent 会发现,setup中 props的 阅读全文
posted @ 2022-05-09 15:19 王希有 阅读(5819) 评论(0) 推荐(1)
摘要:清除无效的 副作用 参考 https://www.jianshu.com/p/64a6427aaf43 阅读全文
posted @ 2022-05-05 14:52 王希有 阅读(110) 评论(0) 推荐(0)
摘要:父组件 子组件 即可 阅读全文
posted @ 2022-05-01 20:26 王希有 阅读(500) 评论(0) 推荐(0)
摘要:1、安装 npm install less npm install less-loader 若有则不需要安装,若无则安装 2、定义变量文件 如 globle.less,添加变量如 3、配置 - vite.config.ts 3、使用 阅读全文
posted @ 2022-05-01 14:17 王希有 阅读(3574) 评论(1) 推荐(0)
摘要:问题: 当在nginx中部署多个前端工程时,且用 history 模式时,不刷新则以,一刷新页面就是奥利给白! 故,经过再次研究(之前就弄过,现在忘了。。。。。),给有这种问题的朋友出教学稳住,哈哈。。。 准备: nginx 目录 nginx html v3ts sbin conf ...... v 阅读全文
posted @ 2022-04-28 10:53 王希有 阅读(5496) 评论(0) 推荐(0)