Loadsh is used in vue to realize real-time retrieval, and arrow function is used to report errors.

use lodash plug-in to realize real-time retrieval of input and report errors

Page Code:

 <div class="search">
                <input type="text" v-model="condition" placeholder="" v-on:input="lodashSearch">
                <span class="search-icon" @click.stop="getSearchCommunity">
                    <i class="iconfont icon-w_search_normal"></i>
                </span>
            </div>

after downloading ladash dependencies using npm, introduce lodash

import _ from "lodash"

methods method:

    //
    
            lodashSearch: _.debounce(() => {
                this.getSearchCommunity(); // debounce
            }, 400),

error report:

clipboard.png


lodashresize
:


lodash?

:

clipboard.png
therefore the arrow function cannot be used in methods

May.22,2021

take a closer look at the documentation https://cn.vuejs.org/v2/api/-sharp.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5ae62-59b72.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5ae62-59b72.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?