meixioacomponent 0.4.49 → 0.4.52

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": "meixioacomponent",
3
- "version": "0.4.49",
3
+ "version": "0.4.52",
4
4
  "private": false,
5
5
  "author": "YuRi",
6
6
  "main": "lib/meixioacomponent.umd.min.js",
@@ -16,6 +16,7 @@
16
16
  ref="itemUpload"
17
17
  :isGroup="true"
18
18
  :size="outline"
19
+ :disabled="disabled"
19
20
  :fileSize="fileSize"
20
21
  :fileType="fileType"
21
22
  :uploadType="`multiple`"
@@ -76,6 +77,10 @@ export default {
76
77
  fileSize: {
77
78
  default: 99,
78
79
  },
80
+ disabled: {
81
+ type: Boolean,
82
+ default: false,
83
+ },
79
84
  },
80
85
  computed: {
81
86
  module: {
@@ -65,6 +65,7 @@
65
65
  <baseUploadVue
66
66
  v-model="item.value"
67
67
  :max="formConfig.max"
68
+ :disabled="disabled"
68
69
  v-if="formType == `upload`"
69
70
  :uploadPath="item.uploadPath"
70
71
  :class="[`form-item-${item.key}`]"
@@ -23,9 +23,12 @@
23
23
  :rules="rules"
24
24
  :footer="false"
25
25
  v-model="formList"
26
+ :formType="formType"
26
27
  :disabled="disabled"
27
28
  :rowNumber="rowNumber"
28
29
  :labelWidth="labelWidth"
30
+ :labelPosition="labelPosition"
31
+ :formConfig="formConfig"
29
32
  @formItemConfirm="formItemConfirm"
30
33
  >
31
34
  <template v-for="slotItem in slotList">
@@ -33,25 +36,26 @@
33
36
  <slot :scope="formList" :name="`formslot-${slotItem}`"></slot>
34
37
  </template>
35
38
  </template>
36
- </pro_formVue> </template
37
- ></baseSectionVue>
39
+ </pro_formVue>
40
+ </template>
41
+ </baseSectionVue>
38
42
  </div>
39
43
  </template>
40
44
 
41
45
  <script>
42
- import pro_formVue from "../proForm/pro_form.vue";
43
- import baseSectionVue from "../../base/baseSection/baseSection.vue";
46
+ import pro_formVue from '../proForm/pro_form.vue'
47
+ import baseSectionVue from '../../base/baseSection/baseSection.vue'
44
48
  export default {
45
- name: "baseFormWrap",
49
+ name: 'baseFormWrap',
46
50
  data() {
47
51
  return {
48
52
  slotList: [],
49
53
  sectionOpen: true,
50
- };
54
+ }
51
55
  },
52
56
  created() {
53
- this.createSlots();
54
- console.log(this.slotList);
57
+ this.createSlots()
58
+ console.log(this.slotList)
55
59
  },
56
60
  props: {
57
61
  disabled: {
@@ -66,10 +70,13 @@ export default {
66
70
  type: String,
67
71
  require: true,
68
72
  },
69
-
73
+ labelPosition: {
74
+ type: String,
75
+ default: `right`,
76
+ },
70
77
  labelWidth: {
71
78
  type: String,
72
- default: "100px",
79
+ default: '100px',
73
80
  },
74
81
 
75
82
  formList: {
@@ -85,15 +92,22 @@ export default {
85
92
  },
86
93
  size: {
87
94
  type: String,
88
- default: "small",
95
+ default: 'small',
89
96
  },
97
+ formType: {
98
+ type: String,
99
+ default: 'default',
100
+ },
101
+ formConfig:{
102
+
103
+ }
90
104
  },
91
105
  computed: {
92
106
  iconClass() {
93
107
  if (this.sectionOpen) {
94
- return "meixicomponenticon-shouqi";
108
+ return 'meixicomponenticon-shouqi'
95
109
  }
96
- return "meixicomponenticon-xiala";
110
+ return 'meixicomponenticon-xiala'
97
111
  },
98
112
  },
99
113
  components: {
@@ -102,38 +116,38 @@ export default {
102
116
  },
103
117
  methods: {
104
118
  createSlots() {
105
- let slotList = this.slotList;
106
- let formList = this.$props.formList;
119
+ let slotList = this.slotList
120
+ let formList = this.$props.formList
107
121
  for (let i = 0; i < formList.length; i++) {
108
- let citem = formList[i];
109
- if (citem.type == "template") {
110
- slotList.push(citem.key);
122
+ let citem = formList[i]
123
+ if (citem.type == 'template') {
124
+ slotList.push(citem.key)
111
125
  }
112
126
  }
113
127
  },
114
128
 
115
129
  async checkValidate() {
116
- let refs = this.$refs.proForm;
117
- let validateResult = true;
118
- let validate = await refs.checkValidate();
119
- validateResult = validate.result;
130
+ let refs = this.$refs.proForm
131
+ let validateResult = true
132
+ let validate = await refs.checkValidate()
133
+ validateResult = validate.result
120
134
  if (!validateResult) {
121
- return validateResult;
135
+ return validateResult
122
136
  }
123
- return validateResult;
137
+ return validateResult
124
138
  },
125
139
  handleSection() {
126
- this.sectionOpen = !this.sectionOpen;
140
+ this.sectionOpen = !this.sectionOpen
127
141
  },
128
142
  formItemConfirm(configItem) {
129
- this.$emit("formItemConfirm", configItem);
143
+ this.$emit('formItemConfirm', configItem)
130
144
  },
131
145
 
132
146
  getFormValue() {
133
- return this.$refs.proForm.returnFormValue();
147
+ return this.$refs.proForm.returnFormValue()
134
148
  },
135
149
  },
136
- };
150
+ }
137
151
  </script>
138
152
 
139
153
  <style lang="less" scoped>