权限、统计接口、默认密码登录
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<a-col :span="20">
|
||||
<a-input @click="chooseBusiness" :value="value[valueKey]" v-bind="$attrs" :readOnly="true"></a-input>
|
||||
</a-col>
|
||||
<a-col :span="4" class="form-btn">
|
||||
<a-col :span="4" class="form-btn" v-if="canAdd">
|
||||
<a-button icon="plus" @click="addCompany"></a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -38,6 +38,12 @@ export default {
|
||||
valueKey: {
|
||||
type: String,
|
||||
default: 'companyName'
|
||||
},
|
||||
// 是否可以新增:true--可以;false--不可以(组件作为查询条件时不可新增)
|
||||
canAdd: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -75,9 +81,9 @@ export default {
|
||||
* @param value
|
||||
*/
|
||||
addCompanyOk(value) {
|
||||
let {id, companyName} = value
|
||||
console.log({id, companyName})
|
||||
this.$emit('change', {id, companyName})
|
||||
let { id, companyName } = value
|
||||
console.log({ id, companyName })
|
||||
this.$emit('change', { id, companyName })
|
||||
}
|
||||
},
|
||||
//2.2新增 在组件内定义 指定父组件调用时候的传值属性和事件类型
|
||||
@@ -89,6 +95,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
a-input:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user