doway-coms 1.1.92 → 1.1.93

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 (2) hide show
  1. package/package.json +1 -1
  2. package/packages/index.js +52 -44
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doway-coms",
3
- "version": "1.1.92",
3
+ "version": "1.1.93",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
package/packages/index.js CHANGED
@@ -18,45 +18,51 @@ import BaseForm from './BaseForm/index';
18
18
  import BasePictureCard from './BasePictureCard/index';
19
19
  import BasePrintPreview from './BasePrintPreview/index';
20
20
  import BaseGantt from "./BaseGantt/index";
21
+ import BaseKanbanEmpty from "./BaseKanbanEmpty/index";
22
+ import BaseSearch from "./BaseSearch/index";
21
23
 
22
24
  import store from './utils/store'
23
25
  import request from './utils/request'
24
26
  import BaseGrid from './BaseGrid/index';
25
-
27
+
26
28
  // 存储组件列表
27
- const components = [BaseInput,BaseCheckbox,BaseDate,BaseDatetime,BaseDateWeek,BaseTextArea,BaseSelect,BaseSelectMulti
28
- ,BaseTime,BasePagination,
29
- BaseNumberInput,BaseTool,BaseToolStatus,BasePulldown,BaseIntervalInput,BaseForm,BasePictureCard,BaseGrid,BasePrintPreview, BaseGantt];
29
+ const components = [
30
+ BaseInput, BaseCheckbox, BaseDate, BaseDatetime, BaseDateWeek,
31
+ BaseTextArea, BaseSelect, BaseSelectMulti, BaseTime, BasePagination,
32
+ BaseNumberInput, BaseTool, BaseToolStatus, BasePulldown, BaseIntervalInput,
33
+ BaseForm, BasePictureCard, BaseGrid, BasePrintPreview, BaseGantt,
34
+ BaseKanbanEmpty, BaseSearch
35
+ ];
30
36
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
31
37
 
32
38
  import 'vxe-table/lib/style.css'
33
39
  import VXETable from 'vxe-table'
34
40
 
35
41
 
36
- const popupInterceptor = (params)=>{
42
+ const popupInterceptor = (params) => {
37
43
  // 比如点击了某个组件的弹出层面板之后,此时被激活单元格不应该被自动关闭,通过返回 false 可以阻止默认的行为。
38
44
  let parentElement = (params.$event.target.shadowRoot && params.$event.composed) ?
39
- (params.$event.composedPath()[0] || params.$event.target) : params.$event.target
45
+ (params.$event.composedPath()[0] || params.$event.target) : params.$event.target
40
46
  while (true) {
41
- // console.debug(parentElement)
42
- if (
43
- parentElement &&
44
- (parentElement.className.indexOf('vxe-modal--wrapper') > -1 ||
45
- parentElement.className.indexOf('ant-calendar') > -1 ||
46
- parentElement.className.indexOf('ant-select-dropdown-menu-item') > -1 ||
47
- parentElement.className.indexOf('interceptor-class') > -1 ||
48
- parentElement.className.indexOf('ant-time-picker-panel') > -1)
49
- ) {
50
- //定义网格弹出框不能对焦问题
51
- return false
52
- }
53
- if (parentElement.parentElement) {
47
+ // console.debug(parentElement)
48
+ if (
49
+ parentElement &&
50
+ (parentElement.className.indexOf('vxe-modal--wrapper') > -1 ||
51
+ parentElement.className.indexOf('ant-calendar') > -1 ||
52
+ parentElement.className.indexOf('ant-select-dropdown-menu-item') > -1 ||
53
+ parentElement.className.indexOf('interceptor-class') > -1 ||
54
+ parentElement.className.indexOf('ant-time-picker-panel') > -1)
55
+ ) {
56
+ //定义网格弹出框不能对焦问题
57
+ return false
58
+ }
59
+ if (parentElement.parentElement) {
54
60
  parentElement = parentElement.parentElement
55
- } else {
56
- break
57
- }
61
+ } else {
62
+ break
63
+ }
58
64
  }
59
-
65
+
60
66
  }
61
67
  //网格弹出点击拦截器
62
68
  VXETable.interceptor.add('event.clearActived', (params) => {
@@ -75,13 +81,13 @@ const install = function (Vue) {
75
81
 
76
82
  //注册grid组件
77
83
  Vue.use(VXETable)
78
-
84
+
79
85
  // 遍历注册全局组件
80
86
  components.forEach((component) => {
81
87
  Vue.component(component.name, component);
82
88
  });
83
89
  };
84
-
90
+
85
91
  // 判断是否是直接引入文件
86
92
  if (typeof window !== 'undefined' && window.Vue) {
87
93
  install(window.Vue);
@@ -92,33 +98,33 @@ import XEUtils from 'xe-utils'
92
98
  import {
93
99
  extend,
94
100
  localize
95
- } from 'vee-validate'
96
- //引入校验规则 安装所有规则
97
- import * as rules from 'vee-validate/dist/rules'
98
- Object.keys(rules).forEach(rule => {
101
+ } from 'vee-validate'
102
+ //引入校验规则 安装所有规则
103
+ import * as rules from 'vee-validate/dist/rules'
104
+ Object.keys(rules).forEach(rule => {
99
105
  extend(rule, rules[rule])
100
- })
106
+ })
101
107
 
102
- extend('gt', (value, min) => {
103
- if (XEUtils.toNumber(value) > min) {
104
- return true
105
- }
106
- return `必须大于${min}`
108
+ extend('gt', (value, min) => {
109
+ if (XEUtils.toNumber(value) > min) {
110
+ return true
111
+ }
112
+ return `必须大于${min}`
107
113
  })
108
114
 
109
115
  localize({
110
116
  en: {
111
- messages: {
112
- required: '必填',
113
- min: '不能小于 {length} 个字符',
114
- max: (_, { length }) => `不能大于 ${length} 个字符`,
115
- email: '邮箱输入不符合规则'
117
+ messages: {
118
+ required: '必填',
119
+ min: '不能小于 {length} 个字符',
120
+ max: (_, { length }) => `不能大于 ${length} 个字符`,
121
+ email: '邮箱输入不符合规则'
122
+ }
116
123
  }
117
- }
118
- })
119
-
124
+ })
125
+
120
126
  export default {
121
- // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
127
+ // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
122
128
  install
123
129
  // 以下是具体的组件列表
124
130
  };
@@ -148,6 +154,8 @@ export {
148
154
  BasePictureCard,
149
155
  BasePrintPreview,
150
156
  BaseGantt,
157
+ BaseKanbanEmpty,
158
+ BaseSearch,
151
159
  store,
152
160
  request,
153
161
  }