? Official documents can only be added and deleted, but there is no editing function. How to edit this
officially, only
? Official documents can only be added and deleted, but there is no editing function. How to edit this
officially, only
after clicking, take out the current node, then submit it with another form, and overwrite the changes to the tree-bound object with code. This is what I do
< hr ><el-tree
ref="tree"
:props="props"
:load="loadChild"
lazy
@current-change="SwitchNode"
:accordion="true"
style="max-height:800px;min-height:400px;background-color:rgba(0,0,0,0.005);box-shadow:0 0 4px 0 -sharp999 inset;padding:10px;user-select:none"
>
</el-tree>
this is to get the selected node
SwitchNode(data,node){
this.form.id = data.Id;
this.form.label = data.label;
this.form.node = node;
},
this is updated:
async UpdateLabel(){
if(this.form.NewName.length===0){
this.$eve.emit("error","");
return;
}
let node = this.form.node;
let name = this.form.NewName;
let res= await this.$api("sys_department",{cmd:"updatelabel",id:this.form.id,name});
if(res.status === 200){
node.data.label = name;
this.form.NewName = "";
this.form.label = name;
this.$eve.emit("success","");
}else{
this.$eve.emit("error",res.msg);
}
},
I got the node directly in the Form object, so I can update
with node.data.label = str
.
Previous: How nginx configures websocket
Next: After the string is cut, the key of the object becomes a number?
there is a requirement that when Select selects a city, it needs fuzzy search, which supports not only Chinese, but also pinyin, acronyms and so on. The back end will give me the corresponding fields, but I find that using filter-method to pass in funct...
Error in event handler for "row-contextmenu": "TypeError: $event.preventDefault is not a function" Please tell me how to add .client to row-contextmenu . ...
how can select empty the selected data and display the original placeholder?? here is my code: ...
tries to use ref, which returns a real example of a component, and then I don t know what to do with how to get the width of header. ...
there is a requirement for the product to put the filter criteria of table here in the table header, and the content is more customized; elementUi1.filters,2.elementUipopover()table dare to ask everyone how to solve the problem, do you want to bui...
look for it on the official website, but there is no corresponding example and api <template> <el-select class="g-public-multi-select" v-model="selectWeekDayListProp" :disabled="disabled" @change="selectCha...
the current project uses vue and element to do, and finds a problem. After entering the current page, it will request an interface with 3000 + pieces of interface data, and then send the data to element-ui to render the select, (page rendering will not ...
I use element ui but don t know how to merge the last column. ...
when checked, I want to pass the row data item, and insert the uid in the item into the array selectedId according to the value of the value after the CheckBox update. there is only one default callback parameter in the official document. I want to pas...
the hair hair doctor, the Master Satan, flew over the place on time ...
before triggering the search event, everything is normal after the drop-down selection, click the search button, other drop-down box selectors can not be selected normally, can trigger the change event, but it is not displayed on the page, click on mor...
the default click is blue. I want to change the color, but there is no effect after adding it in from. How can I change it? <el-form-item label="" prop="resource" fill="red"> <el-radio-group v-mod...
: auto-upload= "false " after it is added, it will not be uploaded automatically. How can I upload it manually when I submit it? ...
problem description after the header is dragged, the data changes, but the sorting method remains the same? the environmental background of the problems and what methods you have tried in the element-ui table header drag effect, view the data, and...
the sortchange hook function is called when sorting, and then the initsort method is triggered. I wanted to keep the first row from moving up (forcing the sorted image to be updated without success), but the table data changed, but the page did not chan...
when the elementUI tab page is switched, the corresponding tab-pane component I use the dynamic component, and then I find that it only triggers the mounted event, and there is no event trigger when I leave. before-leave, with tab tag finds that oldAct...
as shown in the figure, the simplest type, how to add background color to the header, write a lot of css are invalid ah, why? <el-table border :data="tableData" style="width: 100%"> <el-table-column prop="...
is using elementUI as the background. Use the component for uploading pictures. Click the plus sign to add the picture normally. But when the form needs to be re-edited, you need to show these pictures first, and the question is how to do it. ...
I want to set the maximum width for this column so that it can change with the number of pictures, not in space. Is there any way to set the maximum width of the column, or to achieve the effect I want. Ask the bosses for guidance, Orz thank you very...
if you want to upload an avatar, use the el-upload method of element and enter the port address to upload successfully. How do you accept the value returned by the backend? <el-form-item label=""> <el-upload class="avata...