@ctzy-web-client/plugin-component-vue 1.0.22 → 1.0.24
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/advance-select/advance-operation.mjs +51 -37
- package/es/advance-select/advance-option.mjs +167 -97
- package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs +7 -0
- package/es/advance-select/advance-select.mjs +368 -310
- package/es/advance-select/index.mjs +5 -5
- package/es/application-slot/breadcrumb-item.mjs +20 -17
- package/es/application-slot/header-tools-item.mjs +20 -17
- package/es/breadcrumb-select/breadcrumb-select.mjs +134 -112
- package/es/contextmenu/contextmenu-item.mjs +19 -15
- package/es/contextmenu/contextmenu.mjs +72 -56
- package/es/data-form/data-form-item.mjs +48 -30
- package/es/data-form/data-form.mjs +213 -166
- package/es/data-form/form-components/bwa-date-picker.mjs +51 -39
- package/es/data-form/form-components/bwa-date-time-picker.mjs +56 -44
- package/es/data-form/form-components/bwa-input-float.mjs +48 -37
- package/es/data-form/form-components/bwa-input-integer.mjs +68 -50
- package/es/data-form/form-components/bwa-input.mjs +43 -32
- package/es/data-form/form-components/bwa-multi-select.mjs +40 -29
- package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +554 -218
- package/es/data-form/form-components/bwa-rich-text.mjs +404 -316
- package/es/data-form/form-components/bwa-select.mjs +84 -70
- package/es/data-form/form-components/bwa-textarea.mjs +38 -27
- package/es/data-form/form-components/bwa-upload.mjs +172 -148
- package/es/data-form/form-components/bwa-user-multi-select.mjs +35 -24
- package/es/data-form/form-components/bwa-user-select.mjs +86 -61
- package/es/data-table/data-column-view.mjs +146 -115
- package/es/data-table/data-table-card.mjs +48 -40
- package/es/data-table/data-table-column.mjs +58 -45
- package/es/data-table/data-table.mjs +402 -316
- package/es/datatable-settings/datatable-settings.mjs +329 -254
- package/es/date-range/date-picker.mjs +130 -116
- package/es/date-range/date-range.mjs +215 -168
- package/es/drag-list/drag-item.mjs +56 -42
- package/es/drag-list/drag-list.mjs +60 -47
- package/es/dragable/dragable-item.mjs +23 -18
- package/es/dragable/dragable-operation.mjs +32 -24
- package/es/dragable/dragable.mjs +32 -23
- package/es/filter-panel/conditions/date-range-condition.mjs +50 -40
- package/es/filter-panel/conditions/department-condition/department-condition.mjs +99 -72
- package/es/filter-panel/conditions/department-condition/department-node.mjs +73 -59
- package/es/filter-panel/conditions/input-condition.mjs +90 -76
- package/es/filter-panel/conditions/multi-user-condition.mjs +67 -57
- package/es/filter-panel/conditions/multiple-menu-condition.mjs +54 -35
- package/es/filter-panel/conditions/single-menu-condition.mjs +65 -60
- package/es/filter-panel/conditions/single-user-condition.mjs +67 -57
- package/es/filter-panel/filter-panel-item.mjs +54 -39
- package/es/filter-panel/filter-panel.mjs +153 -135
- package/es/layout/layout.mjs +85 -78
- package/es/menu/menu-item.mjs +67 -52
- package/es/menu/menu.mjs +70 -53
- package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +28 -0
- package/es/panel/panel.mjs +53 -40
- package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +74 -63
- package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +76 -67
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +406 -178
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +153 -138
- package/es/pct-filter-panel/pct-filter-panel-item.mjs +55 -40
- package/es/pct-filter-panel/pct-filter-panel.mjs +247 -227
- package/es/progress/progress-item.mjs +81 -61
- package/es/progress/progress.mjs +78 -64
- package/es/where-filter-panel/where-filter-panel.mjs +15 -12
- package/lib/advance-select/advance-operation.js +50 -36
- package/lib/advance-select/advance-option.js +166 -96
- package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js +12 -0
- package/lib/advance-select/advance-select.js +366 -308
- package/lib/application-slot/breadcrumb-item.js +19 -16
- package/lib/application-slot/header-tools-item.js +19 -16
- package/lib/breadcrumb-select/breadcrumb-select.js +133 -111
- package/lib/contextmenu/contextmenu-item.js +18 -14
- package/lib/contextmenu/contextmenu.js +71 -55
- package/lib/data-form/data-form-item.js +47 -29
- package/lib/data-form/data-form.js +212 -165
- package/lib/data-form/form-components/bwa-date-picker.js +50 -38
- package/lib/data-form/form-components/bwa-date-time-picker.js +55 -43
- package/lib/data-form/form-components/bwa-input-float.js +47 -36
- package/lib/data-form/form-components/bwa-input-integer.js +67 -49
- package/lib/data-form/form-components/bwa-input.js +42 -31
- package/lib/data-form/form-components/bwa-multi-select.js +39 -28
- package/lib/data-form/form-components/bwa-rich-text-tinymce.js +553 -217
- package/lib/data-form/form-components/bwa-rich-text.js +403 -315
- package/lib/data-form/form-components/bwa-select.js +83 -69
- package/lib/data-form/form-components/bwa-textarea.js +37 -26
- package/lib/data-form/form-components/bwa-upload.js +171 -147
- package/lib/data-form/form-components/bwa-user-multi-select.js +34 -23
- package/lib/data-form/form-components/bwa-user-select.js +85 -60
- package/lib/data-table/data-column-view.js +146 -115
- package/lib/data-table/data-table-card.js +48 -40
- package/lib/data-table/data-table-column.js +57 -44
- package/lib/data-table/data-table.js +401 -315
- package/lib/datatable-settings/datatable-settings.js +328 -253
- package/lib/date-range/date-picker.js +129 -115
- package/lib/date-range/date-range.js +213 -170
- package/lib/drag-list/drag-item.js +55 -41
- package/lib/drag-list/drag-list.js +59 -46
- package/lib/dragable/dragable-item.js +22 -17
- package/lib/dragable/dragable-operation.js +31 -23
- package/lib/dragable/dragable.js +31 -22
- package/lib/filter-panel/conditions/date-range-condition.js +49 -39
- package/lib/filter-panel/conditions/department-condition/department-condition.js +98 -71
- package/lib/filter-panel/conditions/department-condition/department-node.js +72 -58
- package/lib/filter-panel/conditions/input-condition.js +89 -75
- package/lib/filter-panel/conditions/multi-user-condition.js +66 -56
- package/lib/filter-panel/conditions/multiple-menu-condition.js +53 -34
- package/lib/filter-panel/conditions/single-menu-condition.js +64 -59
- package/lib/filter-panel/conditions/single-user-condition.js +66 -56
- package/lib/filter-panel/filter-panel-item.js +53 -38
- package/lib/filter-panel/filter-panel.js +152 -134
- package/lib/layout/layout.js +84 -77
- package/lib/menu/menu-item.js +66 -51
- package/lib/menu/menu.js +69 -52
- package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +32 -0
- package/lib/panel/panel.js +52 -39
- package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +73 -62
- package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +75 -66
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +405 -177
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +152 -137
- package/lib/pct-filter-panel/pct-filter-panel-item.js +54 -39
- package/lib/pct-filter-panel/pct-filter-panel.js +246 -226
- package/lib/progress/progress-item.js +80 -60
- package/lib/progress/progress.js +77 -63
- package/lib/where-filter-panel/where-filter-panel.js +14 -11
- package/package.json +2 -1
- package/src/advance-select/advance-option.vue +64 -13
- package/src/data-form/form-components/bwa-rich-text-tinymce.vue +1 -1
- package/src/datatable-settings/datatable-settings.vue +33 -3
- package/src/date-range/date-picker.vue +1 -1
- package/src/date-range/date-range.vue +3 -3
- package/src/filter-panel/filter-panel.vue +2 -2
- package/src/pct-filter-panel/pct-compents/pct-Input-condition.vue +64 -64
- package/src/pct-filter-panel/pct-compents/pct-date-range-condition.vue +61 -61
- package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition.vue +302 -178
- package/src/pct-filter-panel/pct-filter-panel.vue +4 -4
|
@@ -9,171 +9,218 @@ var lodash = require('lodash');
|
|
|
9
9
|
var dataFormItem = require('./data-form-item.js');
|
|
10
10
|
var _pluginVue_exportHelper = require('../_virtual/_plugin-vue_export-helper.js');
|
|
11
11
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
props: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
12
|
+
const _sfc_main = {
|
|
13
|
+
__name: 'data-form',
|
|
14
|
+
props: {
|
|
15
|
+
dataForm: {
|
|
16
|
+
type: Object,
|
|
17
|
+
},
|
|
18
|
+
autoLoad: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true,
|
|
21
|
+
},
|
|
22
|
+
//注册id 和 记录数据
|
|
23
|
+
record: {
|
|
24
|
+
type: Object,
|
|
25
|
+
},
|
|
26
|
+
recID: {
|
|
27
|
+
type: String,
|
|
28
|
+
},
|
|
29
|
+
labelPosition: {
|
|
30
|
+
type: String,
|
|
31
|
+
},
|
|
32
|
+
labelWidth: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: '',
|
|
35
|
+
},
|
|
36
|
+
rules: {
|
|
37
|
+
type: Object,
|
|
38
|
+
default: () => ({}),
|
|
39
|
+
},
|
|
40
|
+
validateOnRuleChange: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false,
|
|
43
|
+
},
|
|
44
|
+
isShowLabelColon: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: true,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
48
49
|
setup(__props, { expose }) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
50
|
+
|
|
51
|
+
const props = __props;
|
|
52
|
+
|
|
53
|
+
defineOptions({ name: 'BwaDataForm' });
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
const attrs = vue.useAttrs();
|
|
58
|
+
|
|
59
|
+
const dataForm = props.dataForm;
|
|
60
|
+
|
|
61
|
+
//表单对象的引用
|
|
62
|
+
const dataFormElRef = vue.ref();
|
|
63
|
+
|
|
64
|
+
//验证规则
|
|
65
|
+
const rules = vue.computed(() => {
|
|
66
|
+
let data = {};
|
|
67
|
+
|
|
68
|
+
dataForm.getDisplayColumns().forEach((item) => {
|
|
69
|
+
data[item.fullAttrName] = (
|
|
70
|
+
item.required ? [{ required: true, message: item.title + '必填!' }] : []
|
|
71
|
+
).concat(item.rules);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
return lodash.mergeWith(
|
|
75
|
+
{},
|
|
76
|
+
data,
|
|
77
|
+
props.rules,
|
|
78
|
+
function customizer(objValue, srcValue) {
|
|
79
|
+
if (lodash.isArray(objValue)) {
|
|
80
|
+
return objValue.concat(srcValue);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
//计算后的描述宽度
|
|
87
|
+
const computedLabelWidth = vue.computed(() => {
|
|
88
|
+
if (props.labelWidth) {
|
|
89
|
+
return props.labelWidth;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
let labelWidth = 0;
|
|
93
|
+
|
|
94
|
+
if (props.labelPosition != 'top') {
|
|
95
|
+
let maxLabelCharCount = 0;
|
|
96
|
+
dataForm.getDisplayColumns().forEach((item) => {
|
|
97
|
+
maxLabelCharCount = Math.max(
|
|
98
|
+
maxLabelCharCount,
|
|
99
|
+
item.title.length + (item.required ? 1 : 0)
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
labelWidth = (maxLabelCharCount + 1) * 18;
|
|
103
|
+
}
|
|
104
|
+
return labelWidth + 'px';
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
if (props.autoLoad) {
|
|
108
|
+
//监听recid的变化 是否自动加载数据
|
|
109
|
+
vue.watch(
|
|
110
|
+
vue.computed(() => props.record),
|
|
111
|
+
async () => {
|
|
112
|
+
if (props.recID) {
|
|
113
|
+
try {
|
|
114
|
+
await dataForm.loadDataByRecId(props.recID);
|
|
115
|
+
} catch (e) {
|
|
116
|
+
console.error(e);
|
|
117
|
+
ElementPlus.ElMessage.error('获取记录失败。');
|
|
118
|
+
}
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (props.record) {
|
|
123
|
+
dataForm.setData(props.record);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
dataForm.setData();
|
|
128
|
+
},
|
|
129
|
+
{ immediate: true }
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
//当前data table 上下文对象
|
|
134
|
+
vue.provide(webBaseClientVue.dataFormKey, dataForm);
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* 表单验证
|
|
138
|
+
* @param {*} data
|
|
139
|
+
*/
|
|
140
|
+
const validate = (callback) => {
|
|
141
|
+
return dataFormElRef.value.validate(callback);
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
window.dataFormElRef = dataFormElRef;
|
|
145
|
+
window.aaavvv = validate;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* 提交表单
|
|
149
|
+
* @param {Object} 额外附加的提交数据
|
|
150
|
+
*/
|
|
151
|
+
const submit = (data) => {
|
|
152
|
+
return validate()
|
|
153
|
+
.then(() => {
|
|
154
|
+
dataForm
|
|
155
|
+
.submit(data)
|
|
156
|
+
.then(() => {
|
|
157
|
+
ElementPlus.ElMessage.info('保存成功!');
|
|
158
|
+
})
|
|
159
|
+
.catch((e) => ElementPlus.ElMessage.error(e.message));
|
|
160
|
+
})
|
|
161
|
+
.catch((result) => {
|
|
162
|
+
console.log(result);
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
vue.onMounted(() => {
|
|
167
|
+
vue.unref(dataForm).formValivators.push(vue.unref(dataFormElRef));
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
vue.onBeforeUnmount(() => {
|
|
171
|
+
const _dataFormEl = vue.unref(dataFormElRef);
|
|
172
|
+
vue.unref(dataForm).formValivators = vue.unref(dataForm).formValivators.filter(
|
|
173
|
+
(validate) => validate !== _dataFormEl
|
|
174
|
+
);
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
expose({
|
|
178
|
+
dataForm,
|
|
179
|
+
dataFormElRef,
|
|
180
|
+
validate,
|
|
181
|
+
submit,
|
|
182
|
+
rules,
|
|
183
|
+
computedLabelWidth,
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
return (_ctx, _cache) => {
|
|
187
|
+
return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElForm), vue.mergeProps({
|
|
188
|
+
ref_key: "dataFormElRef",
|
|
189
|
+
ref: dataFormElRef
|
|
190
|
+
}, vue.unref(attrs), {
|
|
191
|
+
model: vue.unref(dataForm).data,
|
|
192
|
+
"label-position": __props.labelPosition,
|
|
193
|
+
"label-width": vue.unref(computedLabelWidth),
|
|
194
|
+
rules: vue.unref(rules),
|
|
195
|
+
"validate-on-rule-change": __props.validateOnRuleChange,
|
|
196
|
+
disabled: vue.unref(dataForm).disabled
|
|
197
|
+
}), {
|
|
198
|
+
default: vue.withCtx(() => [
|
|
199
|
+
vue.renderSlot(_ctx.$slots, "default", { dataForm: vue.unref(dataForm) }, () => [
|
|
200
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(dataForm).getDisplayColumns(), (column) => {
|
|
201
|
+
return (vue.openBlock(), vue.createBlock(dataFormItem["default"], {
|
|
202
|
+
key: column.fullAttrName,
|
|
203
|
+
name: column.fullAttrName,
|
|
204
|
+
isShowLabelColon: __props.isShowLabelColon
|
|
205
|
+
}, {
|
|
206
|
+
default: vue.withCtx(() => [
|
|
207
|
+
vue.renderSlot(_ctx.$slots, 'form-item-' + column.fullAttrName, {
|
|
208
|
+
column: column,
|
|
209
|
+
record: vue.unref(dataForm).data,
|
|
210
|
+
dataForm: vue.unref(dataForm)
|
|
211
|
+
})
|
|
212
|
+
]),
|
|
213
|
+
_: 2 /* DYNAMIC */
|
|
214
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["name", "isShowLabelColon"]))
|
|
215
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
216
|
+
])
|
|
217
|
+
]),
|
|
218
|
+
_: 3 /* FORWARDED */
|
|
219
|
+
}, 16 /* FULL_PROPS */, ["model", "label-position", "label-width", "rules", "validate-on-rule-change", "disabled"]))
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
};
|
|
224
|
+
var DataForm = /*#__PURE__*/_pluginVue_exportHelper["default"](_sfc_main, [['__file',"data-form.vue"]]);
|
|
178
225
|
|
|
179
226
|
exports["default"] = DataForm;
|
|
@@ -6,44 +6,56 @@ var vue = require('vue');
|
|
|
6
6
|
var ElementPlus = require('element-plus');
|
|
7
7
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
emits: ["update:model-value"],
|
|
9
|
+
const _sfc_main = {
|
|
10
|
+
__name: 'bwa-date-picker',
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: [String, Date],
|
|
14
|
+
default: null,
|
|
15
|
+
},
|
|
16
|
+
placeholder: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: '请选择',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
emits: ['update:model-value'],
|
|
24
22
|
setup(__props, { emit }) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
23
|
+
|
|
24
|
+
const props = __props;
|
|
25
|
+
|
|
26
|
+
defineOptions({
|
|
27
|
+
name: 'BwaDatePicker',
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
const attrs = vue.useAttrs();
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
const modelValue = vue.computed({
|
|
37
|
+
get: () => props.modelValue,
|
|
38
|
+
set: (v) =>
|
|
39
|
+
emit(
|
|
40
|
+
'update:model-value',
|
|
41
|
+
v ? ElementPlus.dayjs(new Date(v.getTime())).format('YYYY-MM-DD') : ''
|
|
42
|
+
),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElDatePicker), vue.mergeProps({
|
|
47
|
+
modelValue: vue.unref(modelValue),
|
|
48
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(modelValue) ? (modelValue).value = $event : null)),
|
|
49
|
+
type: "date",
|
|
50
|
+
placeholder: __props.placeholder
|
|
51
|
+
}, vue.unref(attrs), {
|
|
52
|
+
teleported: false,
|
|
53
|
+
style: {"width":"100%"}
|
|
54
|
+
}), null, 16 /* FULL_PROPS */, ["modelValue", "placeholder"]))
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
};
|
|
59
|
+
var DatePicker = /*#__PURE__*/_pluginVue_exportHelper["default"](_sfc_main, [['__file',"bwa-date-picker.vue"]]);
|
|
48
60
|
|
|
49
61
|
exports["default"] = DatePicker;
|
|
@@ -6,49 +6,61 @@ var vue = require('vue');
|
|
|
6
6
|
var ElementPlus = require('element-plus');
|
|
7
7
|
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
emits: ["update:model-value"],
|
|
9
|
+
const _sfc_main = {
|
|
10
|
+
__name: 'bwa-date-time-picker',
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: [String, Date],
|
|
14
|
+
default: null,
|
|
15
|
+
},
|
|
16
|
+
placeholder: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: '请选择',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
emits: ['update:model-value'],
|
|
24
22
|
setup(__props, { emit }) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
|
|
23
|
+
|
|
24
|
+
const props = __props;
|
|
25
|
+
|
|
26
|
+
defineOptions({
|
|
27
|
+
name: 'BwaDateTimePicker',
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
const attrs = vue.useAttrs();
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
const modelValue = vue.computed({
|
|
37
|
+
get: () => props.modelValue,
|
|
38
|
+
set: (v) => {
|
|
39
|
+
if (!v) {
|
|
40
|
+
emit('update:model-value', '');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
emit(
|
|
45
|
+
'update:model-value',
|
|
46
|
+
ElementPlus.dayjs(new Date(v.getTime())).format('YYYY-MM-DD HH:mm:ss')
|
|
47
|
+
);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
return (_ctx, _cache) => {
|
|
52
|
+
return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElDatePicker), vue.mergeProps(vue.unref(attrs), {
|
|
53
|
+
modelValue: vue.unref(modelValue),
|
|
54
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(modelValue) ? (modelValue).value = $event : null)),
|
|
55
|
+
type: "datetime",
|
|
56
|
+
placeholder: __props.placeholder,
|
|
57
|
+
teleported: false,
|
|
58
|
+
style: {"width":"100%"}
|
|
59
|
+
}), null, 16 /* FULL_PROPS */, ["modelValue", "placeholder"]))
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
};
|
|
64
|
+
var DateTimePicker = /*#__PURE__*/_pluginVue_exportHelper["default"](_sfc_main, [['__file',"bwa-date-time-picker.vue"]]);
|
|
53
65
|
|
|
54
66
|
exports["default"] = DateTimePicker;
|