Tag:Wrong method

  • Vue – $set dynamically updates objects / arrays


    Vue bidirectional binding principle is to operate the setter and getter properties of an object through object. Defineproperty().In order to ensure the dynamic update of the view, we need to add get and set methods to the object for two-way binding. 1. Dynamically update objectsAdd age attribute to manError method:add(){ this.man.age = ’22’ console.log(this.man)},Correct method:add(){ […]

  • Background image tiling with cocos2d-x binding Lua


    Usage context:First, create a panel in cocos studio as the background layer, in which you need to tile the pictures. The code is as follows:The notes indicate the wrong method I used, which should be noted. local panelPage1 = ccui.Helper:seekWidgetByName(uiNode, “Panel_page1”) local panelRepeatBg1 = ccui.Helper:seekWidgetByName(panelPage1, “Panel_repeat_bg”) –Note 1: don’t use plist method to specify the […]