flame-plus 0.1.33 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +3 -0
- package/.env +0 -0
- package/.eslintrc.js +20 -0
- package/README.md +1 -7
- package/package.json +48 -23
- package/{src/packages → packages}/components/base/flmButton/flmButton.vue +1 -1
- package/{src/packages → packages}/components/base/flmCascader/flmCascader.vue +1 -1
- package/{src/packages → packages}/components/base/flmCheckbox/flmCheckbox.vue +1 -1
- package/{src/packages → packages}/components/base/flmCheckbox/flmCheckboxGroup.vue +1 -1
- package/{src/packages → packages}/components/base/flmColorPicker/flmColorPicker.vue +1 -1
- package/{src/packages → packages}/components/base/flmDatePicker/flmDatePicker.vue +1 -1
- package/{src/packages → packages}/components/base/flmDialog/flmDialog.vue +1 -1
- package/{src/packages → packages}/components/base/flmInput/flmInput.vue +1 -1
- package/{src/packages → packages}/components/base/flmInputNumber/flmInputNumber.vue +1 -1
- package/{src/packages → packages}/components/base/flmPagination/flmPagination.vue +1 -1
- package/{src/packages → packages}/components/base/flmRadio/flmRadio.vue +1 -1
- package/{src/packages → packages}/components/base/flmRate/flmRate.vue +1 -1
- package/{src/packages → packages}/components/base/flmRead/flmRead.vue +2 -2
- package/{src/packages → packages}/components/base/flmSelect/flmSelect.vue +1 -1
- package/{src/packages → packages}/components/base/flmSlider/flmSlider.vue +1 -1
- package/{src/packages → packages}/components/base/flmSwitch/flmSwitch.vue +1 -1
- package/{src/packages → packages}/components/base/flmTimePicker/flmTimePicker.vue +1 -1
- package/{src/packages → packages}/components/base/flmTimeSelect/flmTimeSelect.vue +1 -1
- package/{src/packages → packages}/components/base/flmTransfer/flmTransfer.vue +1 -1
- package/{src/packages → packages}/components/complex/flmForm/flmForm.vue +1 -2
- package/{src/packages → packages}/components/complex/flmSearch/flmSearch.vue +1 -1
- package/{src/packages → packages}/components/complex/flmTable/flmTable.vue +1 -1
- package/{src/packages → packages}/components/complex/flmToolbar/flmToolbar.vue +2 -2
- package/{src/packages → packages}/components/index.ts +1 -2
- package/{src/packages → packages}/components/page/flmReportPage/flmReportPage.vue +122 -79
- package/packages/index.ts +8 -0
- package/packages/model/flmComponentConfig/base/flmButton.ts +53 -0
- package/packages/model/flmComponentConfig/base/flmCascader.ts +77 -0
- package/packages/model/flmComponentConfig/base/flmCheckbox.ts +51 -0
- package/packages/model/flmComponentConfig/base/flmColorPicker.ts +30 -0
- package/packages/model/flmComponentConfig/base/flmDatePicker.ts +73 -0
- package/packages/model/flmComponentConfig/base/flmDialog.ts +49 -0
- package/packages/model/flmComponentConfig/base/flmInput.ts +57 -0
- package/packages/model/flmComponentConfig/base/flmInputNumber.ts +37 -0
- package/packages/model/flmComponentConfig/base/flmPagination.ts +37 -0
- package/packages/model/flmComponentConfig/base/flmRadio.ts +42 -0
- package/packages/model/flmComponentConfig/base/flmRate.ts +49 -0
- package/packages/model/flmComponentConfig/base/flmRead.ts +6 -0
- package/packages/model/flmComponentConfig/base/flmSelect.ts +104 -0
- package/packages/model/flmComponentConfig/base/flmSlider.ts +51 -0
- package/packages/model/flmComponentConfig/base/flmSwitch.ts +37 -0
- package/packages/model/flmComponentConfig/base/flmTimePicker.ts +61 -0
- package/packages/model/flmComponentConfig/base/flmTimeSelect.ts +44 -0
- package/packages/model/flmComponentConfig/base/flmTransfer.ts +51 -0
- package/packages/model/flmComponentConfig/complex/flmForm.ts +147 -0
- package/packages/model/flmComponentConfig/complex/flmSearch.ts +5 -0
- package/packages/model/flmComponentConfig/complex/flmTable.ts +132 -0
- package/packages/model/flmComponentConfig/complex/flmToolbar.ts +13 -0
- package/packages/model/flmComponentConfig/index.ts +31 -0
- package/packages/model/flmComponentConfig/page/flmReportPage.ts +31 -0
- package/packages/model/flmComponentConfig/public.ts +293 -0
- package/tsconfig.json +73 -20
- package/typings/lodash.d.ts +4 -0
- package/webpack.config.js +15 -0
- package/.vscode/extensions.json +0 -3
- package/flameDist/flame-plus.es.js +0 -5128
- package/flameDist/flame-plus.es.js.map +0 -1
- package/flameDist/flame-plus.umd.js +0 -16
- package/flameDist/flame-plus.umd.js.map +0 -1
- package/flameDist/style.css +0 -1
- package/flameDist/vite.svg +0 -1
- package/index.html +0 -13
- package/pnpm-lock.yaml +0 -2107
- package/public/vite.svg +0 -1
- package/src/App.vue +0 -10
- package/src/assets/vue.svg +0 -1
- package/src/components/HelloWorld.vue +0 -33
- package/src/main.ts +0 -19
- package/src/packages/components/page/flmExportPage/flmExportPage.vue +0 -219
- package/src/packages/index.ts +0 -96
- package/src/shims-vue.d.ts +0 -9
- package/vite.config.js +0 -37
- /package/{src/packages → packages}/utils/filterConfig.ts +0 -0
- /package/{src/packages → packages}/utils/index.ts +0 -0
- /package/{src/packages → packages}/utils/isValidKey.ts +0 -0
package/public/vite.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/src/App.vue
DELETED
package/src/assets/vue.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<script lang="tsx">
|
|
2
|
-
import { ElButton } from 'element-plus'
|
|
3
|
-
import { defineComponent, PropType, computed } from 'vue'
|
|
4
|
-
import { ButtonConfig, buttonDefaultConfig } from 'flame-types'
|
|
5
|
-
import { filterConfig } from '../packages/utils'
|
|
6
|
-
|
|
7
|
-
export default defineComponent({
|
|
8
|
-
emits: ['buttonClick'],
|
|
9
|
-
props: {
|
|
10
|
-
// 默认设置
|
|
11
|
-
config: {
|
|
12
|
-
type: Object as PropType<ButtonConfig>,
|
|
13
|
-
default: {}
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
setup(props, ctx) {
|
|
17
|
-
// 按钮设置
|
|
18
|
-
const buttonConfig = computed((): ButtonConfig => {
|
|
19
|
-
return filterConfig(buttonDefaultConfig, props.config)
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
return () => (
|
|
23
|
-
<ElButton>点我</ElButton>
|
|
24
|
-
)
|
|
25
|
-
// return () => (
|
|
26
|
-
// <el-button
|
|
27
|
-
// {...buttonConfig.value}
|
|
28
|
-
// onClick={() => ctx.emit('buttonClick')}
|
|
29
|
-
// >{buttonConfig.value.buttonText || '点击'}</el-button>
|
|
30
|
-
// )
|
|
31
|
-
},
|
|
32
|
-
})
|
|
33
|
-
</script>
|
package/src/main.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// main.ts
|
|
2
|
-
import { createApp } from 'vue'
|
|
3
|
-
import App from './App.vue'
|
|
4
|
-
|
|
5
|
-
import ElementPlus from 'element-plus'
|
|
6
|
-
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
|
7
|
-
import 'element-plus/dist/index.css'
|
|
8
|
-
// import * as icons from '@element-plus/icons-vue'
|
|
9
|
-
|
|
10
|
-
import flamePlus from './packages/index'
|
|
11
|
-
|
|
12
|
-
const app = createApp(App)
|
|
13
|
-
.use(ElementPlus, { locale: zhCn })
|
|
14
|
-
// .use(flamePlus)
|
|
15
|
-
// Object.keys(icons).forEach((key) => {
|
|
16
|
-
// // isValidKey(key, icons) && app.component(key, icons[key])
|
|
17
|
-
// app.component(key, icons[key])
|
|
18
|
-
// })
|
|
19
|
-
app.mount("#app")
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="export-page" ref="exportPageRef">
|
|
3
|
-
<template v-if="isLoaded">
|
|
4
|
-
<div class="page-search">
|
|
5
|
-
<slot></slot>
|
|
6
|
-
</div>
|
|
7
|
-
<flmToolbar class="page-toolbar" :config="toolbarConfig" @toolbarClick="toolbarClick" />
|
|
8
|
-
<flmTable class="page-table" :config="exportPageConfig.table">
|
|
9
|
-
<template v-for="tableSlot in getTableSlots" #[tableSlot]="{ index, row, column }">
|
|
10
|
-
<slot :name="`table-${tableSlot}`" :index="index" :row="row" :column="column"></slot>
|
|
11
|
-
</template>
|
|
12
|
-
</flmTable>
|
|
13
|
-
<flmPagination
|
|
14
|
-
class="page-pagination"
|
|
15
|
-
:config="exportPageConfig.pagination"
|
|
16
|
-
@size-change="paginationEvent.sizeChange"
|
|
17
|
-
@current-change="paginationEvent.currentChange"
|
|
18
|
-
/>
|
|
19
|
-
</template>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script lang="ts" setup>
|
|
24
|
-
import { PropType, ref, Ref, reactive, computed, onMounted } from 'vue'
|
|
25
|
-
import { ElMessage } from 'element-plus'
|
|
26
|
-
import { flmToolbar, flmTable, flmPagination } from '../../index'
|
|
27
|
-
import {
|
|
28
|
-
ButtonType,
|
|
29
|
-
ToolbarConfig,
|
|
30
|
-
FormConfig,
|
|
31
|
-
TableColumnConfig,
|
|
32
|
-
ExportPageSetting
|
|
33
|
-
} from 'flame-types'
|
|
34
|
-
import { isValidKey } from '../../../utils'
|
|
35
|
-
|
|
36
|
-
const props = defineProps({
|
|
37
|
-
// 表名
|
|
38
|
-
tableName: {
|
|
39
|
-
type: String,
|
|
40
|
-
required: true
|
|
41
|
-
},
|
|
42
|
-
// 请求方式
|
|
43
|
-
request: {
|
|
44
|
-
type: Object as PropType<any>,
|
|
45
|
-
required: true
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
const emit = defineEmits(['customEvent'])
|
|
50
|
-
const exportPageRef = ref()
|
|
51
|
-
|
|
52
|
-
const safeTableName = computed(() => props.tableName.replace(/_/g, ''))
|
|
53
|
-
|
|
54
|
-
let isLoaded: Ref<boolean> = ref(false)
|
|
55
|
-
let exportPageConfig: Ref<ExportPageSetting> = ref({
|
|
56
|
-
table: {},
|
|
57
|
-
pagination: {},
|
|
58
|
-
})
|
|
59
|
-
const searchParams: FormConfig['model'] = ref({}) // 搜索条件
|
|
60
|
-
|
|
61
|
-
onMounted(() => {
|
|
62
|
-
queryPageSetting()
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
// 表格高度
|
|
66
|
-
const tableHeight = () => {
|
|
67
|
-
const homeHeight = '100vh',
|
|
68
|
-
headerHight = '50px', // 页眉高度
|
|
69
|
-
mainSpacing = '30px', // 主体内容边距
|
|
70
|
-
pageSearch = '50px', // 搜索栏高度
|
|
71
|
-
pageFooter = '50px', // 分页高度
|
|
72
|
-
pageSpacing = '40px' // 页面边距
|
|
73
|
-
return `calc(${homeHeight} - ${headerHight} - ${mainSpacing} - ${pageSearch} - ${pageFooter} - ${pageSpacing})`
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// 查询页面配置
|
|
77
|
-
const queryPageSetting = () => {
|
|
78
|
-
props.request.flameprops.request({
|
|
79
|
-
tableName: 'flametableinfo',
|
|
80
|
-
flameMethod: 'webgetpagesetting',
|
|
81
|
-
data: { table_name: props.tableName, menu_id: null }
|
|
82
|
-
})
|
|
83
|
-
.then(({ items }: any) => {
|
|
84
|
-
const exportPageSetting: ExportPageSetting = items
|
|
85
|
-
exportPageSetting.table['height'] = tableHeight()
|
|
86
|
-
exportPageSetting.table['max-height'] = tableHeight()
|
|
87
|
-
exportPageConfig.value = exportPageSetting
|
|
88
|
-
queryPageData()
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// 查询页面数据
|
|
93
|
-
const queryPageData = () => {
|
|
94
|
-
const {
|
|
95
|
-
['current-page']: page_no = 1,
|
|
96
|
-
['page-size']: page_size = 20,
|
|
97
|
-
}: ExportPageSetting['pagination'] = exportPageConfig.value.pagination
|
|
98
|
-
props.request.flameApi.pageSearch({
|
|
99
|
-
tableName: safeTableName.value,
|
|
100
|
-
data: {
|
|
101
|
-
page_no,
|
|
102
|
-
page_size,
|
|
103
|
-
conditions: searchParams.value,
|
|
104
|
-
ref_level: 1,
|
|
105
|
-
order_by: "flame_id DESC"
|
|
106
|
-
}
|
|
107
|
-
})
|
|
108
|
-
.then(({ items, total }: any) => {
|
|
109
|
-
exportPageConfig.value.table.data = items
|
|
110
|
-
exportPageConfig.value.pagination['total'] = total
|
|
111
|
-
isLoaded.value = true
|
|
112
|
-
})
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// 页面刷新
|
|
116
|
-
const pageRefresh = () => {
|
|
117
|
-
exportPageConfig.value.pagination['current-page'] = 1
|
|
118
|
-
queryPageData()
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// 搜索栏提交
|
|
122
|
-
const searchSubmit = (event: object) => {
|
|
123
|
-
searchParams.value = event
|
|
124
|
-
pageRefresh()
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// 工具栏配置
|
|
128
|
-
const toolbarConfig: ToolbarConfig = reactive({
|
|
129
|
-
buttons: [{
|
|
130
|
-
type: ButtonType['success'],
|
|
131
|
-
plain: true,
|
|
132
|
-
buttonText: '导出',
|
|
133
|
-
event: 'pageExport'
|
|
134
|
-
}],
|
|
135
|
-
maxButton: 3,
|
|
136
|
-
publicConfig: {}
|
|
137
|
-
})
|
|
138
|
-
// 工具栏点击
|
|
139
|
-
const toolbarClick = (event: string) => {
|
|
140
|
-
isValidKey(event, pageDefaultEvent)
|
|
141
|
-
? pageDefaultEvent[event]()
|
|
142
|
-
: emit('customEvent', event)
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// 分页器操作
|
|
146
|
-
const paginationEvent: Record<string, (event?: any) => void> = {
|
|
147
|
-
// 每页数量变化
|
|
148
|
-
sizeChange:(pageSize: number) => {
|
|
149
|
-
exportPageConfig.value.pagination['current-page'] = 1
|
|
150
|
-
exportPageConfig.value.pagination['page-size'] = pageSize
|
|
151
|
-
queryPageData()
|
|
152
|
-
},
|
|
153
|
-
// 当前页变化
|
|
154
|
-
currentChange:(current: number) => {
|
|
155
|
-
exportPageConfig.value.pagination['current-page'] = current
|
|
156
|
-
queryPageData()
|
|
157
|
-
},
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// 页面默认操作
|
|
161
|
-
const pageDefaultEvent: Record<string, (event?: any) => void> = {
|
|
162
|
-
// 页面导出
|
|
163
|
-
pageExport:() => {
|
|
164
|
-
props.request.flameApi.exportFile({
|
|
165
|
-
tableName: safeTableName.value,
|
|
166
|
-
data: {
|
|
167
|
-
conditions: searchParams.value,
|
|
168
|
-
ref_level: 1,
|
|
169
|
-
order_by: 'flame_id DESC'
|
|
170
|
-
}
|
|
171
|
-
})
|
|
172
|
-
.then(({ items }: any) => {
|
|
173
|
-
window.open(items.download_url)
|
|
174
|
-
ElMessage.success('导出成功')
|
|
175
|
-
})
|
|
176
|
-
},
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
defineExpose({ searchSubmit, pageRefresh })
|
|
180
|
-
|
|
181
|
-
// 表格插槽
|
|
182
|
-
const getTableSlots = computed((): Array<string> => {
|
|
183
|
-
const columns: Array<TableColumnConfig> = exportPageConfig.value.table.columns || []
|
|
184
|
-
const slotColumns: Array<string> = []
|
|
185
|
-
const slotFilter = (columns: Array<TableColumnConfig>) => {
|
|
186
|
-
columns.forEach(({ prop, isSlot, columns }: TableColumnConfig) => {
|
|
187
|
-
(isSlot && prop && prop !== 'tableAction') && slotColumns.push(prop)
|
|
188
|
-
columns?.length && slotFilter(columns)
|
|
189
|
-
})
|
|
190
|
-
}
|
|
191
|
-
slotFilter(columns)
|
|
192
|
-
return slotColumns
|
|
193
|
-
})
|
|
194
|
-
</script>
|
|
195
|
-
|
|
196
|
-
<style lang="scss" scoped>
|
|
197
|
-
.export-page {
|
|
198
|
-
display: grid;
|
|
199
|
-
grid-template-columns: repeat(24, 1fr);
|
|
200
|
-
grid-template-rows: 50px 1fr 50px;
|
|
201
|
-
padding: 20px;
|
|
202
|
-
border-radius: 2px;
|
|
203
|
-
background: #FFF;
|
|
204
|
-
.page-search {
|
|
205
|
-
grid-column: span 18;
|
|
206
|
-
}
|
|
207
|
-
.page-toolbar {
|
|
208
|
-
grid-column: span 6;
|
|
209
|
-
justify-self: end;
|
|
210
|
-
}
|
|
211
|
-
.page-table, .page-pagination {
|
|
212
|
-
grid-column: span 24;
|
|
213
|
-
}
|
|
214
|
-
.page-pagination {
|
|
215
|
-
align-self: end;
|
|
216
|
-
justify-self: end;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
</style>
|
package/src/packages/index.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import 'element-plus/dist/index.css'
|
|
2
|
-
// 基础组件
|
|
3
|
-
import flmButton from './components/base/flmButton/flmButton.vue' // 按钮
|
|
4
|
-
import flmCascader from './components/base/flmCascader/flmCascader.vue' // 级联选择器
|
|
5
|
-
import flmCheckbox from './components/base/flmCheckbox/flmCheckbox.vue' // 多选框
|
|
6
|
-
import flmCheckboxGroup from './components/base/flmCheckbox/flmCheckboxGroup.vue' // 多选框组
|
|
7
|
-
import flmColorPicker from './components/base/flmColorPicker/flmColorPicker.vue' // 取色器
|
|
8
|
-
import flmDatePicker from './components/base/flmDatePicker/flmDatePicker.vue' // 日期选择器
|
|
9
|
-
import flmInput from './components/base/flmInput/flmInput.vue' // 输入框
|
|
10
|
-
import flmInputNumber from './components/base/flmInputNumber/flmInputNumber.vue' // 数字输入框
|
|
11
|
-
import flmPagination from './components/base/flmPagination/flmPagination.vue' // 分页器
|
|
12
|
-
import flmRadio from './components/base/flmRadio/flmRadio.vue' // 单选框
|
|
13
|
-
import flmRate from './components/base/flmRate/flmRate.vue' // 评分
|
|
14
|
-
import flmRead from './components/base/flmRead/flmRead.vue' // 查看
|
|
15
|
-
import flmSelect from './components/base/flmSelect/flmSelect.vue' // 选择器
|
|
16
|
-
import flmSlider from './components/base/flmSlider/flmSlider.vue' // 滑块
|
|
17
|
-
import flmSwitch from './components/base/flmSwitch/flmSwitch.vue' // 开关
|
|
18
|
-
import flmTimePicker from './components/base/flmTimePicker/flmTimePicker.vue' // 时间选择器
|
|
19
|
-
import flmTimeSelect from './components/base/flmTimeSelect/flmTimeSelect.vue' // 时间选择
|
|
20
|
-
import flmTransfer from './components/base/flmTransfer/flmTransfer.vue' // 穿梭框
|
|
21
|
-
import flmDialog from './components/base/flmDialog/flmDialog.vue' // 弹窗
|
|
22
|
-
// 复合组件
|
|
23
|
-
import flmForm from './components/complex/flmForm/flmForm.vue' // 表单
|
|
24
|
-
import flmTable from './components/complex/flmTable/flmTable.vue' // 表格
|
|
25
|
-
import flmToolbar from './components/complex/flmToolbar/flmToolbar.vue' // 操作栏
|
|
26
|
-
import flmSearch from './components/complex/flmSearch/flmSearch.vue' // 搜索
|
|
27
|
-
// 页面组件
|
|
28
|
-
import flmReportPage from './components/page/flmReportPage/flmReportPage.vue' // 报表页面
|
|
29
|
-
import flmExportPage from './components/page/flmExportPage/flmExportPage.vue' // 导出页面
|
|
30
|
-
|
|
31
|
-
import type { App } from "vue";
|
|
32
|
-
|
|
33
|
-
const components: any = {
|
|
34
|
-
flmButton,
|
|
35
|
-
flmCascader,
|
|
36
|
-
flmCheckbox,
|
|
37
|
-
flmCheckboxGroup,
|
|
38
|
-
flmColorPicker,
|
|
39
|
-
flmDatePicker,
|
|
40
|
-
flmInput,
|
|
41
|
-
flmInputNumber,
|
|
42
|
-
flmPagination,
|
|
43
|
-
flmRadio,
|
|
44
|
-
flmRate,
|
|
45
|
-
flmRead,
|
|
46
|
-
flmSelect,
|
|
47
|
-
flmSlider,
|
|
48
|
-
flmSwitch,
|
|
49
|
-
flmTimePicker,
|
|
50
|
-
flmTimeSelect,
|
|
51
|
-
flmTransfer,
|
|
52
|
-
flmDialog,
|
|
53
|
-
flmForm,
|
|
54
|
-
flmTable,
|
|
55
|
-
flmToolbar,
|
|
56
|
-
flmSearch,
|
|
57
|
-
flmReportPage,
|
|
58
|
-
flmExportPage
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const install = (app: App) => {
|
|
62
|
-
Object.entries(components).forEach(([name, component]: any) => app.component(name, component))
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export {
|
|
66
|
-
flmButton,
|
|
67
|
-
flmCascader,
|
|
68
|
-
flmCheckbox,
|
|
69
|
-
flmCheckboxGroup,
|
|
70
|
-
flmColorPicker,
|
|
71
|
-
flmDatePicker,
|
|
72
|
-
flmInput,
|
|
73
|
-
flmInputNumber,
|
|
74
|
-
flmPagination,
|
|
75
|
-
flmRadio,
|
|
76
|
-
flmRate,
|
|
77
|
-
flmRead,
|
|
78
|
-
flmSelect,
|
|
79
|
-
flmSlider,
|
|
80
|
-
flmSwitch,
|
|
81
|
-
flmTimePicker,
|
|
82
|
-
flmTimeSelect,
|
|
83
|
-
flmTransfer,
|
|
84
|
-
flmDialog,
|
|
85
|
-
flmForm,
|
|
86
|
-
flmTable,
|
|
87
|
-
flmToolbar,
|
|
88
|
-
flmSearch,
|
|
89
|
-
flmReportPage,
|
|
90
|
-
flmExportPage
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export default {
|
|
94
|
-
install,
|
|
95
|
-
...components
|
|
96
|
-
}
|
package/src/shims-vue.d.ts
DELETED
package/vite.config.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import vue from '@vitejs/plugin-vue'
|
|
3
|
-
import vueJsx from "@vitejs/plugin-vue-jsx"
|
|
4
|
-
|
|
5
|
-
// https://vitejs.dev/config/
|
|
6
|
-
export default defineConfig({
|
|
7
|
-
// 打包配置
|
|
8
|
-
build: {
|
|
9
|
-
lib: {
|
|
10
|
-
entry: 'src/packages/index.ts', // 设置入口文件
|
|
11
|
-
name: 'flame-plus', // 起个名字,安装、引入用
|
|
12
|
-
fileName: (format) => `flame-plus.${format}.js` // 打包后的文件名
|
|
13
|
-
},
|
|
14
|
-
cssCodeSplit: false,
|
|
15
|
-
outDir: 'flameDist',
|
|
16
|
-
sourcemap: true, // 输出.map文件
|
|
17
|
-
rollupOptions: {
|
|
18
|
-
external: ['vue'], // 确保外部化处理那些你不想打包进库的依赖
|
|
19
|
-
output: {
|
|
20
|
-
// 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
|
|
21
|
-
globals: {
|
|
22
|
-
vue: 'Vue',
|
|
23
|
-
// 'element-plus': 'element-plus'
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
plugins: [vue(), vueJsx()],
|
|
29
|
-
// css: {
|
|
30
|
-
// preprocessorOptions: {
|
|
31
|
-
// less: {
|
|
32
|
-
// javascriptEnabled: true,
|
|
33
|
-
// additionalData: '@import "./src/packages/index.less";',
|
|
34
|
-
// }
|
|
35
|
-
// }
|
|
36
|
-
// }
|
|
37
|
-
})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|