原创 uniapp小程序實現水印

<template> <view class="content"> <view class='water_top'> <canvas canvas-id='myCanvas' style='width:100%;height

原创 vue中的插槽slot以及插槽向外傳值

1. vue 2.6.0版本之前的slot插槽: 用slot='' 替代表示對應的插槽。 <!--1.插槽組件中: 匿名插槽和具名插槽--> <div> <slot></slot> <slot name='content

原创 vue的路由管理包括路由取別名,頁面懶加載,重定向,動態路由傳參,嵌套路由,命名試圖,404頁面

1. router/index.js:實例化路由。 import Vue from 'vue' import VueRouter from 'vue-router' import routes from './router' Vue.

原创 vue項目大量數據渲染頁面優化---vue-virtual-scroll-list插件

0. git庫:https://www.npmjs.com/package/vue-virtual-scroll-list 1. 下拉列表數據很多時的優化渲染:引入vue-virtual-scroll-list插件。通過每次只渲染指定條數

原创 vue cli3+ 搭建的vue項目中的vue.config.js相關簡單配置

1. vue cli官網:https://cli.vuejs.org/zh/ 2. vue.config.js:如果沒有,就在根目錄下創建一個vue.config.js文件。 const path = require('path') c

原创 vue cli3+搭建項目的相關配置-----之.editorconfig文件配置

1. .editorconfig文件配置官網:https://editorconfig.org/。 2. .editorconfig配置說明: # 告訴EditorConfig插件,這是根文件,不用繼續往上查找 root = true

原创 vue的動態組件component

1. 使用:如用於動態綁定表單組件。  <component :is="item.type" v-model='item.value'> <component :is="item.type" v-model='item.valu

原创 vue頁面跳轉,以及攜帶參數,獲取參數

js操作路由(即編程式的導航)進行頁面跳轉:     1. 返回/前進一頁: 返回:this.$router.go(-1)、this.$router.back()。 前進:this.$router.go(1)     2. 跳轉到其他頁

原创 uniapp/微信小程序獲取微信授權/地理位置授權/二次授權

<template> <view class="auto-login h100 flex a-center j-center"> <view class="content flex flex-column a-center j-c

原创 nuxt中使用axios/@nuxtjs/axios 以及使用mock

1. 搭建nuxt項目:參考https://blog.csdn.net/qq_42231156/article/details/90174203。 2. nuxt中使用全局@nuxtjs/axios:參考:https://blog.csd

原创 css中的flex:1存在的坑

<div class='wrap'> <div class='left'>左</div> <div class='right'>右</div> </div> <style> .wrap{ dis

原创 vue中的vuex的應用以及創建簡易的vuex

 Vuex的應用:參考https://blog.csdn.net/qq_42231156/article/details/82949962。 import Vue from 'vue' class Store{ constructo

原创 js中的深克隆

1. 通過JSON.stringify和JSON.parse實現:不能完全解決深層次對象的嵌套的克隆。 var newVal=JSON.parse(JSON.stringify(val)) 2.封裝一個函數: 通過遞歸遍歷,根據數組

原创 css頁面佈局和重置樣式

<!--index.html--> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" conte

原创 vue-cli3+技術棧實戰完整筆記(一)

    0. 基於vue ui創建vue cli3.0項目:參考:https://blog.csdn.net/qq_42231156/article/details/82343793。 1.項目文件vueCli3.0下:     puli