sag-vxe-pc 1.0.0 → 1.0.1
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/README.md +57 -25
- package/dist/sag-vxe-pc.es.js +10258 -9985
- package/dist/sag-vxe-pc.umd.js +75 -74
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,41 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { App } from 'vue'
|
|
2
|
+
import { SagVxeConfig, SagVxePage } from 'sag-vxe-pc'
|
|
3
|
+
import 'sag-vxe-pc/dist/style.css'
|
|
4
|
+
1.配置
|
|
5
|
+
SagVxeConfig.setupConfig({
|
|
6
|
+
application: 'xxx', //应用名称-缓存使用(如果不设可能会引起同一个项目下不同子应用的缓存命名冲突)
|
|
7
|
+
size: 'small', //全局尺寸 medium small mini
|
|
8
|
+
messageResp: true, //按钮请求是否弹框提示消息
|
|
9
|
+
buttonKeyName: '_X_BUTTON_INFO', //弹出vue页面带入给子页面的按钮信息key名
|
|
10
|
+
ctxPath: 'xxx', //根路径(请求服务器的路径如果不以斜杠开头都将自动添加该前缀)
|
|
11
|
+
requestDictUrl: 'xxx', //下拉框请求服务路径
|
|
12
|
+
dynamicViewsModules: import.meta.glob('../xxx/xxx/**/*.vue'), //动态组件
|
|
13
|
+
requestPlugin: axios.post<any, any>(requestUrl, params), //统一请求后台服务器方法
|
|
14
14
|
templateForm: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
vxeSlot: false, //true为vxe-table控件 false为antd控件
|
|
16
|
+
formProps: {
|
|
17
|
+
vertical: false, //是否使用垂直布局
|
|
18
|
+
titleColon: true, //自动设置冒号
|
|
19
|
+
titleWidth: 110, //标题宽度
|
|
20
|
+
titleAlign: 'right', //标题位置
|
|
21
|
+
buttonAlign: 'right', //按钮位置
|
|
22
|
+
foldingLength: 8, //默认展开数量
|
|
23
|
+
},
|
|
19
24
|
},
|
|
20
25
|
templateTable: {
|
|
21
|
-
|
|
26
|
+
minHeight: 200,
|
|
27
|
+
maxHeight: 1000,
|
|
28
|
+
showOverflow: true, // ellipsis(只显示省略号),title(显示为原生 title),tooltip或true(显示为 tooltip 提示), false则换行显示
|
|
29
|
+
showButtonLink: true, //表格按钮列是否以超链接显示
|
|
30
|
+
toolbarConfig: {
|
|
31
|
+
className: 'vxe-table--toolbar',
|
|
32
|
+
perfect: true,
|
|
33
|
+
print: false, // 显示打印按钮
|
|
34
|
+
refresh: false, // 显示刷新按钮
|
|
35
|
+
zoom: false, // 显示全屏按钮
|
|
36
|
+
},
|
|
37
|
+
tableColumnMerge: {
|
|
38
|
+
backgroundColor: '#99d9f5 !important', //合并行单元格底色
|
|
39
|
+
},
|
|
40
|
+
ignoreExportColumnsTitle: ['', '序号', '操作', '处理'], //导出忽略列
|
|
41
|
+
},
|
|
42
|
+
targetModal: {
|
|
43
|
+
title: '业务处理', //弹窗默认标题
|
|
44
|
+
width: '85%', //弹窗默认高度
|
|
45
|
+
height: '80vh', //弹窗默认宽度
|
|
46
|
+
mountainTop: true, //弹窗是否默认挂载到body上
|
|
47
|
+
componentType: 'iframe', //弹窗默认类型,不设置则为vue
|
|
48
|
+
maskClosable: true,
|
|
22
49
|
},
|
|
23
50
|
})
|
|
24
51
|
|
|
25
|
-
|
|
52
|
+
const setupVxeTable = (app: App) => {
|
|
53
|
+
app.use(SagVxePage)
|
|
54
|
+
}
|
|
55
|
+
export default setupVxeTable
|
|
56
|
+
|
|
57
|
+
2.webpack 设置
|
|
26
58
|
module.exports = {
|
|
27
|
-
transpileDependencies: ['sag-vxe-
|
|
59
|
+
transpileDependencies: ['sag-vxe-pc'],
|
|
28
60
|
}
|
|
29
61
|
|
|
30
|
-
|
|
62
|
+
3.babel 设置
|
|
31
63
|
module.exports = {
|
|
32
|
-
compact: false, //解除组件引用 js 文件大
|
|
64
|
+
compact: false, //解除组件引用 js 文件大
|
|
33
65
|
};
|
|
34
66
|
|
|
35
|
-
|
|
67
|
+
4.样式
|
|
36
68
|
当弹出框挂载不在body下
|
|
37
|
-
|
|
38
|
-
|
|
69
|
+
4.1 需要在挂载处设置样式名h-con-iframe(样式内容可为空)
|
|
70
|
+
4.2 声明挂载处
|
|
39
71
|
// 获取弹窗挂载的内部容器点
|
|
40
72
|
provide('dialogContainer', () => {
|
|
41
73
|
return document.getElementById(unref(computed(() => 'xxx')));
|