杨小白
杨小白
When i read the article, i find some description different with the code. Following personal understand, i change the `*.module.ts` to `index.ts`. Please check is right or not ? Thank...
突然间可视化拖拽的风好像在前端的各个角落吹起,自己也鼓捣了一下,代码基本开发完毕,做一下整理。 **github项目地址:**[taro-designer](https://github.com/silence717/taro-designer) **在线体验地址:**[taro-desiger](https://taro-designer.shuyun.com/#/) **主要涉及技术点如下:** - 背景 - 技术栈 - 拖拽 - 包装组件 - 数据结构 - 编辑器 - 单个组件操作 - 生成taro的源码 - 预览和下载源码 ### 背景 公司有一部分业务是做互动的开发,比如签到、礼品兑换等。由于互动的业务需要快速迭代,并且需要支持H5、微信小程序、以及淘宝小程序,因此前端采用了taro作为基础框架来满足多端的需求。因此我们思考是不是采用可视化的方式对基础的组件进行拖拉拽,直接生成页面布局,提高开发效率。 面对项目的种种局限,采用的是taro2.x库,以及taro自带的组件库,非taro-ui。因为taro支持的属性参差不齐,和业务方讨论之后,我们取tarojs组件库支持的h5和微信小程序的交集进行属性编辑。 ### 技术栈 react、mobx、cloud-react、tarojs ###...
### 理解 node.js 中的 module.exports 与 exports 原文链接: [https://www.sitepoint.com/understanding-module-exports-exports-node-js/](https://www.sitepoint.com/understanding-module-exports-exports-node-js/) 作为一个开发者,我们经常会遇到需要使用不熟悉的代码的情况。 在这个过程中遇到一个问题:我需要花费多少时间去理解这些代码,明白如何使用? 一个典型的回答就是:先让我可以开始coding,等到时间允许再去做深入研究。 接下来我们将对 module.exports 和 exports 在 node.js中的使用有一个更好地了解。 Note: 这篇文章包括了 node 中 module 的使用。如果你想了解浏览器内部 modules 的使用,可以参考这面这篇文章: [Understanding JavaScript Modules: Bundling...
## angular-ui-router使用 ### github源码地址:[https://github.com/angular-ui/ui-router](https://github.com/angular-ui/ui-router) ### api地址 [http://angular-ui.github.io/ui-router/site](http://angular-ui.github.io/ui-router/site) ### 安装 ``` javascript npm install --save angular-ui-router ``` ### 使用angular-ui-router 备注: 以下所有示例代码来源于个人所写的练习. 地址为:[https://github.com/silence717/angular-webpack-demo](https://github.com/silence717/angular-webpack-demo) ##### 导入angular-ui-router ``` javascript import uiRouter from 'angular-ui-router'; ```...
### angular开发过程中 $apply 问题 接到一个类似于dropdown这样的需求,点击按钮下拉选择展示,而它的关闭有3中场景。 1. 目前处于展开状态,再次点击按钮,下拉隐藏。 2. 点击里面的任一条件,下拉隐藏。 3. 点击空白处,下拉隐藏。 相信这样的使用场景一定不陌生,因为他经常出现。 #### 一开始的时候想象了一下jquery多么美好,实现起来多么简单,其实angular也很容易。 思路解析: 外层设置一个状态值,通过添加ngClass控制下拉是否显示。设想都是美好的,也通过测试这样没有问题。 实现过程: 1.html书写 ``` html cilic me! {{item.title}} ``` 2.css代码控制 ``` css .content .list{ display:...
## angular-ui-router使用 ### github源码地址:[https://github.com/angular-ui/ui-router](https://github.com/angular-ui/ui-router) ### api地址 [http://angular-ui.github.io/ui-router/site](http://angular-ui.github.io/ui-router/site) ### 安装 ``` javascript npm install --save angular-ui-router ``` ### 使用angular-ui-router 备注: 以下所有示例代码来源于个人所写的练习. 地址为:[https://github.com/silence717/angular-webpack-demo](https://github.com/silence717/angular-webpack-demo) ##### 导入angular-ui-router ``` javascript import uiRouter from 'angular-ui-router'; ```...