Skip to content

Commit

Permalink
fix: update package version to "1.3.0-beta.2" and fix CollapseLayout …
Browse files Browse the repository at this point in the history
…class issue
  • Loading branch information
Liberty-liu committed Jan 19, 2024
1 parent d156c7a commit cdc6702
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "everright-formeditor",
"version": "1.3.0-beta.1",
"version": "1.3.0-beta.2",
"description": "🦮 Powerful lowcode|vue form editor,generator,designer,builder library. It provides an easy way to create custom forms. The project is extensible, easy to use and configure, and provides many commonly used form components and functions(vue可视化低代码表单设计器、表单编辑器、element-plus vant表单设计)",
"files": [
"dist",
Expand Down
5 changes: 3 additions & 2 deletions packages/formEditor/components/Layout/CollapseLayout.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineComponent, resolveComponent, watch, useAttrs, defineAsyncComponent } from 'vue'
import { defineComponent, resolveComponent, watch, useAttrs, defineAsyncComponent, inject } from 'vue'
import Selection from '@ER/formEditor/components/Selection/selectElement.jsx'
import LayoutDragGable from './DragGable.jsx'
import hooks from '@ER/hooks'
Expand All @@ -11,6 +11,7 @@ export default defineComponent({
parent: Array
},
setup (props) {
const ER = inject('Everright')
const ns = hooks.useNamespace('CollapseLayout')
if (!props.data.options.defaultValue.length) {
props.data.options.defaultValue.push(props.data.columns[0].id)
Expand All @@ -24,7 +25,7 @@ export default defineComponent({
return (
<el-collapse-item title={element.label} name={element.id}>
<Selection
class={[ns.e('area')]}
class={[ER.state.mode === 'edit' ? ns.e('area') : '']}
data={element} parent={props.data}
>
<LayoutDragGable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (checkTypeBySelected(['collapse'])) {
target.value.options.defaultValue = [target.value.columns[0].id]
}
checkList.value = [target.value.columns[0].id]
})
}, { flush: 'post' })
checkList.value = target.value.options.accordion ? [target.value.options.defaultValue] : _.cloneDeep(target.value.options.defaultValue)
} else if (checkTypeBySelected(['tabs'])) {
checkList.value = [target.value.columns[0].id]
Expand Down

0 comments on commit cdc6702

Please sign in to comment.