diff --git a/components.d.ts b/components.d.ts index 8144f62..f333c15 100644 --- a/components.d.ts +++ b/components.d.ts @@ -23,9 +23,10 @@ declare module 'vue' { ElInput: typeof import('element-plus/es/el-input')['default'] ElFormItem: typeof import('element-plus/es/el-form-item')['default'] ElForm: typeof import('element-plus/es/el-form')['default'] + ElPopconfirm: typeof import('element-plus/es/el-popconfirm')['default'] ElCollapseItem: typeof import('element-plus/es/el-collapse-item')['default'] ElCollapse: typeof import('element-plus/es/el-collapse')['default'] - ElPopconfirm: typeof import('element-plus/es/el-popconfirm')['default'] + ElInfiniteScroll: typeof import('element-plus/es/el-infinite-scroll')['default'] } } diff --git a/src/main.ts b/src/main.ts index e1a4f60..7227ced 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,7 @@ import { createApp } from 'vue' import App from './App.vue' -import './plugins/element-plus' +import { setupElementPlus } from './plugins/element-plus' import { setupVant } from './plugins/vant' import 'normalize.css' @@ -14,6 +14,8 @@ import store from './store/' const app = createApp(App) +// 使用element-plus插件 +setupElementPlus(app) // 使用vant插件 setupVant(app) diff --git a/src/packages/base-widgets/button/index.tsx b/src/packages/base-widgets/button/index.tsx index 4972a70..76ad758 100644 --- a/src/packages/base-widgets/button/index.tsx +++ b/src/packages/base-widgets/button/index.tsx @@ -87,6 +87,10 @@ export default { { label: '表单提交按钮', value: 'submit' + }, + { + label: '表单重置按钮', + value: 'reset' } ], defaultValue: 'button' diff --git a/src/plugins/element-plus.ts b/src/plugins/element-plus.ts index 10b0db0..9e6a3d3 100644 --- a/src/plugins/element-plus.ts +++ b/src/plugins/element-plus.ts @@ -1,3 +1,16 @@ +/* + * @Author: 卜启缘 + * @Date: 2021-04-22 02:10:31 + * @LastEditTime: 2021-06-27 14:58:03 + * @LastEditors: 卜启缘 + * @Description: 按需导入element-plus + * @FilePath: \vite-vue3-lowcode\src\plugins\element-plus.ts + */ import 'element-plus/packages/theme-chalk/src/base.scss' // import 'element-plus/lib/theme-chalk/index.css' // import 'element-plus/lib/theme-chalk/el-popper.css' +import type { App } from 'vue' +import { ElInfiniteScroll } from 'element-plus' +export const setupElementPlus = (app: App) => { + app.use(ElInfiniteScroll) +} diff --git a/src/plugins/vant.ts b/src/plugins/vant.ts index 01e67e0..05a26b3 100644 --- a/src/plugins/vant.ts +++ b/src/plugins/vant.ts @@ -1,4 +1,4 @@ -import { App } from 'vue' +import type { App } from 'vue' import '@vant/touch-emulator' import 'vant/lib/index.css' diff --git a/src/visual-editor/components/left-aside/components/data-source/data-fetch.vue b/src/visual-editor/components/left-aside/components/data-source/data-fetch.vue index 6d5fb73..5c13bb1 100644 --- a/src/visual-editor/components/left-aside/components/data-source/data-fetch.vue +++ b/src/visual-editor/components/left-aside/components/data-source/data-fetch.vue @@ -1,7 +1,7 @@