06 2021 档案
摘要:docker pull star7th/showdoc 创建目录 mkdir /showdoc_data mkdir /showdoc_data/html chmod -R 777 /showdoc_data/ 启动showdoc容器 docker run -d --name showdoc_tes
阅读全文
摘要:(1) 先上传项目到 git 记得不要把node_module 上传了 (2)登录服务器, 创建一个空文件夹 命名 例如 music_vue (3) 从远程克隆项目 先 npm install 再npm run build (4) 前端项目 注意不要用 history 路由 (5)如果在服务器创建了
阅读全文
摘要:import storage from 'good-storage' function inertArray(arr, val, compare, maxLen) { const index = arr.findIndex(compare) if (index 0) { return } if (i
阅读全文
摘要:<template> <div class="search-input"> <i class="icon-search"></i> <input class="input-inner" v-model="query" :placeholder="placeholder" /> <i v-show="
阅读全文
摘要:export function shuffle(source) { const arr = source.slice() for (let i = 0; i < arr.length; i++) { const j = getRandomInt(i) swap(arr, i, j) } return
阅读全文
摘要:自定义组件: <template> <div class="loading"> <div class="loading-content"> <img width="24" height="24" src="./loading.gif"> <p class="desc">{{title}}</p> <
阅读全文
摘要:#### Install npm install vue3-lazy -S #### 引入 main.js demo: import { createApp } from 'vue' import App from './app' import lazyPlugin from 'vue3-lazy'
阅读全文
摘要:封装组件: <template> <div ref="rootRef"> <slot></slot> </div> </template> <script> import useScroll from './use-scroll' import { ref } from 'vue' export d
阅读全文
摘要:* 数组元素交换位置 * @param {array} arr 数组 * @param {number} index1 添加项目的位置 * @param {number} index2 删除项目的位置 * index1和index2分别是两个数组的索引值,即是两个要交换元素位置的索引值,如1,5就是
阅读全文
摘要:// 安装对应版本的包 yarn add node-sass@4.14.1 --dev yarn add sass-loader@8.0.0 --dev
阅读全文
摘要:解决方案:卸载node-sass npm uninstall node-sass 然后安装最新版本(5.0之前) npm install node-sass@4.14.1
阅读全文
摘要:新建vue.config.js module.exports = { css: { loaderOptions: { sass: { // 全局引入变量和 mixin additionalData: ` @import "@/assets/scss/variable.scss"; @import "
阅读全文