doway-coms 1.6.63 → 1.6.64

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 (69) hide show
  1. package/.browserslistrc +2 -2
  2. package/README.md +28 -28
  3. package/package.json +52 -52
  4. package/packages/BaseButton/index.js +7 -7
  5. package/packages/BaseButton/src/index.vue +241 -241
  6. package/packages/BaseCheckbox/index.js +7 -7
  7. package/packages/BaseCheckbox/src/index.vue +134 -134
  8. package/packages/BaseDate/index.js +7 -7
  9. package/packages/BaseDate/src/index.vue +197 -197
  10. package/packages/BaseDateMonth/index.js +8 -0
  11. package/packages/BaseDateMonth/src/index.vue +164 -0
  12. package/packages/BaseDateWeek/index.js +7 -7
  13. package/packages/BaseDateWeek/src/index.vue +163 -163
  14. package/packages/BaseDatetime/index.js +7 -7
  15. package/packages/BaseDatetime/src/index.vue +196 -196
  16. package/packages/BaseForm/index.js +7 -7
  17. package/packages/BaseForm/src/index.vue +686 -666
  18. package/packages/BaseGantt/index.js +9 -9
  19. package/packages/BaseGantt/src/index.vue +608 -608
  20. package/packages/BaseGrid/index.js +9 -9
  21. package/packages/BaseGrid/src/index.vue +2735 -2735
  22. package/packages/BaseGridAdjust/index.js +9 -9
  23. package/packages/BaseGridAdjust/src/index.vue +482 -482
  24. package/packages/BaseInput/index.js +7 -7
  25. package/packages/BaseInput/src/index.vue +164 -164
  26. package/packages/BaseIntervalInput/index.js +7 -7
  27. package/packages/BaseIntervalInput/src/index.vue +310 -310
  28. package/packages/BaseKanbanEmpty/index.js +7 -7
  29. package/packages/BaseKanbanEmpty/src/index.vue +176 -176
  30. package/packages/BaseNumberInput/index.js +7 -7
  31. package/packages/BaseNumberInput/src/index.vue +229 -229
  32. package/packages/BasePagination/index.js +7 -7
  33. package/packages/BasePagination/src/index.vue +91 -91
  34. package/packages/BasePictureCard/index.js +7 -7
  35. package/packages/BasePictureCard/src/index.vue +580 -580
  36. package/packages/BasePrintPreview/index.js +7 -7
  37. package/packages/BasePrintPreview/src/index.vue +117 -117
  38. package/packages/BasePulldown/index.js +7 -7
  39. package/packages/BasePulldown/src/index.vue +1136 -1136
  40. package/packages/BaseSearch/index.js +7 -7
  41. package/packages/BaseSearch/src/index.vue +935 -935
  42. package/packages/BaseSelect/index.js +7 -7
  43. package/packages/BaseSelect/src/index.vue +155 -155
  44. package/packages/BaseSelectMulti/index.js +7 -7
  45. package/packages/BaseSelectMulti/src/index.vue +148 -148
  46. package/packages/BaseTextArea/index.js +7 -7
  47. package/packages/BaseTextArea/src/index.vue +178 -178
  48. package/packages/BaseTime/index.js +7 -7
  49. package/packages/BaseTime/src/index.vue +166 -166
  50. package/packages/BaseTool/index.js +7 -7
  51. package/packages/BaseTool/src/index.vue +349 -349
  52. package/packages/BaseToolStatus/index.js +7 -7
  53. package/packages/BaseToolStatus/src/index.vue +388 -388
  54. package/packages/LeaveAMessage/index.js +7 -7
  55. package/packages/LeaveAMessage/src/index.vue +568 -568
  56. package/packages/index.js +167 -167
  57. package/packages/styles/default.less +80 -80
  58. package/packages/utils/api.js +88 -88
  59. package/packages/utils/auth.js +38 -38
  60. package/packages/utils/common.js +595 -595
  61. package/packages/utils/dom.js +181 -181
  62. package/packages/utils/enum.js +83 -83
  63. package/packages/utils/filters.js +458 -458
  64. package/packages/utils/gridFormat.js +60 -60
  65. package/packages/utils/msg.js +16 -16
  66. package/packages/utils/patchFiles.js +44 -44
  67. package/packages/utils/request.js +169 -169
  68. package/packages/utils/store.js +261 -261
  69. package/vue.config.js +59 -59
package/.browserslistrc CHANGED
@@ -1,2 +1,2 @@
1
- > 1%
2
- last 2 versions
1
+ > 1%
2
+ last 2 versions
package/README.md CHANGED
@@ -1,29 +1,29 @@
1
- # doway-coms
2
-
3
- ## Project setup
4
- ```
5
- npm install
6
- ```
7
-
8
- ### Compiles and hot-reloads for development
9
- ```
10
- npm run serve
11
- ```
12
-
13
- ### Compiles and minifies for production
14
- ```
15
- npm run build
16
- ```
17
-
18
- ### Lints and fixes files
19
- ```
20
- npm run lint
21
- ```
22
-
23
- ### Customize configuration
24
- See [Configuration Reference](https://cli.vuejs.org/config/).
25
-
26
- ### 发布到npm
27
- ```
28
- npm publish
1
+ # doway-coms
2
+
3
+ ## Project setup
4
+ ```
5
+ npm install
6
+ ```
7
+
8
+ ### Compiles and hot-reloads for development
9
+ ```
10
+ npm run serve
11
+ ```
12
+
13
+ ### Compiles and minifies for production
14
+ ```
15
+ npm run build
16
+ ```
17
+
18
+ ### Lints and fixes files
19
+ ```
20
+ npm run lint
21
+ ```
22
+
23
+ ### Customize configuration
24
+ See [Configuration Reference](https://cli.vuejs.org/config/).
25
+
26
+ ### 发布到npm
27
+ ```
28
+ npm publish
29
29
  ```
package/package.json CHANGED
@@ -1,52 +1,52 @@
1
- {
2
- "name": "doway-coms",
3
- "version": "1.6.63",
4
- "description": "doway组件库",
5
- "author": "dowaysoft",
6
- "main": "packages/index.js",
7
- "license": "MIT",
8
- "scripts": {
9
- "dev": "vue-cli-service serve",
10
- "build": "vue-cli-service build",
11
- "lint": "vue-cli-service lint",
12
- "lib": "vue-cli-service build --target lib --name doway-coms --dest lib packages/index.js",
13
- "build:test": "vue-cli-service build --report"
14
- },
15
- "dependencies": {
16
- "ant-design-vue": "1.7.8",
17
- "axios": "0.18.0",
18
- "element-resize-detector": "^1.2.4",
19
- "js-cookie": "2.2.0",
20
- "vee-validate": "3.4.14",
21
- "vue": "2.7.14",
22
- "vue-contextmenujs": "^1.4.9",
23
- "vue-router": "3.6.5",
24
- "vuedraggable": "^2.24.3",
25
- "vuex": "3.6.2",
26
- "vxe-table": "3.5.4",
27
- "xe-clipboard": "1.10.2",
28
- "xe-utils": "3.5.4"
29
- },
30
- "devDependencies": {
31
- "@vue/cli-plugin-babel": "~4.2.0",
32
- "@vue/cli-plugin-eslint": "~4.2.0",
33
- "@vue/cli-plugin-vuex": "~4.2.0",
34
- "@vue/cli-service": "~4.2.0",
35
- "babel-eslint": "^10.0.3",
36
- "babel-plugin-component": "^1.1.1",
37
- "babel-plugin-import": "^1.13.6",
38
- "eslint": "^6.7.2",
39
- "eslint-plugin-vue": "^6.1.2",
40
- "extract-text-webpack-plugin": "^3.0.2",
41
- "less-loader": "^6.0.0",
42
- "node-sass": "8.0.0",
43
- "sass-loader": "10.4.1",
44
- "vue-template-compiler": "^2.6.11"
45
- },
46
- "bundleDependencies": false,
47
- "repository": {
48
- "type": "git",
49
- "url": "https://www.npmjs.com/package/doway-coms.git"
50
- },
51
- "keywords": []
52
- }
1
+ {
2
+ "name": "doway-coms",
3
+ "version": "1.6.64",
4
+ "description": "doway组件库",
5
+ "author": "dowaysoft",
6
+ "main": "packages/index.js",
7
+ "license": "MIT",
8
+ "scripts": {
9
+ "dev": "vue-cli-service serve",
10
+ "build": "vue-cli-service build",
11
+ "lint": "vue-cli-service lint",
12
+ "lib": "vue-cli-service build --target lib --name doway-coms --dest lib packages/index.js",
13
+ "build:test": "vue-cli-service build --report"
14
+ },
15
+ "dependencies": {
16
+ "ant-design-vue": "1.7.8",
17
+ "axios": "0.18.0",
18
+ "element-resize-detector": "^1.2.4",
19
+ "js-cookie": "2.2.0",
20
+ "vee-validate": "3.4.14",
21
+ "vue": "2.7.14",
22
+ "vue-contextmenujs": "^1.4.9",
23
+ "vue-router": "3.6.5",
24
+ "vuedraggable": "^2.24.3",
25
+ "vuex": "3.6.2",
26
+ "vxe-table": "3.5.4",
27
+ "xe-clipboard": "1.10.2",
28
+ "xe-utils": "3.5.4"
29
+ },
30
+ "devDependencies": {
31
+ "@vue/cli-plugin-babel": "~4.2.0",
32
+ "@vue/cli-plugin-eslint": "~4.2.0",
33
+ "@vue/cli-plugin-vuex": "~4.2.0",
34
+ "@vue/cli-service": "~4.2.0",
35
+ "babel-eslint": "^10.0.3",
36
+ "babel-plugin-component": "^1.1.1",
37
+ "babel-plugin-import": "^1.13.6",
38
+ "eslint": "^6.7.2",
39
+ "eslint-plugin-vue": "^6.1.2",
40
+ "extract-text-webpack-plugin": "^3.0.2",
41
+ "less-loader": "^6.0.0",
42
+ "node-sass": "8.0.0",
43
+ "sass-loader": "10.4.1",
44
+ "vue-template-compiler": "^2.6.11"
45
+ },
46
+ "bundleDependencies": false,
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "https://www.npmjs.com/package/doway-coms.git"
50
+ },
51
+ "keywords": []
52
+ }
@@ -1,8 +1,8 @@
1
- // 导入组件,组件必须声明 name
2
- import BaseButton from './src/index.vue';
3
- // 为组件提供 install 安装方法,供按需引入
4
- BaseButton.install = function(Vue) {
5
- Vue.component(BaseButton.name, BaseButton);
6
- };
7
- // 默认导出组件
1
+ // 导入组件,组件必须声明 name
2
+ import BaseButton from './src/index.vue';
3
+ // 为组件提供 install 安装方法,供按需引入
4
+ BaseButton.install = function(Vue) {
5
+ Vue.component(BaseButton.name, BaseButton);
6
+ };
7
+ // 默认导出组件
8
8
  export default BaseButton;
@@ -1,241 +1,241 @@
1
- <template>
2
- <div class="d-control-container">
3
- <div class="d-control-label">
4
- {{ colInfo.title
5
- }}<span
6
- v-if="colInfo.rules && colInfo.rules['required']"
7
- class="d-control-label-required"
8
- >*
9
- </span>
10
- </div>
11
- <div class="d-control">
12
- <ValidationProvider
13
- :name="colInfo.title"
14
- v-slot="v"
15
- :rules="colInfo.rules"
16
- >
17
- <span
18
- v-if="
19
- currentValue !== null &&
20
- currentValue !== '' &&
21
- currentValue !== undefined
22
- "
23
- >
24
- {{ currentValue }}&nbsp;&nbsp;&nbsp;
25
- </span>
26
- <Button type="primary" :size="'small'" @click="buttonClick">{{
27
- colInfo.buttonTitle
28
- }}</Button>
29
- <div class="d-error-msg">
30
- {{ v.errors[0] }}
31
- </div>
32
- <!-- 弹出框输入,单独保存接口 -->
33
- <Modal
34
- v-model="visibleModal"
35
- :title="colInfo.buttonTitle + '--' + colInfo.title"
36
- @ok="handleOk"
37
- >
38
- <!-- 文本框输入 -->
39
- <Input
40
- v-if="
41
- colInfo.controlType == 'text' ||
42
- colInfo.controlType == null ||
43
- colInfo.controlType == undefined
44
- "
45
- :size="'small'"
46
- v-model="showValue"
47
- placeholder="请输入需保存的值"
48
- style="width: 100%"
49
- :class="{ 'd-error-input': v.errors.length > 0 }"
50
- />
51
- <!-- 文本框输入控件 -->
52
- <BaseTextArea
53
- v-if="colInfo.controlType === 'textarea'"
54
- :label="colInfo.title"
55
- v-model="currentValue"
56
- :edit="true"
57
- :rules="colInfo.rules"
58
- />
59
- <!-- 日期选择控件 -->
60
- <BaseDate
61
- v-if="colInfo.controlType === 'date'"
62
- :label="colInfo.title"
63
- v-model="currentValue"
64
- :pastDate="colInfo.pastDate"
65
- :rules="colInfo.rules"
66
- :edit="true"
67
- />
68
- <!-- 日期时间控件 -->
69
- <BaseDatetime
70
- v-if="colInfo.controlType === 'datetime'"
71
- :label="colInfo.title"
72
- v-model="currentValue"
73
- :pastDate="colInfo.pastDate"
74
- :rules="colInfo.rules"
75
- :edit="true"
76
- />
77
- <!-- 时间选择控件 -->
78
- <BaseTime
79
- v-if="colInfo.controlType === 'time'"
80
- :label="colInfo.title"
81
- v-model="currentValue"
82
- :edit="true"
83
- :rules="colInfo.rules"
84
- />
85
- <!-- 周数选择器 -->
86
- <BaseDateWeek
87
- v-if="colInfo.controlType === 'dateweek'"
88
- :label="colInfo.title"
89
- v-model="currentValue"
90
- :edit="true"
91
- :rules="colInfo.rules"
92
- />
93
- <!-- 数字输入 -->
94
- <BaseNumberInput
95
- v-if="colInfo.controlType === 'number'"
96
- :label="colInfo.title"
97
- v-model="currentValue"
98
- :edit="true"
99
- :rules="colInfo.rules"
100
- :min="colInfo.min"
101
- :max="colInfo.max"
102
- :precision="colInfo.precision"
103
- />
104
- <BaseIntervalInput
105
- v-if="colInfo.controlType === 'interval'"
106
- :label="colInfo.title"
107
- v-model="currentValue"
108
- :edit="true"
109
- :rules="colInfo.rules"
110
- :displayType="colInfo.displayType"
111
- :valueType="colInfo.valueType"
112
- />
113
- <!-- 单选框 -->
114
- <BaseCheckbox
115
- v-if="colInfo.controlType === 'checkbox'"
116
- :label="colInfo.title"
117
- v-model="currentValue"
118
- :edit="true"
119
- :rules="colInfo.rules"
120
- />
121
- <!-- 下拉选择器 -->
122
- <BaseSelect
123
- v-if="colInfo.controlType === 'select'"
124
- :label="colInfo.title"
125
- v-model="currentValue"
126
- :edit="true"
127
- :rules="colInfo.rules"
128
- :dataSource="colInfo.dataSource"
129
- />
130
- <BaseSelectMulti
131
- v-if="colInfo.controlType === 'dropmulti'"
132
- :label="colInfo.title"
133
- v-model="currentValue"
134
- :edit="colInfo.edit"
135
- :rules="colInfo.rules"
136
- :dataSource="colInfo.dataSource"
137
- />
138
- <!-- 下拉表格容器 -->
139
- <BasePulldown
140
- v-if="colInfo.controlType === 'pulldown'"
141
- :formRow="formRow"
142
- :edit="true"
143
- :defaultExpression="colInfo.defaultExpression"
144
- :row="row"
145
- :api="colInfo.api"
146
- :optBtns="colInfo.optBtns"
147
- :popupAddName="colInfo.popupAddName"
148
- :popupAddPath="colInfo.popupAddPath"
149
- :label="colInfo.title"
150
- :rules="colInfo.rules"
151
- :route="colInfo.route"
152
- v-model="currentValue"
153
- :field="colInfo.field"
154
- :columns="colInfo.columns"
155
- :pageSize="colInfo.pageSize"
156
- :immediate="colInfo.immediate"
157
- />
158
- </Modal>
159
- </ValidationProvider>
160
- </div>
161
- </div>
162
- </template>
163
- <script>
164
- import { Modal, Input, Button } from 'ant-design-vue'
165
- import { ValidationProvider } from 'vee-validate'
166
- export default {
167
- name: 'BaseButton',
168
- components: {
169
- ValidationProvider,
170
- Modal,
171
- Input,
172
- Button,
173
- },
174
- data() {
175
- return {
176
- showValue: '',
177
- // 弹出框是否展示
178
- visibleModal: false
179
- }
180
- },
181
- computed: {
182
- currentValue: {
183
- // 动态计算currentValue的值
184
- get: function() {
185
- return this.value // 将props中的value赋值给currentValue
186
- },
187
- set: function(val) {
188
- this.$emit('input', val) // 通过$emit触发父组件
189
- }
190
- }
191
- },
192
- props: {
193
- value: {
194
- type: String,
195
- default: function() {
196
- return ''
197
- }
198
- },
199
- colInfo: {
200
- type: Object,
201
- default: function() {
202
- return {}
203
- }
204
- },
205
- row: {
206
- // 当前行,如果是表单的话当前行和当前页面数据集是一样的
207
- type: Object,
208
- default: function() {
209
- return {}
210
- }
211
- },
212
- formRow: {
213
- // 当前页面数据集
214
- type: Object,
215
- default: () => {
216
- return {}
217
- }
218
- }
219
- },
220
- created() {},
221
- mounted() {
222
- // 将父组件的值拿来用,确认更改前不改变外部的值
223
- this.showValue = this.value
224
- },
225
- methods: {
226
- // 弹出框显示
227
- buttonClick() {
228
- this.visibleModal = true
229
- },
230
- // 确认
231
- handleOk() {
232
- this.$emit('handleOk', this.showValue)
233
- this.$nextTick(() => {
234
- this.visibleModal = false
235
- })
236
- }
237
- }
238
- }
239
- </script>
240
-
241
- <style lang="scss" scoped></style>
1
+ <template>
2
+ <div class="d-control-container">
3
+ <div class="d-control-label">
4
+ {{ colInfo.title
5
+ }}<span
6
+ v-if="colInfo.rules && colInfo.rules['required']"
7
+ class="d-control-label-required"
8
+ >*
9
+ </span>
10
+ </div>
11
+ <div class="d-control">
12
+ <ValidationProvider
13
+ :name="colInfo.title"
14
+ v-slot="v"
15
+ :rules="colInfo.rules"
16
+ >
17
+ <span
18
+ v-if="
19
+ currentValue !== null &&
20
+ currentValue !== '' &&
21
+ currentValue !== undefined
22
+ "
23
+ >
24
+ {{ currentValue }}&nbsp;&nbsp;&nbsp;
25
+ </span>
26
+ <Button type="primary" :size="'small'" @click="buttonClick">{{
27
+ colInfo.buttonTitle
28
+ }}</Button>
29
+ <div class="d-error-msg">
30
+ {{ v.errors[0] }}
31
+ </div>
32
+ <!-- 弹出框输入,单独保存接口 -->
33
+ <Modal
34
+ v-model="visibleModal"
35
+ :title="colInfo.buttonTitle + '--' + colInfo.title"
36
+ @ok="handleOk"
37
+ >
38
+ <!-- 文本框输入 -->
39
+ <Input
40
+ v-if="
41
+ colInfo.controlType == 'text' ||
42
+ colInfo.controlType == null ||
43
+ colInfo.controlType == undefined
44
+ "
45
+ :size="'small'"
46
+ v-model="showValue"
47
+ placeholder="请输入需保存的值"
48
+ style="width: 100%"
49
+ :class="{ 'd-error-input': v.errors.length > 0 }"
50
+ />
51
+ <!-- 文本框输入控件 -->
52
+ <BaseTextArea
53
+ v-if="colInfo.controlType === 'textarea'"
54
+ :label="colInfo.title"
55
+ v-model="currentValue"
56
+ :edit="true"
57
+ :rules="colInfo.rules"
58
+ />
59
+ <!-- 日期选择控件 -->
60
+ <BaseDate
61
+ v-if="colInfo.controlType === 'date'"
62
+ :label="colInfo.title"
63
+ v-model="currentValue"
64
+ :pastDate="colInfo.pastDate"
65
+ :rules="colInfo.rules"
66
+ :edit="true"
67
+ />
68
+ <!-- 日期时间控件 -->
69
+ <BaseDatetime
70
+ v-if="colInfo.controlType === 'datetime'"
71
+ :label="colInfo.title"
72
+ v-model="currentValue"
73
+ :pastDate="colInfo.pastDate"
74
+ :rules="colInfo.rules"
75
+ :edit="true"
76
+ />
77
+ <!-- 时间选择控件 -->
78
+ <BaseTime
79
+ v-if="colInfo.controlType === 'time'"
80
+ :label="colInfo.title"
81
+ v-model="currentValue"
82
+ :edit="true"
83
+ :rules="colInfo.rules"
84
+ />
85
+ <!-- 周数选择器 -->
86
+ <BaseDateWeek
87
+ v-if="colInfo.controlType === 'dateweek'"
88
+ :label="colInfo.title"
89
+ v-model="currentValue"
90
+ :edit="true"
91
+ :rules="colInfo.rules"
92
+ />
93
+ <!-- 数字输入 -->
94
+ <BaseNumberInput
95
+ v-if="colInfo.controlType === 'number'"
96
+ :label="colInfo.title"
97
+ v-model="currentValue"
98
+ :edit="true"
99
+ :rules="colInfo.rules"
100
+ :min="colInfo.min"
101
+ :max="colInfo.max"
102
+ :precision="colInfo.precision"
103
+ />
104
+ <BaseIntervalInput
105
+ v-if="colInfo.controlType === 'interval'"
106
+ :label="colInfo.title"
107
+ v-model="currentValue"
108
+ :edit="true"
109
+ :rules="colInfo.rules"
110
+ :displayType="colInfo.displayType"
111
+ :valueType="colInfo.valueType"
112
+ />
113
+ <!-- 单选框 -->
114
+ <BaseCheckbox
115
+ v-if="colInfo.controlType === 'checkbox'"
116
+ :label="colInfo.title"
117
+ v-model="currentValue"
118
+ :edit="true"
119
+ :rules="colInfo.rules"
120
+ />
121
+ <!-- 下拉选择器 -->
122
+ <BaseSelect
123
+ v-if="colInfo.controlType === 'select'"
124
+ :label="colInfo.title"
125
+ v-model="currentValue"
126
+ :edit="true"
127
+ :rules="colInfo.rules"
128
+ :dataSource="colInfo.dataSource"
129
+ />
130
+ <BaseSelectMulti
131
+ v-if="colInfo.controlType === 'dropmulti'"
132
+ :label="colInfo.title"
133
+ v-model="currentValue"
134
+ :edit="colInfo.edit"
135
+ :rules="colInfo.rules"
136
+ :dataSource="colInfo.dataSource"
137
+ />
138
+ <!-- 下拉表格容器 -->
139
+ <BasePulldown
140
+ v-if="colInfo.controlType === 'pulldown'"
141
+ :formRow="formRow"
142
+ :edit="true"
143
+ :defaultExpression="colInfo.defaultExpression"
144
+ :row="row"
145
+ :api="colInfo.api"
146
+ :optBtns="colInfo.optBtns"
147
+ :popupAddName="colInfo.popupAddName"
148
+ :popupAddPath="colInfo.popupAddPath"
149
+ :label="colInfo.title"
150
+ :rules="colInfo.rules"
151
+ :route="colInfo.route"
152
+ v-model="currentValue"
153
+ :field="colInfo.field"
154
+ :columns="colInfo.columns"
155
+ :pageSize="colInfo.pageSize"
156
+ :immediate="colInfo.immediate"
157
+ />
158
+ </Modal>
159
+ </ValidationProvider>
160
+ </div>
161
+ </div>
162
+ </template>
163
+ <script>
164
+ import { Modal, Input, Button } from 'ant-design-vue'
165
+ import { ValidationProvider } from 'vee-validate'
166
+ export default {
167
+ name: 'BaseButton',
168
+ components: {
169
+ ValidationProvider,
170
+ Modal,
171
+ Input,
172
+ Button,
173
+ },
174
+ data() {
175
+ return {
176
+ showValue: '',
177
+ // 弹出框是否展示
178
+ visibleModal: false
179
+ }
180
+ },
181
+ computed: {
182
+ currentValue: {
183
+ // 动态计算currentValue的值
184
+ get: function() {
185
+ return this.value // 将props中的value赋值给currentValue
186
+ },
187
+ set: function(val) {
188
+ this.$emit('input', val) // 通过$emit触发父组件
189
+ }
190
+ }
191
+ },
192
+ props: {
193
+ value: {
194
+ type: String,
195
+ default: function() {
196
+ return ''
197
+ }
198
+ },
199
+ colInfo: {
200
+ type: Object,
201
+ default: function() {
202
+ return {}
203
+ }
204
+ },
205
+ row: {
206
+ // 当前行,如果是表单的话当前行和当前页面数据集是一样的
207
+ type: Object,
208
+ default: function() {
209
+ return {}
210
+ }
211
+ },
212
+ formRow: {
213
+ // 当前页面数据集
214
+ type: Object,
215
+ default: () => {
216
+ return {}
217
+ }
218
+ }
219
+ },
220
+ created() {},
221
+ mounted() {
222
+ // 将父组件的值拿来用,确认更改前不改变外部的值
223
+ this.showValue = this.value
224
+ },
225
+ methods: {
226
+ // 弹出框显示
227
+ buttonClick() {
228
+ this.visibleModal = true
229
+ },
230
+ // 确认
231
+ handleOk() {
232
+ this.$emit('handleOk', this.showValue)
233
+ this.$nextTick(() => {
234
+ this.visibleModal = false
235
+ })
236
+ }
237
+ }
238
+ }
239
+ </script>
240
+
241
+ <style lang="scss" scoped></style>