ylwl-cpscoms 1.0.0
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/README.md +15 -0
- package/es/SlAlert/index.vue.js +58 -0
- package/es/SlAlert/index.vue2.js +37 -0
- package/es/SlAlert/index.vue3.js +6 -0
- package/es/SlDescriptions/index.vue.js +55 -0
- package/es/SlDescriptions/index.vue2.js +57 -0
- package/es/SlDescriptions/index.vue3.js +6 -0
- package/es/SlDescriptions/renderOptions.vue.js +25 -0
- package/es/SlDescriptions/renderOptions.vue2.js +31 -0
- package/es/SlDialog/dialogPlus.js +159 -0
- package/es/SlDialog/index.js +202 -0
- package/es/SlDrawer/index.js +54 -0
- package/es/SlForm/index.vue.js +26 -0
- package/es/SlForm/index.vue2.js +433 -0
- package/es/SlForm/index.vue3.js +6 -0
- package/es/SlForm/mixinRender.js +239 -0
- package/es/SlForm/otherItem/titleItem.vue.js +39 -0
- package/es/SlForm/otherItem/titleItem.vue2.js +20 -0
- package/es/SlForm/otherItem/titleItem.vue3.js +6 -0
- package/es/SlGuide/index.vue.js +38 -0
- package/es/SlGuide/index.vue2.js +133 -0
- package/es/SlGuide/index.vue3.js +6 -0
- package/es/SlGuide/index.vue4.js +6 -0
- package/es/SlMessageBox/index.js +46 -0
- package/es/SlPage/index.vue.js +147 -0
- package/es/SlPage/index.vue2.js +312 -0
- package/es/SlPage/index.vue3.js +6 -0
- package/es/SlTable/components/colSetting.vue.js +94 -0
- package/es/SlTable/components/colSetting.vue2.js +66 -0
- package/es/SlTable/components/colSetting.vue3.js +6 -0
- package/es/SlTable/index.vue.js +171 -0
- package/es/SlTable/index.vue2.js +390 -0
- package/es/SlTable/index.vue3.js +6 -0
- package/es/SlTitle/index.vue.js +41 -0
- package/es/SlTitle/index.vue2.js +26 -0
- package/es/SlTitle/index.vue3.js +6 -0
- package/es/_virtual/_rollupPluginBabelHelpers.js +247 -0
- package/es/index.js +41 -0
- package/es/node_modules/shepherd.js/dist/css/shepherd.css.js +7 -0
- package/es/node_modules/style-inject/dist/style-inject.es.js +28 -0
- package/es/node_modules/vue-runtime-helpers/dist/normalize-component.js +76 -0
- package/es/utils/index.js +51 -0
- package/package.json +106 -0
- package/src/SlAlert/SlAlert.stories.js +108 -0
- package/src/SlAlert/index.vue +54 -0
- package/src/SlAlert/remark.md +16 -0
- package/src/SlDescriptions/SlDescriptions.stories.js +119 -0
- package/src/SlDescriptions/index.vue +60 -0
- package/src/SlDescriptions/renderOptions.vue +27 -0
- package/src/SlDialog/README-PLUS.md +74 -0
- package/src/SlDialog/README.md +114 -0
- package/src/SlDialog/dialogPlus.js +160 -0
- package/src/SlDialog/index.js +170 -0
- package/src/SlDrawer/SlDrawer.stories.js +154 -0
- package/src/SlDrawer/index.js +62 -0
- package/src/SlForm/SlForm.stories.js +120 -0
- package/src/SlForm/index.css +141 -0
- package/src/SlForm/index.vue +365 -0
- package/src/SlForm/mixinRender.js +228 -0
- package/src/SlForm/otherItem/titleItem.vue +31 -0
- package/src/SlForm/remark.md +607 -0
- package/src/SlGuide/SlGuide.stories.js +100 -0
- package/src/SlGuide/index.vue +166 -0
- package/src/SlGuide/remark.md +90 -0
- package/src/SlMessageBox/index.js +35 -0
- package/src/SlPage/README.md +515 -0
- package/src/SlPage/SlPage.stories.js +125 -0
- package/src/SlPage/index.css +38 -0
- package/src/SlPage/index.vue +266 -0
- package/src/SlPage/remark.md +283 -0
- package/src/SlTable/SlTable.stories.js +118 -0
- package/src/SlTable/components/colSetting.vue +86 -0
- package/src/SlTable/index.vue +541 -0
- package/src/SlTitle/SlTitle.stories.js +98 -0
- package/src/SlTitle/index.vue +49 -0
- package/src/global.css +5 -0
- package/src/index.js +47 -0
- package/src/store/index.js +20 -0
- package/src/utils/index.js +47 -0
- package/src/utils/tableConfig.js +33 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { objectSpread2 as _objectSpread2, slicedToArray as _slicedToArray } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import titleItem from './otherItem/titleItem.vue.js';
|
|
3
|
+
import EL from 'element-ui';
|
|
4
|
+
import { typeOf } from '../utils/index.js';
|
|
5
|
+
|
|
6
|
+
var mixinRender = {
|
|
7
|
+
components: {
|
|
8
|
+
titleItem: titleItem
|
|
9
|
+
},
|
|
10
|
+
methods: {
|
|
11
|
+
renderTitle: function renderTitle(ce, item) {
|
|
12
|
+
return ce(titleItem, {
|
|
13
|
+
props: {
|
|
14
|
+
item: item
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
renderSwitch: function renderSwitch(ce, item) {
|
|
19
|
+
return ce(EL.Switch, _objectSpread2({}, this.initCommonProps(item)));
|
|
20
|
+
},
|
|
21
|
+
renderDrawer: function renderDrawer(ce) {
|
|
22
|
+
var _this = this;
|
|
23
|
+
return ce(EL.Button, {
|
|
24
|
+
props: {
|
|
25
|
+
icon: this.isDrawerOpen ? 'el-icon-top-right' : 'el-icon-rank',
|
|
26
|
+
type: 'primary'
|
|
27
|
+
},
|
|
28
|
+
on: {
|
|
29
|
+
click: function click() {
|
|
30
|
+
_this.isDrawerOpen = !_this.isDrawerOpen;
|
|
31
|
+
_this.boxHeight = _this.isDrawerOpen ? 'auto' : _this.firstitemHeight;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// this.isDrawerOpen ? 'shrink' : 'open'
|
|
36
|
+
);
|
|
37
|
+
},
|
|
38
|
+
renderText: function renderText(ce, item) {
|
|
39
|
+
return ce('div', {
|
|
40
|
+
style: {
|
|
41
|
+
width: '100%'
|
|
42
|
+
}
|
|
43
|
+
}, this.form[item.model]);
|
|
44
|
+
},
|
|
45
|
+
renderInput: function renderInput(ce, item) {
|
|
46
|
+
return ce('div', {
|
|
47
|
+
style: {
|
|
48
|
+
width: '100%'
|
|
49
|
+
}
|
|
50
|
+
}, [ce(EL.Input, _objectSpread2({}, this.initCommonProps(item, [], {}, item.privateAttrs))), ce('div', {
|
|
51
|
+
style: {
|
|
52
|
+
color: 'red',
|
|
53
|
+
lineHeight: 2,
|
|
54
|
+
fontSize: '12px'
|
|
55
|
+
}
|
|
56
|
+
}, item.remark)]);
|
|
57
|
+
// return ce(EL.Input, {
|
|
58
|
+
// ...this.initCommonProps(item, [], {}, item.privateAttrs)
|
|
59
|
+
// })
|
|
60
|
+
},
|
|
61
|
+
renderInputNumber: function renderInputNumber(ce, item) {
|
|
62
|
+
return ce('div', {
|
|
63
|
+
style: {
|
|
64
|
+
width: item.privateAttrs && item.privateAttrs.style && item.privateAttrs.style.width ? item.privateAttrs.style.width : '90%'
|
|
65
|
+
}
|
|
66
|
+
}, [ce(EL.InputNumber, _objectSpread2({}, this.initCommonProps(item, [], {
|
|
67
|
+
'controls-position': 'right'
|
|
68
|
+
}, item.privateAttrs))), ce('span', {
|
|
69
|
+
style: {
|
|
70
|
+
marginLeft: '10px'
|
|
71
|
+
}
|
|
72
|
+
}, item.privateAttrs && item.privateAttrs.unit ? item.privateAttrs.unit : ''), ce('div', {
|
|
73
|
+
style: {
|
|
74
|
+
color: 'red',
|
|
75
|
+
lineHeight: 2,
|
|
76
|
+
fontSize: '12px'
|
|
77
|
+
}
|
|
78
|
+
}, item.remark)]);
|
|
79
|
+
// return ce(EL.Input, {
|
|
80
|
+
// ...this.initCommonProps(item, [], {}, item.privateAttrs)
|
|
81
|
+
// })
|
|
82
|
+
},
|
|
83
|
+
renderSelect: function renderSelect(ce, item) {
|
|
84
|
+
var _this2 = this;
|
|
85
|
+
var _item$labelKey = item.labelKey,
|
|
86
|
+
labelKey = _item$labelKey === void 0 ? 'label' : _item$labelKey,
|
|
87
|
+
_item$valueKey = item.valueKey,
|
|
88
|
+
valueKey = _item$valueKey === void 0 ? 'value' : _item$valueKey,
|
|
89
|
+
model = item.model,
|
|
90
|
+
slots = item.slots;
|
|
91
|
+
// const isopstr = typeOf(options, 'string')
|
|
92
|
+
// const isopsFun = typeOf(asycnOptions, 'function')
|
|
93
|
+
// const isremote = typeOf(remoteMethod, 'function')
|
|
94
|
+
// const op = (isopsFun ? (await asycnOptions()) : options) || []
|
|
95
|
+
// console.log(this.selectOptions, "this.selectOptions")
|
|
96
|
+
// if (isopsFun) {
|
|
97
|
+
// asycnOptions().then(result => {
|
|
98
|
+
// this.$set(this.selectOptions, model, result || [])
|
|
99
|
+
// // return result || []
|
|
100
|
+
// })
|
|
101
|
+
// } else {
|
|
102
|
+
// this.$set(this.selectOptions, model, options || [])
|
|
103
|
+
// }
|
|
104
|
+
var customOp = this.initCommonProps(item, ['options', 'labelKey', 'valueKey'], {
|
|
105
|
+
hitable: true,
|
|
106
|
+
defaultFirstOption: true
|
|
107
|
+
}, item.privateAttrs);
|
|
108
|
+
var otherSlots = Object.entries(slots || {}).reduce(function (pre, _ref) {
|
|
109
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
110
|
+
key = _ref2[0],
|
|
111
|
+
fun = _ref2[1];
|
|
112
|
+
typeOf(fun, 'function') && (pre[key] = function () {
|
|
113
|
+
return fun(ce);
|
|
114
|
+
});
|
|
115
|
+
return pre;
|
|
116
|
+
}, {});
|
|
117
|
+
// return ce(bstSelect.SelectPro, {
|
|
118
|
+
return ce(EL.Select, _objectSpread2(_objectSpread2({}, customOp), {}, {
|
|
119
|
+
scopedSlots: _objectSpread2({
|
|
120
|
+
default: function _default() {
|
|
121
|
+
return _this2.selectOptions[model] && _this2.selectOptions[model].length ? _this2.selectOptions[model].map(function (o) {
|
|
122
|
+
return (
|
|
123
|
+
// ce(bstSelect.SelectOption, {
|
|
124
|
+
ce(EL.Option, {
|
|
125
|
+
props: Object.assign({}, o, {
|
|
126
|
+
key: 'id',
|
|
127
|
+
data: o,
|
|
128
|
+
label: o[labelKey],
|
|
129
|
+
value: o[valueKey]
|
|
130
|
+
})
|
|
131
|
+
})
|
|
132
|
+
);
|
|
133
|
+
}) : [];
|
|
134
|
+
// return op.map(o=>ce(EL.Option,{props:Object.assign({},o,{key:'id',data:o,label:o[labelKey],value:o[valueKey]})}))
|
|
135
|
+
}
|
|
136
|
+
}, otherSlots)
|
|
137
|
+
}));
|
|
138
|
+
},
|
|
139
|
+
renderDatePicker: function renderDatePicker(ce, item) {
|
|
140
|
+
return ce(EL.DatePicker, _objectSpread2({}, this.initCommonProps(item, [], _objectSpread2({
|
|
141
|
+
startPlaceholder: '开始时间',
|
|
142
|
+
endPlaceholder: '结束时间',
|
|
143
|
+
defaultTime: item.privateProps && item.privateProps.type === 'daterange' ? ['00:00:00', '23:59:59'] : undefined
|
|
144
|
+
}, item.privateProps), item.privateProps)));
|
|
145
|
+
},
|
|
146
|
+
renderRadio: function renderRadio(ce, item) {
|
|
147
|
+
var _item$labelKey2 = item.labelKey,
|
|
148
|
+
labelKey = _item$labelKey2 === void 0 ? 'label' : _item$labelKey2,
|
|
149
|
+
_item$valueKey2 = item.valueKey,
|
|
150
|
+
valueKey = _item$valueKey2 === void 0 ? 'value' : _item$valueKey2,
|
|
151
|
+
model = item.model;
|
|
152
|
+
return ce(EL.RadioGroup, _objectSpread2({}, this.initCommonProps(item, ['options', 'labelKey', 'valueKey', 'label'])), this.selectOptions[model] && this.selectOptions[model].length ? this.selectOptions[model].map(function (o) {
|
|
153
|
+
return ce(EL.Radio, {
|
|
154
|
+
props: {
|
|
155
|
+
label: o[valueKey]
|
|
156
|
+
}
|
|
157
|
+
}, [o[labelKey]]);
|
|
158
|
+
}) : []);
|
|
159
|
+
},
|
|
160
|
+
renderSlider: function renderSlider(ce, item) {
|
|
161
|
+
return ce('div', {
|
|
162
|
+
class: 'yl-form-slider'
|
|
163
|
+
}, [ce('span', {
|
|
164
|
+
class: 'yl-form-slider-span'
|
|
165
|
+
}, [item.label]), ce(EL.Slider, _objectSpread2(_objectSpread2({}, this.initCommonProps(item, [])), {}, {
|
|
166
|
+
style: 'width:200px'
|
|
167
|
+
}))]);
|
|
168
|
+
},
|
|
169
|
+
renderRangeInput: function renderRangeInput(ce, item) {
|
|
170
|
+
var _this3 = this;
|
|
171
|
+
!typeOf(item.value, 'array') && (item.value = []);
|
|
172
|
+
// const target = item.callback ? this.transfer : this.form
|
|
173
|
+
var target = this.form;
|
|
174
|
+
var val = target[item.model];
|
|
175
|
+
var style = '';
|
|
176
|
+
// 清空输入框的函数
|
|
177
|
+
var clearInputs = function clearInputs() {
|
|
178
|
+
_this3.fomateValue(item, ['', '']);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
// 检查是否至少有一个输入框有值
|
|
182
|
+
var hasValue = val && (val[0] || val[1]);
|
|
183
|
+
return ce('div', {
|
|
184
|
+
class: 'yl-form-range-input'
|
|
185
|
+
}, [ce('span', {
|
|
186
|
+
class: 'yl-form-slider-span'
|
|
187
|
+
}, [item.label]), ce('input', {
|
|
188
|
+
style: style,
|
|
189
|
+
domProps: {
|
|
190
|
+
value: val[0],
|
|
191
|
+
placeholder: '起始值',
|
|
192
|
+
type: 'number'
|
|
193
|
+
},
|
|
194
|
+
on: {
|
|
195
|
+
input: function input(_ref3) {
|
|
196
|
+
var target = _ref3.target;
|
|
197
|
+
_this3.fomateValue(item, [target.value, val[1]]);
|
|
198
|
+
// this.$emit("input",this.form);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}), '-', ce('input', {
|
|
202
|
+
style: style,
|
|
203
|
+
domProps: {
|
|
204
|
+
value: val[1],
|
|
205
|
+
placeholder: '截止值',
|
|
206
|
+
type: 'number'
|
|
207
|
+
},
|
|
208
|
+
on: {
|
|
209
|
+
input: function input(_ref4) {
|
|
210
|
+
var target = _ref4.target;
|
|
211
|
+
_this3.fomateValue(item, [val[0], target.value]);
|
|
212
|
+
// this.$emit("input",this.form);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}), hasValue && ce('button', {
|
|
216
|
+
class: 'range-input-clear-btn',
|
|
217
|
+
attrs: {
|
|
218
|
+
type: 'button'
|
|
219
|
+
},
|
|
220
|
+
style: {
|
|
221
|
+
marginLeft: '5px',
|
|
222
|
+
background: 'none',
|
|
223
|
+
border: 'none',
|
|
224
|
+
fontSize: '16px',
|
|
225
|
+
cursor: 'pointer',
|
|
226
|
+
color: '#999'
|
|
227
|
+
},
|
|
228
|
+
on: {
|
|
229
|
+
click: function click(e) {
|
|
230
|
+
e.stopPropagation();
|
|
231
|
+
clearInputs();
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}, '×')]);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
export { mixinRender as default };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import script from './titleItem.vue2.js';
|
|
2
|
+
import './titleItem.vue3.js';
|
|
3
|
+
import normalizeComponent from '../../node_modules/vue-runtime-helpers/dist/normalize-component.js';
|
|
4
|
+
|
|
5
|
+
/* script */
|
|
6
|
+
var __vue_script__ = script;
|
|
7
|
+
/* template */
|
|
8
|
+
var __vue_render__ = function __vue_render__() {
|
|
9
|
+
var _vm = this;
|
|
10
|
+
var _h = _vm.$createElement;
|
|
11
|
+
var _c = _vm._self._c || _h;
|
|
12
|
+
return _c("h3", {
|
|
13
|
+
staticClass: "title-item"
|
|
14
|
+
}, [_vm._v("\n " + _vm._s(_vm.item.label) + "\n")]);
|
|
15
|
+
};
|
|
16
|
+
var __vue_staticRenderFns__ = [];
|
|
17
|
+
__vue_render__._withStripped = true;
|
|
18
|
+
|
|
19
|
+
/* style */
|
|
20
|
+
var __vue_inject_styles__ = undefined;
|
|
21
|
+
/* scoped */
|
|
22
|
+
var __vue_scope_id__ = "data-v-63641762";
|
|
23
|
+
/* module identifier */
|
|
24
|
+
var __vue_module_identifier__ = undefined;
|
|
25
|
+
/* functional template */
|
|
26
|
+
var __vue_is_functional_template__ = false;
|
|
27
|
+
/* style inject */
|
|
28
|
+
|
|
29
|
+
/* style inject SSR */
|
|
30
|
+
|
|
31
|
+
/* style inject shadow dom */
|
|
32
|
+
|
|
33
|
+
var __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
34
|
+
render: __vue_render__,
|
|
35
|
+
staticRenderFns: __vue_staticRenderFns__
|
|
36
|
+
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
37
|
+
var titleItem = __vue_component__;
|
|
38
|
+
|
|
39
|
+
export { titleItem as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
//
|
|
3
|
+
//
|
|
4
|
+
//
|
|
5
|
+
//
|
|
6
|
+
|
|
7
|
+
var script = {
|
|
8
|
+
name: 'TitleItem',
|
|
9
|
+
props: {
|
|
10
|
+
item: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: function _default() {}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
mounted: function mounted() {
|
|
16
|
+
// console.log(this.item, "你的手")
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { script as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import styleInject from '../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".title-item[data-v-63641762]:before{background-color:#409eff;color:#409eff;content:\"|\";width:3px}.title-item[data-v-63641762]{margin-bottom:20px}";
|
|
4
|
+
styleInject(css_248z);
|
|
5
|
+
|
|
6
|
+
export { css_248z as default };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import script from './index.vue2.js';
|
|
2
|
+
import './index.vue3.js';
|
|
3
|
+
import './index.vue4.js';
|
|
4
|
+
import normalizeComponent from '../node_modules/vue-runtime-helpers/dist/normalize-component.js';
|
|
5
|
+
|
|
6
|
+
/* script */
|
|
7
|
+
var __vue_script__ = script;
|
|
8
|
+
/* template */
|
|
9
|
+
var __vue_render__ = function __vue_render__() {
|
|
10
|
+
var _vm = this;
|
|
11
|
+
var _h = _vm.$createElement;
|
|
12
|
+
var _c = _vm._self._c || _h;
|
|
13
|
+
return _c("div");
|
|
14
|
+
};
|
|
15
|
+
var __vue_staticRenderFns__ = [];
|
|
16
|
+
__vue_render__._withStripped = true;
|
|
17
|
+
|
|
18
|
+
/* style */
|
|
19
|
+
var __vue_inject_styles__ = undefined;
|
|
20
|
+
/* scoped */
|
|
21
|
+
var __vue_scope_id__ = "data-v-3b678a49";
|
|
22
|
+
/* module identifier */
|
|
23
|
+
var __vue_module_identifier__ = undefined;
|
|
24
|
+
/* functional template */
|
|
25
|
+
var __vue_is_functional_template__ = false;
|
|
26
|
+
/* style inject */
|
|
27
|
+
|
|
28
|
+
/* style inject SSR */
|
|
29
|
+
|
|
30
|
+
/* style inject shadow dom */
|
|
31
|
+
|
|
32
|
+
var __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
33
|
+
render: __vue_render__,
|
|
34
|
+
staticRenderFns: __vue_staticRenderFns__
|
|
35
|
+
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
36
|
+
var SlGuide = __vue_component__;
|
|
37
|
+
|
|
38
|
+
export { SlGuide as default };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { asyncToGenerator as _asyncToGenerator, regenerator as _regenerator, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
|
|
3
|
+
//
|
|
4
|
+
//
|
|
5
|
+
//
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// 运行时动态加载 shepherd.js
|
|
9
|
+
// 使用 webpackIgnore 注释避免消费项目的 webpack 在构建时解析此可选依赖
|
|
10
|
+
var Shepherd = null;
|
|
11
|
+
function loadShepherd() {
|
|
12
|
+
return _loadShepherd.apply(this, arguments);
|
|
13
|
+
}
|
|
14
|
+
function _loadShepherd() {
|
|
15
|
+
_loadShepherd = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
16
|
+
var shepherdModule;
|
|
17
|
+
return _regenerator().w(function (_context2) {
|
|
18
|
+
while (1) switch (_context2.p = _context2.n) {
|
|
19
|
+
case 0:
|
|
20
|
+
_context2.p = 0;
|
|
21
|
+
_context2.n = 1;
|
|
22
|
+
return import(/* webpackIgnore: true */'shepherd.js');
|
|
23
|
+
case 1:
|
|
24
|
+
shepherdModule = _context2.v;
|
|
25
|
+
Shepherd = shepherdModule.default || shepherdModule;
|
|
26
|
+
_context2.n = 2;
|
|
27
|
+
return import(/* webpackIgnore: true */'../node_modules/shepherd.js/dist/css/shepherd.css.js');
|
|
28
|
+
case 2:
|
|
29
|
+
return _context2.a(2, true);
|
|
30
|
+
case 3:
|
|
31
|
+
_context2.p = 3;
|
|
32
|
+
_context2.v;
|
|
33
|
+
console.warn('[SlGuide] shepherd.js 未安装,引导功能不可用。请执行 npm install shepherd.js 安装依赖。');
|
|
34
|
+
return _context2.a(2, false);
|
|
35
|
+
}
|
|
36
|
+
}, _callee2, null, [[0, 3]]);
|
|
37
|
+
}));
|
|
38
|
+
return _loadShepherd.apply(this, arguments);
|
|
39
|
+
}
|
|
40
|
+
var script = {
|
|
41
|
+
name: 'Guide',
|
|
42
|
+
props: {
|
|
43
|
+
steps: {
|
|
44
|
+
type: Array,
|
|
45
|
+
required: true
|
|
46
|
+
},
|
|
47
|
+
options: {
|
|
48
|
+
type: Object,
|
|
49
|
+
default: function _default() {
|
|
50
|
+
return {};
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
onNext: {
|
|
54
|
+
type: Function,
|
|
55
|
+
default: function _default() {}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
mounted: function mounted() {
|
|
59
|
+
var _this = this;
|
|
60
|
+
return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
61
|
+
var loaded;
|
|
62
|
+
return _regenerator().w(function (_context) {
|
|
63
|
+
while (1) switch (_context.n) {
|
|
64
|
+
case 0:
|
|
65
|
+
_context.n = 1;
|
|
66
|
+
return loadShepherd();
|
|
67
|
+
case 1:
|
|
68
|
+
loaded = _context.v;
|
|
69
|
+
if (loaded) {
|
|
70
|
+
_this.initTour();
|
|
71
|
+
}
|
|
72
|
+
case 2:
|
|
73
|
+
return _context.a(2);
|
|
74
|
+
}
|
|
75
|
+
}, _callee);
|
|
76
|
+
}))();
|
|
77
|
+
},
|
|
78
|
+
methods: {
|
|
79
|
+
initTour: function initTour() {
|
|
80
|
+
var tour = new Shepherd.Tour(_objectSpread2(_objectSpread2({}, this.options), {}, {
|
|
81
|
+
defaultStepOptions: {
|
|
82
|
+
classes: 'shadow-md bg-purple-dark text-light shepherd-has-title',
|
|
83
|
+
scrollTo: true,
|
|
84
|
+
cancelIcon: {
|
|
85
|
+
enabled: false
|
|
86
|
+
},
|
|
87
|
+
highlightClass: 'highlight-custom-class'
|
|
88
|
+
},
|
|
89
|
+
exitOnEsc: true,
|
|
90
|
+
keyboardNavigation: true,
|
|
91
|
+
showCancelLink: false,
|
|
92
|
+
useModalOverlay: true
|
|
93
|
+
}));
|
|
94
|
+
this.steps.forEach(function (step, index) {
|
|
95
|
+
var customButtons = step.buttons.map(function (button) {
|
|
96
|
+
return _objectSpread2(_objectSpread2({}, button), {}, {
|
|
97
|
+
action: function action() {
|
|
98
|
+
if (button.actionType === 'next') {
|
|
99
|
+
button.action && button.action(tour);
|
|
100
|
+
tour.next();
|
|
101
|
+
} else {
|
|
102
|
+
button.action(tour);
|
|
103
|
+
}
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
tour.addStep(_objectSpread2(_objectSpread2({}, step), {}, {
|
|
109
|
+
buttons: customButtons,
|
|
110
|
+
beforeShowPromise: function beforeShowPromise() {
|
|
111
|
+
return new Promise(function (resolve) {
|
|
112
|
+
if (step.attachTo && step.attachTo.element) {
|
|
113
|
+
var el = document.querySelector(step.attachTo.element);
|
|
114
|
+
if (el) {
|
|
115
|
+
el.style.pointerEvents = 'none';
|
|
116
|
+
el.classList.add('disabled-by-shepherd');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
resolve();
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
showOn: function showOn() {
|
|
123
|
+
var el = document.querySelector(step.attachTo.element || '');
|
|
124
|
+
return Boolean(el);
|
|
125
|
+
}
|
|
126
|
+
}));
|
|
127
|
+
});
|
|
128
|
+
tour.start();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export { script as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import styleInject from '../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".shepherd-element{background-color:#158dff}.shepherd-element[data-popper-placement=bottom]{margin-top:60px!important}.shepherd-element[data-popper-placement=bottom] .shepherd-arrow{height:60px;left:-60px;top:-61px;width:60px}.shepherd-element[data-popper-placement=bottom] .shepherd-arrow:before{display:none}.shepherd-element .shepherd-header{background-color:#158dff;height:40px;line-height:40px}.shepherd-element .shepherd-header .shepherd-title{color:#fff;font-size:16px;font-weight:700}.shepherd-element .shepherd-text{color:#fff;font-size:14px;line-height:1.6;padding:1em}.shepherd-element .shepherd-footer{color:#fff;padding:0 1em 1em}.shepherd-element .shepherd-footer .shepherd-button{background-color:#fff;color:#158dff;font-size:14px;height:32px;line-height:32px;padding:0 1.5rem}.shepherd-element .shepherd-button-quit{background:none!important;color:#c9caca!important}.shepherd-element .disabled-by-shepherd{cursor:not-allowed;opacity:.6;pointer-events:none}";
|
|
4
|
+
styleInject(css_248z);
|
|
5
|
+
|
|
6
|
+
export { css_248z as default };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { objectSpread2 as _objectSpread2, asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { MessageBox, Message } from 'element-ui';
|
|
3
|
+
|
|
4
|
+
function showConfirmMessageBox(options) {
|
|
5
|
+
var defaultOptions = {
|
|
6
|
+
title: '提示',
|
|
7
|
+
confirmButtonText: '确定',
|
|
8
|
+
cancelButtonText: '取消',
|
|
9
|
+
type: 'warning',
|
|
10
|
+
successMessage: '操作成功'
|
|
11
|
+
};
|
|
12
|
+
var mergedOptions = _objectSpread2(_objectSpread2({}, defaultOptions), options);
|
|
13
|
+
MessageBox.confirm(mergedOptions.message, mergedOptions.title, {
|
|
14
|
+
confirmButtonText: mergedOptions.confirmButtonText,
|
|
15
|
+
cancelButtonText: mergedOptions.cancelButtonText,
|
|
16
|
+
type: mergedOptions.type
|
|
17
|
+
}).then(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
18
|
+
return _regenerator().w(function (_context) {
|
|
19
|
+
while (1) switch (_context.n) {
|
|
20
|
+
case 0:
|
|
21
|
+
if (!(typeof mergedOptions.api === 'function')) {
|
|
22
|
+
_context.n = 1;
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
_context.n = 1;
|
|
26
|
+
return mergedOptions.api(mergedOptions.params);
|
|
27
|
+
case 1:
|
|
28
|
+
if (typeof mergedOptions.onConfirm === 'function') {
|
|
29
|
+
mergedOptions.onConfirm();
|
|
30
|
+
}
|
|
31
|
+
Message({
|
|
32
|
+
type: 'success',
|
|
33
|
+
message: mergedOptions.successMessage
|
|
34
|
+
});
|
|
35
|
+
case 2:
|
|
36
|
+
return _context.a(2);
|
|
37
|
+
}
|
|
38
|
+
}, _callee);
|
|
39
|
+
}))).catch(function () {
|
|
40
|
+
if (typeof mergedOptions.onCancel === 'function') {
|
|
41
|
+
mergedOptions.onCancel();
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { showConfirmMessageBox };
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import script from './index.vue2.js';
|
|
2
|
+
import './index.vue3.js';
|
|
3
|
+
import normalizeComponent from '../node_modules/vue-runtime-helpers/dist/normalize-component.js';
|
|
4
|
+
|
|
5
|
+
/* script */
|
|
6
|
+
var __vue_script__ = script;
|
|
7
|
+
/* template */
|
|
8
|
+
var __vue_render__ = function __vue_render__() {
|
|
9
|
+
var _vm = this;
|
|
10
|
+
var _h = _vm.$createElement;
|
|
11
|
+
var _c = _vm._self._c || _h;
|
|
12
|
+
return _c("main", {
|
|
13
|
+
staticClass: "content-box",
|
|
14
|
+
style: {
|
|
15
|
+
padding: _vm.notShowPadding ? "" : "20px"
|
|
16
|
+
}
|
|
17
|
+
}, [_c("div", {
|
|
18
|
+
staticClass: "sl-form"
|
|
19
|
+
}, [_c("transition-group", {
|
|
20
|
+
attrs: {
|
|
21
|
+
name: "fade",
|
|
22
|
+
tag: "span"
|
|
23
|
+
}
|
|
24
|
+
}, [_c("slForm", {
|
|
25
|
+
key: "slForm",
|
|
26
|
+
ref: "slForm",
|
|
27
|
+
attrs: {
|
|
28
|
+
data: _vm.filterForm,
|
|
29
|
+
showlabel: false,
|
|
30
|
+
"form-props": {
|
|
31
|
+
inline: true,
|
|
32
|
+
size: "small",
|
|
33
|
+
labelStyle: {
|
|
34
|
+
textAlign: "left"
|
|
35
|
+
},
|
|
36
|
+
labelWidth: "auto"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
model: {
|
|
40
|
+
value: _vm.form,
|
|
41
|
+
callback: function callback($$v) {
|
|
42
|
+
_vm.form = $$v;
|
|
43
|
+
},
|
|
44
|
+
expression: "form"
|
|
45
|
+
}
|
|
46
|
+
})], 1), _vm._v(" "), _c("div", {
|
|
47
|
+
staticClass: "search-btn"
|
|
48
|
+
}, [_c("el-button", {
|
|
49
|
+
attrs: {
|
|
50
|
+
type: "primary",
|
|
51
|
+
size: "small",
|
|
52
|
+
icon: "el-icon-search"
|
|
53
|
+
},
|
|
54
|
+
on: {
|
|
55
|
+
click: _vm.searchTableData
|
|
56
|
+
}
|
|
57
|
+
}, [_vm._v("搜索")]), _vm._v(" "), _c("el-button", {
|
|
58
|
+
attrs: {
|
|
59
|
+
size: "small",
|
|
60
|
+
icon: "el-icon-search"
|
|
61
|
+
},
|
|
62
|
+
on: {
|
|
63
|
+
click: _vm.resetTableData
|
|
64
|
+
}
|
|
65
|
+
}, [_vm._v("重置")]), _vm._v(" "), _c("el-button", {
|
|
66
|
+
directives: [{
|
|
67
|
+
name: "show",
|
|
68
|
+
rawName: "v-show",
|
|
69
|
+
value: _vm.options.length > _vm.showFormItem,
|
|
70
|
+
expression: "options.length > showFormItem "
|
|
71
|
+
}],
|
|
72
|
+
attrs: {
|
|
73
|
+
size: "small",
|
|
74
|
+
type: "text"
|
|
75
|
+
},
|
|
76
|
+
on: {
|
|
77
|
+
click: _vm.isShowMoreFilter
|
|
78
|
+
}
|
|
79
|
+
}, [_vm._v(_vm._s(_vm.isFold ? "折叠" : "展开")), _c("i", {
|
|
80
|
+
class: _vm.isFold ? "el-icon-arrow-up" : "el-icon-arrow-down",
|
|
81
|
+
staticStyle: {
|
|
82
|
+
"margin-left": "3px"
|
|
83
|
+
}
|
|
84
|
+
})])], 1)], 1), _vm._v(" "), _c("div", {
|
|
85
|
+
staticClass: "sl-table-header"
|
|
86
|
+
}, [_c("div", [_vm._t("tableLeftButtons", null, {
|
|
87
|
+
tablefilterFormData: _vm.$refs.slTable ? _vm.$refs.slTable.processedParams : {}
|
|
88
|
+
})], 2), _vm._v(" "), _c("div", [_vm._t("tableRightButtons", null, {
|
|
89
|
+
tablefilterFormData: _vm.$refs.slTable ? _vm.$refs.slTable.processedParams : {}
|
|
90
|
+
}), _vm._v(" "), _vm.isShowColSetting ? _c("el-button", {
|
|
91
|
+
attrs: {
|
|
92
|
+
size: "small",
|
|
93
|
+
icon: "el-icon-setting"
|
|
94
|
+
},
|
|
95
|
+
on: {
|
|
96
|
+
click: _vm.editCol
|
|
97
|
+
}
|
|
98
|
+
}, [_vm._v("列设置")]) : _vm._e()], 2)]), _vm._v(" "), _c("slTable", _vm._g(_vm._b({
|
|
99
|
+
ref: "slTable",
|
|
100
|
+
attrs: {
|
|
101
|
+
"table-api": _vm.tableApi,
|
|
102
|
+
columns: _vm.tableColumns,
|
|
103
|
+
"project-from": _vm.projectFrom,
|
|
104
|
+
params: _vm.form,
|
|
105
|
+
"filter-form": _vm.filterForm,
|
|
106
|
+
"other-config": _vm.otherConfig,
|
|
107
|
+
"default-seach-params": _vm.defaultSeachParams
|
|
108
|
+
},
|
|
109
|
+
on: {
|
|
110
|
+
setStorageCustomCol: _vm.setStorageCustomCol
|
|
111
|
+
},
|
|
112
|
+
scopedSlots: _vm._u([_vm._l(Object.keys(_vm.$scopedSlots), function (slotName) {
|
|
113
|
+
return {
|
|
114
|
+
key: slotName,
|
|
115
|
+
fn: function fn(scope) {
|
|
116
|
+
return [_vm._t(slotName, null, null, {
|
|
117
|
+
row: scope.row
|
|
118
|
+
})];
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
})])
|
|
122
|
+
}, "slTable", _vm.$attrs, false), _vm.$listeners))], 1);
|
|
123
|
+
};
|
|
124
|
+
var __vue_staticRenderFns__ = [];
|
|
125
|
+
__vue_render__._withStripped = true;
|
|
126
|
+
|
|
127
|
+
/* style */
|
|
128
|
+
var __vue_inject_styles__ = undefined;
|
|
129
|
+
/* scoped */
|
|
130
|
+
var __vue_scope_id__ = "data-v-47c2a39b";
|
|
131
|
+
/* module identifier */
|
|
132
|
+
var __vue_module_identifier__ = undefined;
|
|
133
|
+
/* functional template */
|
|
134
|
+
var __vue_is_functional_template__ = false;
|
|
135
|
+
/* style inject */
|
|
136
|
+
|
|
137
|
+
/* style inject SSR */
|
|
138
|
+
|
|
139
|
+
/* style inject shadow dom */
|
|
140
|
+
|
|
141
|
+
var __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
142
|
+
render: __vue_render__,
|
|
143
|
+
staticRenderFns: __vue_staticRenderFns__
|
|
144
|
+
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
145
|
+
var SlPage = __vue_component__;
|
|
146
|
+
|
|
147
|
+
export { SlPage as default };
|