mooho-base-admin-plus 2.10.7 → 2.10.9

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.7",
4
+ "version": "2.10.9",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -1,6 +1,15 @@
1
1
  <template>
2
2
  <div>
3
- <Modal v-model="opened" scrollable :mask-closable="layout.maskClosable" :draggable="layout.draggable" :sticky="true" :reset-drag-position="true" :width="width">
3
+ <Modal
4
+ v-model="opened"
5
+ scrollable
6
+ :fullscreen="isFullscreen"
7
+ :mask-closable="layout.maskClosable"
8
+ :draggable="layout.draggable"
9
+ :sticky="true"
10
+ :reset-drag-position="true"
11
+ :width="width"
12
+ >
4
13
  <template #header>
5
14
  <div>
6
15
  <!--
@@ -12,6 +21,13 @@
12
21
  </slot>
13
22
  </div>
14
23
  </template>
24
+ <template #close>
25
+ <div @click.stop>
26
+ <Icon v-if="!isFullscreen" style="font-size: 20px; color: #999; position: relative; top: -3px" type="ios-expand" @click="isFullscreen = !isFullscreen" />
27
+ <Icon v-if="isFullscreen" style="font-size: 20px; color: #999; position: relative; top: -3px" type="ios-contract" @click="isFullscreen = !isFullscreen" />
28
+ <Icon type="ios-close" @click="opened = false" />
29
+ </div>
30
+ </template>
15
31
  <div class="ivu-ml-8 ivu-mr-8">
16
32
  <view-form v-if="!isCustom" ref="form" :readonly="readonly"></view-form>
17
33
  <component v-if="isCustom" ref="customComponent" :is="customComponent" :readonly="readonly" @on-ready="customComponentReady"></component>
@@ -104,7 +120,8 @@
104
120
  name: null,
105
121
  description: null,
106
122
  customComponent: null,
107
- form: null
123
+ form: null,
124
+ isFullscreen: false
108
125
  };
109
126
  },
110
127
  async created() {},
@@ -1 +1 @@
1
- import{s as e}from"./lang.js";const t={i:{locale:"en-US",select:{placeholder:"Select",noMatch:"No matching data",loading:"Loading"},table:{noDataText:"No Data",noFilteredDataText:"No filter data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},datepicker:{selectDate:"Select date",selectTime:"Select time",startTime:"Start Time",endTime:"End Time",clear:"Clear",ok:"OK",datePanelLabel:"[mmmm] [yyyy]",month:"Month",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",year:"Year",weekStartDay:"0",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},months:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"May",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Oct",m11:"Nov",m12:"Dec"}},transfer:{titles:{source:"Source",target:"Target"},filterPlaceholder:"Search here",notFoundText:"Not Found"},modal:{okText:"OK",cancelText:"Cancel"},poptip:{okText:"OK",cancelText:"Cancel"},page:{prev:"Previous Page",next:"Next Page",total:"Total",item:"item",items:"items",prev5:"Previous 5 Pages",next5:"Next 5 Pages",page:"/page",goto:"Goto",p:""},rate:{star:"Star",stars:"Stars"},time:{before:" ago",after:" after",just:"just now",seconds:" seconds",minutes:" minutes",hours:" hours",days:" days"},tree:{emptyText:"No Data"}}};e(t);export{t as default};
1
+ import{s as e}from"./lang.js";const t={i:{locale:"en-US",select:{placeholder:"Select",noMatch:"No matching data",loading:"Loading"},table:{noDataText:"No Data",noFilteredDataText:"No filter data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},datepicker:{selectDate:"Select date",selectTime:"Select time",startTime:"Start Time",endTime:"End Time",clear:"Clear",ok:"OK",datePanelLabel:"[mmmm] [yyyy]",month:"Month",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",year:"Year",weekStartDay:"0",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},months:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"May",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Oct",m11:"Nov",m12:"Dec"}},transfer:{titles:{source:"Source",target:"Target"},filterPlaceholder:"Search here",notFoundText:"Not Found"},modal:{okText:"OK",cancelText:"Cancel"},poptip:{okText:"OK",cancelText:"Cancel"},page:{prev:"Previous Page",next:"Next Page",total:"Total",item:"item",items:"items",prev5:"Previous 5 Pages",next5:"Next 5 Pages",page:"/page",goto:"Goto",p:""},rate:{star:"Star",stars:"Stars"},time:{before:" ago",after:" after",just:"just now",seconds:" seconds",minutes:" minutes",hours:" hours",days:" days"},tree:{emptyText:"No Data"}}};e(t);export{t as default};
@@ -1 +1 @@
1
- const e=typeof window!="undefined";function n(i){e&&typeof window.viewuiplus!="undefined"&&("langs"in viewuiplus||(viewuiplus.langs={}),viewuiplus.langs[i.i.locale]=i)}export{n as s};
1
+ const e=typeof window!="undefined";function n(i){e&&typeof window.viewuiplus!="undefined"&&("langs"in viewuiplus||(viewuiplus.langs={}),viewuiplus.langs[i.i.locale]=i)}export{n as s};
@@ -1 +1 @@
1
- import{s as e}from"./lang.js";const t={i:{locale:"zh-CN",select:{placeholder:"\u8BF7\u9009\u62E9",noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D"},table:{noDataText:"\u6682\u65E0\u6570\u636E",noFilteredDataText:"\u6682\u65E0\u7B5B\u9009\u7ED3\u679C",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},datepicker:{selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startTime:"\u5F00\u59CB\u65F6\u95F4",endTime:"\u7ED3\u675F\u65F6\u95F4",clear:"\u6E05\u7A7A",ok:"\u786E\u5B9A",datePanelLabel:"[yyyy\u5E74] [m\u6708]",month:"\u6708",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",year:"\u5E74",weekStartDay:"0",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},months:{m1:"1\u6708",m2:"2\u6708",m3:"3\u6708",m4:"4\u6708",m5:"5\u6708",m6:"6\u6708",m7:"7\u6708",m8:"8\u6708",m9:"9\u6708",m10:"10\u6708",m11:"11\u6708",m12:"12\u6708"}},transfer:{titles:{source:"\u6E90\u5217\u8868",target:"\u76EE\u7684\u5217\u8868"},filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",notFoundText:"\u5217\u8868\u4E3A\u7A7A"},modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88"},poptip:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88"},page:{prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",total:"\u5171",item:"\u6761",items:"\u6761",prev5:"\u5411\u524D 5 \u9875",next5:"\u5411\u540E 5 \u9875",page:"\u6761/\u9875",goto:"\u8DF3\u81F3",p:"\u9875"},rate:{star:"\u661F",stars:"\u661F"},time:{before:"\u524D",after:"\u540E",just:"\u521A\u521A",seconds:"\u79D2",minutes:"\u5206\u949F",hours:"\u5C0F\u65F6",days:"\u5929"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"}}};e(t);export{t as default};
1
+ import{s as e}from"./lang.js";const t={i:{locale:"zh-CN",select:{placeholder:"\u8BF7\u9009\u62E9",noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D"},table:{noDataText:"\u6682\u65E0\u6570\u636E",noFilteredDataText:"\u6682\u65E0\u7B5B\u9009\u7ED3\u679C",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},datepicker:{selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startTime:"\u5F00\u59CB\u65F6\u95F4",endTime:"\u7ED3\u675F\u65F6\u95F4",clear:"\u6E05\u7A7A",ok:"\u786E\u5B9A",datePanelLabel:"[yyyy\u5E74] [m\u6708]",month:"\u6708",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",year:"\u5E74",weekStartDay:"0",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},months:{m1:"1\u6708",m2:"2\u6708",m3:"3\u6708",m4:"4\u6708",m5:"5\u6708",m6:"6\u6708",m7:"7\u6708",m8:"8\u6708",m9:"9\u6708",m10:"10\u6708",m11:"11\u6708",m12:"12\u6708"}},transfer:{titles:{source:"\u6E90\u5217\u8868",target:"\u76EE\u7684\u5217\u8868"},filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",notFoundText:"\u5217\u8868\u4E3A\u7A7A"},modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88"},poptip:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88"},page:{prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",total:"\u5171",item:"\u6761",items:"\u6761",prev5:"\u5411\u524D 5 \u9875",next5:"\u5411\u540E 5 \u9875",page:"\u6761/\u9875",goto:"\u8DF3\u81F3",p:"\u9875"},rate:{star:"\u661F",stars:"\u661F"},time:{before:"\u524D",after:"\u540E",just:"\u521A\u521A",seconds:"\u79D2",minutes:"\u5206\u949F",hours:"\u5C0F\u65F6",days:"\u5929"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"}}};e(t);export{t as default};
@@ -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
+ }
@@ -4,7 +4,7 @@
4
4
  <PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
5
5
  </div>
6
6
  <Card :bordered="false" dis-hover class="ivu-mt">
7
- <view-table ref="table" v-if="page" :create-enable="allow('create')" @create="create">
7
+ <view-table ref="table" v-if="page" :return-columns="['application.status', 'application.applicantID']" :create-enable="allow('create')" @create="create">
8
8
  <template #top>
9
9
  <slot name="top"></slot>
10
10
  </template>
@@ -33,7 +33,7 @@
33
33
  :title="$t('Front_Btn_Detail')"
34
34
  type="info"
35
35
  custom-icon="fa fa-file-alt"
36
- @click="$refs.showForm.open(row)"
36
+ @click="show(row)"
37
37
  ></Button>
38
38
  <Button
39
39
  size="small"
@@ -41,7 +41,7 @@
41
41
  :title="$t('Front_Btn_Edit')"
42
42
  type="primary"
43
43
  custom-icon="fa fa-edit"
44
- @click="$refs.form.open(row)"
44
+ @click="edit(row)"
45
45
  ></Button>
46
46
  <slot name="command" :row="row" :index="index"></slot>
47
47
  </template>
@@ -186,6 +186,7 @@
186
186
  </template>
187
187
  <script>
188
188
  import modelApi from '../../api/model';
189
+ import customModelApi from '../../api/customModel';
189
190
  import applicationApi from '../../api/application';
190
191
  import processInstApi from '../../api/processInst';
191
192
  import mixinPage from '../../mixins/page';
@@ -377,6 +378,38 @@
377
378
  this.$refs.showForm.close();
378
379
  });
379
380
  });
381
+ },
382
+ /**
383
+ * 编辑项
384
+ *
385
+ * @param {object} row 行对象
386
+ * @public
387
+ */
388
+ async edit(row) {
389
+ let data = row;
390
+ if (this.$refs.table.tableView.isCustom) {
391
+ data = await customModelApi.get(this.$refs.table.tableView.model, row.id);
392
+ } else if (!this.$refs.table.tableView.isDataSource) {
393
+ data = await modelApi.get(this.$refs.table.tableView.model, row.id);
394
+ }
395
+
396
+ this.$refs.form.open(data);
397
+ },
398
+ /**
399
+ * 查看项
400
+ *
401
+ * @param {object} row 行对象
402
+ * @public
403
+ */
404
+ async show(row) {
405
+ let data = row;
406
+ if (this.$refs.table.tableView.isCustom) {
407
+ data = await customModelApi.get(this.$refs.table.tableView.model, row.id);
408
+ } else if (!this.$refs.table.tableView.isDataSource) {
409
+ data = await modelApi.get(this.$refs.table.tableView.model, row.id);
410
+ }
411
+
412
+ this.$refs.showForm.open(data);
380
413
  }
381
414
  }
382
415
  };
@@ -0,0 +1,25 @@
1
+ import store from '../../store';
2
+ import util from '../../libs/util';
3
+
4
+ export default {
5
+ install(app) {
6
+ // 快速打印 log
7
+ app.config.globalProperties.$log = {
8
+ ...util.log,
9
+ push(data) {
10
+ if (typeof data === 'string') {
11
+ // 如果传递来的数据是字符串
12
+ // 赋值给 message 字段
13
+ // 为了方便使用
14
+ // eg: this.$log.push('foo text')
15
+ store.dispatch('admin/log/push', {
16
+ message: data
17
+ });
18
+ } else if (typeof data === 'object') {
19
+ // 如果传递来的数据是对象
20
+ store.dispatch('admin/log/push', data);
21
+ }
22
+ }
23
+ };
24
+ }
25
+ };
@@ -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
+