河畔的风

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  61 随笔 :: 0 文章 :: 0 评论 :: 15287 阅读
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  vue

关于vue的一下方法
摘要:主要表现在 左右滚动的时候会有数据漏出来,需要使用css控制一下 ::v-deep .el-table__body-wrapper, ::v-deep .el-table__header-wrapper{ border: 1px solid transparent; } /* 去掉表格整体左边和上边 阅读全文
posted @ 2025-02-18 10:41 河畔的风 阅读(2) 评论(0) 推荐(0) 编辑

摘要:背景: 在vue中,使用watch监听pinia中的数据是否变化来调用api watch(() => { return [ pinia.data, ] }, (newV, oldV) => { axios.get('a.b', params).then((response) => { .... .. 阅读全文
posted @ 2025-01-17 11:21 河畔的风 阅读(15) 评论(0) 推荐(0) 编辑

摘要:在进页面前可能需要初始化一些请求数据,用于后续的数据请求 传统的做法是在mounted中嵌套请求方法来请求数据 在vue3 中 我们可以使用 beforeRouteEnter <script lang="ts"> export default { async beforeRouteEnter(to: 阅读全文
posted @ 2024-12-20 17:32 河畔的风 阅读(187) 评论(0) 推荐(0) 编辑

摘要:<template> <div> <el-button @click="openMessageBox">打开MessageBox</el-button> <el-button @click="updateMessageBoxContent">打开MessageBox</el-button> </di 阅读全文
posted @ 2024-09-02 19:11 河畔的风 阅读(3) 评论(0) 推荐(0) 编辑

摘要:vNode 只是用来描述DOM,自身不维护状态,messageBox只是利用vNode渲染DOM,要想实现messageBox内容响应式,需要提供Vue实例(组件): 写一个这样的组件 新建组件(customRadioGroup.js): import Vue from "vue"; const C 阅读全文
posted @ 2024-08-30 18:46 河畔的风 阅读(8) 评论(0) 推荐(0) 编辑

摘要:最近vue2遇到的问题 有一个数据结构是多层嵌套 var level1list = [ { name: 'level1-1', level2List:[ { name: 'level2-1', level3List:[ { name: 'level3-1', value: '' }, { name: 阅读全文
posted @ 2024-08-28 14:25 河畔的风 阅读(150) 评论(0) 推荐(0) 编辑

摘要:<script setup lang="ts"> import { useStore } from '@/vuex'; import {computed} from 'vue' const store = useStore() const onSubmit = () => { store.dispa 阅读全文
posted @ 2024-08-22 11:01 河畔的风 阅读(151) 评论(0) 推荐(0) 编辑

摘要:<template> <div class="drag-ball" ref="dragBall" @mousedown.stop.prevent="mousedown" @mouseup.stop.prevent="mouseup"> <div class="drag-content"> <slot 阅读全文
posted @ 2020-11-18 14:09 河畔的风 阅读(128) 评论(0) 推荐(0) 编辑

摘要:import Vue from 'vue'; import VueI18n from 'vue-i18n'; import stroe from './store' import en from '../en'; import zh from '../cn'; Vue.use(VueI18n); c 阅读全文
posted @ 2020-09-22 17:02 河畔的风 阅读(699) 评论(0) 推荐(0) 编辑

摘要:rules: { name: [ { required: true, validator: (rule, value, callback) => { if (!value) { return callback(new Error("请输入名称")); }else{ //这个else 一定要写, 要不 阅读全文
posted @ 2020-06-23 11:26 河畔的风 阅读(238) 评论(0) 推荐(0) 编辑

摘要:image.vue <template> <transition name="viewer-fade"> <div ref="bigImg" class="bigImg" v-show="visible"> <div class="back_mask"></div> <span class="big 阅读全文
posted @ 2020-06-02 17:22 河畔的风 阅读(190) 评论(0) 推荐(0) 编辑

摘要:return createElement( 'h' + this.level, [ createElement('a', { attrs: { name: headingId, href: '#' + headingId }, style: { color: 'red', }, 'class': { 阅读全文
posted @ 2020-05-25 16:08 河畔的风 阅读(568) 评论(0) 推荐(0) 编辑

摘要:import Vue from 'vue' import Vuex from 'vuex' import axaios from 'axios' import createPersistedState from "vuex-persistedstate" //将数据持久化, 此方法就是将store中 阅读全文
posted @ 2020-05-11 12:59 河畔的风 阅读(364) 评论(0) 推荐(0) 编辑

摘要:在组件的index.js文件中export出组件 组件 import Component from './Component ' const MyComponent= { install: function(Vue){ Vue.component('MyComponent',Component ) 阅读全文
posted @ 2020-05-11 11:24 河畔的风 阅读(162) 评论(0) 推荐(0) 编辑

摘要:import axios from 'axios'; import router from '../router' axios.interceptors.request.use( config => { if (localStorage.getItem("token")) { //统一将token带 阅读全文
posted @ 2020-05-11 10:45 河畔的风 阅读(195) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示