同步操作将从 zuohuaijun/Admin.NET 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<template><a-select:mode="model"showSearch:value="selectValue":filter-option="false":placeholder="placeholder":not-found-content="fetching ? undefined : null"@search="fetchUser"@change="handleChange"><a-spin v-if="fetching" slot="notFoundContent" size="small" /><a-select-option v-for="d in data" :key="d.value">{{ d.text }}</a-select-option></a-select></template><script>import debounce from 'lodash/debounce'import { getUserPage } from '@/api/modular/system/userManage'export default {name: 'UserSelect',props: {placeholder: {type: String},value: {type: String},multiple: {type: Boolean,default: false}},data() {const multiple = this.multiplethis.fetchUser = debounce(this.fetchUser, 800)return {data: [],fetching: false,selectValue: multiple ? [] : undefined,model: multiple ? 'multiple' : 'default'}},methods: {fetchUser(key) {this.data = []this.fetching = trueconst params = {pageNo: 1,pageSize: 10,searchValue: key}this.userFetching = truegetUserPage(params).then((res) => {this.data = res.data.rows.map(user => ({text: `${user.name}${user.account}`,value: user.id}))}).finally(() => {this.fetching = false})},handleChange(value) {Object.assign(this, {selectValue: value,fetching: false})this.$emit('change', value)}}}</script>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。