Skip to content

Commit 5f99924

Browse files
committedJun 15, 2021
chore: update deps
1 parent 240a0bd commit 5f99924

File tree

11 files changed

+128
-152
lines changed

11 files changed

+128
-152
lines changed
 

‎.github/workflows/deploy.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Setup Node.js v14.x
1414
uses: actions/setup-node@v1
1515
with:
16-
node-version: "14.x"
16+
node-version: '14.x'
1717

1818
- name: Install
1919
run: npm install
@@ -27,3 +27,4 @@ jobs:
2727
publish_dir: ./dist
2828
personal_token: ${{ secrets.PERSONAL_TOKEN }}
2929
commit_message: Update ghPages
30+
force_orphan: true

‎package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
"@commitlint/cli": "^12.1.4",
4444
"@commitlint/config-conventional": "^12.1.4",
4545
"@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",
4848
"@vitejs/plugin-legacy": "^1.4.1",
4949
"@vitejs/plugin-vue": "^1.2.3",
5050
"@vitejs/plugin-vue-jsx": "^1.1.5",
@@ -57,12 +57,12 @@
5757
"eslint-plugin-import": "^2.23.4",
5858
"eslint-plugin-prettier": "^3.4.0",
5959
"eslint-plugin-vue": "^7.11.1",
60-
"gh-pages": "^3.2.0",
60+
"gh-pages": "^3.2.1",
6161
"husky": "^6.0.0",
6262
"lint-staged": "^11.0.0",
6363
"prettier": "^2.3.1",
6464
"pretty-quick": "^3.1.0",
65-
"sass": "1.34.1",
65+
"sass": "1.35.0",
6666
"stylelint": "^13.13.1",
6767
"stylelint-config-prettier": "^8.0.2",
6868
"stylelint-config-standard": "^22.0.0",

‎src/packages/base-widgets/swipe/index.tsx

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
22
* @Author: 卜启缘
33
* @Date: 2021-06-14 12:24:12
4-
* @LastEditTime: 2021-06-14 18:48:44
4+
* @LastEditTime: 2021-06-14 21:19:28
55
* @LastEditors: 卜启缘
6-
* @Description:
6+
* @Description: 轮播图组件
77
* @FilePath: \vite-vue3-lowcode\src\packages\base-widgets\swipe\index.tsx
88
*/
99
import { Swipe, SwipeItem } from 'vant'
@@ -33,7 +33,11 @@ export default {
3333
const { registerRef } = useGlobalProperties()
3434

3535
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+
>
3741
{props.images?.map((item) => (
3842
<>
3943
<SwipeItem key={item}>

‎src/packages/base-widgets/switch/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default {
1717
return (
1818
<Field
1919
{...props}
20+
modelValue={''}
2021
style={{
2122
width: size.width ? `${size.width}px` : null
2223
}}

‎src/visual-editor/components/header/index.vue

+1-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@
6262
</el-col>
6363
<!-- 右侧工具栏 end-->
6464
</el-row>
65-
<template v-if="isShowH5Preview">
66-
<preview v-model:visible="isShowH5Preview" />
67-
</template>
65+
<preview v-model:visible="isShowH5Preview" />
6866
</template>
6967

7068
<script lang="ts">

‎src/visual-editor/components/header/preview.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<template>
22
<el-dialog v-model="dialogVisible" custom-class="h5-preview" :show-close="false" width="360px">
33
<iframe
4-
style="width: 360px; height: 640px"
4+
v-if="dialogVisible"
5+
:style="{ width: '360px', height: '640px' }"
56
:src="previewUrl"
67
frameborder="0"
78
scrolling="auto"
@@ -45,14 +46,18 @@ export default defineComponent({
4546
<style lang="scss">
4647
.h5-preview {
4748
overflow: hidden;
49+
4850
.el-dialog__body {
4951
padding: 0;
5052
}
53+
5154
.el-dialog__header {
5255
display: none;
5356
}
57+
5458
.simulator {
5559
padding-right: 0;
60+
5661
&::-webkit-scrollbar {
5762
width: 0;
5863
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* @Author: 卜启缘
33
* @Date: 2021-06-12 22:18:48
4-
* @LastEditTime: 2021-06-14 16:58:34
4+
* @LastEditTime: 2021-06-14 18:53:02
55
* @LastEditors: 卜启缘
66
* @Description:
77
* @FilePath: \vite-vue3-lowcode\src\visual-editor\components\right-attribute-panel\components\index.ts
@@ -10,4 +10,4 @@
1010
export { TablePropEditor } from './table-prop-editor/table-prop-editor'
1111
export { AttrEditor } from './attr-editor/AttrEditor'
1212
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'

‎src/visual-editor/components/simulator-editor/simulator-editor.vue

+18-10
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
:config="visualConfig"
3434
:on-contextmenu-block="onContextmenuBlock"
3535
:select-comp="selectComp"
36+
:delete-comp="deleteComp"
3637
/>
3738
</template>
3839
</comp-render>
@@ -129,6 +130,21 @@ export default defineComponent({
129130
})
130131
}
131132
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+
132148
const onContextmenuBlock = (
133149
e: MouseEvent,
134150
block: VisualEditorBlockData,
@@ -168,16 +184,7 @@ export default defineComponent({
168184
label="删除节点"
169185
icon="el-icon-delete"
170186
{...{
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)
181188
}}
182189
/>
183190
</>
@@ -189,6 +196,7 @@ export default defineComponent({
189196
...toRefs(state),
190197
currentPage,
191198
visualConfig,
199+
deleteComp,
192200
selectComp,
193201
onContextmenuBlock
194202
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
.dropdown-service {
22
position: fixed;
3-
padding: 8px 0;
43
z-index: 99;
5-
box-shadow: 0 2px 5px 1px #ddd;
4+
padding: 8px 0;
5+
pointer-events: none;
66
background-color: white;
77
opacity: 0;
8-
pointer-events: none;
8+
box-shadow: 0 2px 5px 1px #ddd;
99
transition: opacity 200ms linear;
1010

1111
.dropdown-option {
@@ -17,13 +17,13 @@
1717
}
1818

1919
&:hover {
20-
background-color: #efefef;
2120
cursor: pointer;
21+
background-color: #efefef;
2222
}
2323
}
2424

2525
&.dropdown-service-show {
26-
opacity: 1;
2726
pointer-events: auto;
27+
opacity: 1;
2828
}
29-
}
29+
}

0 commit comments

Comments
 (0)
Please sign in to comment.