123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- // components/My_SearchInputBox/index.js
- Component({
- /**
- * 组件的属性列表
- */
- 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"
- },
- /* 邀请按钮 */
- invitation: {
- type: Boolean,
- value: false
- }
- },
- /**
- * 组件的初始数据
- */
- 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',
- })
- }
- },
- /* 团队成员邀请 */
- InvitedToEnter() {
- wx.navigateTo({
- url: '/pages/teamManagement/applyFor',
- })
- },
- /* 清空 */
- clearInput() {
- this.setData({
- text: ""
- })
- this.triggerEvent("searchQuery", '')
- }
- }
- })
|