xt-element-ui 1.0.2 → 1.0.4
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 +35 -0
- package/lib/demo.html +10 -1
- package/lib/index.common.js +178 -118
- package/lib/index.css +1 -1
- package/lib/index.umd.js +162 -142
- package/lib/index.umd.min.js +1 -1
- package/package.json +11 -13
- package/src/components/button/index.vue +3 -2
- package/src/index.js +6 -9
- /package/lib/fonts/{element-icons.ff18efd1.woff → element-icons.535877f5.woff} +0 -0
- /package/lib/fonts/{element-icons.f1a45d74.ttf → element-icons.732389de.ttf} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -7,127 +7,141 @@
|
|
|
7
7
|
exports["xt-element-ui"] = factory(require("ElementUI"), require("Vue"));
|
|
8
8
|
else
|
|
9
9
|
root["xt-element-ui"] = factory(root["ElementUI"], root["Vue"]);
|
|
10
|
-
})((typeof self !== 'undefined' ? self : this), (
|
|
11
|
-
return /******/ (()
|
|
12
|
-
/******/ "use strict";
|
|
13
|
-
/******/ var __webpack_modules__ = ({
|
|
14
|
-
|
|
15
|
-
/***/ 282
|
|
16
|
-
(module) {
|
|
17
|
-
|
|
18
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__282__;
|
|
19
|
-
|
|
20
|
-
/***/ },
|
|
21
|
-
|
|
22
|
-
/***/ 508
|
|
23
|
-
(module) {
|
|
24
|
-
|
|
25
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__508__;
|
|
26
|
-
|
|
27
|
-
/***/ }
|
|
28
|
-
|
|
29
|
-
/******/ });
|
|
30
|
-
/************************************************************************/
|
|
10
|
+
})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__5f72__, __WEBPACK_EXTERNAL_MODULE__8bbf__) {
|
|
11
|
+
return /******/ (function(modules) { // webpackBootstrap
|
|
31
12
|
/******/ // The module cache
|
|
32
|
-
/******/ var
|
|
33
|
-
/******/
|
|
13
|
+
/******/ var installedModules = {};
|
|
14
|
+
/******/
|
|
34
15
|
/******/ // The require function
|
|
35
16
|
/******/ function __webpack_require__(moduleId) {
|
|
17
|
+
/******/
|
|
36
18
|
/******/ // Check if module is in cache
|
|
37
|
-
/******/
|
|
38
|
-
/******/
|
|
39
|
-
/******/ return cachedModule.exports;
|
|
19
|
+
/******/ if(installedModules[moduleId]) {
|
|
20
|
+
/******/ return installedModules[moduleId].exports;
|
|
40
21
|
/******/ }
|
|
41
22
|
/******/ // Create a new module (and put it into the cache)
|
|
42
|
-
/******/ var module =
|
|
43
|
-
/******/
|
|
44
|
-
/******/
|
|
23
|
+
/******/ var module = installedModules[moduleId] = {
|
|
24
|
+
/******/ i: moduleId,
|
|
25
|
+
/******/ l: false,
|
|
45
26
|
/******/ exports: {}
|
|
46
27
|
/******/ };
|
|
47
|
-
/******/
|
|
28
|
+
/******/
|
|
48
29
|
/******/ // Execute the module function
|
|
49
|
-
/******/
|
|
50
|
-
/******/
|
|
30
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
31
|
+
/******/
|
|
32
|
+
/******/ // Flag the module as loaded
|
|
33
|
+
/******/ module.l = true;
|
|
34
|
+
/******/
|
|
51
35
|
/******/ // Return the exports of the module
|
|
52
36
|
/******/ return module.exports;
|
|
53
37
|
/******/ }
|
|
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
|
-
/******/ __webpack_require__.
|
|
99
|
-
/******/
|
|
100
|
-
/******/
|
|
38
|
+
/******/
|
|
39
|
+
/******/
|
|
40
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
41
|
+
/******/ __webpack_require__.m = modules;
|
|
42
|
+
/******/
|
|
43
|
+
/******/ // expose the module cache
|
|
44
|
+
/******/ __webpack_require__.c = installedModules;
|
|
45
|
+
/******/
|
|
46
|
+
/******/ // define getter function for harmony exports
|
|
47
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
48
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
49
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
50
|
+
/******/ }
|
|
51
|
+
/******/ };
|
|
52
|
+
/******/
|
|
53
|
+
/******/ // define __esModule on exports
|
|
54
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
55
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
56
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
57
|
+
/******/ }
|
|
58
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
59
|
+
/******/ };
|
|
60
|
+
/******/
|
|
61
|
+
/******/ // create a fake namespace object
|
|
62
|
+
/******/ // mode & 1: value is a module id, require it
|
|
63
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
64
|
+
/******/ // mode & 4: return value when already ns object
|
|
65
|
+
/******/ // mode & 8|1: behave like require
|
|
66
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
67
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
68
|
+
/******/ if(mode & 8) return value;
|
|
69
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
70
|
+
/******/ var ns = Object.create(null);
|
|
71
|
+
/******/ __webpack_require__.r(ns);
|
|
72
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
73
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
74
|
+
/******/ return ns;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
78
|
+
/******/ __webpack_require__.n = function(module) {
|
|
79
|
+
/******/ var getter = module && module.__esModule ?
|
|
80
|
+
/******/ function getDefault() { return module['default']; } :
|
|
81
|
+
/******/ function getModuleExports() { return module; };
|
|
82
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
83
|
+
/******/ return getter;
|
|
84
|
+
/******/ };
|
|
85
|
+
/******/
|
|
86
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
87
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
88
|
+
/******/
|
|
89
|
+
/******/ // __webpack_public_path__
|
|
90
|
+
/******/ __webpack_require__.p = "";
|
|
91
|
+
/******/
|
|
92
|
+
/******/
|
|
93
|
+
/******/ // Load entry module and return exports
|
|
94
|
+
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
|
95
|
+
/******/ })
|
|
101
96
|
/************************************************************************/
|
|
102
|
-
|
|
97
|
+
/******/ ({
|
|
98
|
+
|
|
99
|
+
/***/ "0fae":
|
|
100
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
101
|
+
|
|
102
|
+
// extracted by mini-css-extract-plugin
|
|
103
|
+
|
|
104
|
+
/***/ }),
|
|
105
|
+
|
|
106
|
+
/***/ "5f72":
|
|
107
|
+
/***/ (function(module, exports) {
|
|
108
|
+
|
|
109
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__5f72__;
|
|
110
|
+
|
|
111
|
+
/***/ }),
|
|
112
|
+
|
|
113
|
+
/***/ "8bbf":
|
|
114
|
+
/***/ (function(module, exports) {
|
|
115
|
+
|
|
116
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;
|
|
117
|
+
|
|
118
|
+
/***/ }),
|
|
119
|
+
|
|
120
|
+
/***/ "fb15":
|
|
121
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
122
|
+
|
|
123
|
+
"use strict";
|
|
103
124
|
// ESM COMPAT FLAG
|
|
104
125
|
__webpack_require__.r(__webpack_exports__);
|
|
105
126
|
|
|
106
127
|
// EXPORTS
|
|
107
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
setSize: () => (/* reexport */ setSize),
|
|
120
|
-
setTheme: () => (/* reexport */ setTheme)
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
;// ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
124
|
-
/* eslint-disable no-var */
|
|
128
|
+
__webpack_require__.d(__webpack_exports__, "getConfig", function() { return /* reexport */ getConfig; });
|
|
129
|
+
__webpack_require__.d(__webpack_exports__, "setConfig", function() { return /* reexport */ setConfig; });
|
|
130
|
+
__webpack_require__.d(__webpack_exports__, "setTheme", function() { return /* reexport */ setTheme; });
|
|
131
|
+
__webpack_require__.d(__webpack_exports__, "setSize", function() { return /* reexport */ setSize; });
|
|
132
|
+
__webpack_require__.d(__webpack_exports__, "setPrimaryColor", function() { return /* reexport */ setPrimaryColor; });
|
|
133
|
+
__webpack_require__.d(__webpack_exports__, "getTheme", function() { return /* reexport */ getTheme; });
|
|
134
|
+
__webpack_require__.d(__webpack_exports__, "getSize", function() { return /* reexport */ getSize; });
|
|
135
|
+
__webpack_require__.d(__webpack_exports__, "getPrimaryColor", function() { return /* reexport */ getPrimaryColor; });
|
|
136
|
+
__webpack_require__.d(__webpack_exports__, "resetConfig", function() { return /* reexport */ resetConfig; });
|
|
137
|
+
__webpack_require__.d(__webpack_exports__, "onConfigChange", function() { return /* reexport */ onConfigChange; });
|
|
138
|
+
|
|
139
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
125
140
|
// This file is imported into lib/wc client bundles.
|
|
126
141
|
|
|
127
142
|
if (typeof window !== 'undefined') {
|
|
128
143
|
var currentScript = window.document.currentScript
|
|
129
|
-
if (false)
|
|
130
|
-
{ var getCurrentScript; }
|
|
144
|
+
if (false) { var getCurrentScript; }
|
|
131
145
|
|
|
132
146
|
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
133
147
|
if (src) {
|
|
@@ -136,24 +150,30 @@ if (typeof window !== 'undefined') {
|
|
|
136
150
|
}
|
|
137
151
|
|
|
138
152
|
// Indicate to webpack that this file can be concatenated
|
|
139
|
-
/* harmony default export */
|
|
153
|
+
/* harmony default export */ var setPublicPath = (null);
|
|
140
154
|
|
|
141
155
|
// EXTERNAL MODULE: external "Vue"
|
|
142
|
-
var external_Vue_ = __webpack_require__(
|
|
156
|
+
var external_Vue_ = __webpack_require__("8bbf");
|
|
143
157
|
var external_Vue_default = /*#__PURE__*/__webpack_require__.n(external_Vue_);
|
|
158
|
+
|
|
144
159
|
// EXTERNAL MODULE: external "ElementUI"
|
|
145
|
-
var external_ElementUI_ = __webpack_require__(
|
|
160
|
+
var external_ElementUI_ = __webpack_require__("5f72");
|
|
146
161
|
var external_ElementUI_default = /*#__PURE__*/__webpack_require__.n(external_ElementUI_);
|
|
147
|
-
|
|
148
|
-
|
|
162
|
+
|
|
163
|
+
// EXTERNAL MODULE: ./node_modules/element-ui/lib/theme-chalk/index.css
|
|
164
|
+
var theme_chalk = __webpack_require__("0fae");
|
|
165
|
+
|
|
166
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7d921827-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/button/index.vue?vue&type=template&id=0ad9d4c9
|
|
167
|
+
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-button',{on:{"click":_vm.handleClick}},[_vm._t("default")],2)
|
|
149
168
|
}
|
|
150
169
|
var staticRenderFns = []
|
|
151
170
|
|
|
152
171
|
|
|
153
|
-
|
|
172
|
+
// CONCATENATED MODULE: ./src/components/button/index.vue?vue&type=template&id=0ad9d4c9
|
|
173
|
+
|
|
174
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/button/index.vue?vue&type=script&lang=js
|
|
154
175
|
|
|
155
|
-
/* harmony default export */
|
|
156
|
-
props:['text'],
|
|
176
|
+
/* harmony default export */ var buttonvue_type_script_lang_js = ({
|
|
157
177
|
name: 'XtButton',
|
|
158
178
|
methods:{
|
|
159
179
|
handleClick(){
|
|
@@ -162,9 +182,9 @@ var staticRenderFns = []
|
|
|
162
182
|
}
|
|
163
183
|
});
|
|
164
184
|
|
|
165
|
-
|
|
166
|
-
/* harmony default export */
|
|
167
|
-
|
|
185
|
+
// CONCATENATED MODULE: ./src/components/button/index.vue?vue&type=script&lang=js
|
|
186
|
+
/* harmony default export */ var components_buttonvue_type_script_lang_js = (buttonvue_type_script_lang_js);
|
|
187
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
168
188
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
169
189
|
|
|
170
190
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
@@ -262,14 +282,14 @@ function normalizeComponent(
|
|
|
262
282
|
}
|
|
263
283
|
}
|
|
264
284
|
|
|
265
|
-
|
|
285
|
+
// CONCATENATED MODULE: ./src/components/button/index.vue
|
|
266
286
|
|
|
267
287
|
|
|
268
288
|
|
|
269
289
|
|
|
270
290
|
|
|
271
291
|
/* normalize component */
|
|
272
|
-
|
|
292
|
+
|
|
273
293
|
var component = normalizeComponent(
|
|
274
294
|
components_buttonvue_type_script_lang_js,
|
|
275
295
|
render,
|
|
@@ -281,19 +301,21 @@ var component = normalizeComponent(
|
|
|
281
301
|
|
|
282
302
|
)
|
|
283
303
|
|
|
284
|
-
/* harmony default export */
|
|
285
|
-
|
|
304
|
+
/* harmony default export */ var components_button = (component.exports);
|
|
305
|
+
// CONCATENATED MODULE: ./src/components/button/index.js
|
|
286
306
|
|
|
287
|
-
/* harmony default export */
|
|
288
|
-
|
|
307
|
+
/* harmony default export */ var src_components_button = (components_button);
|
|
308
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7d921827-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/input/index.vue?vue&type=template&id=fe9146e4
|
|
289
309
|
var inputvue_type_template_id_fe9146e4_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-input',{attrs:{"value":_vm.value,"placeholder":_vm.placeholder},on:{"input":function($event){return _vm.$emit('input', $event)}}})
|
|
290
310
|
}
|
|
291
311
|
var inputvue_type_template_id_fe9146e4_staticRenderFns = []
|
|
292
312
|
|
|
293
313
|
|
|
294
|
-
|
|
314
|
+
// CONCATENATED MODULE: ./src/components/input/index.vue?vue&type=template&id=fe9146e4
|
|
315
|
+
|
|
316
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/input/index.vue?vue&type=script&lang=js
|
|
295
317
|
|
|
296
|
-
/* harmony default export */
|
|
318
|
+
/* harmony default export */ var inputvue_type_script_lang_js = ({
|
|
297
319
|
name: 'XtInput',
|
|
298
320
|
props: {
|
|
299
321
|
value: [String, Number],
|
|
@@ -304,16 +326,16 @@ var inputvue_type_template_id_fe9146e4_staticRenderFns = []
|
|
|
304
326
|
}
|
|
305
327
|
});
|
|
306
328
|
|
|
307
|
-
|
|
308
|
-
/* harmony default export */
|
|
309
|
-
|
|
329
|
+
// CONCATENATED MODULE: ./src/components/input/index.vue?vue&type=script&lang=js
|
|
330
|
+
/* harmony default export */ var components_inputvue_type_script_lang_js = (inputvue_type_script_lang_js);
|
|
331
|
+
// CONCATENATED MODULE: ./src/components/input/index.vue
|
|
310
332
|
|
|
311
333
|
|
|
312
334
|
|
|
313
335
|
|
|
314
336
|
|
|
315
337
|
/* normalize component */
|
|
316
|
-
|
|
338
|
+
|
|
317
339
|
var input_component = normalizeComponent(
|
|
318
340
|
components_inputvue_type_script_lang_js,
|
|
319
341
|
inputvue_type_template_id_fe9146e4_render,
|
|
@@ -325,17 +347,17 @@ var input_component = normalizeComponent(
|
|
|
325
347
|
|
|
326
348
|
)
|
|
327
349
|
|
|
328
|
-
/* harmony default export */
|
|
329
|
-
|
|
350
|
+
/* harmony default export */ var input = (input_component.exports);
|
|
351
|
+
// CONCATENATED MODULE: ./src/components/input/index.js
|
|
330
352
|
|
|
331
|
-
/* harmony default export */
|
|
332
|
-
|
|
353
|
+
/* harmony default export */ var components_input = (input);
|
|
354
|
+
// CONCATENATED MODULE: ./src/index.js
|
|
333
355
|
// 导入 Vue
|
|
334
356
|
|
|
335
357
|
|
|
336
358
|
// 在导入 Element UI 之前,先将 Vue 设置为全局变量
|
|
337
359
|
if (typeof window !== 'undefined') {
|
|
338
|
-
window.Vue =
|
|
360
|
+
window.Vue = external_Vue_default.a
|
|
339
361
|
}
|
|
340
362
|
|
|
341
363
|
// 导入 Element UI 并注册
|
|
@@ -352,14 +374,15 @@ const components = [
|
|
|
352
374
|
components_input
|
|
353
375
|
]
|
|
354
376
|
|
|
377
|
+
|
|
378
|
+
// 注册 Element UI
|
|
379
|
+
external_Vue_default.a.use(external_ElementUI_default.a)
|
|
380
|
+
|
|
355
381
|
// 定义 install 方法,Vue.use() 会自动调用
|
|
356
382
|
const install = function (Vue) {
|
|
357
383
|
if (install.installed) return
|
|
358
384
|
install.installed = true
|
|
359
385
|
|
|
360
|
-
// 注册 Element UI
|
|
361
|
-
Vue.use((external_ElementUI_default()))
|
|
362
|
-
|
|
363
386
|
// 全局注册所有 xt- 组件
|
|
364
387
|
components.forEach(component => {
|
|
365
388
|
Vue.component(component.name, component)
|
|
@@ -372,17 +395,13 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
372
395
|
}
|
|
373
396
|
|
|
374
397
|
// 导出
|
|
375
|
-
/* harmony default export */
|
|
398
|
+
/* harmony default export */ var src_0 = ({
|
|
376
399
|
install,
|
|
377
400
|
// 按需导出组件
|
|
378
401
|
Button: src_components_button,
|
|
379
|
-
Input: components_input
|
|
380
|
-
// 导出 ElementUI 以便用户按需引入
|
|
381
|
-
ElementUI: (external_ElementUI_default())
|
|
402
|
+
Input: components_input
|
|
382
403
|
});
|
|
383
404
|
|
|
384
|
-
// 导出 Vue 和 ElementUI 以便用户使用
|
|
385
|
-
|
|
386
405
|
|
|
387
406
|
// 默认配置
|
|
388
407
|
const defaultConfig = {
|
|
@@ -500,13 +519,14 @@ const onConfigChange = function(listener) {
|
|
|
500
519
|
console.warn('[XtElementUI] onConfigChange 必须传入函数')
|
|
501
520
|
}
|
|
502
521
|
}
|
|
503
|
-
|
|
522
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (src_0);
|
|
504
526
|
|
|
505
527
|
|
|
506
|
-
/* harmony default export */ const entry_lib = (src_0);
|
|
507
528
|
|
|
529
|
+
/***/ })
|
|
508
530
|
|
|
509
|
-
/******/
|
|
510
|
-
/******/ })()
|
|
511
|
-
;
|
|
531
|
+
/******/ });
|
|
512
532
|
});
|
package/lib/index.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("ElementUI"),require("Vue")):"function"===typeof define&&define.amd?define("xt-element-ui",["ElementUI","Vue"],t):"object"===typeof exports?exports["xt-element-ui"]=t(require("ElementUI"),require("Vue")):e["xt-element-ui"]=t(e["ElementUI"],e["Vue"])})("undefined"!==typeof self?self:this,(e,t)
|
|
1
|
+
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("ElementUI"),require("Vue")):"function"===typeof define&&define.amd?define("xt-element-ui",["ElementUI","Vue"],t):"object"===typeof exports?exports["xt-element-ui"]=t(require("ElementUI"),require("Vue")):e["xt-element-ui"]=t(e["ElementUI"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"0fae":function(e,t,n){},"5f72":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fb15:function(e,t,n){"use strict";if(n.r(t),n.d(t,"getConfig",(function(){return z})),n.d(t,"setConfig",(function(){return V})),n.d(t,"setTheme",(function(){return X})),n.d(t,"setSize",(function(){return P})),n.d(t,"setPrimaryColor",(function(){return T})),n.d(t,"getTheme",(function(){return k})),n.d(t,"getSize",(function(){return R})),n.d(t,"getPrimaryColor",(function(){return q})),n.d(t,"resetConfig",(function(){return A})),n.d(t,"onConfigChange",(function(){return M})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var i=n("8bbf"),u=n.n(i),f=n("5f72"),c=n.n(f),l=(n("0fae"),function(){var e=this,t=e._self._c;return t("el-button",{on:{click:e.handleClick}},[e._t("default")],2)}),s=[],a={name:"XtButton",methods:{handleClick(){this.$emit("click")}}},d=a;function p(e,t,n,o,r,i,u,f){var c,l="function"===typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),u?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(u)},l._ssrRegister=c):r&&(c=f?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var s=l.render;l.render=function(e,t){return c.call(t),s(e,t)}}else{var a=l.beforeCreate;l.beforeCreate=a?[].concat(a,c):[c]}return{exports:e,options:l}}var m=p(d,l,s,!1,null,null,null),h=m.exports,y=h,b=function(){var e=this,t=e._self._c;return t("el-input",{attrs:{value:e.value,placeholder:e.placeholder},on:{input:function(t){return e.$emit("input",t)}}})},_=[],v={name:"XtInput",props:{value:[String,Number],placeholder:{type:String,default:"请输入内容"}}},g=v,C=p(g,b,_,!1,null,null,null),w=C.exports,x=w;"undefined"!==typeof window&&(window.Vue=u.a);const E=[y,x];u.a.use(c.a);const $=function(e){$.installed||($.installed=!0,E.forEach(t=>{e.component(t.name,t)}))};"undefined"!==typeof window&&window.Vue&&$(window.Vue);var j={install:$,Button:y,Input:x};const S={theme:"light",size:"medium",primaryColor:"#1890ff"};let I={...S};const U=[],O=function(e,t){U.forEach(n=>{n(e,t)})},z=function(){return{...I}},V=function(e){"object"===typeof e&&null!==e?(void 0!==e.theme&&X(e.theme),void 0!==e.size&&P(e.size),void 0!==e.primaryColor&&T(e.primaryColor)):console.warn("[XtElementUI] setConfig 必须传入对象参数")},X=function(e){const t=["light","dark","compact"];t.includes(e)?(I.theme=e,document.documentElement.setAttribute("data-theme",e),O("theme",e)):console.warn(`[XtElementUI] 无效的主题值: ${e},可选值: ${t.join(", ")}`)},P=function(e){const t=["small","medium","large"];t.includes(e)?(I.size=e,document.documentElement.setAttribute("data-size",e),O("size",e)):console.warn(`[XtElementUI] 无效的大小值: ${e},可选值: ${t.join(", ")}`)},T=function(e){const t=/^#[0-9A-Fa-f]{6}$|^#[0-9A-Fa-f]{3}$/;t.test(e)?(I.primaryColor=e,document.documentElement.style.setProperty("--xt-color-primary",e),O("primaryColor",e)):console.warn(`[XtElementUI] 无效的颜色值: ${e},请使用十六进制颜色格式,如 #1890ff`)},k=function(){return I.theme},R=function(){return I.size},q=function(){return I.primaryColor},A=function(){V(S)},M=function(e){if("function"===typeof e)return U.push(e),function(){const t=U.indexOf(e);t>-1&&U.splice(t,1)};console.warn("[XtElementUI] onConfigChange 必须传入函数")};t["default"]=j}})}));
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xt-element-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "基于 Vue2.7 + ElementUI 的组件库",
|
|
5
5
|
"main": "lib/index.common.js",
|
|
6
|
-
"module": "lib/index.
|
|
6
|
+
"module": "lib/index.esm.js",
|
|
7
7
|
"unpkg": "lib/index.umd.min.js",
|
|
8
8
|
"style": "lib/index.css",
|
|
9
9
|
"scripts": {
|
|
@@ -13,27 +13,25 @@
|
|
|
13
13
|
"lib": "vue-cli-service build --target lib --name index --dest lib src/index.js",
|
|
14
14
|
"prepublishOnly": "npm run lib"
|
|
15
15
|
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"vue2",
|
|
18
|
-
"element-ui",
|
|
19
|
-
"component",
|
|
20
|
-
"ui"
|
|
21
|
-
],
|
|
22
|
-
"author": "nss3012",
|
|
23
|
-
"license": "MIT",
|
|
24
16
|
"peerDependencies": {
|
|
25
17
|
"element-ui": "^2.15.0",
|
|
26
18
|
"vue": "^2.7.0"
|
|
27
19
|
},
|
|
28
20
|
"devDependencies": {
|
|
29
|
-
"@vue/cli-service": "
|
|
21
|
+
"@vue/cli-service": "~4.5.19",
|
|
22
|
+
"element-ui": "^2.15.14",
|
|
30
23
|
"sass": "^1.32.13",
|
|
31
24
|
"sass-loader": "^10.5.2",
|
|
25
|
+
"vue": "^2.7.14",
|
|
32
26
|
"vuepress": "^1.9.10"
|
|
33
27
|
},
|
|
34
28
|
"files": [
|
|
35
29
|
"lib",
|
|
36
30
|
"src",
|
|
37
31
|
"README.md"
|
|
38
|
-
]
|
|
39
|
-
|
|
32
|
+
],
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"vue-server-renderer": "^2.7.14",
|
|
35
|
+
"xt-element-ui": "^1.0.3"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/src/index.js
CHANGED
|
@@ -7,7 +7,7 @@ if (typeof window !== 'undefined') {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// 导入 Element UI 并注册
|
|
10
|
-
import
|
|
10
|
+
import Element from 'element-ui'
|
|
11
11
|
import 'element-ui/lib/theme-chalk/index.css'
|
|
12
12
|
|
|
13
13
|
// 导入组件
|
|
@@ -20,14 +20,15 @@ const components = [
|
|
|
20
20
|
Input
|
|
21
21
|
]
|
|
22
22
|
|
|
23
|
+
|
|
24
|
+
// 注册 Element UI
|
|
25
|
+
Vue.use(Element)
|
|
26
|
+
|
|
23
27
|
// 定义 install 方法,Vue.use() 会自动调用
|
|
24
28
|
const install = function (Vue) {
|
|
25
29
|
if (install.installed) return
|
|
26
30
|
install.installed = true
|
|
27
31
|
|
|
28
|
-
// 注册 Element UI
|
|
29
|
-
Vue.use(ElementUI)
|
|
30
|
-
|
|
31
32
|
// 全局注册所有 xt- 组件
|
|
32
33
|
components.forEach(component => {
|
|
33
34
|
Vue.component(component.name, component)
|
|
@@ -44,13 +45,9 @@ export default {
|
|
|
44
45
|
install,
|
|
45
46
|
// 按需导出组件
|
|
46
47
|
Button,
|
|
47
|
-
Input
|
|
48
|
-
// 导出 ElementUI 以便用户按需引入
|
|
49
|
-
ElementUI
|
|
48
|
+
Input
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
// 导出 Vue 和 ElementUI 以便用户使用
|
|
53
|
-
export { Vue, ElementUI }
|
|
54
51
|
|
|
55
52
|
// 默认配置
|
|
56
53
|
const defaultConfig = {
|
|
File without changes
|
|
File without changes
|