<template>
	<div class="workerOperate">
		<div class="operateBtn">
			<span
				class="view"
				v-hasPermi="['base:group-team:view-worker']"
				@click="emitParams('view')">
				查看
			</span>
			<span
				class="edit"
				v-hasPermi="['base:group-team:edit-worker']"
				@click="emitParams('edit')">
				编辑
			</span>
		</div>
	</div>
</template>
<script>
export default {
	name: 'WorkerOperate',
	props: {
		injectData: {
			type: Object,
			default: () => ({}),
		},
	},
	methods: {
		emitParams(data) {
			let params = {};
			params.name = data;
			params.payload = this.injectData;
			this.$emit('emitData', params);
		},
	},
};
</script>
<style lang='scss' scoped>
.workerOperate {
	.operateBtn {
		color: #0b58ff;
		.view {
			margin-right: 10px;
			cursor: pointer;
		}
		.edit {
			cursor: pointer;
		}
	}
}
</style>