jsuites 6.4.2 → 6.4.3
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/LICENSE +21 -21
- package/README.md +119 -119
- package/dist/jsuites.css +3424 -3424
- package/dist/jsuites.d.ts +10 -10
- package/dist/jsuites.js +22475 -22450
- package/dist/jsuites.webcomponents.js +501 -501
- package/dist/types/animation.d.ts +23 -23
- package/dist/types/calendar.d.ts +87 -87
- package/dist/types/color.d.ts +50 -50
- package/dist/types/contextmenu.d.ts +43 -43
- package/dist/types/dropdown.d.ts +177 -177
- package/dist/types/editor.d.ts +96 -96
- package/dist/types/floating.d.ts +23 -23
- package/dist/types/form.d.ts +57 -57
- package/dist/types/index.d.ts +59 -59
- package/dist/types/mask.d.ts +50 -50
- package/dist/types/modal.d.ts +35 -35
- package/dist/types/notification.d.ts +27 -27
- package/dist/types/picker.d.ts +45 -45
- package/dist/types/rating.d.ts +19 -19
- package/dist/types/search.d.ts +23 -23
- package/dist/types/slider.d.ts +31 -31
- package/dist/types/tabs.d.ts +79 -79
- package/dist/types/tags.d.ts +105 -105
- package/dist/types/toolbar.d.ts +70 -70
- package/dist/types/upload.d.ts +45 -45
- package/dist/types/validations.d.ts +39 -39
- package/package.json +4 -4
- package/react/calendar/index.d.ts +105 -105
- package/react/calendar/index.js +28 -28
- package/react/color/index.d.ts +84 -84
- package/react/color/index.js +28 -28
- package/react/contextmenu/index.d.ts +61 -61
- package/react/contextmenu/index.js +24 -24
- package/react/dropdown/index.d.ts +184 -184
- package/react/dropdown/index.js +25 -25
- package/react/editor/index.d.ts +114 -114
- package/react/editor/index.js +31 -31
- package/react/index.js +26 -26
- package/react/modal/index.d.ts +53 -53
- package/react/modal/index.js +30 -30
- package/react/picker/index.d.ts +64 -64
- package/react/picker/index.js +28 -28
- package/react/rating/index.d.ts +37 -37
- package/react/rating/index.js +28 -28
- package/react/slider/index.d.ts +49 -49
- package/react/slider/index.js +30 -30
- package/react/tabs/index.d.ts +97 -97
- package/react/tabs/index.js +29 -29
- package/react/tags/index.d.ts +121 -121
- package/react/tags/index.js +24 -24
- package/react/toolbar/index.d.ts +88 -88
- package/react/toolbar/index.js +24 -24
- package/vue/calendar/index.d.ts +105 -105
- package/vue/calendar/index.js +36 -36
- package/vue/color/index.d.ts +84 -84
- package/vue/color/index.js +36 -36
- package/vue/contextmenu/index.d.ts +61 -61
- package/vue/contextmenu/index.js +21 -21
- package/vue/dropdown/index.d.ts +184 -184
- package/vue/dropdown/index.js +25 -25
- package/vue/editor/index.d.ts +114 -114
- package/vue/editor/index.js +40 -40
- package/vue/index.js +40 -40
- package/vue/modal/index.d.ts +53 -53
- package/vue/modal/index.js +41 -41
- package/vue/picker/index.d.ts +64 -64
- package/vue/picker/index.js +36 -36
- package/vue/rating/index.d.ts +37 -37
- package/vue/rating/index.js +36 -36
- package/vue/slider/index.d.ts +49 -49
- package/vue/slider/index.js +33 -33
- package/vue/tabs/index.d.ts +97 -97
- package/vue/tabs/index.js +28 -28
- package/vue/tags/index.d.ts +121 -121
- package/vue/tags/index.js +21 -21
- package/vue/toolbar/index.d.ts +88 -88
- package/vue/toolbar/index.js +21 -21
package/vue/picker/index.d.ts
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Official Type definitions for LemonadeJS plugins
|
|
3
|
-
* https://lemonadejs.net
|
|
4
|
-
* Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
declare function Component(el: HTMLElement, options?: Component.Options): Component.Instance;
|
|
8
|
-
|
|
9
|
-
declare namespace Component {
|
|
10
|
-
interface Options {
|
|
11
|
-
/** Data items */
|
|
12
|
-
data?: Record<number, string>;
|
|
13
|
-
/** Method for rendering the items */
|
|
14
|
-
render?: (label: string, item: object) => string;
|
|
15
|
-
/** Event when value is changed */
|
|
16
|
-
onchange?: (el: HTMLElement, instance: Picker, reservedValue: string, value: string, index: number, e: MouseEvent) => void;
|
|
17
|
-
/** Event when value is changed */
|
|
18
|
-
onopen?: (el: HTMLElement, instance: Picker) => void;
|
|
19
|
-
/** Event when value is changed */
|
|
20
|
-
onclose?: (el: HTMLElement, instance: Picker) => void;
|
|
21
|
-
/** Event when value is changed */
|
|
22
|
-
onload?: (el: HTMLElement, instance: Picker) => void;
|
|
23
|
-
/** Default width */
|
|
24
|
-
width?: number;
|
|
25
|
-
/** Show the header. Default: true */
|
|
26
|
-
header?: boolean;
|
|
27
|
-
/** Align right. Default: false */
|
|
28
|
-
right?: boolean;
|
|
29
|
-
/** Open picker from bottom to top direction. Default: false */
|
|
30
|
-
bottom?: boolean;
|
|
31
|
-
/** Replace the header value by an material icon keyword. Default: false */
|
|
32
|
-
content?: boolean;
|
|
33
|
-
/** Number elements per line. Default: null */
|
|
34
|
-
columns?: number;
|
|
35
|
-
/** Order elements in a grid. Default: null */
|
|
36
|
-
grid?: number;
|
|
37
|
-
/** Default height */
|
|
38
|
-
height?: null;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
interface Instance {
|
|
42
|
-
/** Get the current selected value */
|
|
43
|
-
getValue: () => void;
|
|
44
|
-
/** Set the current value for the component */
|
|
45
|
-
setValue: (v: number, event: MouseEvent | boolean) => void;
|
|
46
|
-
/** Internal method. Get the label */
|
|
47
|
-
getLabel: (v, item) => void;
|
|
48
|
-
/** Internal method. Set the label */
|
|
49
|
-
setLabel: (v) => void;
|
|
50
|
-
/** Open the picker */
|
|
51
|
-
open: () => void;
|
|
52
|
-
/** Close the picker */
|
|
53
|
-
close: () => void;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
interface Picker {
|
|
59
|
-
(): any
|
|
60
|
-
[key: string]: any
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
declare function Picker<Picker>(props: Component.Options): any;
|
|
64
|
-
export default Picker;
|
|
1
|
+
/**
|
|
2
|
+
* Official Type definitions for LemonadeJS plugins
|
|
3
|
+
* https://lemonadejs.net
|
|
4
|
+
* Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
declare function Component(el: HTMLElement, options?: Component.Options): Component.Instance;
|
|
8
|
+
|
|
9
|
+
declare namespace Component {
|
|
10
|
+
interface Options {
|
|
11
|
+
/** Data items */
|
|
12
|
+
data?: Record<number, string>;
|
|
13
|
+
/** Method for rendering the items */
|
|
14
|
+
render?: (label: string, item: object) => string;
|
|
15
|
+
/** Event when value is changed */
|
|
16
|
+
onchange?: (el: HTMLElement, instance: Picker, reservedValue: string, value: string, index: number, e: MouseEvent) => void;
|
|
17
|
+
/** Event when value is changed */
|
|
18
|
+
onopen?: (el: HTMLElement, instance: Picker) => void;
|
|
19
|
+
/** Event when value is changed */
|
|
20
|
+
onclose?: (el: HTMLElement, instance: Picker) => void;
|
|
21
|
+
/** Event when value is changed */
|
|
22
|
+
onload?: (el: HTMLElement, instance: Picker) => void;
|
|
23
|
+
/** Default width */
|
|
24
|
+
width?: number;
|
|
25
|
+
/** Show the header. Default: true */
|
|
26
|
+
header?: boolean;
|
|
27
|
+
/** Align right. Default: false */
|
|
28
|
+
right?: boolean;
|
|
29
|
+
/** Open picker from bottom to top direction. Default: false */
|
|
30
|
+
bottom?: boolean;
|
|
31
|
+
/** Replace the header value by an material icon keyword. Default: false */
|
|
32
|
+
content?: boolean;
|
|
33
|
+
/** Number elements per line. Default: null */
|
|
34
|
+
columns?: number;
|
|
35
|
+
/** Order elements in a grid. Default: null */
|
|
36
|
+
grid?: number;
|
|
37
|
+
/** Default height */
|
|
38
|
+
height?: null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface Instance {
|
|
42
|
+
/** Get the current selected value */
|
|
43
|
+
getValue: () => void;
|
|
44
|
+
/** Set the current value for the component */
|
|
45
|
+
setValue: (v: number, event: MouseEvent | boolean) => void;
|
|
46
|
+
/** Internal method. Get the label */
|
|
47
|
+
getLabel: (v, item) => void;
|
|
48
|
+
/** Internal method. Set the label */
|
|
49
|
+
setLabel: (v) => void;
|
|
50
|
+
/** Open the picker */
|
|
51
|
+
open: () => void;
|
|
52
|
+
/** Close the picker */
|
|
53
|
+
close: () => void;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
interface Picker {
|
|
59
|
+
(): any
|
|
60
|
+
[key: string]: any
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare function Picker<Picker>(props: Component.Options): any;
|
|
64
|
+
export default Picker;
|
package/vue/picker/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { h } from 'vue';
|
|
2
|
-
import jSuites from "../../dist/jsuites";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
inheritAttrs: false,
|
|
7
|
-
mounted() {
|
|
8
|
-
let options = {
|
|
9
|
-
...this.$attrs
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
this.el = this.$refs.container;
|
|
13
|
-
|
|
14
|
-
this.current = jSuites.picker(this.$refs.container, options);
|
|
15
|
-
},
|
|
16
|
-
setup() {
|
|
17
|
-
let containerProps = {
|
|
18
|
-
ref: 'container',
|
|
19
|
-
};
|
|
20
|
-
return () => h('div', containerProps);
|
|
21
|
-
},
|
|
22
|
-
watch: {
|
|
23
|
-
$attrs: {
|
|
24
|
-
deep: true,
|
|
25
|
-
handler() {
|
|
26
|
-
this.updateState();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
methods: {
|
|
31
|
-
updateState() {
|
|
32
|
-
if (this.$attrs["value"] !== this.current["value"]) {
|
|
33
|
-
this.current.setValue(this.$attrs["value"])
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
1
|
+
import { h } from 'vue';
|
|
2
|
+
import jSuites from "../../dist/jsuites";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
mounted() {
|
|
8
|
+
let options = {
|
|
9
|
+
...this.$attrs
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
this.el = this.$refs.container;
|
|
13
|
+
|
|
14
|
+
this.current = jSuites.picker(this.$refs.container, options);
|
|
15
|
+
},
|
|
16
|
+
setup() {
|
|
17
|
+
let containerProps = {
|
|
18
|
+
ref: 'container',
|
|
19
|
+
};
|
|
20
|
+
return () => h('div', containerProps);
|
|
21
|
+
},
|
|
22
|
+
watch: {
|
|
23
|
+
$attrs: {
|
|
24
|
+
deep: true,
|
|
25
|
+
handler() {
|
|
26
|
+
this.updateState();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
updateState() {
|
|
32
|
+
if (this.$attrs["value"] !== this.current["value"]) {
|
|
33
|
+
this.current.setValue(this.$attrs["value"])
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
37
|
}
|
package/vue/rating/index.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Official Type definitions for LemonadeJS plugins
|
|
3
|
-
* https://lemonadejs.net
|
|
4
|
-
* Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
declare function Component(el: HTMLElement, options?: Component.Options): Component.Instance;
|
|
8
|
-
|
|
9
|
-
declare namespace Component {
|
|
10
|
-
interface Options {
|
|
11
|
-
/** Number of stars */
|
|
12
|
-
number?: 5,
|
|
13
|
-
/** Current value */
|
|
14
|
-
value?: number,
|
|
15
|
-
/** Example by default. [ 'Very bad', 'Bad', 'Average', 'Good', 'Very good' ] */
|
|
16
|
-
tooltip?: string[],
|
|
17
|
-
/** When the value changes */
|
|
18
|
-
onchange?: () => void,
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface Instance {
|
|
22
|
-
/** Change the value */
|
|
23
|
-
setValue: (index: number) => void;
|
|
24
|
-
/** Get the current value */
|
|
25
|
-
getValue: () => void;
|
|
26
|
-
/** Current options */
|
|
27
|
-
options: Component.Options;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
interface Rating {
|
|
32
|
-
(): any
|
|
33
|
-
[key: string]: any
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
declare function Rating<Rating>(props: Component.Options): any;
|
|
37
|
-
export default Rating;
|
|
1
|
+
/**
|
|
2
|
+
* Official Type definitions for LemonadeJS plugins
|
|
3
|
+
* https://lemonadejs.net
|
|
4
|
+
* Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
declare function Component(el: HTMLElement, options?: Component.Options): Component.Instance;
|
|
8
|
+
|
|
9
|
+
declare namespace Component {
|
|
10
|
+
interface Options {
|
|
11
|
+
/** Number of stars */
|
|
12
|
+
number?: 5,
|
|
13
|
+
/** Current value */
|
|
14
|
+
value?: number,
|
|
15
|
+
/** Example by default. [ 'Very bad', 'Bad', 'Average', 'Good', 'Very good' ] */
|
|
16
|
+
tooltip?: string[],
|
|
17
|
+
/** When the value changes */
|
|
18
|
+
onchange?: () => void,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface Instance {
|
|
22
|
+
/** Change the value */
|
|
23
|
+
setValue: (index: number) => void;
|
|
24
|
+
/** Get the current value */
|
|
25
|
+
getValue: () => void;
|
|
26
|
+
/** Current options */
|
|
27
|
+
options: Component.Options;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface Rating {
|
|
32
|
+
(): any
|
|
33
|
+
[key: string]: any
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare function Rating<Rating>(props: Component.Options): any;
|
|
37
|
+
export default Rating;
|
package/vue/rating/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { h } from 'vue';
|
|
2
|
-
import jSuites from "../../dist/jsuites";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
inheritAttrs: false,
|
|
7
|
-
mounted() {
|
|
8
|
-
let options = {
|
|
9
|
-
...this.$attrs
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
this.el = this.$refs.container;
|
|
13
|
-
|
|
14
|
-
this.current = jSuites.rating(this.$refs.container, options);
|
|
15
|
-
},
|
|
16
|
-
setup() {
|
|
17
|
-
let containerProps = {
|
|
18
|
-
ref: 'container',
|
|
19
|
-
};
|
|
20
|
-
return () => h('div', containerProps);
|
|
21
|
-
},
|
|
22
|
-
watch: {
|
|
23
|
-
$attrs: {
|
|
24
|
-
deep: true,
|
|
25
|
-
handler() {
|
|
26
|
-
this.updateState();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
methods: {
|
|
31
|
-
updateState() {
|
|
32
|
-
if (this.$attrs["value"] !== this.current["value"]) {
|
|
33
|
-
this.current.setValue(this.$attrs["value"])
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
1
|
+
import { h } from 'vue';
|
|
2
|
+
import jSuites from "../../dist/jsuites";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
mounted() {
|
|
8
|
+
let options = {
|
|
9
|
+
...this.$attrs
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
this.el = this.$refs.container;
|
|
13
|
+
|
|
14
|
+
this.current = jSuites.rating(this.$refs.container, options);
|
|
15
|
+
},
|
|
16
|
+
setup() {
|
|
17
|
+
let containerProps = {
|
|
18
|
+
ref: 'container',
|
|
19
|
+
};
|
|
20
|
+
return () => h('div', containerProps);
|
|
21
|
+
},
|
|
22
|
+
watch: {
|
|
23
|
+
$attrs: {
|
|
24
|
+
deep: true,
|
|
25
|
+
handler() {
|
|
26
|
+
this.updateState();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
updateState() {
|
|
32
|
+
if (this.$attrs["value"] !== this.current["value"]) {
|
|
33
|
+
this.current.setValue(this.$attrs["value"])
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
37
|
}
|
package/vue/slider/index.d.ts
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Official Type definitions for LemonadeJS plugins
|
|
3
|
-
* https://lemonadejs.net
|
|
4
|
-
* Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
declare function Component(el: HTMLElement, options?: Component.Options): Component.Instance;
|
|
8
|
-
|
|
9
|
-
declare namespace Component {
|
|
10
|
-
interface Options {
|
|
11
|
-
/** Items */
|
|
12
|
-
items: [];
|
|
13
|
-
/** Height */
|
|
14
|
-
height: number
|
|
15
|
-
/** Height */
|
|
16
|
-
width: number
|
|
17
|
-
/** Height */
|
|
18
|
-
grid: boolean
|
|
19
|
-
/** Height */
|
|
20
|
-
onopen: (el: HTMLElement) => void
|
|
21
|
-
/** Height */
|
|
22
|
-
onclose: (el: HTMLElement) => void
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface Instance {
|
|
26
|
-
/** Update the number of photos label */
|
|
27
|
-
updateCounter: (index) => void;
|
|
28
|
-
/** Open photo preview with a photo define in the arguments */
|
|
29
|
-
show: (target) => void;
|
|
30
|
-
/** Open photo preview */
|
|
31
|
-
open: () => void;
|
|
32
|
-
/** Close the photo preview */
|
|
33
|
-
close: () => void;
|
|
34
|
-
/** Reset photos */
|
|
35
|
-
reset: () => void;
|
|
36
|
-
/** Next photo */
|
|
37
|
-
next: () => void;
|
|
38
|
-
/** Previous photo */
|
|
39
|
-
prev: () => void;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
interface Slider {
|
|
44
|
-
(): any
|
|
45
|
-
[key: string]: any
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
declare function Slider<Slider>(props: Component.Options): any;
|
|
49
|
-
export default Slider;
|
|
1
|
+
/**
|
|
2
|
+
* Official Type definitions for LemonadeJS plugins
|
|
3
|
+
* https://lemonadejs.net
|
|
4
|
+
* Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
declare function Component(el: HTMLElement, options?: Component.Options): Component.Instance;
|
|
8
|
+
|
|
9
|
+
declare namespace Component {
|
|
10
|
+
interface Options {
|
|
11
|
+
/** Items */
|
|
12
|
+
items: [];
|
|
13
|
+
/** Height */
|
|
14
|
+
height: number
|
|
15
|
+
/** Height */
|
|
16
|
+
width: number
|
|
17
|
+
/** Height */
|
|
18
|
+
grid: boolean
|
|
19
|
+
/** Height */
|
|
20
|
+
onopen: (el: HTMLElement) => void
|
|
21
|
+
/** Height */
|
|
22
|
+
onclose: (el: HTMLElement) => void
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface Instance {
|
|
26
|
+
/** Update the number of photos label */
|
|
27
|
+
updateCounter: (index) => void;
|
|
28
|
+
/** Open photo preview with a photo define in the arguments */
|
|
29
|
+
show: (target) => void;
|
|
30
|
+
/** Open photo preview */
|
|
31
|
+
open: () => void;
|
|
32
|
+
/** Close the photo preview */
|
|
33
|
+
close: () => void;
|
|
34
|
+
/** Reset photos */
|
|
35
|
+
reset: () => void;
|
|
36
|
+
/** Next photo */
|
|
37
|
+
next: () => void;
|
|
38
|
+
/** Previous photo */
|
|
39
|
+
prev: () => void;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface Slider {
|
|
44
|
+
(): any
|
|
45
|
+
[key: string]: any
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare function Slider<Slider>(props: Component.Options): any;
|
|
49
|
+
export default Slider;
|
package/vue/slider/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { h } from 'vue';
|
|
2
|
-
import jSuites from "../../dist/jsuites";
|
|
3
|
-
|
|
4
|
-
export const Slider = {
|
|
5
|
-
inheritAttrs: false,
|
|
6
|
-
mounted() {
|
|
7
|
-
let options = {
|
|
8
|
-
...this.$attrs
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
this.el = this.$refs.container;
|
|
12
|
-
|
|
13
|
-
this.current = jSuites.slider(this.$refs.container, options);
|
|
14
|
-
},
|
|
15
|
-
setup(_, context) {
|
|
16
|
-
let containerProps = {
|
|
17
|
-
ref: 'container',
|
|
18
|
-
style: {
|
|
19
|
-
width: '100%',
|
|
20
|
-
height: '100%',
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
let vnode = [];
|
|
25
|
-
|
|
26
|
-
if (context.slots.default && typeof (context.slots.default) === 'function') {
|
|
27
|
-
vnode = context.slots.default()
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return () => h('div', containerProps, vnode);
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
|
|
1
|
+
import { h } from 'vue';
|
|
2
|
+
import jSuites from "../../dist/jsuites";
|
|
3
|
+
|
|
4
|
+
export const Slider = {
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
mounted() {
|
|
7
|
+
let options = {
|
|
8
|
+
...this.$attrs
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
this.el = this.$refs.container;
|
|
12
|
+
|
|
13
|
+
this.current = jSuites.slider(this.$refs.container, options);
|
|
14
|
+
},
|
|
15
|
+
setup(_, context) {
|
|
16
|
+
let containerProps = {
|
|
17
|
+
ref: 'container',
|
|
18
|
+
style: {
|
|
19
|
+
width: '100%',
|
|
20
|
+
height: '100%',
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
let vnode = [];
|
|
25
|
+
|
|
26
|
+
if (context.slots.default && typeof (context.slots.default) === 'function') {
|
|
27
|
+
vnode = context.slots.default()
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return () => h('div', containerProps, vnode);
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
34
|
export default Slider;
|