File tree 11 files changed +128
-152
lines changed
right-attribute-panel/components
cross-sortable-options-editor
11 files changed +128
-152
lines changed Original file line number Diff line number Diff line change 13
13
- name : Setup Node.js v14.x
14
14
uses : actions/setup-node@v1
15
15
with :
16
- node-version : " 14.x"
16
+ node-version : ' 14.x'
17
17
18
18
- name : Install
19
19
run : npm install
27
27
publish_dir : ./dist
28
28
personal_token : ${{ secrets.PERSONAL_TOKEN }}
29
29
commit_message : Update ghPages
30
+ force_orphan : true
Original file line number Diff line number Diff line change 43
43
"@commitlint/cli" : " ^12.1.4" ,
44
44
"@commitlint/config-conventional" : " ^12.1.4" ,
45
45
"@types/node" : " ^15.12.2" ,
46
- "@typescript-eslint/eslint-plugin" : " ^4.26.1 " ,
47
- "@typescript-eslint/parser" : " ^4.26.1 " ,
46
+ "@typescript-eslint/eslint-plugin" : " ^4.27.0 " ,
47
+ "@typescript-eslint/parser" : " ^4.27.0 " ,
48
48
"@vitejs/plugin-legacy" : " ^1.4.1" ,
49
49
"@vitejs/plugin-vue" : " ^1.2.3" ,
50
50
"@vitejs/plugin-vue-jsx" : " ^1.1.5" ,
57
57
"eslint-plugin-import" : " ^2.23.4" ,
58
58
"eslint-plugin-prettier" : " ^3.4.0" ,
59
59
"eslint-plugin-vue" : " ^7.11.1" ,
60
- "gh-pages" : " ^3.2.0 " ,
60
+ "gh-pages" : " ^3.2.1 " ,
61
61
"husky" : " ^6.0.0" ,
62
62
"lint-staged" : " ^11.0.0" ,
63
63
"prettier" : " ^2.3.1" ,
64
64
"pretty-quick" : " ^3.1.0" ,
65
- "sass" : " 1.34.1 " ,
65
+ "sass" : " 1.35.0 " ,
66
66
"stylelint" : " ^13.13.1" ,
67
67
"stylelint-config-prettier" : " ^8.0.2" ,
68
68
"stylelint-config-standard" : " ^22.0.0" ,
Original file line number Diff line number Diff line change 1
1
/*
2
2
* @Author : 卜启缘
3
3
* @Date : 2021-06-14 12:24:12
4
- * @LastEditTime : 2021-06-14 18:48:44
4
+ * @LastEditTime : 2021-06-14 21:19:28
5
5
* @LastEditors : 卜启缘
6
- * @Description :
6
+ * @Description : 轮播图组件
7
7
* @FilePath : \vite-vue3-lowcode\src\packages\base-widgets\swipe\index.tsx
8
8
*/
9
9
import { Swipe , SwipeItem } from 'vant'
@@ -33,7 +33,11 @@ export default {
33
33
const { registerRef } = useGlobalProperties ( )
34
34
35
35
return (
36
- < Swipe ref = { ( el ) => registerRef ( el , block . _vid ) } { ...props } >
36
+ < Swipe
37
+ ref = { ( el ) => registerRef ( el , block . _vid ) }
38
+ { ...props }
39
+ style = { { height : `${ props . height } px` } }
40
+ >
37
41
{ props . images ?. map ( ( item ) => (
38
42
< >
39
43
< SwipeItem key = { item } >
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export default {
17
17
return (
18
18
< Field
19
19
{ ...props }
20
+ modelValue = { '' }
20
21
style = { {
21
22
width : size . width ? `${ size . width } px` : null
22
23
} }
Original file line number Diff line number Diff line change 62
62
</el-col >
63
63
<!-- 右侧工具栏 end-->
64
64
</el-row >
65
- <template v-if =" isShowH5Preview " >
66
- <preview v-model:visible =" isShowH5Preview" />
67
- </template >
65
+ <preview v-model:visible =" isShowH5Preview" />
68
66
</template >
69
67
70
68
<script lang="ts">
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<el-dialog v-model =" dialogVisible" custom-class =" h5-preview" :show-close =" false" width =" 360px" >
3
3
<iframe
4
- style =" width : 360px ; height : 640px "
4
+ v-if =" dialogVisible"
5
+ :style =" { width: '360px', height: '640px' }"
5
6
:src =" previewUrl"
6
7
frameborder =" 0"
7
8
scrolling =" auto"
@@ -45,14 +46,18 @@ export default defineComponent({
45
46
<style lang="scss">
46
47
.h5-preview {
47
48
overflow : hidden ;
49
+
48
50
.el-dialog__body {
49
51
padding : 0 ;
50
52
}
53
+
51
54
.el-dialog__header {
52
55
display : none ;
53
56
}
57
+
54
58
.simulator {
55
59
padding-right : 0 ;
60
+
56
61
& ::-webkit-scrollbar {
57
62
width : 0 ;
58
63
}
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
/*
2
2
* @Author : 卜启缘
3
3
* @Date : 2021-06-12 22:18:48
4
- * @LastEditTime : 2021-06-14 16:58:34
4
+ * @LastEditTime : 2021-06-14 18:53:02
5
5
* @LastEditors : 卜启缘
6
6
* @Description :
7
7
* @FilePath : \vite-vue3-lowcode\src\visual-editor\components\right-attribute-panel\components\index.ts
10
10
export { TablePropEditor } from './table-prop-editor/table-prop-editor'
11
11
export { AttrEditor } from './attr-editor/AttrEditor'
12
12
export { Animate } from './animate/Animate'
13
- export { CrossSortableOptionsEditor } from './cross-sortable-options/cross-sortable-options'
13
+ export { CrossSortableOptionsEditor } from './cross-sortable-options-editor /cross-sortable-options-editor '
Original file line number Diff line number Diff line change 33
33
:config =" visualConfig"
34
34
:on-contextmenu-block =" onContextmenuBlock"
35
35
:select-comp =" selectComp"
36
+ :delete-comp =" deleteComp"
36
37
/>
37
38
</template >
38
39
</comp-render >
@@ -129,6 +130,21 @@ export default defineComponent({
129
130
})
130
131
}
131
132
133
+ /**
134
+ * 删除组件
135
+ */
136
+ const deleteComp = (block : VisualEditorBlockData , parentBlocks = currentPage .value .blocks ) => {
137
+ console .log (block , ' block' )
138
+ const index = parentBlocks .findIndex ((item ) => item ._vid == block ._vid )
139
+ if (index != - 1 ) {
140
+ delete globalProperties .$$refs [parentBlocks [index ]._vid ]
141
+ const delTarget = parentBlocks .splice (index , 1 )[0 ]
142
+ if (delTarget .focus ) {
143
+ setCurrentBlock ({} as VisualEditorBlockData )
144
+ }
145
+ }
146
+ }
147
+
132
148
const onContextmenuBlock = (
133
149
e : MouseEvent ,
134
150
block : VisualEditorBlockData ,
@@ -168,16 +184,7 @@ export default defineComponent({
168
184
label = " 删除节点"
169
185
icon = " el-icon-delete"
170
186
{ ... {
171
- onClick : () => {
172
- const index = parentBlocks .findIndex ((item ) => item ._vid == block ._vid )
173
- if (index != - 1 ) {
174
- delete globalProperties .$$refs [parentBlocks [index ]._vid ]
175
- const delTarget = parentBlocks .splice (index , 1 )[0 ]
176
- if (delTarget .focus ) {
177
- setCurrentBlock ({} as VisualEditorBlockData )
178
- }
179
- }
180
- }
187
+ onClick : () => deleteComp (block , parentBlocks )
181
188
}}
182
189
/>
183
190
</>
@@ -189,6 +196,7 @@ export default defineComponent({
189
196
... toRefs (state ),
190
197
currentPage ,
191
198
visualConfig ,
199
+ deleteComp ,
192
200
selectComp ,
193
201
onContextmenuBlock
194
202
}
Original file line number Diff line number Diff line change 1
1
.dropdown-service {
2
2
position : fixed ;
3
- padding : 8px 0 ;
4
3
z-index : 99 ;
5
- box-shadow : 0 2px 5px 1px #ddd ;
4
+ padding : 8px 0 ;
5
+ pointer-events : none ;
6
6
background-color : white ;
7
7
opacity : 0 ;
8
- pointer-events : none ;
8
+ box-shadow : 0 2 px 5 px 1 px #ddd ;
9
9
transition : opacity 200ms linear ;
10
10
11
11
.dropdown-option {
17
17
}
18
18
19
19
& :hover {
20
- background-color : #efefef ;
21
20
cursor : pointer ;
21
+ background-color : #efefef ;
22
22
}
23
23
}
24
24
25
25
& .dropdown-service-show {
26
- opacity : 1 ;
27
26
pointer-events : auto ;
27
+ opacity : 1 ;
28
28
}
29
- }
29
+ }
You can’t perform that action at this time.
0 commit comments