| | |
| | | |
| | | <script lang="ts" setup> |
| | | import { onMounted ,onBeforeMount, reactive, ref } from "vue"; |
| | | import { kbdocumentrename, kbdocumentrm } from "@/api/kbList"; |
| | | import { Message } from "@arco-design/web-vue"; |
| | | |
| | | const visible = ref(false); |
| | | const loading = ref(false); |
| | | const form = reactive({ |
| | | name: '',// 用户名 |
| | | nameJoin: '',// 昵称 |
| | | post: '',// 岗位 |
| | | txt: '',// 备注 |
| | | }); |
| | | const formRef = ref(null); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | const handleSubmit = ({values, errors}) => { |
| | | console.log('values:', values, '\nerrors:', errors) |
| | | const props = defineProps(['item']) |
| | | |
| | | const emit = defineEmits(['upTabdateItem']) |
| | | |
| | | const handleSubmit = async ({values, errors}) => { |
| | | if (errors) return; |
| | | let data = await kbdocumentrename({ |
| | | doc_id:props.item.id, |
| | | name:form.name |
| | | }) |
| | | if(data.code == 0){ |
| | | Message.success('操作成功'); |
| | | visible.value = false; |
| | | emit("upTabdateItem",props.item.id,form.name); |
| | | } |
| | | } |
| | | |
| | | const handleClick = () => { |
| | |
| | | } |
| | | |
| | | const handleOpened =(el) => { |
| | | Object.assign(form,{ |
| | | name: '',// 用户名 |
| | | nameJoin: '',// 昵称 |
| | | post: '',// 岗位 |
| | | txt: '',// 备注 |
| | | }); |
| | | formRef.value.resetFields(); |
| | | console.log(props.item, 'props.item'); |
| | | Object.assign(form,props.item); |
| | | // formRef.value.resetFields(); |
| | | } |
| | | |
| | | onBeforeMount(()=>{ |