const computedBehavior = require ( "miniprogram-computed" ) ; import autologBehavior from "../../behaviors/autolog-behavior" ; const PAGE_NAME = "logs" ; Component ( { behaviors : [ computedBehavior , autologBehavior ] , data : { PAGE_NAME , logs : [ ] as string [ ] } , computed : { logsAfterComputed : function ( ) { return this . data . logs . map ( ( x ) => { return { logAfterCompute : x + "logAfterCompute" } ; } ) ; } } , methods : { onLoad ( ) { this . setData ( { logs : wx . getStorageSync ( "logs" ) || [ ] } ) ; } } } ) ;