| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <template>
- <div>
- <el-select v-model="select_val" @change="handleChange" placeholder="请选择">
- <el-option
- v-for="item in options"
- :key="item.uid"
- :label="item.real_name"
- :value="item.uid">
- </el-option>
- </el-select>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- select_val: "",
- options: [
- ]
- }
- },
- props: {
- change:{
- type: Function,
- },
- value:{
- }
- },
- watch:{
- value:function (newVal,oldVal) {
- this.select_val = newVal;
- }
- },
- mounted() {
- this.select_val = this.value;
- this.getCateGory()
- },
- methods: {
- handleChange(value) {
- this.$emit('input',value);
- if(typeof(this.change)=="function")
- {
- this.change(value);
- }
- },
- async getCateGory() {
- const res = await this.$post('/uapi/pub/list/admin/admin_user/list')
- this.options = res.data
- }
- }
- }
- </script>
- <style scoped>
- .screenfull-svg {
- display: inline-block;
- cursor: pointer;
- fill: #5a5e66;;
- width: 20px;
- height: 20px;
- vertical-align: 10px;
- }
- </style>
|