doway-coms 1.6.72 → 1.6.74

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.
Files changed (75) hide show
  1. package/.browserslistrc +2 -2
  2. package/README.md +28 -28
  3. package/dist/css/chunk-vendors.7f83d8f9.css +8 -0
  4. package/dist/css/index.86478f73.css +3 -0
  5. package/dist/favicon.ico +0 -0
  6. package/dist/js/chunk-vendors.307eaa8f.js +347 -0
  7. package/dist/js/index.48e7f7ac.js +2 -0
  8. package/package.json +53 -52
  9. package/packages/BaseButton/index.js +7 -7
  10. package/packages/BaseButton/src/index.vue +241 -241
  11. package/packages/BaseCheckbox/index.js +7 -7
  12. package/packages/BaseCheckbox/src/index.vue +134 -134
  13. package/packages/BaseDate/index.js +7 -7
  14. package/packages/BaseDate/src/index.vue +197 -197
  15. package/packages/BaseDateWeek/index.js +7 -7
  16. package/packages/BaseDateWeek/src/index.vue +163 -163
  17. package/packages/BaseDatetime/index.js +7 -7
  18. package/packages/BaseDatetime/src/index.vue +196 -196
  19. package/packages/BaseForm/index.js +7 -7
  20. package/packages/BaseForm/src/index.vue +688 -688
  21. package/packages/BaseGantt/index.js +9 -9
  22. package/packages/BaseGantt/src/index.vue +608 -608
  23. package/packages/BaseGrid/index.js +9 -9
  24. package/packages/BaseGrid/src/SeqSetting.vue +273 -0
  25. package/packages/BaseGrid/src/index.vue +3117 -2740
  26. package/packages/BaseGridAdjust/index.js +9 -9
  27. package/packages/BaseGridAdjust/src/index.vue +482 -482
  28. package/packages/BaseInput/index.js +7 -7
  29. package/packages/BaseInput/src/index.vue +164 -164
  30. package/packages/BaseIntervalInput/index.js +7 -7
  31. package/packages/BaseIntervalInput/src/index.vue +310 -310
  32. package/packages/BaseKanbanEmpty/index.js +7 -7
  33. package/packages/BaseKanbanEmpty/src/index.vue +176 -176
  34. package/packages/BaseNumberInput/index.js +7 -7
  35. package/packages/BaseNumberInput/src/index.vue +229 -229
  36. package/packages/BasePagination/index.js +7 -7
  37. package/packages/BasePagination/src/index.vue +91 -91
  38. package/packages/BasePictureCard/index.js +7 -7
  39. package/packages/BasePictureCard/src/index.vue +580 -580
  40. package/packages/BasePrintPreview/index.js +7 -7
  41. package/packages/BasePrintPreview/src/index.vue +117 -117
  42. package/packages/BasePulldown/index.js +7 -7
  43. package/packages/BasePulldown/src/index.vue +1136 -1138
  44. package/packages/BaseSearch/index.js +7 -7
  45. package/packages/BaseSearch/src/index.vue +935 -935
  46. package/packages/BaseSelect/index.js +7 -7
  47. package/packages/BaseSelect/src/index.vue +155 -155
  48. package/packages/BaseSelectMulti/index.js +7 -7
  49. package/packages/BaseSelectMulti/src/index.vue +148 -148
  50. package/packages/BaseTextArea/index.js +7 -7
  51. package/packages/BaseTextArea/src/index.vue +178 -178
  52. package/packages/BaseTime/index.js +7 -7
  53. package/packages/BaseTime/src/index.vue +166 -166
  54. package/packages/BaseTool/index.js +7 -7
  55. package/packages/BaseTool/src/index.vue +349 -349
  56. package/packages/BaseToolStatus/index.js +7 -7
  57. package/packages/BaseToolStatus/src/index.vue +388 -388
  58. package/packages/LeaveAMessage/index.js +7 -7
  59. package/packages/LeaveAMessage/src/index.vue +574 -574
  60. package/packages/index.js +167 -167
  61. package/packages/styles/default.less +80 -80
  62. package/packages/styles/icon/drag.svg +1 -0
  63. package/packages/styles/icon/seqConfig.svg +1 -0
  64. package/packages/utils/api.js +88 -88
  65. package/packages/utils/auth.js +38 -38
  66. package/packages/utils/common.js +595 -595
  67. package/packages/utils/dom.js +181 -181
  68. package/packages/utils/enum.js +84 -84
  69. package/packages/utils/filters.js +458 -458
  70. package/packages/utils/gridFormat.js +60 -60
  71. package/packages/utils/msg.js +16 -16
  72. package/packages/utils/patchFiles.js +44 -44
  73. package/packages/utils/request.js +169 -169
  74. package/packages/utils/store.js +261 -261
  75. package/vue.config.js +59 -59
@@ -1,262 +1,262 @@
1
-
2
- import {loadViewInfo} from './api'
3
- import XEUtils from 'xe-utils'
4
- import Vue from 'vue'
5
- import Vuex from 'vuex'
6
- import {stringUrlQuery} from './common'
7
- import { controlType } from './enum'
8
- Vue.use(Vuex)
9
-
10
- export default new Vuex.Store({
11
- state: {
12
- umsUrl:'',
13
- msgUrl:'',
14
- wmsUrl:'',
15
- identityUrl:'',
16
- token: '',
17
- industryVersion:'',//行业版本
18
- custPriceNotTaxPrecision:0,
19
- custPricePrecision:0,
20
- supplyPriceNotTaxPrecision:0,
21
- supplyPricePrecision:0,
22
- isGenerateMatCode:'false',//是否生成物料编码
23
- webAppCode: '',
24
- moduleViewInfo: {},
25
- controlSize: 'small',
26
- newId: 0,//明细新增id
27
- userId: '',
28
- userName: '',
29
- staffId: '',
30
- },
31
- mutations: {
32
- SET_TOKEN: (state, token) => {
33
- state.token = token
34
- },
35
- SET_USERID: (state, userId) => {
36
- state.userId = userId
37
- },
38
- SET_USERNAME: (state, userName) => {
39
- state.userName = userName
40
- },
41
- SET_STAFFID: (state, staffId) => {
42
- state.staffId = staffId
43
- },
44
- SET_INDUSTRY_VERSION:(state,industryVersion)=>{
45
- state.industryVersion = industryVersion
46
- },
47
- SET_IS_GENERATE_MAT_CODE:(state,isGenerateMatCode)=>{
48
- state.isGenerateMatCode = isGenerateMatCode
49
- },
50
- SET_WEB_APP_CODE: (state, webAppCode) => {
51
- state.webAppCode = webAppCode
52
- },
53
- SET_MODULE_VIEW_INFO: (state, data) => {
54
- let tempDataInfo = {}
55
- XEUtils.arrayEach(data.info.datas,loopData=>{
56
- let tempFields = []
57
- let tempPagerButtons = []
58
- tempDataInfo[loopData.code] = {code:'',name:'',fields:[]}
59
- tempDataInfo[loopData.code].code = loopData.code
60
- tempDataInfo[loopData.code].name = loopData.name
61
- let operationFields = []
62
- XEUtils.arrayEach(loopData.fields,loopField=>{
63
- let tempField = {
64
- field: loopField.boundField,
65
- title: loopField.name,
66
- width: loopField.width,
67
- visible: !loopField.hidden,
68
- filters: loopField.isFilter,
69
- sortable: loopField.isSortable,
70
- controlType: loopField.controlType,
71
- edit:loopField.edit,
72
- sysVisible:!loopField.sysHidden
73
- }
74
- if(tempField.sysVisible===false){
75
- tempField.visible = false
76
- }
77
- //页面状态控制
78
- if(loopField.editStates){
79
- tempField['editStates'] = loopField.editStates.split(',')
80
- }
81
- //单据状态控制
82
- if(loopField.editStatuss){
83
- tempField['editStatuss'] = loopField.editStatuss.split(',')
84
- }
85
- let extraInfo = loopField.extraInfo
86
- ? JSON.parse(loopField.extraInfo)
87
- : {}
88
- let userExtraInfo = loopField.userExtraInfo
89
- ? JSON.parse(loopField.userExtraInfo)
90
- : {}
91
- extraInfo = {...extraInfo, ...userExtraInfo}
92
- //存在额外参数,就赋值
93
- if (Object.keys(extraInfo).length) {
94
- if (Object.hasOwn(extraInfo,'api')){
95
- extraInfo['api'] = state[extraInfo['url']] + extraInfo['api']
96
- }
97
- tempField = XEUtils.assign(extraInfo, tempField)
98
- }
99
- if (tempField.controlType === controlType.select) {
100
- tempField['dataSource'] = XEUtils.filter(
101
- data.info.dictItems,
102
- p => p.dictCode === extraInfo.dataSource
103
- )
104
- }
105
-
106
- if(tempField.controlType === controlType.pager_button){
107
- tempPagerButtons.push(tempField)
108
- }else if(tempField.controlType===controlType.operation){
109
- //操作按钮列
110
- operationFields.push(tempField)
111
-
112
- }
113
- else{
114
- tempFields.push(tempField)
115
- }
116
- })
117
-
118
- tempDataInfo[loopData.code]['pagerButtons'] = tempPagerButtons
119
- if(operationFields.length>0){
120
- //添加右侧按钮操作列
121
- tempFields.push({
122
- field: controlType.operation,
123
- title: '操作',
124
- width: operationFields[0].width || 100,
125
- fixed: 'right',
126
- showOverflow: true,
127
- controlType: controlType.operation,
128
- params:{
129
- columns:operationFields
130
- }
131
- })
132
- }
133
- tempDataInfo[loopData.code]['fields'] = tempFields
134
-
135
- })
136
- data.info['dataInfo'] = tempDataInfo
137
- state.moduleViewInfo[data.moduleCode] = data.info
138
- },
139
- SET_NEW_ID: (state, id) => {
140
- state.newId = id
141
- },
142
- SET_UMS_URL:(state,url) => {
143
- state.umsUrl = url
144
- },
145
- SET_WMS_URL:(state,url) => {
146
- state.wmsUrl = url
147
- },
148
- SET_CUST_PRICE_NOT_TAX_PRECISION:(state,custPriceNotTaxPrecision)=>{
149
- state.custPriceNotTaxPrecision = custPriceNotTaxPrecision
150
- },
151
- SET_CUST_PRICE_PRECISION:(state,custPricePrecision)=>{
152
- state.custPricePrecision = custPricePrecision
153
- },
154
- SET_SUPPLY_PRICE_NOT_TAX_PRECISION:(state,supplyPriceNotTaxPrecision)=>{
155
- state.supplyPriceNotTaxPrecision = supplyPriceNotTaxPrecision
156
- },
157
- SET_SUPPLY_PRICE_PRECISION:(state,supplyPricePrecision)=>{
158
- state.supplyPricePrecision = supplyPricePrecision
159
- },
160
- SET_MSG_URL:(state,url) => {
161
- state.msgUrl = url
162
- },
163
- SET_IDENTITY_URL:(state,url) => {
164
- state.identityUrl = url
165
- },
166
- },
167
- actions: {
168
- /**
169
- * 系统登出
170
- * @param {} param0
171
- */
172
- logOut({commit}){
173
- // alert('会话过期3');
174
- if(window.$wujie){
175
- // alert('会话过期4');
176
- //通知主应用会员过期重新登陆
177
- window.$wujie.bus.$emit(
178
- 'subAppLoginOut',window.$wujie.props.webAppCode
179
- )
180
- }
181
- },
182
- setTabTitle({ commit }, tabInfo) {
183
- if (tabInfo.replaceQuery) {
184
- let newRoutePath =
185
- tabInfo.path + '?' + stringUrlQuery(tabInfo.replaceQuery)
186
- history.replaceState(null,null,(window.$wujie.props.webAppActiveRule + newRoutePath))
187
- }
188
- //通知父应用修改Tab标签文字描述
189
- if(window.$wujie){
190
- window.$wujie.bus.$emit('subAppSetTabTitle', {
191
- title: tabInfo.title,
192
- name: tabInfo.name,
193
- query: tabInfo.query,
194
- replaceQuery: tabInfo.replaceQuery,
195
- path: tabInfo.path
196
- })
197
- }
198
- },
199
- closeTab({ commit }, fullPath) {
200
- if(window.$wujie){
201
- window.$wujie.bus.$emit(
202
- 'subAppCloseTab',
203
- window.$wujie.props.webAppActiveRule + fullPath
204
- )
205
- }
206
- },
207
- moduleLoadViewInfo({ commit, state }, dataInfo) {
208
- let vm = this
209
- return new Promise((resolve, reject) => {
210
- loadViewInfo(dataInfo.moduleCode)
211
- .then(reponseData => {
212
- commit('SET_MODULE_VIEW_INFO', {
213
- moduleCode: dataInfo.moduleCode,
214
- info: reponseData.content
215
- })
216
- resolve()
217
- })
218
- .catch(error => {
219
- reject(error)
220
- })
221
- })
222
- },
223
- // 固定返回工作台,并根据条件决定是否关闭其余标签
224
- goWorkbench({ commit }, tabsAllClose) {
225
- if(window.$wujie){
226
- window.$wujie.bus.$emit('subAppGoWorkbench', tabsAllClose==false?false:true)
227
- }
228
- },
229
- // 替换页面
230
- replaceTab({ commit }, fullPath) {
231
- if(window.$wujie){
232
- window.$wujie.bus.$emit(
233
- 'subAppReplaceTab',
234
- window.$wujie.props.webAppActiveRule + fullPath
235
- )
236
- }
237
- },
238
- },
239
- modules:{},
240
- getters: {
241
- custPriceNotTaxPrecision:state=>state.custPriceNotTaxPrecision,
242
- custPricePrecision:state=>state.custPricePrecision,
243
- supplyPriceNotTaxPrecision:state=>state.supplyPriceNotTaxPrecision,
244
- supplyPricePrecision:state=>state.supplyPricePrecision,
245
- industryVersion:state=>state.industryVersion,
246
- isGenerateMatCode:state=>state.isGenerateMatCode,
247
- umsUrl:state=>state.umsUrl,
248
- msgUrl:state=>state.msgUrl,
249
- identityUrl:state=>state.identityUrl,
250
- token: state => state.token,
251
- webAppCode: state => state.webAppCode,
252
- moduleViewInfo: state => state.moduleViewInfo,
253
- controlSize: state => state.controlSize,
254
- newId: state => () => {
255
- state.newId = state.newId + 1
256
- return state.newId
257
- },
258
- userId: state => state.userId,
259
- userName: state => state.userName,
260
- staffId: state => state.staffId,
261
- }
1
+
2
+ import {loadViewInfo} from './api'
3
+ import XEUtils from 'xe-utils'
4
+ import Vue from 'vue'
5
+ import Vuex from 'vuex'
6
+ import {stringUrlQuery} from './common'
7
+ import { controlType } from './enum'
8
+ Vue.use(Vuex)
9
+
10
+ export default new Vuex.Store({
11
+ state: {
12
+ umsUrl:'',
13
+ msgUrl:'',
14
+ wmsUrl:'',
15
+ identityUrl:'',
16
+ token: '',
17
+ industryVersion:'',//行业版本
18
+ custPriceNotTaxPrecision:0,
19
+ custPricePrecision:0,
20
+ supplyPriceNotTaxPrecision:0,
21
+ supplyPricePrecision:0,
22
+ isGenerateMatCode:'false',//是否生成物料编码
23
+ webAppCode: '',
24
+ moduleViewInfo: {},
25
+ controlSize: 'small',
26
+ newId: 0,//明细新增id
27
+ userId: '',
28
+ userName: '',
29
+ staffId: '',
30
+ },
31
+ mutations: {
32
+ SET_TOKEN: (state, token) => {
33
+ state.token = token
34
+ },
35
+ SET_USERID: (state, userId) => {
36
+ state.userId = userId
37
+ },
38
+ SET_USERNAME: (state, userName) => {
39
+ state.userName = userName
40
+ },
41
+ SET_STAFFID: (state, staffId) => {
42
+ state.staffId = staffId
43
+ },
44
+ SET_INDUSTRY_VERSION:(state,industryVersion)=>{
45
+ state.industryVersion = industryVersion
46
+ },
47
+ SET_IS_GENERATE_MAT_CODE:(state,isGenerateMatCode)=>{
48
+ state.isGenerateMatCode = isGenerateMatCode
49
+ },
50
+ SET_WEB_APP_CODE: (state, webAppCode) => {
51
+ state.webAppCode = webAppCode
52
+ },
53
+ SET_MODULE_VIEW_INFO: (state, data) => {
54
+ let tempDataInfo = {}
55
+ XEUtils.arrayEach(data.info.datas,loopData=>{
56
+ let tempFields = []
57
+ let tempPagerButtons = []
58
+ tempDataInfo[loopData.code] = {code:'',name:'',fields:[]}
59
+ tempDataInfo[loopData.code].code = loopData.code
60
+ tempDataInfo[loopData.code].name = loopData.name
61
+ let operationFields = []
62
+ XEUtils.arrayEach(loopData.fields,loopField=>{
63
+ let tempField = {
64
+ field: loopField.boundField,
65
+ title: loopField.name,
66
+ width: loopField.width,
67
+ visible: !loopField.hidden,
68
+ filters: loopField.isFilter,
69
+ sortable: loopField.isSortable,
70
+ controlType: loopField.controlType,
71
+ edit:loopField.edit,
72
+ sysVisible:!loopField.sysHidden
73
+ }
74
+ if(tempField.sysVisible===false){
75
+ tempField.visible = false
76
+ }
77
+ //页面状态控制
78
+ if(loopField.editStates){
79
+ tempField['editStates'] = loopField.editStates.split(',')
80
+ }
81
+ //单据状态控制
82
+ if(loopField.editStatuss){
83
+ tempField['editStatuss'] = loopField.editStatuss.split(',')
84
+ }
85
+ let extraInfo = loopField.extraInfo
86
+ ? JSON.parse(loopField.extraInfo)
87
+ : {}
88
+ let userExtraInfo = loopField.userExtraInfo
89
+ ? JSON.parse(loopField.userExtraInfo)
90
+ : {}
91
+ extraInfo = {...extraInfo, ...userExtraInfo}
92
+ //存在额外参数,就赋值
93
+ if (Object.keys(extraInfo).length) {
94
+ if (Object.hasOwn(extraInfo,'api')){
95
+ extraInfo['api'] = state[extraInfo['url']] + extraInfo['api']
96
+ }
97
+ tempField = XEUtils.assign(extraInfo, tempField)
98
+ }
99
+ if (tempField.controlType === controlType.select) {
100
+ tempField['dataSource'] = XEUtils.filter(
101
+ data.info.dictItems,
102
+ p => p.dictCode === extraInfo.dataSource
103
+ )
104
+ }
105
+
106
+ if(tempField.controlType === controlType.pager_button){
107
+ tempPagerButtons.push(tempField)
108
+ }else if(tempField.controlType===controlType.operation){
109
+ //操作按钮列
110
+ operationFields.push(tempField)
111
+
112
+ }
113
+ else{
114
+ tempFields.push(tempField)
115
+ }
116
+ })
117
+
118
+ tempDataInfo[loopData.code]['pagerButtons'] = tempPagerButtons
119
+ if(operationFields.length>0){
120
+ //添加右侧按钮操作列
121
+ tempFields.push({
122
+ field: controlType.operation,
123
+ title: '操作',
124
+ width: operationFields[0].width || 100,
125
+ fixed: 'right',
126
+ showOverflow: true,
127
+ controlType: controlType.operation,
128
+ params:{
129
+ columns:operationFields
130
+ }
131
+ })
132
+ }
133
+ tempDataInfo[loopData.code]['fields'] = tempFields
134
+
135
+ })
136
+ data.info['dataInfo'] = tempDataInfo
137
+ state.moduleViewInfo[data.moduleCode] = data.info
138
+ },
139
+ SET_NEW_ID: (state, id) => {
140
+ state.newId = id
141
+ },
142
+ SET_UMS_URL:(state,url) => {
143
+ state.umsUrl = url
144
+ },
145
+ SET_WMS_URL:(state,url) => {
146
+ state.wmsUrl = url
147
+ },
148
+ SET_CUST_PRICE_NOT_TAX_PRECISION:(state,custPriceNotTaxPrecision)=>{
149
+ state.custPriceNotTaxPrecision = custPriceNotTaxPrecision
150
+ },
151
+ SET_CUST_PRICE_PRECISION:(state,custPricePrecision)=>{
152
+ state.custPricePrecision = custPricePrecision
153
+ },
154
+ SET_SUPPLY_PRICE_NOT_TAX_PRECISION:(state,supplyPriceNotTaxPrecision)=>{
155
+ state.supplyPriceNotTaxPrecision = supplyPriceNotTaxPrecision
156
+ },
157
+ SET_SUPPLY_PRICE_PRECISION:(state,supplyPricePrecision)=>{
158
+ state.supplyPricePrecision = supplyPricePrecision
159
+ },
160
+ SET_MSG_URL:(state,url) => {
161
+ state.msgUrl = url
162
+ },
163
+ SET_IDENTITY_URL:(state,url) => {
164
+ state.identityUrl = url
165
+ },
166
+ },
167
+ actions: {
168
+ /**
169
+ * 系统登出
170
+ * @param {} param0
171
+ */
172
+ logOut({commit}){
173
+ // alert('会话过期3');
174
+ if(window.$wujie){
175
+ // alert('会话过期4');
176
+ //通知主应用会员过期重新登陆
177
+ window.$wujie.bus.$emit(
178
+ 'subAppLoginOut',window.$wujie.props.webAppCode
179
+ )
180
+ }
181
+ },
182
+ setTabTitle({ commit }, tabInfo) {
183
+ if (tabInfo.replaceQuery) {
184
+ let newRoutePath =
185
+ tabInfo.path + '?' + stringUrlQuery(tabInfo.replaceQuery)
186
+ history.replaceState(null,null,(window.$wujie.props.webAppActiveRule + newRoutePath))
187
+ }
188
+ //通知父应用修改Tab标签文字描述
189
+ if(window.$wujie){
190
+ window.$wujie.bus.$emit('subAppSetTabTitle', {
191
+ title: tabInfo.title,
192
+ name: tabInfo.name,
193
+ query: tabInfo.query,
194
+ replaceQuery: tabInfo.replaceQuery,
195
+ path: tabInfo.path
196
+ })
197
+ }
198
+ },
199
+ closeTab({ commit }, fullPath) {
200
+ if(window.$wujie){
201
+ window.$wujie.bus.$emit(
202
+ 'subAppCloseTab',
203
+ window.$wujie.props.webAppActiveRule + fullPath
204
+ )
205
+ }
206
+ },
207
+ moduleLoadViewInfo({ commit, state }, dataInfo) {
208
+ let vm = this
209
+ return new Promise((resolve, reject) => {
210
+ loadViewInfo(dataInfo.moduleCode)
211
+ .then(reponseData => {
212
+ commit('SET_MODULE_VIEW_INFO', {
213
+ moduleCode: dataInfo.moduleCode,
214
+ info: reponseData.content
215
+ })
216
+ resolve()
217
+ })
218
+ .catch(error => {
219
+ reject(error)
220
+ })
221
+ })
222
+ },
223
+ // 固定返回工作台,并根据条件决定是否关闭其余标签
224
+ goWorkbench({ commit }, tabsAllClose) {
225
+ if(window.$wujie){
226
+ window.$wujie.bus.$emit('subAppGoWorkbench', tabsAllClose==false?false:true)
227
+ }
228
+ },
229
+ // 替换页面
230
+ replaceTab({ commit }, fullPath) {
231
+ if(window.$wujie){
232
+ window.$wujie.bus.$emit(
233
+ 'subAppReplaceTab',
234
+ window.$wujie.props.webAppActiveRule + fullPath
235
+ )
236
+ }
237
+ },
238
+ },
239
+ modules:{},
240
+ getters: {
241
+ custPriceNotTaxPrecision:state=>state.custPriceNotTaxPrecision,
242
+ custPricePrecision:state=>state.custPricePrecision,
243
+ supplyPriceNotTaxPrecision:state=>state.supplyPriceNotTaxPrecision,
244
+ supplyPricePrecision:state=>state.supplyPricePrecision,
245
+ industryVersion:state=>state.industryVersion,
246
+ isGenerateMatCode:state=>state.isGenerateMatCode,
247
+ umsUrl:state=>state.umsUrl,
248
+ msgUrl:state=>state.msgUrl,
249
+ identityUrl:state=>state.identityUrl,
250
+ token: state => state.token,
251
+ webAppCode: state => state.webAppCode,
252
+ moduleViewInfo: state => state.moduleViewInfo,
253
+ controlSize: state => state.controlSize,
254
+ newId: state => () => {
255
+ state.newId = state.newId + 1
256
+ return state.newId
257
+ },
258
+ userId: state => state.userId,
259
+ userName: state => state.userName,
260
+ staffId: state => state.staffId,
261
+ }
262
262
  })
package/vue.config.js CHANGED
@@ -1,60 +1,60 @@
1
- // vue.config.js 文件
2
- // const ExtractTextPlugin = require('extract-text-webpack-plugin')
3
- const path = require('path')
4
- function resolve(dir) {
5
- return path.join(__dirname, dir)
6
- }
7
- module.exports = {
8
- pages: {
9
- index: {
10
- entry: "examples/main.js",
11
- template: "public/index.html",
12
- filename: "index.html"
13
- }
14
- },
15
- // configureWebpack: () => {
16
- // new ExtractTextPlugin('libs/test.css')
17
- // },
18
- // css: {
19
- // extract: true, // 是否使用css分离插件 ExtractTextPlugin
20
- // sourceMap: false, // 开启 CSS source maps?
21
- // // loaderOptions: {
22
- // // less: {
23
- // // javascriptEnabled: true //less 配置
24
- // // }
25
- // // }, // css预设器配置项
26
- // modules: false // 启用 CSS modules for all css / pre-processor files.
27
- // },
28
- // 扩展 webpack 配置,使 packages 加入编译
29
- /* chainWebpack 是一个函数,会接收一个基于 webpack-chain 的 ChainableConfig 实例。容许对内部的 webpack 配置进行更细粒度的修改。 */
30
- chainWebpack: config => {
31
- config.plugins.delete('preload') // TODO: need test
32
- config.plugins.delete('prefetch') // TODO: need test
33
- config.resolve.alias.set('../../tools/dom', resolve('packages/utils/dom.js'))
34
- // config.module.rule('/\.less$/').use(ExtractTextPlugin.extract({
35
- // fallback:'vue-style-loader',
36
- // use:['css-loader',
37
- // 'less-loader']
38
- // })).loader('less-loader','css-loader')
39
-
40
-
41
-
42
- config.module
43
- .rule('js')
44
- .include
45
- .add(__dirname + 'packages') // 注意这里须要绝对路径,全部要拼接__dirname
46
- .end()
47
- .use('babel')
48
- .loader('babel-loader')
49
- .tap(options => {
50
- // 修改它的选项...
51
- return options
52
- })
53
-
54
-
55
- }
56
- }
57
-
58
-
59
-
1
+ // vue.config.js 文件
2
+ // const ExtractTextPlugin = require('extract-text-webpack-plugin')
3
+ const path = require('path')
4
+ function resolve(dir) {
5
+ return path.join(__dirname, dir)
6
+ }
7
+ module.exports = {
8
+ pages: {
9
+ index: {
10
+ entry: "examples/main.js",
11
+ template: "public/index.html",
12
+ filename: "index.html"
13
+ }
14
+ },
15
+ // configureWebpack: () => {
16
+ // new ExtractTextPlugin('libs/test.css')
17
+ // },
18
+ // css: {
19
+ // extract: true, // 是否使用css分离插件 ExtractTextPlugin
20
+ // sourceMap: false, // 开启 CSS source maps?
21
+ // // loaderOptions: {
22
+ // // less: {
23
+ // // javascriptEnabled: true //less 配置
24
+ // // }
25
+ // // }, // css预设器配置项
26
+ // modules: false // 启用 CSS modules for all css / pre-processor files.
27
+ // },
28
+ // 扩展 webpack 配置,使 packages 加入编译
29
+ /* chainWebpack 是一个函数,会接收一个基于 webpack-chain 的 ChainableConfig 实例。容许对内部的 webpack 配置进行更细粒度的修改。 */
30
+ chainWebpack: config => {
31
+ config.plugins.delete('preload') // TODO: need test
32
+ config.plugins.delete('prefetch') // TODO: need test
33
+ config.resolve.alias.set('../../tools/dom', resolve('packages/utils/dom.js'))
34
+ // config.module.rule('/\.less$/').use(ExtractTextPlugin.extract({
35
+ // fallback:'vue-style-loader',
36
+ // use:['css-loader',
37
+ // 'less-loader']
38
+ // })).loader('less-loader','css-loader')
39
+
40
+
41
+
42
+ config.module
43
+ .rule('js')
44
+ .include
45
+ .add(__dirname + 'packages') // 注意这里须要绝对路径,全部要拼接__dirname
46
+ .end()
47
+ .use('babel')
48
+ .loader('babel-loader')
49
+ .tap(options => {
50
+ // 修改它的选项...
51
+ return options
52
+ })
53
+
54
+
55
+ }
56
+ }
57
+
58
+
59
+
60
60