deligent-ant

Results 17 issues of deligent-ant

# 关于稍微复杂项目开始之前对准备 1. 查看所需要的数据,以及观察其来源,是本地运算还是远程fetch 2. init store fe有rootStore和Module_Store 。然后考虑什么样的数据要放在Module_store,什么样的数据不需要放入store 只需要放在自己的组建data. ```javascript rootStore.registerModule(MODULE_NAME, moduleStore) rootStore.unregisterModule(state.moduleName) // 卸载上一个路由对应的 module store ``` 3. 划分功能,每个组件只负责自己的功能部分,负责后,调用上层传过来的函数 # 详细的一些技巧 - 父子通信:子组件定义一个prop,父组件把自己method方法传过去 - 数据获取:父组件,一般是index.vue会定义method,而该方法在做了一些判断后,会调用store中actions的方法,异步获得数据 - 单页面还是多页面:如果公用的信息比较多,业务也比较简单,写成单页面,这样在数据共享上会很方便,对应需要在不同情况,展示不一样的组件,可以使用v-if。 比如这个需求,看是多个页面其实只要写一个单页面,然后分别加一个v-if就可以。...

Notes

##无限下拉或是上拉组件 #### 依赖: - 依赖 underscore 来编译模版字符串 * 用户使用插件前要在 html 中先进行引入: ```html ``` - 在浏览器端使用 ```js ;(function() { infiniteLoad({ scollDirection: 'up', //滚动方向,‘up’||‘down’ domString: '', //页尾栏 选择器,可以省略 fatherString: '.content', //父亲元素 选择器...

## 个人插件 写一些平时自己用到的一些组件,主要基于 vue #### 具体插件 - jsonArray 导出到excel import FileSaver from 'file-saver' import XLSX from 'xlsx' ```js props: { params: { type: Object, default: () => {} //{jsonData:[],keyMap:{name:'名字'}} }...

#分享一波上周使用vue细节2018.06.04 ## 只是分享了坑,没有详细去说VUE里面的源码实现逻辑(因为也没看哈) 1. vue style 加不加scoped区别: 当 标签有 scoped 属性时,它的 CSS 只作用于当前组件中的元素。机制是给dom添加一个data-****的自定义属性,然后style会这么操作.classNamep[data-***],也就是属性选择器。注意,只要静态的dom和class才有效,动态添加的dom和class样式是无效的。解决办法是可以去掉scoped或是用内联样式dom.style...... 2. vue watch是可以深度监听的(默认就是深度监听),也就是没有vue那个this.$set这个问题。ps:记得 这个watch是没有s 不是watchs. 3. methods方法不能用箭头函数绑定,因为箭头函数声明时候回绑定声明时父级的作用域。ps:vue会给methods等 函数执行时候绑定当前组件的实例 4. 关于el-element中关于表格 el-table里面那个自定义scope.如果和表单一起使用,那个row绑定 也会改变以前的数值,属于引用绑定 5. vue的v-for。知道在es6中,有new Map()对象的 for of...

Notes

# canvas操作 1. 关于canvas的变换矩阵 ```javascript this.sector.setTransform( Math.cos(s), Math.sin(s), -1 * Math.sin(s), Math.cos(s), 600 - Math.cos(s) * 600 + Math.sin(s) * 600, 600 - Math.sin(s) * 600 - Math.cos(s) * 600...

Notes

- [ ] I'm sure this does not appear in [the issue list of the repository](https://github.com/arco-design/arco-design/issues) ## Basic Info - **Package Name And Version:** @arco-design/[email protected] - **Browser:** chrome123.0.0.0 ![img_v3_02a0_b4f919be-58bb-4624-8690-09f45f93049g](https://github.com/arco-design/arco-design/assets/30307406/c13bed0e-502e-45a6-88c8-d7e517898b27)

- [ ] I'm sure this does not appear in [the issue list of the repository](https://github.com/arco-design/arco-design/issues) ## Basic Info - **Package Name And Version:** @arco-design/[email protected] - **Browser:** chrome124.0.0.0