imatrix-ui 2.8.97-dw-tmp3 → 2.8.97-dw-tmp4

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
@@ -1,20 +1,25 @@
1
1
  {
2
2
  "name": "imatrix-ui",
3
- "version": "2.8.97-dw-tmp3",
3
+ "version": "2.8.97-dw-tmp4",
4
4
  "description": "前端组件库:表格、表单、组织结构树等",
5
5
  "main": "lib/super-ui.umd.min.js",
6
6
  "private": false,
7
7
  "scripts": {
8
8
  "serve": "vue-cli-service serve",
9
9
  "build": "vue-cli-service build",
10
- "lib": "vue-cli-service build --modern --target lib --name super-ui --dest lib packages/index.js --report",
10
+ "lib": "vue-cli-service build --modern --target lib --name super-ui --dest lib packages/index.js",
11
11
  "lint": "vue-cli-service lint",
12
12
  "test:e2e": "vue-cli-service test:e2e",
13
13
  "test:unit": "vue-cli-service test:unit"
14
14
  },
15
- "dependencies": {},
16
- "devDependencies": {
15
+ "dependencies": {
17
16
  "@tinymce/tinymce-vue": "^3.2.4",
17
+ "@zxing/library": "^0.19.1",
18
+ "js-cookie": "^2.2.0",
19
+ "sortablejs": "1.10.2",
20
+ "tinymce": "^5.6.1"
21
+ },
22
+ "devDependencies": {
18
23
  "@vue/cli-plugin-babel": "3.8.0",
19
24
  "@vue/cli-plugin-e2e-cypress": "3.8.0",
20
25
  "@vue/cli-plugin-eslint": "3.8.0",
@@ -22,7 +27,6 @@
22
27
  "@vue/cli-service": "3.8.0",
23
28
  "@vue/eslint-config-standard": "^4.0.0",
24
29
  "@vue/test-utils": "^1.0.0-beta.29",
25
- "@zxing/library": "^0.19.1",
26
30
  "axios": "0.19.0",
27
31
  "babel-cli": "^6.26.0",
28
32
  "babel-eslint": "^10.0.1",
@@ -30,14 +34,10 @@
30
34
  "element-ui": "2.15.3",
31
35
  "eslint": "5.16.0",
32
36
  "eslint-plugin-vue": "5.2.2",
33
- "js-cookie": "^2.2.0",
34
37
  "node-sass": "4.12.0",
35
38
  "nprogress": "^0.2.0",
36
39
  "sass-loader": "^7.1.0",
37
40
  "sessionstorage": "^0.1.0",
38
- "sortablejs": "1.10.2",
39
- "tinymce": "^5.6.1",
40
- "uglifyjs-webpack-plugin": "^2.2.0",
41
41
  "vue": "^2.6.10",
42
42
  "vue-cli-plugin-element": "^1.0.1",
43
43
  "vue-i18n": "^8.17.4",
package/src/i18n/i18n.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import Vue from 'vue'
2
- import locale from '@gcommon/gcommon-ui/lib/locale'
2
+ import locale from 'element-ui/lib/locale'
3
3
  import VueI18n from 'vue-i18n'
4
4
  import en from './langs/en'
5
5
  import cn from './langs/cn'
@@ -1,4 +1,4 @@
1
- import zhLocale from '@gcommon/gcommon-ui/lib/locale/lang/zh-CN'
1
+ import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
2
2
  const cn = {
3
3
  imatrixUIPublicModel: {
4
4
  sure: '确定',
@@ -1,4 +1,4 @@
1
- import enLocale from '@gcommon/gcommon-ui/lib/locale/lang/en'
1
+ import enLocale from 'element-ui/lib/locale/lang/en'
2
2
  const en = {
3
3
  imatrixUIPublicModel: {
4
4
  sure: 'Sure',
package/src/permission.js CHANGED
@@ -4,7 +4,7 @@ import { getToken, setToken } from './utils/auth' // 验权
4
4
  import store from './store'
5
5
  import router, { errorRouterMap } from './router'
6
6
  NProgress.configure({ showSpinner: false })// NProgress Configuration
7
- import { Message } from '@gcommon/gcommon-ui'
7
+ import { Message } from 'element-ui'
8
8
  import Vue from 'vue'
9
9
 
10
10
  const whiteList = ['/login', '/update-password', '/forget-password', '/reset-password', '/redirect'] // 不重定向白名单
package/src/plugins.js CHANGED
@@ -3,12 +3,12 @@ import Vue from 'vue'
3
3
  import 'normalize.css/normalize.css' // A modern alternative to CSS resets
4
4
  import './styles/index.scss' // global css
5
5
 
6
- import ElementUI from '@gcommon/gcommon-ui'
7
- import '@gcommon/gcommon-ui/lib/theme-chalk/index.css'
8
- import locale from '@gcommon/gcommon-ui/lib/locale/lang/zh-CN' // lang i18n
6
+ import ElementUI from 'element-ui'
7
+ import 'element-ui/lib/theme-chalk/index.css'
8
+ import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
9
9
 
10
10
  import SuperUI from 'imatrix-ui'
11
- //import 'imatrix-ui/lib/super-ui.css'
11
+ import 'imatrix-ui/lib/super-ui.css'
12
12
 
13
13
  import 'imatrix-ui/src/permission' // permission control
14
14
  import permission from 'imatrix-ui/src/directives/permission'
@@ -86,7 +86,10 @@ const permission = {
86
86
  return new Promise(resolve => {
87
87
  const currentUserPermissions = data
88
88
  // commit('setCurrentUserPermissions', currentUserPermissions)
89
+ const a = new Date().getTime()
89
90
  const accessableRoutersResult = filterProtectedRouter(protectedRouterMap, currentUserPermissions)
91
+ const b = new Date().getTime()
92
+ sessionStorage.setItem('=====generateRoutes====>'+new Date().getTime()+'-执行时间b-a=', (b-a)+'')
90
93
  const accessableRouters = accessableRoutersResult.allRouters
91
94
  const allMenuRoutes = accessableRoutersResult.menuRouters
92
95
  // console.log('有权限的路由表结果==', accessableRouters)
@@ -114,6 +117,8 @@ const permission = {
114
117
  // console.log('更新后的有权限的路由表结果,更新了根路由跳转的地址==', accessableRouters)
115
118
  }
116
119
  }
120
+ const c = new Date().getTime()
121
+ sessionStorage.setItem('=====generateRoutes====>执行时间c-a=', (c-a)+'')
117
122
  commit('setRouters', accessableRouters)
118
123
  resolve()
119
124
  })
@@ -9,8 +9,8 @@
9
9
  @import './theme/blue2/sidebar.scss';
10
10
  @import './theme/gray/index.scss';
11
11
  @import './theme/gray/sidebar.scss';
12
- // @import './theme/dark-blue/index.scss';
13
- // @import './theme/dark-blue/sidebar.scss';
12
+ @import './theme/dark-blue/index.scss';
13
+ @import './theme/dark-blue/sidebar.scss';
14
14
  @import './display-layout.scss';
15
15
 
16
16
  body {
@@ -18,15 +18,19 @@ export function getSystemCode() {
18
18
  }
19
19
 
20
20
  export function getPermissions() {
21
+ const a = new Date().getTime()
21
22
  const systemCode = getSystemCode()
22
23
  const permissions = sessionStorage.getItem(permissionKey + systemCode)
23
24
  if (permissions) {
24
25
  return JSON.parse(permissions)
25
26
  }
27
+ const b = new Date().getTime()
28
+ sessionStorage.setItem('====getPermissions===>'+new Date().getTime()+'-执行时间=',(b-a)+'')
26
29
  return null
27
30
  }
28
31
 
29
32
  export function setPermissions(permissions) {
33
+ const a = new Date().getTime()
30
34
  const systemCode = getSystemCode()
31
35
  const permissionObjs = {}
32
36
  for (let i = 0; i < permissions.length; i++) {
@@ -34,6 +38,8 @@ export function setPermissions(permissions) {
34
38
  permissionObjs[permission] = true
35
39
  }
36
40
  sessionStorage.setItem(permissionKey + systemCode, JSON.stringify(permissionObjs))
41
+ const b = new Date().getTime()
42
+ sessionStorage.setItem('====setPermissions===>'+new Date().getTime()+'-执行时间=',(b-a)+'')
37
43
  return permissionObjs
38
44
  }
39
45
 
@@ -1,7 +1,7 @@
1
1
  import axios from 'axios'
2
2
  import {
3
3
  Message
4
- } from '@gcommon/gcommon-ui'
4
+ } from 'element-ui'
5
5
  import {
6
6
  getToken,
7
7
  removeToken
@@ -41,7 +41,7 @@
41
41
  </template>
42
42
 
43
43
  <script>
44
- import { Message } from '@gcommon/gcommon-ui'
44
+ import { Message } from 'element-ui'
45
45
  export default {
46
46
  name: 'Login',
47
47
  data() {
@@ -1,368 +0,0 @@
1
- ((typeof self !== 'undefined' ? self : this)["webpackJsonpsuper_ui"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpsuper_ui"] || []).push([[1],{
2
-
3
- /***/ "c4a9":
4
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
5
-
6
- "use strict";
7
- /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getTinymce; });
8
- /**
9
- * Copyright (c) 2018-present, Ephox, Inc.
10
- *
11
- * This source code is licensed under the Apache 2 license found in the
12
- * LICENSE file in the root directory of this source tree.
13
- *
14
- */
15
- var getGlobal = function () { return (typeof window !== 'undefined' ? window : global); };
16
- var getTinymce = function () {
17
- var global = getGlobal();
18
- return global && global.tinymce ? global.tinymce : null;
19
- };
20
-
21
-
22
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
23
-
24
- /***/ }),
25
-
26
- /***/ "ca72":
27
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
28
-
29
- "use strict";
30
- __webpack_require__.r(__webpack_exports__);
31
-
32
- // CONCATENATED MODULE: ./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/Utils.js
33
- /**
34
- * Copyright (c) 2018-present, Ephox, Inc.
35
- *
36
- * This source code is licensed under the Apache 2 license found in the
37
- * LICENSE file in the root directory of this source tree.
38
- *
39
- */
40
- var validEvents = [
41
- 'onActivate',
42
- 'onAddUndo',
43
- 'onBeforeAddUndo',
44
- 'onBeforeExecCommand',
45
- 'onBeforeGetContent',
46
- 'onBeforeRenderUI',
47
- 'onBeforeSetContent',
48
- 'onBeforePaste',
49
- 'onBlur',
50
- 'onChange',
51
- 'onClearUndos',
52
- 'onClick',
53
- 'onContextMenu',
54
- 'onCopy',
55
- 'onCut',
56
- 'onDblclick',
57
- 'onDeactivate',
58
- 'onDirty',
59
- 'onDrag',
60
- 'onDragDrop',
61
- 'onDragEnd',
62
- 'onDragGesture',
63
- 'onDragOver',
64
- 'onDrop',
65
- 'onExecCommand',
66
- 'onFocus',
67
- 'onFocusIn',
68
- 'onFocusOut',
69
- 'onGetContent',
70
- 'onHide',
71
- 'onInit',
72
- 'onKeyDown',
73
- 'onKeyPress',
74
- 'onKeyUp',
75
- 'onLoadContent',
76
- 'onMouseDown',
77
- 'onMouseEnter',
78
- 'onMouseLeave',
79
- 'onMouseMove',
80
- 'onMouseOut',
81
- 'onMouseOver',
82
- 'onMouseUp',
83
- 'onNodeChange',
84
- 'onObjectResizeStart',
85
- 'onObjectResized',
86
- 'onObjectSelected',
87
- 'onPaste',
88
- 'onPostProcess',
89
- 'onPostRender',
90
- 'onPreProcess',
91
- 'onProgressState',
92
- 'onRedo',
93
- 'onRemove',
94
- 'onReset',
95
- 'onSaveContent',
96
- 'onSelectionChange',
97
- 'onSetAttrib',
98
- 'onSetContent',
99
- 'onShow',
100
- 'onSubmit',
101
- 'onUndo',
102
- 'onVisualAid'
103
- ];
104
- var isValidKey = function (key) { return validEvents.map(function (event) { return event.toLowerCase(); }).indexOf(key.toLowerCase()) !== -1; };
105
- var bindHandlers = function (initEvent, listeners, editor) {
106
- Object.keys(listeners)
107
- .filter(isValidKey)
108
- .forEach(function (key) {
109
- var handler = listeners[key];
110
- if (typeof handler === 'function') {
111
- if (key === 'onInit') {
112
- handler(initEvent, editor);
113
- }
114
- else {
115
- editor.on(key.substring(2), function (e) { return handler(e, editor); });
116
- }
117
- }
118
- });
119
- };
120
- var bindModelHandlers = function (ctx, editor) {
121
- var modelEvents = ctx.$props.modelEvents ? ctx.$props.modelEvents : null;
122
- var normalizedEvents = Array.isArray(modelEvents) ? modelEvents.join(' ') : modelEvents;
123
- editor.on(normalizedEvents ? normalizedEvents : 'change input undo redo', function () {
124
- ctx.$emit('input', editor.getContent({ format: ctx.$props.outputFormat }));
125
- });
126
- };
127
- var initEditor = function (initEvent, ctx, editor) {
128
- var value = ctx.$props.value ? ctx.$props.value : '';
129
- var initialValue = ctx.$props.initialValue ? ctx.$props.initialValue : '';
130
- editor.setContent(value || (ctx.initialized ? ctx.cache : initialValue));
131
- // Always bind the value listener in case users use :value instead of v-model
132
- ctx.$watch('value', function (val, prevVal) {
133
- if (editor && typeof val === 'string' && val !== prevVal && val !== editor.getContent({ format: ctx.$props.outputFormat })) {
134
- editor.setContent(val);
135
- }
136
- });
137
- // checks if the v-model shorthand is used (which sets an v-on:input listener) and then binds either
138
- // specified the events or defaults to "change keyup" event and emits the editor content on that event
139
- if (ctx.$listeners.input) {
140
- bindModelHandlers(ctx, editor);
141
- }
142
- bindHandlers(initEvent, ctx.$listeners, editor);
143
- ctx.initialized = true;
144
- };
145
- var unique = 0;
146
- var uuid = function (prefix) {
147
- var time = Date.now();
148
- var random = Math.floor(Math.random() * 1000000000);
149
- unique++;
150
- return prefix + '_' + random + unique + String(time);
151
- };
152
- var isTextarea = function (element) {
153
- return element !== null && element.tagName.toLowerCase() === 'textarea';
154
- };
155
- var normalizePluginArray = function (plugins) {
156
- if (typeof plugins === 'undefined' || plugins === '') {
157
- return [];
158
- }
159
- return Array.isArray(plugins) ? plugins : plugins.split(' ');
160
- };
161
- var mergePlugins = function (initPlugins, inputPlugins) {
162
- return normalizePluginArray(initPlugins).concat(normalizePluginArray(inputPlugins));
163
- };
164
- var isNullOrUndefined = function (value) { return value === null || value === undefined; };
165
-
166
-
167
- // CONCATENATED MODULE: ./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/ScriptLoader.js
168
- /**
169
- * Copyright (c) 2018-present, Ephox, Inc.
170
- *
171
- * This source code is licensed under the Apache 2 license found in the
172
- * LICENSE file in the root directory of this source tree.
173
- *
174
- */
175
-
176
- var createState = function () {
177
- return {
178
- listeners: [],
179
- scriptId: uuid('tiny-script'),
180
- scriptLoaded: false
181
- };
182
- };
183
- var CreateScriptLoader = function () {
184
- var state = createState();
185
- var injectScriptTag = function (scriptId, doc, url, callback) {
186
- var scriptTag = doc.createElement('script');
187
- scriptTag.referrerPolicy = 'origin';
188
- scriptTag.type = 'application/javascript';
189
- scriptTag.id = scriptId;
190
- scriptTag.src = url;
191
- var handler = function () {
192
- scriptTag.removeEventListener('load', handler);
193
- callback();
194
- };
195
- scriptTag.addEventListener('load', handler);
196
- if (doc.head) {
197
- doc.head.appendChild(scriptTag);
198
- }
199
- };
200
- var load = function (doc, url, callback) {
201
- if (state.scriptLoaded) {
202
- callback();
203
- }
204
- else {
205
- state.listeners.push(callback);
206
- if (!doc.getElementById(state.scriptId)) {
207
- injectScriptTag(state.scriptId, doc, url, function () {
208
- state.listeners.forEach(function (fn) { return fn(); });
209
- state.scriptLoaded = true;
210
- });
211
- }
212
- }
213
- };
214
- // Only to be used by tests.
215
- var reinitialize = function () {
216
- state = createState();
217
- };
218
- return {
219
- load: load,
220
- reinitialize: reinitialize
221
- };
222
- };
223
- var ScriptLoader = CreateScriptLoader();
224
-
225
-
226
- // EXTERNAL MODULE: ./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/TinyMCE.js
227
- var TinyMCE = __webpack_require__("c4a9");
228
-
229
- // CONCATENATED MODULE: ./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/components/EditorPropTypes.js
230
- /**
231
- * Copyright (c) 2018-present, Ephox, Inc.
232
- *
233
- * This source code is licensed under the Apache 2 license found in the
234
- * LICENSE file in the root directory of this source tree.
235
- *
236
- */
237
- var editorProps = {
238
- apiKey: String,
239
- cloudChannel: String,
240
- id: String,
241
- init: Object,
242
- initialValue: String,
243
- inline: Boolean,
244
- modelEvents: [String, Array],
245
- plugins: [String, Array],
246
- tagName: String,
247
- toolbar: [String, Array],
248
- value: String,
249
- disabled: Boolean,
250
- tinymceScriptSrc: String,
251
- outputFormat: {
252
- type: String,
253
- validator: function (prop) { return prop === 'html' || prop === 'text'; }
254
- },
255
- };
256
-
257
- // CONCATENATED MODULE: ./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/components/Editor.js
258
- /**
259
- * Copyright (c) 2018-present, Ephox, Inc.
260
- *
261
- * This source code is licensed under the Apache 2 license found in the
262
- * LICENSE file in the root directory of this source tree.
263
- *
264
- */
265
- var __assign = (undefined && undefined.__assign) || function () {
266
- __assign = Object.assign || function(t) {
267
- for (var s, i = 1, n = arguments.length; i < n; i++) {
268
- s = arguments[i];
269
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
270
- t[p] = s[p];
271
- }
272
- return t;
273
- };
274
- return __assign.apply(this, arguments);
275
- };
276
-
277
-
278
-
279
-
280
- var renderInline = function (h, id, tagName) {
281
- return h(tagName ? tagName : 'div', {
282
- attrs: { id: id }
283
- });
284
- };
285
- var renderIframe = function (h, id) {
286
- return h('textarea', {
287
- attrs: { id: id },
288
- style: { visibility: 'hidden' }
289
- });
290
- };
291
- var initialise = function (ctx) { return function () {
292
- var finalInit = __assign(__assign({}, ctx.$props.init), { readonly: ctx.$props.disabled, selector: "#" + ctx.elementId, plugins: mergePlugins(ctx.$props.init && ctx.$props.init.plugins, ctx.$props.plugins), toolbar: ctx.$props.toolbar || (ctx.$props.init && ctx.$props.init.toolbar), inline: ctx.inlineEditor, setup: function (editor) {
293
- ctx.editor = editor;
294
- editor.on('init', function (e) { return initEditor(e, ctx, editor); });
295
- if (ctx.$props.init && typeof ctx.$props.init.setup === 'function') {
296
- ctx.$props.init.setup(editor);
297
- }
298
- } });
299
- if (isTextarea(ctx.element)) {
300
- ctx.element.style.visibility = '';
301
- ctx.element.style.display = '';
302
- }
303
- Object(TinyMCE["a" /* getTinymce */])().init(finalInit);
304
- }; };
305
- var Editor = {
306
- props: editorProps,
307
- created: function () {
308
- this.elementId = this.$props.id || uuid('tiny-vue');
309
- this.inlineEditor = (this.$props.init && this.$props.init.inline) || this.$props.inline;
310
- this.initialized = false;
311
- },
312
- watch: {
313
- disabled: function () {
314
- this.editor.setMode(this.disabled ? 'readonly' : 'design');
315
- }
316
- },
317
- mounted: function () {
318
- this.element = this.$el;
319
- if (Object(TinyMCE["a" /* getTinymce */])() !== null) {
320
- initialise(this)();
321
- }
322
- else if (this.element && this.element.ownerDocument) {
323
- var channel = this.$props.cloudChannel ? this.$props.cloudChannel : '5';
324
- var apiKey = this.$props.apiKey ? this.$props.apiKey : 'no-api-key';
325
- var scriptSrc = isNullOrUndefined(this.$props.tinymceScriptSrc) ?
326
- "https://cdn.tiny.cloud/1/" + apiKey + "/tinymce/" + channel + "/tinymce.min.js" :
327
- this.$props.tinymceScriptSrc;
328
- ScriptLoader.load(this.element.ownerDocument, scriptSrc, initialise(this));
329
- }
330
- },
331
- beforeDestroy: function () {
332
- if (Object(TinyMCE["a" /* getTinymce */])() !== null) {
333
- Object(TinyMCE["a" /* getTinymce */])().remove(this.editor);
334
- }
335
- },
336
- deactivated: function () {
337
- var _a;
338
- if (!this.inlineEditor) {
339
- this.cache = this.editor.getContent();
340
- (_a = Object(TinyMCE["a" /* getTinymce */])()) === null || _a === void 0 ? void 0 : _a.remove(this.editor);
341
- }
342
- },
343
- activated: function () {
344
- if (!this.inlineEditor && this.initialized) {
345
- initialise(this)();
346
- }
347
- },
348
- render: function (h) {
349
- return this.inlineEditor ? renderInline(h, this.elementId, this.$props.tagName) : renderIframe(h, this.elementId);
350
- }
351
- };
352
-
353
- // CONCATENATED MODULE: ./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/index.js
354
- /**
355
- * Copyright (c) 2018-present, Ephox, Inc.
356
- *
357
- * This source code is licensed under the Apache 2 license found in the
358
- * LICENSE file in the root directory of this source tree.
359
- *
360
- */
361
-
362
- /* harmony default export */ var ts = __webpack_exports__["default"] = (Editor);
363
-
364
-
365
- /***/ })
366
-
367
- }]);
368
- //# sourceMappingURL=super-ui.common.1.js.map