sh-view 1.6.9 → 1.7.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/package.json
CHANGED
|
@@ -48,8 +48,9 @@ const components = {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
const index = {
|
|
51
|
-
install: function (Vue) {
|
|
52
|
-
Object.keys(components).
|
|
51
|
+
install: function (Vue, { excludeComponents = [] }) {
|
|
52
|
+
let globalComponentKeys = Object.keys(components).filter(key => !excludeComponents.includes(key))
|
|
53
|
+
globalComponentKeys.forEach(key => {
|
|
53
54
|
Vue.component(key, components[key])
|
|
54
55
|
})
|
|
55
56
|
}
|
package/packages/index.js
CHANGED
|
@@ -9,15 +9,15 @@ import mixin from './mixin/index'
|
|
|
9
9
|
import './css/index'
|
|
10
10
|
|
|
11
11
|
// 全局公共封装组件
|
|
12
|
-
const install = function (root) {
|
|
12
|
+
const install = function (root, option = {}) {
|
|
13
13
|
if (install.installed) return
|
|
14
14
|
root.config.globalProperties.$vUtils = utils
|
|
15
15
|
root.mixin(mixin)
|
|
16
|
-
root.use(VueMasonryPlugin)
|
|
16
|
+
root.use(VueMasonryPlugin, option)
|
|
17
17
|
root.use(directive)
|
|
18
|
-
root.use(iview)
|
|
19
|
-
root.use(vxeTable)
|
|
20
|
-
root.use(globalComponents)
|
|
18
|
+
root.use(iview, option)
|
|
19
|
+
root.use(vxeTable, option)
|
|
20
|
+
root.use(globalComponents, option)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const ShUI = {
|
package/packages/iview/index.js
CHANGED
|
@@ -8,7 +8,7 @@ ViewUI.Message.config({
|
|
|
8
8
|
})
|
|
9
9
|
|
|
10
10
|
const index = {
|
|
11
|
-
install: function (Vue) {
|
|
11
|
+
install: function (Vue, { viewOption = {} }) {
|
|
12
12
|
let ViewUiOption = {
|
|
13
13
|
transfer: true,
|
|
14
14
|
capture: false,
|
|
@@ -17,7 +17,8 @@ const index = {
|
|
|
17
17
|
arrowSize: 20
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
let setupOption = Object.assign(ViewUiOption, viewOption)
|
|
21
|
+
Vue.use(ViewUI, setupOption)
|
|
21
22
|
Vue.config.globalProperties.$ViewUI = ViewUI
|
|
22
23
|
}
|
|
23
24
|
}
|
|
@@ -154,23 +154,27 @@ let vxeOptions = {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
VXETable.renderer.mixin(defaultExtraRenders)
|
|
159
|
-
VXETable.renderer.mixin(defaultFilterRenders)
|
|
160
|
-
VXETable.setup(vxeOptions)
|
|
161
|
-
VXETablePluginExportPDF.setup({
|
|
157
|
+
let vxePdfOptions = {
|
|
162
158
|
// 设置全局默认字体
|
|
163
159
|
fontName: 'SourceHanSans-Normal',
|
|
164
160
|
beforeMethod: ({ $pdf, options, columns, datas }) => {}
|
|
165
|
-
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
VXETable.renderer.mixin(defaultPublicRenders)
|
|
164
|
+
VXETable.renderer.mixin(defaultExtraRenders)
|
|
165
|
+
VXETable.renderer.mixin(defaultFilterRenders)
|
|
166
166
|
VXETable.use(VXETablePluginExportXLSX)
|
|
167
167
|
VXETable.use(VXETablePluginExportPDF)
|
|
168
168
|
|
|
169
169
|
const index = {
|
|
170
|
-
install: function (Vue) {
|
|
170
|
+
install: function (Vue, { vxeOption = {}, vxePdfOption = {} }) {
|
|
171
|
+
let setupOption = Object.assign(vxeOptions, vxeOption)
|
|
172
|
+
let pdfSetUpOption = Object.assign(vxePdfOptions, vxePdfOption)
|
|
173
|
+
VXETable.setup(setupOption)
|
|
174
|
+
VXETablePluginExportPDF.setup(pdfSetUpOption)
|
|
171
175
|
Vue.use(VXETable)
|
|
172
176
|
Vue.config.globalProperties.$vTable = VXETable
|
|
173
|
-
Vue.config.globalProperties.$vTableSetup =
|
|
177
|
+
Vue.config.globalProperties.$vTableSetup = setupOption
|
|
174
178
|
Vue.config.globalProperties.$vxePluginNames = defaultPublicRendersNames
|
|
175
179
|
Vue.config.globalProperties.$vClipboard = XEClipboard
|
|
176
180
|
}
|