最近放假有点无聊写的)
先放一段使用示例吧
	
	
	
		
控件生成逻辑参照hmUI和Vepp,当然框架大体上还是借鉴的vue),也支持onReady以及onInit等这些的生命周期函数,虽然我没有8实机不知能否正常运行,但是模拟器是可以的惹
(提一嘴这个响应式变量其实没做好哈,暂且只能一些变量名和label控件用(毕竟只花了半天时间搓的))
github地址
(欢迎提issue和pull request
				
			先放一段使用示例吧
		JavaScript:
	
	const Page = new Vace({
  data: {
    text: 'hello world',
    color: "#00FFFF"
  },
  methods: {
    onClick() {
      console.log('button clicked');
    }
  },
  render() {
    this.controls['label'] = Vacm.createWidget('label', {
      id: 'label',
      x: 20,
      y: 20,
      w: 200,
      h: 20,
      text: this.text,
      font: 4163,
      color: this.color,
      contentCenter: true,
      contentAlign: true,
      onClick: () => {
        if (this.color === "#FFFFFF") {
          this.color = "#00FFFF";
          this.text = "hello world";
        } else {
          this.color = "#FFFFFF";
          this.text = "new text";
        }
      }
    });
    this.controls['btn'] = Vacm.createWidget('btn', {
      id: 'btn',
      x: 20,
      y: 80,
      w: 40,
      h: 20,
      onClick: this.onClick
    });
    return { label: this.controls['label'], btn: this.controls['btn'] };
  }
});(提一嘴这个响应式变量其实没做好哈,暂且只能一些变量名和label控件用(毕竟只花了半天时间搓的))
github地址
(欢迎提issue和pull request
			
				最后编辑: 
			
		
	
                                    
                                    
                                        
	
	
	
	
                                    
                                
							 
							 
						 
 
		 
			
		
		
		
	
	
			
		 
			
		
		
		
	
	
			
		 
			
		
		
		
	
	
			
		 
			
		
		
		
	
	
			
		 
 
		 
 
		 
                             
                             
                 
 
		 
					 
					 
					