12 2022 档案
摘要:官网 https://www.wangeditor.com/v5/for-frame.html#%E4%BD%BF%E7%94%A8-1 安装: npm install @wangeditor/editor --save npm install @wangeditor/editor-for-vue@
阅读全文
摘要:1 子组件 Demo 里: <script setup> import {ref} from 'vue' let ceshi = ref(520) defineExpose({ // 通过 defineExpose 将 子组件 内部 数据 暴露给 父组件 !!!! ceshi }) </script
阅读全文
摘要:父传子 父组件 绑定传参( :img_type="img_type") 不绑定只能传字符串 import {defineProps } from 'vue' let props = defineProps({ //子组件接收父组件传递过来的值 img_type: String, }) //视图中直接
阅读全文
摘要:shallowRef 定义得数组 清空 let component_list = shallowRef([ {unit: Head, name: 'Head', id: 1}, {unit: TopClass, name: 'TopClass', id: 2}, ]) component_list.
阅读全文
摘要:官网地址>> 引入后样式不对截图: 在 App.vue 贴上代码 如下: 附上代码: .el-message__content { width: auto; height: auto; background: none; } 达到期望结果截图:
阅读全文
摘要:.t_nowp {white-space: nowrap;} white-space: nowrap; 使用 white-space: nowrap; 后的期望结果:
阅读全文
摘要:<script setup> import { useStore } from 'vuex' import { computed } from 'vue' let store = useStore() let sel = computed(() => store.state.login_index)
阅读全文
摘要:当前视图: 我要做的是将 Total 类似的 英文 改为 中文 1. 在组件里引入 ElConfigProvider 组件 和中文包 // ElConfigProvider 组件 import { ElConfigProvider } from 'element-plus' // 引入中文包 imp
阅读全文
摘要:<style> html { filter: grayscale(1); } </style> 原色: 使用 filter: grayscale(1); 后:
阅读全文
摘要:1. npm 安装 npm install echarts --save 2. 使用 <template> <div> <div id="myChart123" :style="{width: '1500px', height: '550px'}"></div> </div> </template>
阅读全文
摘要:1.在 node_modules 里找到 vue-count-to 2. 将 vue-count-to src 文件夹 里的 3 个文件 放到 自己 src components 里 调用 ( 我这里用 count-to 文件包裹起来的) 3. 删除package.json内的 "vue-count
阅读全文
摘要:因为比较简单先说解决方法: 用一个 div 把 过渡到的 代码(组件代码) 包起来即可 详情: 用到 transition: (提升用户体验组件动画) 警告信息: 过渡的 组件 代码: 解决:(用div 把所有 代码包起来) 期望结果: 由于vue3 支持碎片写法没错,但是 transition 内
阅读全文
摘要:document.onkeydown = e => { // login() 登录事件 if(e.key == 'Enter') login() }
阅读全文
摘要:1. watch监听 import { watch} from 'vue' import {useRouter} from 'vue-router' let router = useRouter() watch(() =>router.currentRoute._value,(m,n)=> { co
阅读全文
摘要:使用场景: 提一下vue2 用法>> 下面回到正题 vue3 用法 1 安装包: npm install @icon-park/vue-next --save 2 字节跳动图标库取图地址>> 3 用法: <template> <div class="mm"> <!-- 使用 --> <home-tw
阅读全文
摘要:场景: 用到技术: vue vite element plus 我这里是 修改 element plus css 需要用到 这里先说 root 变量用法及声明。 1. 静态文件 创建一个 public.css 文件 :root { --hoverc: #fe4800; --hoverbgc: #fe
阅读全文