<template> <view> <jinEdit placeholder="请输入内容" @editOk="editOk" uploadFileUrl="/#"></jinEdit> </view> </template> <script> import jinEdit from '@/components/jin-edit/jin-edit.vue'; export default { data() { return { } }, components: { jinEdit }, methods: { editOk(res) { /* 点击的时候触发对应的数据事件 */ let container = res.html; let pages = getCurrentPages(); //获取所有页面栈实例列表 let nowPage = pages[pages.length - 1]; //当前页页面实例 let prevPage = pages[pages.length - 2]; //上一页页面实例 prevPage.$vm.form.content = container; //修改上一页data里面的searchVal参数值为1211 prevPage.$vm.form.container = container; //修改上一页data里面的searchVal参数值为1211 uni.navigateBack({ //uni.navigateTo跳转的返回,默认1为返回上一级 delta: 1 }); } } } </script> <style> </style>