zartui 1.0.33 → 1.0.34-bate
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/es/index.js +3 -5
- package/es/popover/index.js +7 -1
- package/es/radio-picker/index.js +2 -4
- package/es/utils/debounce.js +42 -0
- package/lib/index.css +1 -1
- package/lib/index.js +2 -10
- package/lib/index.less +0 -2
- package/lib/popover/index.js +7 -1
- package/lib/radio-picker/index.js +4 -4
- package/lib/utils/debounce.js +47 -0
- package/lib/zart.js +1743 -24939
- package/lib/zart.min.js +1 -18
- package/package.json +1 -3
- package/es/pdf-viewer/index.css +0 -1
- package/es/pdf-viewer/index.js +0 -456
- package/es/pdf-viewer/index.less +0 -69
- package/es/pdf-viewer/style/index.js +0 -9
- package/es/pdf-viewer/style/less.js +0 -9
- package/es/pdf-viewer-v2/index.css +0 -1
- package/es/pdf-viewer-v2/index.js +0 -371
- package/es/pdf-viewer-v2/index.less +0 -61
- package/es/pdf-viewer-v2/style/index.js +0 -10
- package/es/pdf-viewer-v2/style/less.js +0 -10
- package/lib/7893e51cf0a4877dac80.worker.js +0 -10
- package/lib/be09b519a460e229fd8d.worker.js +0 -2527
- package/lib/pdf-viewer/index.css +0 -1
- package/lib/pdf-viewer/index.js +0 -471
- package/lib/pdf-viewer/index.less +0 -69
- package/lib/pdf-viewer/style/index.js +0 -9
- package/lib/pdf-viewer/style/less.js +0 -9
- package/lib/pdf-viewer-v2/index.css +0 -1
- package/lib/pdf-viewer-v2/index.js +0 -384
- package/lib/pdf-viewer-v2/index.less +0 -61
- package/lib/pdf-viewer-v2/style/index.js +0 -10
- package/lib/pdf-viewer-v2/style/less.js +0 -10
package/es/index.js
CHANGED
|
@@ -45,8 +45,6 @@ import NoticeBar from './notice-bar';
|
|
|
45
45
|
import NumberKeyboard from './number-keyboard';
|
|
46
46
|
import Overlay from './overlay';
|
|
47
47
|
import PasswordInput from './password-input';
|
|
48
|
-
import PdfViewer from './pdf-viewer';
|
|
49
|
-
import PdfViewerV2 from './pdf-viewer-v2';
|
|
50
48
|
import Picker from './picker';
|
|
51
49
|
import Popover from './popover';
|
|
52
50
|
import Popup from './popup';
|
|
@@ -78,10 +76,10 @@ import Tag from './tag';
|
|
|
78
76
|
import Timeline from './timeline';
|
|
79
77
|
import Toast from './toast';
|
|
80
78
|
import Uploader from './uploader';
|
|
81
|
-
var version = '1.0.
|
|
79
|
+
var version = '1.0.34-bate';
|
|
82
80
|
|
|
83
81
|
function install(Vue) {
|
|
84
|
-
var components = [ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput,
|
|
82
|
+
var components = [ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, RadioPicker, Rate, Row, Search, Signature, Skeleton, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, Timeline, Toast, Uploader];
|
|
85
83
|
components.forEach(function (item) {
|
|
86
84
|
if (item.install) {
|
|
87
85
|
Vue.use(item);
|
|
@@ -95,7 +93,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
95
93
|
install(window.Vue);
|
|
96
94
|
}
|
|
97
95
|
|
|
98
|
-
export { install, version, ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput,
|
|
96
|
+
export { install, version, ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, RadioPicker, Rate, Row, Search, Signature, Skeleton, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, Timeline, Toast, Uploader };
|
|
99
97
|
export default {
|
|
100
98
|
install: install,
|
|
101
99
|
version: version
|
package/es/popover/index.js
CHANGED
|
@@ -48,6 +48,12 @@ export default createComponent({
|
|
|
48
48
|
closeOnClickAction: {
|
|
49
49
|
type: Boolean,
|
|
50
50
|
default: true
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
/** 自定义弹窗外层class */
|
|
54
|
+
customClass: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ''
|
|
51
57
|
}
|
|
52
58
|
},
|
|
53
59
|
watch: {
|
|
@@ -188,7 +194,7 @@ export default createComponent({
|
|
|
188
194
|
"lockScroll": false,
|
|
189
195
|
"getContainer": this.getContainer
|
|
190
196
|
},
|
|
191
|
-
"class": bem([this.theme]),
|
|
197
|
+
"class": [bem([this.theme]), this.customClass],
|
|
192
198
|
"on": {
|
|
193
199
|
"open": this.onOpen,
|
|
194
200
|
"close": this.onClose,
|
package/es/radio-picker/index.js
CHANGED
|
@@ -4,9 +4,7 @@ import { createNamespace } from '../utils';
|
|
|
4
4
|
import { preventDefault } from '../utils/dom/event';
|
|
5
5
|
import { unitToPx } from '../utils/format/unit';
|
|
6
6
|
import { DEFAULT_WRAP_HEIGHT, radioPickerProps } from './shared';
|
|
7
|
-
|
|
8
|
-
var _ = require('lodash'); // Components
|
|
9
|
-
|
|
7
|
+
import { debounce } from '../utils/debounce'; // Components
|
|
10
8
|
|
|
11
9
|
import Loading from '../loading';
|
|
12
10
|
import { PopupMixin } from '../mixins/popup';
|
|
@@ -396,7 +394,7 @@ export default createComponent({
|
|
|
396
394
|
handleSearch: function handleSearch() {
|
|
397
395
|
var _this6 = this;
|
|
398
396
|
|
|
399
|
-
return
|
|
397
|
+
return debounce(function (val) {
|
|
400
398
|
_this6.searchVal = val;
|
|
401
399
|
}, 500);
|
|
402
400
|
},
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description 防抖函数(https://juejin.im/post/5c270ae16fb9a049bb7c69c2)
|
|
3
|
+
* @param {function} method - 需防抖的方法
|
|
4
|
+
* @param {number} wait - 计时器延迟时间
|
|
5
|
+
* @param {boolean} immediate - 是否立即执行method
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export function debounce(method, wait, immediate) {
|
|
9
|
+
if (immediate === void 0) {
|
|
10
|
+
immediate = false;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var timeout = null;
|
|
14
|
+
return function () {
|
|
15
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16
|
+
args[_key] = arguments[_key];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
20
|
+
var context = this; // 如果需要在防抖函数中维持this上下文,可以保留此行,但需注意eslint规则
|
|
21
|
+
|
|
22
|
+
var later = function later() {
|
|
23
|
+
timeout = null;
|
|
24
|
+
|
|
25
|
+
if (!immediate) {
|
|
26
|
+
method.apply(context, args);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var callNow = immediate && !timeout;
|
|
31
|
+
|
|
32
|
+
if (timeout) {
|
|
33
|
+
clearTimeout(timeout);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
timeout = setTimeout(later, wait);
|
|
37
|
+
|
|
38
|
+
if (callNow) {
|
|
39
|
+
method.apply(context, args);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|