Skip to content

Commit 828d9c2

Browse files
committed
debug
1 parent 4080820 commit 828d9c2

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

app/components/example/touch.vue

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
</template>
1111

1212
<script>
13-
13+
import { log } from 'util';
14+
import {Color} from 'color';
1415
export default {
1516
data () {
1617
return {
@@ -22,13 +23,27 @@ export default {
2223
},
2324
methods: {
2425
touch: function () {
25-
26+
var colorModule = require("color");
27+
var red = new colorModule.Color("#ff0000");
2628
let btn = this.$refs.btn.nativeView;
27-
console.log('xxxx',btn.ios);
29+
console.log('xxxx', btn.ios);
2830
//设置button按钮文字
2931
btn.ios.setTitleForState('Button title', UIControlStateNormal);
30-
//var UIButton = UIButton.alloc.init;
31-
btn.ios.basicRandom();
32+
//var UIButton = UIButton.alloc.init;
33+
//btn.ios.frame = CGRectMake(5, 5, 5, 5)
34+
//btn.ios.showsTouchWhenHighlighted = 'YES';
35+
//btn.ios.ButtonType = 'custom';
36+
btn.ios.setTitleColor = new Color('red');
37+
let title = btn.ios.currentTitle;
38+
console.log('标题', title);
39+
let titleColor = btn.ios.currentTitleColor
40+
;
41+
console.log('标题颜色', titleColor);
42+
;
43+
// [button addTarget: self action:@selector(touchDownAction) forControlEvents: UIControlEventTouchDown];
44+
// [button addTarget: self action:@selector(touchUpInsideAction) forControlEvents: UIControlEventTouchUpInside];
45+
46+
// [self.view addSubview: button];
3247
//btn.ios.addTargetWithActionForControlEvent(this, cccontrol_selector(HelloWorld:: touchDownAction), CCControlEventTouchDown);
3348
// btn.android.setOnTouchListener(new android.view.View.OnTouchListener({
3449
// onTouch: function (view, motionEvent) {

0 commit comments

Comments
 (0)