shuyunff2e / ccms-components Goto Github PK
View Code? Open in Web Editor NEW数云PC angular1.x 组件库 (不再维护更新)
Home Page: http://cloud-angular.shuyun.com/demos/index.html
License: MIT License
数云PC angular1.x 组件库 (不再维护更新)
Home Page: http://cloud-angular.shuyun.com/demos/index.html
License: MIT License
angular.js用es6写,代码真是恶心到爆
排版格式太low,差评
{
cellTemplate: '<span ng-bind="entity.name" tooltip-compilable="true" cc-tooltip="app.getTemplateUrl(entity)" tooltip-append-to-body="true"></span>',
displayName: '姓名',
align: 'center',
width: '100px',
sortProp: 'name'
}
this.getTemplateUrl = function(entity) {
// case1: 每次ng-repeat进入编译没错,所以log出来的1的次数应该和数据长度匹配,但是事实不是这样。。。
console.log(1);
// case2: tooltip hover上去,应该触发一次指令编译,但是只要hover,就会触发两次
console.log(entity);
// case3: 传递对象错误一直是类型转换错误
// return '<demo obj="'+entity+'"></demo>';
// case4: 传递回调方法,一直不断给后端发送请求,进入死循环
// return '<demo callback="'+this.refreshGrid()+'"></demo>';
// 正常情况: 字符串可正常传递
return '<demo test="test"></demo>';
};
angular
.module('componentsApp')
.directive('demo', function(){
return {
restrict: 'E',
scope: {
callback: '&',
obj: '=',
test: '@'
},
template: '<div ng-bind="vm.obj.name"></div>',
controller: function() {
this.callback();
console.log('**********');
console.log(this.obj);
console.log(this.test);
console.log('============');
},
controllerAs: 'vm',
bindToController: true
}
});
demo代码设置的多选有初始化值 但是失效了
初步原因是 cc-dropdown 指令会自动运行onclose函数
复现步骤:(Window系统下)
1、找到使用grid组件的页面
2、收起左侧菜单栏
就会发现滚动条的位置发生了偏差
由于网络原因,第二次先返回,第一次后返回,表格显示第一次结果(程序员),我实际期望的是QA
建议是用 $cancelRequest, 取消上次请求。
// ...defining the `Hotel` resource...
var Hotel = $resource('/api/hotel/:id', {id: '@id'}, {
// Let's make the `query()` method cancellable
query: {method: 'get', isArray: true, cancellable: true}
});
// ...somewhere in the PlanVacationController...
...
this.onDestinationChanged = function onDestinationChanged(destination) {
// We don't care about any pending request for hotels
// in a different destination any more
this.availableHotels.$cancelRequest();
// Let's query for hotels in '<destination>'
// (calls: /api/hotel?location=<destination>)
this.availableHotels = Hotel.query({location: destination});
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.