Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5c0895e

Browse files
committed
chore: ⬆️ update deps
1 parent 8619c57 commit 5c0895e

File tree

11 files changed

+459
-305
lines changed

11 files changed

+459
-305
lines changed

.vscode/settings.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,22 @@
112112
"editor.defaultFormatter": "esbenp.prettier-vscode"
113113
},
114114
"[scss]": {
115-
"editor.defaultFormatter": "esbenp.prettier-vscode"
115+
"editor.defaultFormatter": "esbenp.prettier-vscode",
116+
"editor.codeActionsOnSave": {
117+
"source.fixAll.eslint": false,
118+
"source.fixAll.stylelint": true
119+
}
116120
},
117121
"[markdown]": {
118122
"editor.defaultFormatter": "esbenp.prettier-vscode"
119123
},
120124
"editor.codeActionsOnSave": {
121-
"source.fixAll.eslint": true,
122-
"source.fixAll.stylelint": true
125+
"source.fixAll.eslint": true
123126
},
124127
"[vue]": {
125128
"editor.codeActionsOnSave": {
126-
"source.fixAll.eslint": false
129+
"source.fixAll.eslint": false,
130+
"source.fixAll.stylelint": true
127131
}
128132
},
129133
"i18n-ally.localesPaths": ["src/locales/lang"],

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 基于 Vite2.x + Vue3.x + TypeScript H5 低代码平台
22

3-
### 只是一个简单的模板,感兴趣可以根据自己的需要调整
3+
### 只是一个简单的模板,感兴趣可以根据自己的需要调整, 在这里你可以看到 vue3 很多有趣的新特性和玩法。
44

55
[![license](https://img.shields.io/github/license/buqiyuan/vite-vue3-lowcode.svg)](LICENSE)
66

components.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ declare module 'vue' {
88
ElCol: typeof import('element-plus/es/el-col')['default']
99
ElCollapse: typeof import('element-plus/es/el-collapse')['default']
1010
ElCollapseItem: typeof import('element-plus/es/el-collapse-item')['default']
11+
ElConfigProvider: typeof import('element-plus/es/el-config-provider')['default']
1112
ElContainer: typeof import('element-plus/es/el-container')['default']
1213
ElDialog: typeof import('element-plus/es/el-dialog')['default']
1314
ElDropdown: typeof import('element-plus/es/el-dropdown')['default']

package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,63 +21,63 @@
2121
},
2222
"dependencies": {
2323
"@vant/touch-emulator": "^1.3.2",
24-
"@vueuse/core": "^5.2.0",
25-
"@vueuse/integrations": "^5.2.0",
24+
"@vueuse/core": "^5.3.0",
25+
"@vueuse/integrations": "^5.3.0",
2626
"animate.css": "^4.1.1",
2727
"axios": "^0.21.1",
2828
"dayjs": "^1.10.6",
2929
"dexie": "^3.0.3",
30-
"element-plus": "1.0.2-beta.58",
30+
"element-plus": "1.0.2-beta.70",
3131
"lodash": "^4.17.21",
3232
"monaco-editor": "^0.26.1",
33-
"nanoid": "^3.1.23",
33+
"nanoid": "^3.1.25",
3434
"normalize.css": "^8.0.1",
3535
"nprogress": "^1.0.0-1",
3636
"qrcode": "^1.4.4",
3737
"qs": "^6.10.1",
38-
"vant": "3.1.4",
39-
"vue": "3.1.5",
40-
"vue-router": "^4.0.10",
38+
"vant": "3.2.0",
39+
"vue": "3.2.2",
40+
"vue-router": "^4.0.11",
4141
"vuedraggable": "^4.0.3",
4242
"vuex": "^4.0.2"
4343
},
4444
"devDependencies": {
4545
"@commitlint/cli": "^13.1.0",
4646
"@commitlint/config-conventional": "^13.1.0",
47-
"@types/node": "^16.4.2",
48-
"@typescript-eslint/eslint-plugin": "^4.28.4",
49-
"@typescript-eslint/parser": "^4.28.4",
50-
"@vitejs/plugin-legacy": "^1.4.4",
51-
"@vitejs/plugin-vue": "^1.2.5",
52-
"@vitejs/plugin-vue-jsx": "^1.1.6",
53-
"@vue/compiler-sfc": "3.1.5",
47+
"@types/node": "^16.6.0",
48+
"@typescript-eslint/eslint-plugin": "^4.29.1",
49+
"@typescript-eslint/parser": "^4.29.1",
50+
"@vitejs/plugin-legacy": "^1.5.1",
51+
"@vitejs/plugin-vue": "^1.4.0",
52+
"@vitejs/plugin-vue-jsx": "^1.1.7",
53+
"@vue/compiler-sfc": "3.2.2",
5454
"commitizen": "^4.2.4",
5555
"cross-env": "^7.0.3",
5656
"cz-conventional-changelog": "^3.3.0",
5757
"cz-customizable": "^6.3.0",
58-
"eslint": "^7.31.0",
58+
"eslint": "^7.32.0",
5959
"eslint-config-prettier": "^8.3.0",
60-
"eslint-plugin-import": "^2.23.4",
60+
"eslint-plugin-import": "^2.24.0",
6161
"eslint-plugin-prettier": "^3.4.0",
62-
"eslint-plugin-vue": "^7.14.0",
62+
"eslint-plugin-vue": "^7.16.0",
6363
"gh-pages": "^3.2.3",
6464
"husky": "^7.0.1",
65-
"lint-staged": "^11.1.1",
65+
"lint-staged": "^11.1.2",
6666
"prettier": "^2.3.2",
6767
"pretty-quick": "^3.1.1",
68-
"sass": "1.36.0",
68+
"sass": "1.37.5",
6969
"stylelint": "^13.13.1",
7070
"stylelint-config-prettier": "^8.0.2",
7171
"stylelint-config-standard": "^22.0.0",
7272
"stylelint-order": "^4.1.0",
7373
"typescript": "^4.3.5",
74-
"vite": "2.4.3",
74+
"vite": "2.4.4",
7575
"vite-plugin-components": "^0.13.2",
76-
"vite-plugin-style-import": "^1.0.1",
77-
"vite-plugin-windicss": "^1.2.5",
78-
"vue-eslint-parser": "^7.9.0",
76+
"vite-plugin-style-import": "^1.1.1",
77+
"vite-plugin-windicss": "^1.2.7",
78+
"vue-eslint-parser": "^7.10.0",
7979
"vue-tsc": "^0.2.2",
80-
"windicss": "^3.1.5"
80+
"windicss": "^3.1.7"
8181
},
8282
"repository": {
8383
"type": "git",

src/App.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
<template>
2-
<router-view #="{ Component, route }">
3-
<component :is="Component" :key="route.path" />
4-
</router-view>
2+
<el-config-provider :locale="locale">
3+
<router-view #="{ Component, route }">
4+
<component :is="Component" :key="route.path" />
5+
</router-view>
6+
</el-config-provider>
57
</template>
68

79
<script setup lang="ts">
810
import { provide } from 'vue'
11+
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
912
import { initVisualData, injectKey, localKey } from '@/visual-editor/hooks/useVisualData'
1013
1114
const visualData = initVisualData()
@@ -14,6 +17,8 @@ provide(injectKey, visualData)
1417
1518
const { jsonData } = visualData
1619
20+
const locale = zhCn
21+
1722
window.addEventListener('beforeunload', () => {
1823
sessionStorage.setItem(localKey, JSON.stringify(jsonData))
1924
})

src/packages/base-widgets/datetimePicker/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default {
6363
)
6464
}}
6565
/>
66-
<Popup v-model={[state.showPicker, 'show']} position={'bottom'}>
66+
<Popup v-model={[state.showPicker, 'show']} position={'bottom'} teleport="body">
6767
<DatetimePicker
6868
ref={(el) => registerRef(el, block._vid)}
6969
{...props}
@@ -127,7 +127,7 @@ export default {
127127
loading: createEditorSwitchProp({ label: '是否显示加载状态' }),
128128
showToolbar: createEditorSwitchProp({ label: '是否显示顶部栏' }),
129129
swipeDuration: createEditorInputProp({ label: '快速滑动时惯性滚动的时长,单位ms' }),
130-
visibleItemCount: createEditorInputNumberProp({ label: '可见的选项个数' }),
130+
visibleItemCount: createEditorInputNumberProp({ label: '可见的选项个数', defaultValue: 6 }),
131131
placeholder: createEditorInputProp({ label: '占位符', defaultValue: '请选择' }),
132132
...createFieldProps()
133133
},

src/packages/base-widgets/stepper/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default {
6161
name: createEditorModelBindProp({ label: '字段绑定', defaultValue: '' }),
6262
label: createEditorInputProp({ label: '输入框左侧文本', defaultValue: '步进器' }),
6363
min: createEditorInputNumberProp({ label: '最小值', defaultValue: 0 }),
64-
max: createEditorInputNumberProp({ label: '最大值' }),
64+
max: createEditorInputNumberProp({ label: '最大值', defaultValue: 10 }),
6565
...createFieldProps(),
6666
allowEmpty: createEditorSwitchProp({ label: '是否允许输入的值为空', defaultValue: false }),
6767
buttonSize: createEditorInputProp({

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
size="mini"
3030
icon="el-icon-video-play"
3131
circle
32-
class="flex-shrink-0"
32+
class="flex-shrink-0 !p-6px"
3333
@click="runPreview"
3434
/>
3535
</el-tooltip>

src/visual-editor/components/left-aside/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default defineComponent({
5757
height: 100%;
5858
contain: layout;
5959
60-
> ::v-deep(.el-tabs__header) {
60+
> :deep(.el-tabs__header) {
6161
margin-right: 0;
6262
6363
.el-tabs__item {
@@ -74,7 +74,7 @@ export default defineComponent({
7474
}
7575
}
7676
77-
> ::v-deep(.el-tabs__content) {
77+
> :deep(.el-tabs__content) {
7878
height: 100%;
7979
overflow-y: auto;
8080
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import { cloneDeep } from 'lodash'
6363
import { useGlobalProperties } from '@/hooks/useGlobalProperties'
6464
import { useVisualData } from '@/visual-editor/hooks/useVisualData'
6565
import { useModal } from '@/visual-editor/hooks/useModal'
66+
import { generateNanoid } from '@/visual-editor/utils'
6667
6768
export default defineComponent({
6869
name: 'SimulatorEditor',
@@ -191,21 +192,20 @@ export default defineComponent({
191192
onClick: () => {
192193
const index = parentBlocks.findIndex((item) => item._vid == block._vid)
193194
if (index != -1) {
194-
const setBlockVid = (block, index = -1) => {
195-
block._vid = `vid_${Date.now() + index}`
195+
const setBlockVid = (block: VisualEditorBlockData) => {
196+
block._vid = `vid_${generateNanoid()}`
197+
block.focus = false
196198
const slots = block?.props?.slots || {}
197199
const slotKeys = Object.keys(slots)
198200
if (slotKeys.length) {
199201
slotKeys.forEach((slotKey) => {
200-
slots[slotKey]?.children?.forEach((child, index) =>
201-
setBlockVid(child, index)
202-
)
202+
slots[slotKey]?.children?.forEach((child) => setBlockVid(child))
203203
})
204204
}
205205
}
206206
const blockCopy = cloneDeep(parentBlocks[index])
207207
setBlockVid(blockCopy)
208-
parentBlocks.splice(index, 0, blockCopy)
208+
parentBlocks.splice(index + 1, 0, blockCopy)
209209
}
210210
}
211211
}}

0 commit comments

Comments
 (0)