Tag:Wrong method

  • Vue – $set dynamically updates objects / arrays

    Time:2021-8-14

    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

    Time:2020-11-10

    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 […]