mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(checkbox): checkbox-square/platform updates
This commit is contained in:
7
js/angular/directive/checkbox.js
vendored
7
js/angular/directive/checkbox.js
vendored
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
IonicModule
|
||||
.directive('ionCheckbox', function() {
|
||||
.directive('ionCheckbox', ['$ionicConfig', function($ionicConfig) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
@@ -47,7 +47,8 @@ IonicModule
|
||||
input.attr(name, value);
|
||||
}
|
||||
});
|
||||
var checkboxWrapper = element[0].querySelector('.checkbox');
|
||||
checkboxWrapper.classList.add('checkbox-' + $ionicConfig.form.checkbox());
|
||||
}
|
||||
|
||||
};
|
||||
});
|
||||
}]);
|
||||
|
||||
11
js/angular/service/ionicConfig.js
vendored
11
js/angular/service/ionicConfig.js
vendored
@@ -220,6 +220,9 @@ IonicModule
|
||||
text: PLATFORM,
|
||||
previousTitleText: PLATFORM
|
||||
},
|
||||
form: {
|
||||
checkbox: PLATFORM
|
||||
},
|
||||
tabs: {
|
||||
style: PLATFORM,
|
||||
position: PLATFORM
|
||||
@@ -255,6 +258,10 @@ IonicModule
|
||||
previousTitleText: true
|
||||
},
|
||||
|
||||
form: {
|
||||
checkbox: 'circle'
|
||||
},
|
||||
|
||||
tabs: {
|
||||
style: 'standard',
|
||||
position: 'bottom'
|
||||
@@ -294,6 +301,10 @@ IonicModule
|
||||
previousTitleText: false
|
||||
},
|
||||
|
||||
form: {
|
||||
checkbox: 'square'
|
||||
},
|
||||
|
||||
tabs: {
|
||||
style: 'striped',
|
||||
position: 'top'
|
||||
|
||||
Reference in New Issue
Block a user