Two-way data binding failure using layui pop-up window in vue

Help me, guys. I already regret the mixed use of vue and layui. Question 1: in the vue project, using layui"s layer pop-up window, the form form binding v-model in the pop-up window is invalid. How to solve this problem of two-way data binding?
question 2: how to solve the failure of binding click event to layui pop-up form used by vue? If you use a native onkeyup event, where is the event registered? Where is the code written?

with regard to problem 2, it has been resolved by itself
put the dom element in the template, and the content in the case of layer.open is introduced in the form of $("- sharpid") to bind the event. But the problem of two-way data binding is still unsolved.

Mar.09,2021

official .vue scaffolding or traditional scaffolding?


cannot be bound. The layui pop-up window adds a html code snippet, and the vue binding is over. You need the $.mount () method to add a bidirectionally bound html fragment to js. It is recommended to understand the workflow and working principle of vue.

Menu