mooho-base-admin-plus 2.10.9 → 2.10.10

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,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "2.10.9",
4
+ "version": "2.10.10",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -156,17 +156,17 @@
156
156
  this.$refs.table.data.forEach(item => {
157
157
  let key = item.column;
158
158
 
159
- if ((item.operatorType = '大于')) {
159
+ if ((item.operatorType == '大于')) {
160
160
  key += '_g';
161
- } else if ((item.operatorType = '小于')) {
161
+ } else if ((item.operatorType == '小于')) {
162
162
  key += '_l';
163
- } else if ((item.operatorType = '大于等于')) {
163
+ } else if ((item.operatorType == '大于等于')) {
164
164
  key += '_ge';
165
- } else if ((item.operatorType = '小于等于')) {
165
+ } else if ((item.operatorType == '小于等于')) {
166
166
  key += '_le';
167
- } else if ((item.operatorType = '不等于')) {
167
+ } else if ((item.operatorType == '不等于')) {
168
168
  key += '_n';
169
- } else if ((item.operatorType = '文字包含')) {
169
+ } else if ((item.operatorType == '文字包含')) {
170
170
  key += '_c';
171
171
  }
172
172
 
@@ -1,21 +1,21 @@
1
- import { findComponentUpward } from 'view-ui-plus/src/utils/assist';
2
- import { mapState } from 'vuex';
3
-
4
- export default {
5
- computed: {
6
- ...mapState('admin/layout', ['menuSiderReload', 'menuHeaderReload'])
7
- },
8
- methods: {
9
- handleClick(path, type = 'sider') {
10
- const current = this.$route.path;
11
- if (current === path) {
12
- if (type === 'sider' && this.menuSiderReload) this.handleReload();
13
- else if (type === 'header' && this.menuHeaderReload) this.handleReload();
14
- }
15
- },
16
- handleReload() {
17
- const $layout = findComponentUpward(this, 'BasicLayout');
18
- if ($layout) $layout.handleReload();
19
- }
20
- }
21
- };
1
+ import { findComponentUpward } from 'view-ui-plus/src/utils/assist';
2
+ import { mapState } from 'vuex';
3
+
4
+ export default {
5
+ computed: {
6
+ ...mapState('admin/layout', ['menuSiderReload', 'menuHeaderReload'])
7
+ },
8
+ methods: {
9
+ handleClick(path, type = 'sider') {
10
+ const current = this.$route.path;
11
+ if (current === path) {
12
+ if (type === 'sider' && this.menuSiderReload) this.handleReload();
13
+ else if (type === 'header' && this.menuHeaderReload) this.handleReload();
14
+ }
15
+ },
16
+ handleReload() {
17
+ const $layout = findComponentUpward(this, 'BasicLayout');
18
+ if ($layout) $layout.handleReload();
19
+ }
20
+ }
21
+ };
@@ -1,13 +1,13 @@
1
- import { mapState } from 'vuex';
2
-
3
- export default {
4
- computed: {
5
- ...mapState('admin/menu', ['siderMenuBadge']),
6
- badgeData() {
7
- let data = null;
8
- const siderMenuBadge = this.siderMenuBadge.find(item => item.path === this.menu.path);
9
- if (siderMenuBadge) data = siderMenuBadge;
10
- return data;
11
- }
12
- }
13
- };
1
+ import { mapState } from 'vuex';
2
+
3
+ export default {
4
+ computed: {
5
+ ...mapState('admin/menu', ['siderMenuBadge']),
6
+ badgeData() {
7
+ let data = null;
8
+ const siderMenuBadge = this.siderMenuBadge.find(item => item.path === this.menu.path);
9
+ if (siderMenuBadge) data = siderMenuBadge;
10
+ return data;
11
+ }
12
+ }
13
+ };
@@ -1,29 +1,29 @@
1
- <template>
2
- <div :style="styles" v-if="waterMark.show"></div>
3
- </template>
4
- <script>
5
- import { mapState } from 'vuex';
6
- import getWaterMarkCanvas from '../../../libs/water-mark';
7
-
8
- export default {
9
- name: 'i-water-mark',
10
- computed: {
11
- ...mapState('admin/layout', ['waterMark']),
12
- styles() {
13
- const url = getWaterMarkCanvas(this.waterMark.text, this.waterMark.options);
14
- return {
15
- width: '100%',
16
- height: '100%',
17
- position: 'absolute',
18
- top: '0',
19
- left: '0',
20
- 'z-index': '2000',
21
- 'background-size': '320px',
22
- 'background-repeat': 'repeat',
23
- 'background-image': `url(${url})`,
24
- 'pointer-events': 'none'
25
- };
26
- }
27
- }
28
- };
29
- </script>
1
+ <template>
2
+ <div :style="styles" v-if="waterMark.show"></div>
3
+ </template>
4
+ <script>
5
+ import { mapState } from 'vuex';
6
+ import getWaterMarkCanvas from '../../../libs/water-mark';
7
+
8
+ export default {
9
+ name: 'i-water-mark',
10
+ computed: {
11
+ ...mapState('admin/layout', ['waterMark']),
12
+ styles() {
13
+ const url = getWaterMarkCanvas(this.waterMark.text, this.waterMark.options);
14
+ return {
15
+ width: '100%',
16
+ height: '100%',
17
+ position: 'absolute',
18
+ top: '0',
19
+ left: '0',
20
+ 'z-index': '2000',
21
+ 'background-size': '320px',
22
+ 'background-repeat': 'repeat',
23
+ 'background-image': `url(${url})`,
24
+ 'pointer-events': 'none'
25
+ };
26
+ }
27
+ }
28
+ };
29
+ </script>
@@ -1,10 +1,10 @@
1
- // 生成随机字符串
2
- export default function (len = 32) {
3
- const $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
4
- const maxPos = $chars.length;
5
- let str = '';
6
- for (let i = 0; i < len; i++) {
7
- str += $chars.charAt(Math.floor(Math.random() * maxPos));
8
- }
9
- return str;
10
- }
1
+ // 生成随机字符串
2
+ export default function (len = 32) {
3
+ const $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
4
+ const maxPos = $chars.length;
5
+ let str = '';
6
+ for (let i = 0; i < len; i++) {
7
+ str += $chars.charAt(Math.floor(Math.random() * maxPos));
8
+ }
9
+ return str;
10
+ }
@@ -1,44 +1,44 @@
1
- /**
2
- * @description 生成水印
3
- * */
4
- export default function getWaterMarkCanvas(text, options) {
5
- const canvas = document.createElement('canvas');
6
- const ctx = canvas.getContext('2d');
7
- const canvasWidth = 400;
8
- const canvasHeight = 400;
9
- canvas.width = canvasWidth;
10
- canvas.height = canvasHeight;
11
- ctx.textAlign = 'center';
12
- ctx.textBaseline = 'bottom';
13
- ctx.globalAlpha = options.globalAlpha || 0.1;
14
- ctx.font = options.font || '20px Microsoft Yahei';
15
-
16
- ctx.translate(canvasWidth / 2, canvasHeight / 2);
17
- ctx.rotate(options.rotateAngle || -0.4);
18
-
19
- ctx.translate((-canvasWidth / 2) * 1.2, (-canvasHeight / 2) * 1.2);
20
-
21
- const waterMarkText = [];
22
- const chunkWidth = options.chunkWidth || 400;
23
- const chunkHeight = options.chunkHeight || 120;
24
- const horizontalChunkCount = 0;
25
- const verticalChunkCount = 1;
26
-
27
- for (let j = 0, initY = chunkHeight / 2, indent = 0; j <= verticalChunkCount; j += 1) {
28
- indent = parseInt(j % 2);
29
-
30
- for (let i = 0, initX = chunkWidth / 2; i <= horizontalChunkCount; i += 1) {
31
- waterMarkText.push({
32
- text,
33
- x: i * chunkWidth + indent * initX,
34
- y: j * chunkHeight + initY
35
- });
36
- }
37
- }
38
-
39
- waterMarkText.forEach(item => {
40
- ctx.fillText(item.text, item.x, item.y);
41
- });
42
-
43
- return ctx.canvas.toDataURL();
44
- }
1
+ /**
2
+ * @description 生成水印
3
+ * */
4
+ export default function getWaterMarkCanvas(text, options) {
5
+ const canvas = document.createElement('canvas');
6
+ const ctx = canvas.getContext('2d');
7
+ const canvasWidth = 400;
8
+ const canvasHeight = 400;
9
+ canvas.width = canvasWidth;
10
+ canvas.height = canvasHeight;
11
+ ctx.textAlign = 'center';
12
+ ctx.textBaseline = 'bottom';
13
+ ctx.globalAlpha = options.globalAlpha || 0.1;
14
+ ctx.font = options.font || '20px Microsoft Yahei';
15
+
16
+ ctx.translate(canvasWidth / 2, canvasHeight / 2);
17
+ ctx.rotate(options.rotateAngle || -0.4);
18
+
19
+ ctx.translate((-canvasWidth / 2) * 1.2, (-canvasHeight / 2) * 1.2);
20
+
21
+ const waterMarkText = [];
22
+ const chunkWidth = options.chunkWidth || 400;
23
+ const chunkHeight = options.chunkHeight || 120;
24
+ const horizontalChunkCount = 0;
25
+ const verticalChunkCount = 1;
26
+
27
+ for (let j = 0, initY = chunkHeight / 2, indent = 0; j <= verticalChunkCount; j += 1) {
28
+ indent = parseInt(j % 2);
29
+
30
+ for (let i = 0, initX = chunkWidth / 2; i <= horizontalChunkCount; i += 1) {
31
+ waterMarkText.push({
32
+ text,
33
+ x: i * chunkWidth + indent * initX,
34
+ y: j * chunkHeight + initY
35
+ });
36
+ }
37
+ }
38
+
39
+ waterMarkText.forEach(item => {
40
+ ctx.fillText(item.text, item.x, item.y);
41
+ });
42
+
43
+ return ctx.canvas.toDataURL();
44
+ }
@@ -1,47 +1,47 @@
1
- #app, body, html{
2
- height: 100%;
3
- }
4
- body{
5
- background-color: @background-color-base;
6
- font-size: 14px;
7
- }
8
-
9
- // 隐藏滚动条样式
10
- .i-scrollbar-hide{
11
- &::-webkit-scrollbar{
12
- width: 0;
13
- }
14
- &::-webkit-scrollbar-track{
15
- background-color: transparent;
16
- }
17
- &::-webkit-scrollbar-thumb{
18
- background: #e8eaec;
19
- }
20
- }
21
-
22
- // 极简滚动条样式
23
- .i-scrollbar{
24
- &::-webkit-scrollbar{
25
- width: 6px;
26
- }
27
- &::-webkit-scrollbar-track{
28
- background-color: transparent;
29
- }
30
- &::-webkit-scrollbar-thumb{
31
- background: #808695;
32
- border-radius: 4px;
33
- }
34
- }
35
-
36
- // 去除 Table 的左右边框,更精简
37
- .i-table-no-border{
38
- .ivu-table th{
39
- background-color: #fff;
40
- }
41
- .ivu-table-wrapper, .ivu-table tr:last-child td{
42
- border: none;
43
- }
44
- .ivu-table:before, .ivu-table:after{
45
- display: none;
46
- }
47
- }
1
+ #app, body, html{
2
+ height: 100%;
3
+ }
4
+ body{
5
+ background-color: @background-color-base;
6
+ font-size: 14px;
7
+ }
8
+
9
+ // 隐藏滚动条样式
10
+ .i-scrollbar-hide{
11
+ &::-webkit-scrollbar{
12
+ width: 0;
13
+ }
14
+ &::-webkit-scrollbar-track{
15
+ background-color: transparent;
16
+ }
17
+ &::-webkit-scrollbar-thumb{
18
+ background: #e8eaec;
19
+ }
20
+ }
21
+
22
+ // 极简滚动条样式
23
+ .i-scrollbar{
24
+ &::-webkit-scrollbar{
25
+ width: 6px;
26
+ }
27
+ &::-webkit-scrollbar-track{
28
+ background-color: transparent;
29
+ }
30
+ &::-webkit-scrollbar-thumb{
31
+ background: #808695;
32
+ border-radius: 4px;
33
+ }
34
+ }
35
+
36
+ // 去除 Table 的左右边框,更精简
37
+ .i-table-no-border{
38
+ .ivu-table th{
39
+ background-color: #fff;
40
+ }
41
+ .ivu-table-wrapper, .ivu-table tr:last-child td{
42
+ border: none;
43
+ }
44
+ .ivu-table:before, .ivu-table:after{
45
+ display: none;
46
+ }
47
+ }
@@ -1,6 +1,6 @@
1
- // 自定义主题
2
- // 详见 https://www.iviewui.com/docs/guide/theme
3
- @import 'view-ui-plus/src/styles/index.less';
4
-
5
- @menu-dark-title: #191a23;
6
- @menu-dark-active-bg: #101117;
1
+ // 自定义主题
2
+ // 详见 https://www.iviewui.com/docs/guide/theme
3
+ @import 'view-ui-plus/src/styles/index.less';
4
+
5
+ @menu-dark-title: #191a23;
6
+ @menu-dark-active-bg: #101117;
@@ -1,47 +1,47 @@
1
- @font-face {
2
- font-family: "i-icon"; /* Project id 1125611 */
3
- src: url('iconfont.woff2?t=1651052284018') format('woff2'),
4
- url('iconfont.woff?t=1651052284018') format('woff'),
5
- url('iconfont.ttf?t=1651052284018') format('truetype');
6
- }
7
-
8
- .i-icon {
9
- font-family: "i-icon" !important;
10
- font-size: 16px;
11
- font-style: normal;
12
- -webkit-font-smoothing: antialiased;
13
- -moz-osx-font-smoothing: grayscale;
14
- }
15
-
16
- .i-icon-i18n:before {
17
- content: "\e8e9";
18
- }
19
-
20
- .i-icon-refresh:before {
21
- content: "\e7d1";
22
- }
23
-
24
- .i-icon-record:before {
25
- content: "\e61f";
26
- }
27
-
28
- .i-icon-notification:before {
29
- content: "\e69d";
30
- }
31
-
32
- .i-icon-full-screen:before {
33
- content: "\e743";
34
- }
35
-
36
- .i-icon-exit-full-screen:before {
37
- content: "\e657";
38
- }
39
-
40
- .i-icon-menu-unfold:before {
41
- content: "\e68b";
42
- }
43
-
44
- .i-icon-menu-fold:before {
45
- content: "\e600";
46
- }
47
-
1
+ @font-face {
2
+ font-family: "i-icon"; /* Project id 1125611 */
3
+ src: url('iconfont.woff2?t=1651052284018') format('woff2'),
4
+ url('iconfont.woff?t=1651052284018') format('woff'),
5
+ url('iconfont.ttf?t=1651052284018') format('truetype');
6
+ }
7
+
8
+ .i-icon {
9
+ font-family: "i-icon" !important;
10
+ font-size: 16px;
11
+ font-style: normal;
12
+ -webkit-font-smoothing: antialiased;
13
+ -moz-osx-font-smoothing: grayscale;
14
+ }
15
+
16
+ .i-icon-i18n:before {
17
+ content: "\e8e9";
18
+ }
19
+
20
+ .i-icon-refresh:before {
21
+ content: "\e7d1";
22
+ }
23
+
24
+ .i-icon-record:before {
25
+ content: "\e61f";
26
+ }
27
+
28
+ .i-icon-notification:before {
29
+ content: "\e69d";
30
+ }
31
+
32
+ .i-icon-full-screen:before {
33
+ content: "\e743";
34
+ }
35
+
36
+ .i-icon-exit-full-screen:before {
37
+ content: "\e657";
38
+ }
39
+
40
+ .i-icon-menu-unfold:before {
41
+ content: "\e68b";
42
+ }
43
+
44
+ .i-icon-menu-fold:before {
45
+ content: "\e600";
46
+ }
47
+
@@ -1,65 +1,65 @@
1
- {
2
- "id": "1125611",
3
- "name": "iview-admin-pro",
4
- "font_family": "i-icon",
5
- "css_prefix_text": "i-icon-",
6
- "description": "",
7
- "glyphs": [
8
- {
9
- "icon_id": "27328867",
10
- "name": "i18n",
11
- "font_class": "i18n",
12
- "unicode": "e8e9",
13
- "unicode_decimal": 59625
14
- },
15
- {
16
- "icon_id": "587065",
17
- "name": "refresh",
18
- "font_class": "refresh",
19
- "unicode": "e7d1",
20
- "unicode_decimal": 59345
21
- },
22
- {
23
- "icon_id": "544041",
24
- "name": "iconfont-radiobox",
25
- "font_class": "record",
26
- "unicode": "e61f",
27
- "unicode_decimal": 58911
28
- },
29
- {
30
- "icon_id": "2552069",
31
- "name": "notification",
32
- "font_class": "notification",
33
- "unicode": "e69d",
34
- "unicode_decimal": 59037
35
- },
36
- {
37
- "icon_id": "3556111",
38
- "name": "full-screen",
39
- "font_class": "full-screen",
40
- "unicode": "e743",
41
- "unicode_decimal": 59203
42
- },
43
- {
44
- "icon_id": "1433808",
45
- "name": "exit-full-screen",
46
- "font_class": "exit-full-screen",
47
- "unicode": "e657",
48
- "unicode_decimal": 58967
49
- },
50
- {
51
- "icon_id": "6925933",
52
- "name": "menu-unfold",
53
- "font_class": "menu-unfold",
54
- "unicode": "e68b",
55
- "unicode_decimal": 59019
56
- },
57
- {
58
- "icon_id": "7839858",
59
- "name": "menu-fold",
60
- "font_class": "menu-fold",
61
- "unicode": "e600",
62
- "unicode_decimal": 58880
63
- }
64
- ]
65
- }
1
+ {
2
+ "id": "1125611",
3
+ "name": "iview-admin-pro",
4
+ "font_family": "i-icon",
5
+ "css_prefix_text": "i-icon-",
6
+ "description": "",
7
+ "glyphs": [
8
+ {
9
+ "icon_id": "27328867",
10
+ "name": "i18n",
11
+ "font_class": "i18n",
12
+ "unicode": "e8e9",
13
+ "unicode_decimal": 59625
14
+ },
15
+ {
16
+ "icon_id": "587065",
17
+ "name": "refresh",
18
+ "font_class": "refresh",
19
+ "unicode": "e7d1",
20
+ "unicode_decimal": 59345
21
+ },
22
+ {
23
+ "icon_id": "544041",
24
+ "name": "iconfont-radiobox",
25
+ "font_class": "record",
26
+ "unicode": "e61f",
27
+ "unicode_decimal": 58911
28
+ },
29
+ {
30
+ "icon_id": "2552069",
31
+ "name": "notification",
32
+ "font_class": "notification",
33
+ "unicode": "e69d",
34
+ "unicode_decimal": 59037
35
+ },
36
+ {
37
+ "icon_id": "3556111",
38
+ "name": "full-screen",
39
+ "font_class": "full-screen",
40
+ "unicode": "e743",
41
+ "unicode_decimal": 59203
42
+ },
43
+ {
44
+ "icon_id": "1433808",
45
+ "name": "exit-full-screen",
46
+ "font_class": "exit-full-screen",
47
+ "unicode": "e657",
48
+ "unicode_decimal": 58967
49
+ },
50
+ {
51
+ "icon_id": "6925933",
52
+ "name": "menu-unfold",
53
+ "font_class": "menu-unfold",
54
+ "unicode": "e68b",
55
+ "unicode_decimal": 59019
56
+ },
57
+ {
58
+ "icon_id": "7839858",
59
+ "name": "menu-fold",
60
+ "font_class": "menu-fold",
61
+ "unicode": "e600",
62
+ "unicode_decimal": 58880
63
+ }
64
+ ]
65
+ }