zydx-plus 1.17.74 → 1.17.76

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,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.17.74",
3
+ "version": "1.17.76",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -0,0 +1,6 @@
1
+ import main from './src/checkBox';
2
+
3
+ main.install = function(Vue) {
4
+ Vue.component(main.name, main);
5
+ };
6
+ export default main;
@@ -0,0 +1,48 @@
1
+ <template>
2
+ <span>
3
+ <input type="checkbox" :value="value" :checked="isChecked" @change="emitValue"/>
4
+ </span>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: "zydx-checkBox",
10
+ model: {
11
+ prop: "modelValue",
12
+ event: "update:modelValue"
13
+ },
14
+ props: {
15
+ modelValue: {
16
+ type: Array,
17
+ default: () => []
18
+ },
19
+ value: {
20
+ type: String,
21
+ default: ''
22
+ }
23
+ },
24
+ computed: {
25
+ isChecked () {
26
+ if (this.modelValue.includes(this.value)) {
27
+ return true
28
+ } else {
29
+ return false
30
+ }
31
+ }
32
+ },
33
+ methods: {
34
+ emitValue(e) {
35
+ let value = e.target.value
36
+ if (this.modelValue.includes(this.value)) {
37
+ this.modelValue.splice(this.modelValue.indexOf(value), 1)
38
+ } else {
39
+ this.modelValue.push(value)
40
+ }
41
+ this.$emit('update:modelValue', this.modelValue)
42
+ }
43
+ }
44
+ }
45
+ </script>
46
+
47
+ <style scoped>
48
+ </style>
package/src/index.js CHANGED
@@ -53,7 +53,7 @@ function install(app) {
53
53
  }
54
54
 
55
55
  export default {
56
- version: '1.17.74',
56
+ version: '1.17.76',
57
57
  install,
58
58
  Calendar,
59
59
  Message,