dahong icon indicating copy to clipboard operation
dahong copied to clipboard

个人技术随笔

Results 47 dahong issues
Sort by recently updated
recently updated
newest added

### 前言 modal 是前端开发中普遍且高频的组件之一,很多UI框架中都会实现modal 来增强实践中的交互,但是都没有达到我想要的,因为开发管理后台类页面时modal 形式多变,而且会相互嵌套,这样的话对可定制性有很大的要求 ### 项目地址 [vuejs-modal](https://github.com/shaodahong/vuejs-modal) [Demo](https://shaodahong.github.io/vuejs-modal/) ### 预期目标 1. 可以自定义modal,一个vue 组件就是一个modal 2. 想要调用modal 直接通过`this.$modal[modal名]()`来调用 3. `this.$modal[modal名]()`是个promise,可以根据它的状态来得到modal 上的状态(确定或者取消等) 4. 可以通过`this.$modal[modal名](params)`来传参复用modal ### 实现 vue 提供use 函数来让我们安装插件 ```js vue.use(plugin,...

vue

在介绍篇#7 中,我大概说了下`boarder`这个命令行工具初始化出来的webpack项目模板有哪些功能,但是这些功能实在简单,所以想了想继续优化下,顺便解决下上篇留下来的问题 很多道友知道webpack打包现在很热门,但是不知其究竟,说实话我也不知道,上完班回去撸几把王者农药岂不快哉?但是最近webpack3又出来了,难道它想争夺版本帝? 本篇点到为止,可以根据关键字自行搜索,互联网的资料比我的更详细,易懂,有不明白的可以下面评论交流切磋,道友请留步!!! 上一篇中我已经介绍了目录结构,现在有所增强了 ``` . ├── README.md ├── build │   ├── webpack.base.js │   ├── webpack.build.js │   └── webpack.dev.js ├── dist │   ├── index.html │   └── static │   └──...

webpack

现在许多的项目都是基于webpack来构建的,并且自从webpack提供了[中文官网](https://doc.webpack-china.org/)后友好度大大的提高了,但是有些时候想快速开始一个webpack项目却只能把之前项目的一些config配置拿过来改改显得有点麻烦,所以写了一个简易的脚手架(真的很简易!!!) 安装: ``` $ npm install boarder -g ``` 使用: ``` $ boarder init $ cd $ npm install $ npm run dev ``` 初始化的结构目录是这样子的 ``` ├── README.md ├── build...

webpack

# 冒泡排序 > 引自wikipedia 冒泡排序(英语:Bubble Sort,台湾另外一种译名为:泡沫排序)是一种简单的排序算法。它重复地走访过要排序的数列,一次比较两个元素,如果他们的顺序错误就把他们交换过来。走访数列的工作是重复地进行直到没有再需要交换,也就是说该数列已经排序完成。这个算法的名字由来是因为越小的元素会经由交换慢慢“浮”到数列的顶端。 ## 图片详解 ![2 1](https://cloud.githubusercontent.com/assets/14831261/23332579/fdce56a6-fbb6-11e6-9cfd-3f82b9667b94.png) ## 代码实现 假设有一个数组`var list = [22, 90, 65, 34, 27, 8, 43, 24, 9, 10, 100, 1001]` ### 一阶段 要想实现冒泡肯定得来个双重循环结构,遍历到每个数和其之后的数进行比较,如果符合预期则进行交换,代码如下,计数`count`来表示交换的次数...

算法

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) Welcome to [Renovate](https://togithub.com/renovatebot/renovate)! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin. 🚦 To activate Renovate, merge this Pull Request....

Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.18.2. Release notes Sourced from express's releases. 4.18.2 Fix regression routing a large stack in a single route deps: [email protected] deps: [email protected] perf: remove unnecessary...

dependencies

Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. Release notes Sourced from decode-uri-component's releases. v0.2.2 Prevent overwriting previously decoded tokens 980e0bf https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2 v0.2.1 Switch to GitHub workflows 76abc93 Fix issue where decode...

dependencies