| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 | // components/My_SearchInputBox/index.jsComponent({    /**     * 组件的属性列表     */    properties: {        /* 搜索方法 */        searchQuery: {            type: Function        },        /* 新增按钮跳转 */        route: {            type: String        },        /* 是否主账号 */        fisadministrator: {            type: Boolean        },        butText: {            type: String,            value: "新增"        },        marTop: {            type: Number,            value: 30        },        inputColor: {            type: String,            value: "#FFFF"        },        inputRadius: {            type: String,            value: "10"        }    },    /**     * 组件的初始数据     */    data: {        text: ""    },    /**     * 组件的方法列表     */    methods: {        /* 输入 */        inputText(e) {            this.setData({                text: e.detail.value            })        },        /* 失去焦点 */        searchBlur(e) {            const {                value            } = e.detail;            this.triggerEvent("searchQuery", value.trim())        },        /* 跳转页面 */        itemAdd() {            if (this.data.route == 'product') {                wx.navigateTo({                    url: '/pages/productManagement/change',                })            } else if (this.data.route == 'team') {                wx.navigateTo({                    url: '/pages/teamManagement/change',                })            } else if(this.data.route == 'consociation'){                wx.navigateTo({                  url: '/pages/businessPartner/applyFor',                })            }        },        /* 清空 */        clearInput() {            this.setData({                text: ""            })            this.triggerEvent("searchQuery", '')        }    }})
 |