aisuda / vue2-amis-custom-widget

amis自定义组件模板(vue2.0技术栈)
13 stars 7 forks source link

vue配置面板不生效 #7

Closed yuuummmii closed 9 months ago

yuuummmii commented 1 year ago

在amis-widget在线demo中,编辑器中修改vue组件的参数,在编辑器中可以看到变化,点击预览之后只能显示默认参数 编辑页面 image 预览页面 image

xiaochaochao520 commented 10 months ago

解决了嘛

xiaochaochao520 commented 10 months ago

image

xiaochaochao520 commented 10 months ago

@wibetter

yuuummmii commented 10 months ago

解决了嘛

可以看一下这个,我修改了componentDidMount和componentDidUpdate方法,目前使用没什么问题。 https://github.com/yuuummmii/amis-editor-vue-custom/blob/003fcc0cc25d3d29ea17b3bba14c9299d5079310/src/amis-editor-plugin/dist/index.esm.js#L250

xiaochaochao520 commented 10 months ago

解决了嘛

可以看一下这个,我修改了componentDidMount和componentDidUpdate方法,目前使用没什么问题。 https://github.com/yuuummmii/amis-editor-vue-custom/blob/003fcc0cc25d3d29ea17b3bba14c9299d5079310/src/amis-editor-plugin/dist/index.esm.js#L250 你是换了一个项目嘛

yuuummmii commented 10 months ago

解决了嘛

可以看一下这个,我修改了componentDidMount和componentDidUpdate方法,目前使用没什么问题。 https://github.com/yuuummmii/amis-editor-vue-custom/blob/003fcc0cc25d3d29ea17b3bba14c9299d5079310/src/amis-editor-plugin/dist/index.esm.js#L250 你是换了一个项目嘛

没有啊,这个dist文件夹是amis-widget-cli打包生成的

xiaochaochao520 commented 10 months ago

解决了嘛

可以看一下这个,我修改了componentDidMount和componentDidUpdate方法,目前使用没什么问题。 https://github.com/yuuummmii/amis-editor-vue-custom/blob/003fcc0cc25d3d29ea17b3bba14c9299d5079310/src/amis-editor-plugin/dist/index.esm.js#L250 你是换了一个项目嘛

没有啊,这个dist文件夹是amis-widget-cli打包生成的

你就新加了一个这个文件是嘛 image

yuuummmii commented 10 months ago

解决了嘛

可以看一下这个,我修改了componentDidMount和componentDidUpdate方法,目前使用没什么问题。 https://github.com/yuuummmii/amis-editor-vue-custom/blob/003fcc0cc25d3d29ea17b3bba14c9299d5079310/src/amis-editor-plugin/dist/index.esm.js#L250 你是换了一个项目嘛

没有啊,这个dist文件夹是amis-widget-cli打包生成的

你就新加了一个这个文件是嘛 image

这个文件也是生成的,我只是修改了一下里边的方法

xiaochaochao520 commented 10 months ago

解决了嘛

可以看一下这个,我修改了componentDidMount和componentDidUpdate方法,目前使用没什么问题。 https://github.com/yuuummmii/amis-editor-vue-custom/blob/003fcc0cc25d3d29ea17b3bba14c9299d5079310/src/amis-editor-plugin/dist/index.esm.js#L250 你是换了一个项目嘛

没有啊,这个dist文件夹是amis-widget-cli打包生成的

你就新加了一个这个文件是嘛 image

这个文件也是生成的,我只是修改了一下里边的方法

image 这个东西哪里来的 报这个东西没有

xiaochaochao520 commented 10 months ago

解决了嘛

可以看一下这个,我修改了componentDidMount和componentDidUpdate方法,目前使用没什么问题。 https://github.com/yuuummmii/amis-editor-vue-custom/blob/003fcc0cc25d3d29ea17b3bba14c9299d5079310/src/amis-editor-plugin/dist/index.esm.js#L250 你是换了一个项目嘛

没有啊,这个dist文件夹是amis-widget-cli打包生成的

你就新加了一个这个文件是嘛 image

这个文件也是生成的,我只是修改了一下里边的方法 image 报这个·错误

yuuummmii commented 10 months ago

解决了嘛

可以看一下这个,我修改了componentDidMount和componentDidUpdate方法,目前使用没什么问题。 https://github.com/yuuummmii/amis-editor-vue-custom/blob/003fcc0cc25d3d29ea17b3bba14c9299d5079310/src/amis-editor-plugin/dist/index.esm.js#L250 你是换了一个项目嘛

没有啊,这个dist文件夹是amis-widget-cli打包生成的

你就新加了一个这个文件是嘛 image

这个文件也是生成的,我只是修改了一下里边的方法 image 报这个·错误

应该是package.json里边没加这个,安装一下就好了

xiaochaochao520 commented 10 months ago

解决了嘛

可以看一下这个,我修改了componentDidMount和componentDidUpdate方法,目前使用没什么问题。 https://github.com/yuuummmii/amis-editor-vue-custom/blob/003fcc0cc25d3d29ea17b3bba14c9299d5079310/src/amis-editor-plugin/dist/index.esm.js#L250 你是换了一个项目嘛

没有啊,这个dist文件夹是amis-widget-cli打包生成的

你就新加了一个这个文件是嘛 image

这个文件也是生成的,我只是修改了一下里边的方法 image 报这个·错误

应该是package.json里边没加这个,安装一下就好了

这种自定义组件配置项里面能配置添加事件的那种吗

yuuummmii commented 10 months ago

这种自定义组件配置项里面能配置添加事件的那种吗

这个没研究过,可以通过onBuildPanels事件获取到amis组件的配置,对照着写一个试试

wibetter commented 9 months ago

可以理解编辑器端切换预览类似一个刷新操作,编辑端的配置面板中的所有配置改动,因为没有保存入库(存入数据库)肯定是会丢失的。所以这不是一个问题。