xt-element-ui 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/lib/demo.html +1 -0
- package/lib/index.common.js +259 -0
- package/lib/index.umd.js +270 -0
- package/lib/index.umd.min.js +1 -0
- package/package.json +29 -0
- package/src/components/Button.vue +1 -0
- package/src/components/Input.vue +1 -0
- package/src/index.js +34 -0
- package/src/styles/theme-element.scss +120 -0
- package/src/styles/theme.scss +106 -0
- package/src/styles/variables.scss +41 -0
- package/vue.config.js +41 -0
package/lib/demo.html
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!doctype html><meta charset="utf-8"><title>index demo</title><script src="./index.umd.js"></script><link rel="stylesheet" href="./index.css"><script>console.log(index)</script>
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ // The require scope
|
|
4
|
+
/******/ var __webpack_require__ = {};
|
|
5
|
+
/******/
|
|
6
|
+
/************************************************************************/
|
|
7
|
+
/******/ /* webpack/runtime/define property getters */
|
|
8
|
+
/******/ (() => {
|
|
9
|
+
/******/ // define getter functions for harmony exports
|
|
10
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
11
|
+
/******/ for(var key in definition) {
|
|
12
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
13
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
14
|
+
/******/ }
|
|
15
|
+
/******/ }
|
|
16
|
+
/******/ };
|
|
17
|
+
/******/ })();
|
|
18
|
+
/******/
|
|
19
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
20
|
+
/******/ (() => {
|
|
21
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
22
|
+
/******/ })();
|
|
23
|
+
/******/
|
|
24
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
25
|
+
/******/ (() => {
|
|
26
|
+
/******/ // define __esModule on exports
|
|
27
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
28
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
29
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
30
|
+
/******/ }
|
|
31
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
32
|
+
/******/ };
|
|
33
|
+
/******/ })();
|
|
34
|
+
/******/
|
|
35
|
+
/******/ /* webpack/runtime/publicPath */
|
|
36
|
+
/******/ (() => {
|
|
37
|
+
/******/ __webpack_require__.p = "";
|
|
38
|
+
/******/ })();
|
|
39
|
+
/******/
|
|
40
|
+
/************************************************************************/
|
|
41
|
+
var __webpack_exports__ = {};
|
|
42
|
+
// ESM COMPAT FLAG
|
|
43
|
+
__webpack_require__.r(__webpack_exports__);
|
|
44
|
+
|
|
45
|
+
// EXPORTS
|
|
46
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
47
|
+
"default": () => (/* binding */ entry_lib)
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
;// ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
51
|
+
/* eslint-disable no-var */
|
|
52
|
+
// This file is imported into lib/wc client bundles.
|
|
53
|
+
|
|
54
|
+
if (typeof window !== 'undefined') {
|
|
55
|
+
var currentScript = window.document.currentScript
|
|
56
|
+
if (false) // removed by dead control flow
|
|
57
|
+
{ var getCurrentScript; }
|
|
58
|
+
|
|
59
|
+
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
60
|
+
if (src) {
|
|
61
|
+
__webpack_require__.p = src[1] // eslint-disable-line
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Indicate to webpack that this file can be concatenated
|
|
66
|
+
/* harmony default export */ const setPublicPath = (null);
|
|
67
|
+
|
|
68
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Button.vue?vue&type=template&id=bdf70fbe
|
|
69
|
+
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-button',[_vm._v("按钮")])
|
|
70
|
+
}
|
|
71
|
+
var staticRenderFns = []
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
75
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
76
|
+
|
|
77
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
78
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
79
|
+
// be included in the final webpack user bundle.
|
|
80
|
+
|
|
81
|
+
function normalizeComponent(
|
|
82
|
+
scriptExports,
|
|
83
|
+
render,
|
|
84
|
+
staticRenderFns,
|
|
85
|
+
functionalTemplate,
|
|
86
|
+
injectStyles,
|
|
87
|
+
scopeId,
|
|
88
|
+
moduleIdentifier /* server only */,
|
|
89
|
+
shadowMode /* vue-cli only */
|
|
90
|
+
) {
|
|
91
|
+
// Vue.extend constructor export interop
|
|
92
|
+
var options =
|
|
93
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
94
|
+
|
|
95
|
+
// render functions
|
|
96
|
+
if (render) {
|
|
97
|
+
options.render = render
|
|
98
|
+
options.staticRenderFns = staticRenderFns
|
|
99
|
+
options._compiled = true
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// functional template
|
|
103
|
+
if (functionalTemplate) {
|
|
104
|
+
options.functional = true
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// scopedId
|
|
108
|
+
if (scopeId) {
|
|
109
|
+
options._scopeId = 'data-v-' + scopeId
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
var hook
|
|
113
|
+
if (moduleIdentifier) {
|
|
114
|
+
// server build
|
|
115
|
+
hook = function (context) {
|
|
116
|
+
// 2.3 injection
|
|
117
|
+
context =
|
|
118
|
+
context || // cached call
|
|
119
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
120
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
121
|
+
// 2.2 with runInNewContext: true
|
|
122
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
123
|
+
context = __VUE_SSR_CONTEXT__
|
|
124
|
+
}
|
|
125
|
+
// inject component styles
|
|
126
|
+
if (injectStyles) {
|
|
127
|
+
injectStyles.call(this, context)
|
|
128
|
+
}
|
|
129
|
+
// register component module identifier for async chunk inferrence
|
|
130
|
+
if (context && context._registeredComponents) {
|
|
131
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// used by ssr in case component is cached and beforeCreate
|
|
135
|
+
// never gets called
|
|
136
|
+
options._ssrRegister = hook
|
|
137
|
+
} else if (injectStyles) {
|
|
138
|
+
hook = shadowMode
|
|
139
|
+
? function () {
|
|
140
|
+
injectStyles.call(
|
|
141
|
+
this,
|
|
142
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
: injectStyles
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (hook) {
|
|
149
|
+
if (options.functional) {
|
|
150
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
151
|
+
// go through the normalizer
|
|
152
|
+
options._injectStyles = hook
|
|
153
|
+
// register for functional component in vue file
|
|
154
|
+
var originalRender = options.render
|
|
155
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
156
|
+
hook.call(context)
|
|
157
|
+
return originalRender(h, context)
|
|
158
|
+
}
|
|
159
|
+
} else {
|
|
160
|
+
// inject component registration as beforeCreate hook
|
|
161
|
+
var existing = options.beforeCreate
|
|
162
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return {
|
|
167
|
+
exports: scriptExports,
|
|
168
|
+
options: options
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
;// ./src/components/Button.vue
|
|
173
|
+
|
|
174
|
+
var script = {}
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
/* normalize component */
|
|
178
|
+
;
|
|
179
|
+
var component = normalizeComponent(
|
|
180
|
+
script,
|
|
181
|
+
render,
|
|
182
|
+
staticRenderFns,
|
|
183
|
+
false,
|
|
184
|
+
null,
|
|
185
|
+
null,
|
|
186
|
+
null
|
|
187
|
+
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
/* harmony default export */ const Button = (component.exports);
|
|
191
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Input.vue?vue&type=template&id=e1a0dba0
|
|
192
|
+
var Inputvue_type_template_id_e1a0dba0_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-input')
|
|
193
|
+
}
|
|
194
|
+
var Inputvue_type_template_id_e1a0dba0_staticRenderFns = []
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
;// ./src/components/Input.vue
|
|
198
|
+
|
|
199
|
+
var Input_script = {}
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
/* normalize component */
|
|
203
|
+
;
|
|
204
|
+
var Input_component = normalizeComponent(
|
|
205
|
+
Input_script,
|
|
206
|
+
Inputvue_type_template_id_e1a0dba0_render,
|
|
207
|
+
Inputvue_type_template_id_e1a0dba0_staticRenderFns,
|
|
208
|
+
false,
|
|
209
|
+
null,
|
|
210
|
+
null,
|
|
211
|
+
null
|
|
212
|
+
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
/* harmony default export */ const Input = (Input_component.exports);
|
|
216
|
+
;// ./src/index.js
|
|
217
|
+
// 导入组件
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
// ...其他组件
|
|
221
|
+
|
|
222
|
+
// 存储组件列表
|
|
223
|
+
const components = [
|
|
224
|
+
Button,
|
|
225
|
+
Input
|
|
226
|
+
]
|
|
227
|
+
|
|
228
|
+
// 定义 install 方法,Vue.use() 会自动调用
|
|
229
|
+
const install = function (Vue) {
|
|
230
|
+
if (install.installed) return
|
|
231
|
+
install.installed = true
|
|
232
|
+
|
|
233
|
+
// 全局注册所有组件
|
|
234
|
+
components.forEach(component => {
|
|
235
|
+
Vue.component(component.name, component)
|
|
236
|
+
})
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// 支持全局 script 标签引入
|
|
240
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
241
|
+
install(window.Vue)
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// 导出
|
|
245
|
+
/* harmony default export */ const src_0 = ({
|
|
246
|
+
install,
|
|
247
|
+
// 按需导出组件
|
|
248
|
+
Button: Button,
|
|
249
|
+
Input: Input
|
|
250
|
+
});
|
|
251
|
+
;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
/* harmony default export */ const entry_lib = (src_0);
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
module.exports = __webpack_exports__;
|
|
258
|
+
/******/ })()
|
|
259
|
+
;
|
package/lib/index.umd.js
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory();
|
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
|
5
|
+
define("xt-element-ui", [], factory);
|
|
6
|
+
else if(typeof exports === 'object')
|
|
7
|
+
exports["xt-element-ui"] = factory();
|
|
8
|
+
else
|
|
9
|
+
root["xt-element-ui"] = factory();
|
|
10
|
+
})((typeof self !== 'undefined' ? self : this), () => {
|
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
|
12
|
+
/******/ "use strict";
|
|
13
|
+
/******/ // The require scope
|
|
14
|
+
/******/ var __webpack_require__ = {};
|
|
15
|
+
/******/
|
|
16
|
+
/************************************************************************/
|
|
17
|
+
/******/ /* webpack/runtime/define property getters */
|
|
18
|
+
/******/ (() => {
|
|
19
|
+
/******/ // define getter functions for harmony exports
|
|
20
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
21
|
+
/******/ for(var key in definition) {
|
|
22
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
23
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
24
|
+
/******/ }
|
|
25
|
+
/******/ }
|
|
26
|
+
/******/ };
|
|
27
|
+
/******/ })();
|
|
28
|
+
/******/
|
|
29
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
30
|
+
/******/ (() => {
|
|
31
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
32
|
+
/******/ })();
|
|
33
|
+
/******/
|
|
34
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
35
|
+
/******/ (() => {
|
|
36
|
+
/******/ // define __esModule on exports
|
|
37
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
38
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
39
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
40
|
+
/******/ }
|
|
41
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
42
|
+
/******/ };
|
|
43
|
+
/******/ })();
|
|
44
|
+
/******/
|
|
45
|
+
/******/ /* webpack/runtime/publicPath */
|
|
46
|
+
/******/ (() => {
|
|
47
|
+
/******/ __webpack_require__.p = "";
|
|
48
|
+
/******/ })();
|
|
49
|
+
/******/
|
|
50
|
+
/************************************************************************/
|
|
51
|
+
var __webpack_exports__ = {};
|
|
52
|
+
// ESM COMPAT FLAG
|
|
53
|
+
__webpack_require__.r(__webpack_exports__);
|
|
54
|
+
|
|
55
|
+
// EXPORTS
|
|
56
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
57
|
+
"default": () => (/* binding */ entry_lib)
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
;// ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
61
|
+
/* eslint-disable no-var */
|
|
62
|
+
// This file is imported into lib/wc client bundles.
|
|
63
|
+
|
|
64
|
+
if (typeof window !== 'undefined') {
|
|
65
|
+
var currentScript = window.document.currentScript
|
|
66
|
+
if (false) // removed by dead control flow
|
|
67
|
+
{ var getCurrentScript; }
|
|
68
|
+
|
|
69
|
+
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
70
|
+
if (src) {
|
|
71
|
+
__webpack_require__.p = src[1] // eslint-disable-line
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Indicate to webpack that this file can be concatenated
|
|
76
|
+
/* harmony default export */ const setPublicPath = (null);
|
|
77
|
+
|
|
78
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Button.vue?vue&type=template&id=bdf70fbe
|
|
79
|
+
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-button',[_vm._v("按钮")])
|
|
80
|
+
}
|
|
81
|
+
var staticRenderFns = []
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
85
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
86
|
+
|
|
87
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
88
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
89
|
+
// be included in the final webpack user bundle.
|
|
90
|
+
|
|
91
|
+
function normalizeComponent(
|
|
92
|
+
scriptExports,
|
|
93
|
+
render,
|
|
94
|
+
staticRenderFns,
|
|
95
|
+
functionalTemplate,
|
|
96
|
+
injectStyles,
|
|
97
|
+
scopeId,
|
|
98
|
+
moduleIdentifier /* server only */,
|
|
99
|
+
shadowMode /* vue-cli only */
|
|
100
|
+
) {
|
|
101
|
+
// Vue.extend constructor export interop
|
|
102
|
+
var options =
|
|
103
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
104
|
+
|
|
105
|
+
// render functions
|
|
106
|
+
if (render) {
|
|
107
|
+
options.render = render
|
|
108
|
+
options.staticRenderFns = staticRenderFns
|
|
109
|
+
options._compiled = true
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// functional template
|
|
113
|
+
if (functionalTemplate) {
|
|
114
|
+
options.functional = true
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// scopedId
|
|
118
|
+
if (scopeId) {
|
|
119
|
+
options._scopeId = 'data-v-' + scopeId
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
var hook
|
|
123
|
+
if (moduleIdentifier) {
|
|
124
|
+
// server build
|
|
125
|
+
hook = function (context) {
|
|
126
|
+
// 2.3 injection
|
|
127
|
+
context =
|
|
128
|
+
context || // cached call
|
|
129
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
130
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
131
|
+
// 2.2 with runInNewContext: true
|
|
132
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
133
|
+
context = __VUE_SSR_CONTEXT__
|
|
134
|
+
}
|
|
135
|
+
// inject component styles
|
|
136
|
+
if (injectStyles) {
|
|
137
|
+
injectStyles.call(this, context)
|
|
138
|
+
}
|
|
139
|
+
// register component module identifier for async chunk inferrence
|
|
140
|
+
if (context && context._registeredComponents) {
|
|
141
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
// used by ssr in case component is cached and beforeCreate
|
|
145
|
+
// never gets called
|
|
146
|
+
options._ssrRegister = hook
|
|
147
|
+
} else if (injectStyles) {
|
|
148
|
+
hook = shadowMode
|
|
149
|
+
? function () {
|
|
150
|
+
injectStyles.call(
|
|
151
|
+
this,
|
|
152
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
153
|
+
)
|
|
154
|
+
}
|
|
155
|
+
: injectStyles
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (hook) {
|
|
159
|
+
if (options.functional) {
|
|
160
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
161
|
+
// go through the normalizer
|
|
162
|
+
options._injectStyles = hook
|
|
163
|
+
// register for functional component in vue file
|
|
164
|
+
var originalRender = options.render
|
|
165
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
166
|
+
hook.call(context)
|
|
167
|
+
return originalRender(h, context)
|
|
168
|
+
}
|
|
169
|
+
} else {
|
|
170
|
+
// inject component registration as beforeCreate hook
|
|
171
|
+
var existing = options.beforeCreate
|
|
172
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
exports: scriptExports,
|
|
178
|
+
options: options
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
;// ./src/components/Button.vue
|
|
183
|
+
|
|
184
|
+
var script = {}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
/* normalize component */
|
|
188
|
+
;
|
|
189
|
+
var component = normalizeComponent(
|
|
190
|
+
script,
|
|
191
|
+
render,
|
|
192
|
+
staticRenderFns,
|
|
193
|
+
false,
|
|
194
|
+
null,
|
|
195
|
+
null,
|
|
196
|
+
null
|
|
197
|
+
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
/* harmony default export */ const Button = (component.exports);
|
|
201
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Input.vue?vue&type=template&id=e1a0dba0
|
|
202
|
+
var Inputvue_type_template_id_e1a0dba0_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-input')
|
|
203
|
+
}
|
|
204
|
+
var Inputvue_type_template_id_e1a0dba0_staticRenderFns = []
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
;// ./src/components/Input.vue
|
|
208
|
+
|
|
209
|
+
var Input_script = {}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
/* normalize component */
|
|
213
|
+
;
|
|
214
|
+
var Input_component = normalizeComponent(
|
|
215
|
+
Input_script,
|
|
216
|
+
Inputvue_type_template_id_e1a0dba0_render,
|
|
217
|
+
Inputvue_type_template_id_e1a0dba0_staticRenderFns,
|
|
218
|
+
false,
|
|
219
|
+
null,
|
|
220
|
+
null,
|
|
221
|
+
null
|
|
222
|
+
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
/* harmony default export */ const Input = (Input_component.exports);
|
|
226
|
+
;// ./src/index.js
|
|
227
|
+
// 导入组件
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
// ...其他组件
|
|
231
|
+
|
|
232
|
+
// 存储组件列表
|
|
233
|
+
const components = [
|
|
234
|
+
Button,
|
|
235
|
+
Input
|
|
236
|
+
]
|
|
237
|
+
|
|
238
|
+
// 定义 install 方法,Vue.use() 会自动调用
|
|
239
|
+
const install = function (Vue) {
|
|
240
|
+
if (install.installed) return
|
|
241
|
+
install.installed = true
|
|
242
|
+
|
|
243
|
+
// 全局注册所有组件
|
|
244
|
+
components.forEach(component => {
|
|
245
|
+
Vue.component(component.name, component)
|
|
246
|
+
})
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// 支持全局 script 标签引入
|
|
250
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
251
|
+
install(window.Vue)
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// 导出
|
|
255
|
+
/* harmony default export */ const src_0 = ({
|
|
256
|
+
install,
|
|
257
|
+
// 按需导出组件
|
|
258
|
+
Button: Button,
|
|
259
|
+
Input: Input
|
|
260
|
+
});
|
|
261
|
+
;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
/* harmony default export */ const entry_lib = (src_0);
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
/******/ return __webpack_exports__;
|
|
268
|
+
/******/ })()
|
|
269
|
+
;
|
|
270
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define("xt-element-ui",[],t):"object"===typeof exports?exports["xt-element-ui"]=t():e["xt-element-ui"]=t()})("undefined"!==typeof self?self:this,()=>(()=>{"use strict";var e={};(()=>{e.d=(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})}})(),(()=>{e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{e.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{e.p=""})();var t={};if(e.r(t),e.d(t,{default:()=>h}),"undefined"!==typeof window){var n=window.document.currentScript,o=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(e.p=o[1])}var r=function(){var e=this,t=e._self._c;return t("el-button",[e._v("按钮")])},i=[];function s(e,t,n,o,r,i,s,l){var u,d="function"===typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0),o&&(d.functional=!0),i&&(d._scopeId="data-v-"+i),s?(u=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(s)},d._ssrRegister=u):r&&(u=l?function(){r.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:r),u)if(d.functional){d._injectStyles=u;var f=d.render;d.render=function(e,t){return u.call(t),f(e,t)}}else{var a=d.beforeCreate;d.beforeCreate=a?[].concat(a,u):[u]}return{exports:e,options:d}}var l={},u=s(l,r,i,!1,null,null,null);const d=u.exports;var f=function(){var e=this,t=e._self._c;return t("el-input")},a=[],c={},p=s(c,f,a,!1,null,null,null);const _=p.exports,v=[d,_],y=function(e){y.installed||(y.installed=!0,v.forEach(t=>{e.component(t.name,t)}))};"undefined"!==typeof window&&window.Vue&&y(window.Vue);const m={install:y,Button:d,Input:_},h=m;return t})());
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xt-element-ui",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "基于 Vue2.7 + ElementUI 的组件库",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"style": "lib/index.css",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"docs:dev": "vuepress dev docs",
|
|
9
|
+
"docs:build": "vuepress build docs",
|
|
10
|
+
"lib": "vue-cli-service build --target lib --name index --dest lib src/index.js"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"vue2",
|
|
14
|
+
"element-ui",
|
|
15
|
+
"component",
|
|
16
|
+
"ui"
|
|
17
|
+
],
|
|
18
|
+
"author": "nss3012",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"element-ui": "^2.15.0",
|
|
22
|
+
"vue": "^2.7.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@vue/cli-service": "^5.0.9",
|
|
26
|
+
"sass": "^1.32.13",
|
|
27
|
+
"sass-loader": "^10.5.2"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<template><el-button>按钮</el-button></template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<template><el-input></el-input></template>
|
package/src/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// 导入组件
|
|
2
|
+
import Button from './components/Button'
|
|
3
|
+
import Input from './components/Input'
|
|
4
|
+
// ...其他组件
|
|
5
|
+
|
|
6
|
+
// 存储组件列表
|
|
7
|
+
const components = [
|
|
8
|
+
Button,
|
|
9
|
+
Input
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
// 定义 install 方法,Vue.use() 会自动调用
|
|
13
|
+
const install = function (Vue) {
|
|
14
|
+
if (install.installed) return
|
|
15
|
+
install.installed = true
|
|
16
|
+
|
|
17
|
+
// 全局注册所有组件
|
|
18
|
+
components.forEach(component => {
|
|
19
|
+
Vue.component(component.name, component)
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// 支持全局 script 标签引入
|
|
24
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
25
|
+
install(window.Vue)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 导出
|
|
29
|
+
export default {
|
|
30
|
+
install,
|
|
31
|
+
// 按需导出组件
|
|
32
|
+
Button,
|
|
33
|
+
Input
|
|
34
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
@import './variables.scss';
|
|
2
|
+
|
|
3
|
+
/* Element UI 风格主题 */
|
|
4
|
+
:root {
|
|
5
|
+
/* 主色调 */
|
|
6
|
+
--el-color-primary: #409eff;
|
|
7
|
+
--el-color-primary-light-3: #79bbff;
|
|
8
|
+
--el-color-primary-light-5: #a0cfff;
|
|
9
|
+
--el-color-primary-light-7: #c6e2ff;
|
|
10
|
+
--el-color-primary-light-8: #d9ecff;
|
|
11
|
+
--el-color-primary-light-9: #ecf5ff;
|
|
12
|
+
|
|
13
|
+
--el-color-success: #67c23a;
|
|
14
|
+
--el-color-warning: #e6a23c;
|
|
15
|
+
--el-color-danger: #f56c6c;
|
|
16
|
+
--el-color-info: #909399;
|
|
17
|
+
|
|
18
|
+
/* 文字颜色 */
|
|
19
|
+
--el-text-color-primary: #303133;
|
|
20
|
+
--el-text-color-regular: #606266;
|
|
21
|
+
--el-text-color-secondary: #909399;
|
|
22
|
+
--el-text-color-placeholder: #c0c4cc;
|
|
23
|
+
--el-text-color-disabled: #c0c4cc;
|
|
24
|
+
|
|
25
|
+
/* 背景色 */
|
|
26
|
+
--el-bg-color: #ffffff;
|
|
27
|
+
--el-bg-color-page: #f5f7fa;
|
|
28
|
+
--el-bg-color-overlay: #ffffff;
|
|
29
|
+
|
|
30
|
+
/* 边框颜色 */
|
|
31
|
+
--el-border-color: #dcdfe6;
|
|
32
|
+
--el-border-color-light: #e4e7ed;
|
|
33
|
+
--el-border-color-lighter: #ebeef5;
|
|
34
|
+
--el-border-color-extra-light: #f2f6fc;
|
|
35
|
+
|
|
36
|
+
/* 字体大小 */
|
|
37
|
+
--el-font-size-extra-large: 20px;
|
|
38
|
+
--el-font-size-large: 18px;
|
|
39
|
+
--el-font-size-medium: 16px;
|
|
40
|
+
--el-font-size-base: 14px;
|
|
41
|
+
--el-font-size-small: 13px;
|
|
42
|
+
--el-font-size-extra-small: 12px;
|
|
43
|
+
|
|
44
|
+
/* 间距 */
|
|
45
|
+
--el-spacing-xs: 4px;
|
|
46
|
+
--el-spacing-sm: 8px;
|
|
47
|
+
--el-spacing-md: 12px;
|
|
48
|
+
--el-spacing-lg: 16px;
|
|
49
|
+
--el-spacing-xl: 20px;
|
|
50
|
+
|
|
51
|
+
/* 圆角 */
|
|
52
|
+
--el-border-radius-base: 4px;
|
|
53
|
+
--el-border-radius-small: 2px;
|
|
54
|
+
--el-border-radius-round: 20px;
|
|
55
|
+
--el-border-radius-circle: 50%;
|
|
56
|
+
|
|
57
|
+
/* 阴影 */
|
|
58
|
+
--el-box-shadow-base: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
59
|
+
--el-box-shadow-dark: 0 2px 12px 0 rgba(0, 0, 0, 0.12);
|
|
60
|
+
--el-box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
|
|
61
|
+
|
|
62
|
+
/* 动画 */
|
|
63
|
+
--el-transition-duration: 0.3s;
|
|
64
|
+
--el-transition-duration-fast: 0.2s;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* 深色主题 */
|
|
68
|
+
[data-theme="dark"] {
|
|
69
|
+
--el-color-primary: #409eff;
|
|
70
|
+
--el-color-primary-light-9: #1d1e1f;
|
|
71
|
+
|
|
72
|
+
--el-text-color-primary: #e5eaf3;
|
|
73
|
+
--el-text-color-regular: #cbd0d9;
|
|
74
|
+
--el-text-color-secondary: #a3a6ad;
|
|
75
|
+
--el-text-color-placeholder: #8d9095;
|
|
76
|
+
|
|
77
|
+
--el-bg-color: #1d1e1f;
|
|
78
|
+
--el-bg-color-page: #0a0a0a;
|
|
79
|
+
--el-bg-color-overlay: #1d1e1f;
|
|
80
|
+
|
|
81
|
+
--el-border-color: #4c4d4f;
|
|
82
|
+
--el-border-color-light: #515253;
|
|
83
|
+
--el-border-color-lighter: #565758;
|
|
84
|
+
--el-border-color-extra-light: #5c5c5d;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* 紧凑主题 */
|
|
88
|
+
[data-theme="compact"] {
|
|
89
|
+
--el-font-size-base: 13px;
|
|
90
|
+
--el-font-size-small: 12px;
|
|
91
|
+
|
|
92
|
+
--el-spacing-xs: 3px;
|
|
93
|
+
--el-spacing-sm: 6px;
|
|
94
|
+
--el-spacing-md: 10px;
|
|
95
|
+
--el-spacing-lg: 14px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* 大字体主题 */
|
|
99
|
+
[data-size="large"] {
|
|
100
|
+
--el-font-size-base: 16px;
|
|
101
|
+
--el-font-size-medium: 18px;
|
|
102
|
+
--el-font-size-large: 20px;
|
|
103
|
+
|
|
104
|
+
--el-spacing-xs: 5px;
|
|
105
|
+
--el-spacing-sm: 10px;
|
|
106
|
+
--el-spacing-md: 15px;
|
|
107
|
+
--el-spacing-lg: 20px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* 小字体主题 */
|
|
111
|
+
[data-size="small"] {
|
|
112
|
+
--el-font-size-base: 12px;
|
|
113
|
+
--el-font-size-small: 11px;
|
|
114
|
+
--el-font-size-extra-small: 10px;
|
|
115
|
+
|
|
116
|
+
--el-spacing-xs: 3px;
|
|
117
|
+
--el-spacing-sm: 6px;
|
|
118
|
+
--el-spacing-md: 9px;
|
|
119
|
+
--el-spacing-lg: 12px;
|
|
120
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
@use './variables.scss' as *;
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--xt-color-primary: #{$xt-color-primary};
|
|
5
|
+
--xt-color-success: #{$xt-color-success};
|
|
6
|
+
--xt-color-warning: #{$xt-color-warning};
|
|
7
|
+
--xt-color-danger: #{$xt-color-danger};
|
|
8
|
+
--xt-color-info: #{$xt-color-info};
|
|
9
|
+
|
|
10
|
+
--xt-color-text-primary: #{$xt-color-text-primary};
|
|
11
|
+
--xt-color-text-secondary: #{$xt-color-text-secondary};
|
|
12
|
+
--xt-color-text-placeholder: #{$xt-color-text-placeholder};
|
|
13
|
+
--xt-color-text-disabled: #{$xt-color-text-disabled};
|
|
14
|
+
|
|
15
|
+
--xt-color-bg-primary: #{$xt-color-bg-primary};
|
|
16
|
+
--xt-color-bg-secondary: #{$xt-color-bg-secondary};
|
|
17
|
+
--xt-color-bg-hover: #{$xt-color-bg-hover};
|
|
18
|
+
|
|
19
|
+
--xt-color-border: #{$xt-color-border};
|
|
20
|
+
--xt-color-border-light: #{$xt-color-border-light};
|
|
21
|
+
|
|
22
|
+
--xt-font-size-xs: #{$xt-font-size-xs};
|
|
23
|
+
--xt-font-size-sm: #{$xt-font-size-sm};
|
|
24
|
+
--xt-font-size-md: #{$xt-font-size-md};
|
|
25
|
+
--xt-font-size-lg: #{$xt-font-size-lg};
|
|
26
|
+
--xt-font-size-xl: #{$xt-font-size-xl};
|
|
27
|
+
|
|
28
|
+
--xt-spacing-xs: #{$xt-spacing-xs};
|
|
29
|
+
--xt-spacing-sm: #{$xt-spacing-sm};
|
|
30
|
+
--xt-spacing-md: #{$xt-spacing-md};
|
|
31
|
+
--xt-spacing-lg: #{$xt-spacing-lg};
|
|
32
|
+
--xt-spacing-xl: #{$xt-spacing-xl};
|
|
33
|
+
|
|
34
|
+
--xt-border-radius-sm: #{$xt-border-radius-sm};
|
|
35
|
+
--xt-border-radius-md: #{$xt-border-radius-md};
|
|
36
|
+
--xt-border-radius-lg: #{$xt-border-radius-lg};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[data-theme="dark"] {
|
|
40
|
+
--xt-color-primary: #177ddc;
|
|
41
|
+
--xt-color-success: #48b059;
|
|
42
|
+
--xt-color-warning: #d4981a;
|
|
43
|
+
--xt-color-danger: #d93030;
|
|
44
|
+
--xt-color-info: #177ddc;
|
|
45
|
+
|
|
46
|
+
--xt-color-text-primary: rgba(255, 255, 255, 0.95);
|
|
47
|
+
--xt-color-text-secondary: rgba(255, 255, 255, 0.75);
|
|
48
|
+
--xt-color-text-placeholder: rgba(255, 255, 255, 0.55);
|
|
49
|
+
--xt-color-text-disabled: rgba(255, 255, 255, 0.35);
|
|
50
|
+
|
|
51
|
+
--xt-color-bg-primary: #1f1f1f;
|
|
52
|
+
--xt-color-bg-secondary: #2d2d2d;
|
|
53
|
+
--xt-color-bg-hover: #3d3d3d;
|
|
54
|
+
|
|
55
|
+
--xt-color-border: #434343;
|
|
56
|
+
--xt-color-border-light: #3d3d3d;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[data-theme="compact"] {
|
|
60
|
+
--xt-color-primary: #096dd9;
|
|
61
|
+
--xt-color-success: #389e0d;
|
|
62
|
+
--xt-color-warning: #d49806;
|
|
63
|
+
--xt-color-danger: #cf1322;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[data-size="small"] {
|
|
67
|
+
--xt-font-size-xs: #{12 + 0}px;
|
|
68
|
+
--xt-font-size-sm: #{14 + 0}px;
|
|
69
|
+
--xt-font-size-md: #{16 + 0}px;
|
|
70
|
+
--xt-font-size-lg: #{18 + 0}px;
|
|
71
|
+
--xt-font-size-xl: #{20 + 0}px;
|
|
72
|
+
|
|
73
|
+
--xt-spacing-xs: #{4 + 0}px;
|
|
74
|
+
--xt-spacing-sm: #{8 + 0}px;
|
|
75
|
+
--xt-spacing-md: #{16 + 0}px;
|
|
76
|
+
--xt-spacing-lg: #{24 + 0}px;
|
|
77
|
+
--xt-spacing-xl: #{32 + 0}px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-size="medium"] {
|
|
81
|
+
--xt-font-size-xs: #{12 + 2}px;
|
|
82
|
+
--xt-font-size-sm: #{14 + 2}px;
|
|
83
|
+
--xt-font-size-md: #{16 + 2}px;
|
|
84
|
+
--xt-font-size-lg: #{18 + 2}px;
|
|
85
|
+
--xt-font-size-xl: #{20 + 2}px;
|
|
86
|
+
|
|
87
|
+
--xt-spacing-xs: #{4 + 1}px;
|
|
88
|
+
--xt-spacing-sm: #{8 + 2}px;
|
|
89
|
+
--xt-spacing-md: #{16 + 4}px;
|
|
90
|
+
--xt-spacing-lg: #{24 + 6}px;
|
|
91
|
+
--xt-spacing-xl: #{32 + 8}px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[data-size="large"] {
|
|
95
|
+
--xt-font-size-xs: #{12 + 4}px;
|
|
96
|
+
--xt-font-size-sm: #{14 + 4}px;
|
|
97
|
+
--xt-font-size-md: #{16 + 4}px;
|
|
98
|
+
--xt-font-size-lg: #{18 + 4}px;
|
|
99
|
+
--xt-font-size-xl: #{20 + 4}px;
|
|
100
|
+
|
|
101
|
+
--xt-spacing-xs: #{4 + 2}px;
|
|
102
|
+
--xt-spacing-sm: #{8 + 4}px;
|
|
103
|
+
--xt-spacing-md: #{16 + 8}px;
|
|
104
|
+
--xt-spacing-lg: #{24 + 12}px;
|
|
105
|
+
--xt-spacing-xl: #{32 + 16}px;
|
|
106
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
$xt-color-primary: #1890ff;
|
|
2
|
+
$xt-color-success: #52c41a;
|
|
3
|
+
$xt-color-warning: #faad14;
|
|
4
|
+
$xt-color-danger: #f5222d;
|
|
5
|
+
$xt-color-info: #1890ff;
|
|
6
|
+
|
|
7
|
+
$xt-color-text-primary: rgba(0, 0, 0, 0.85);
|
|
8
|
+
$xt-color-text-secondary: rgba(0, 0, 0, 0.65);
|
|
9
|
+
$xt-color-text-placeholder: rgba(0, 0, 0, 0.45);
|
|
10
|
+
$xt-color-text-disabled: rgba(0, 0, 0, 0.25);
|
|
11
|
+
|
|
12
|
+
$xt-color-bg-primary: #ffffff;
|
|
13
|
+
$xt-color-bg-secondary: #f5f5f5;
|
|
14
|
+
$xt-color-bg-hover: #f5f5f5;
|
|
15
|
+
|
|
16
|
+
$xt-color-border: #d9d9d9;
|
|
17
|
+
$xt-color-border-light: #f0f0f0;
|
|
18
|
+
|
|
19
|
+
$xt-font-size-xs: 12px;
|
|
20
|
+
$xt-font-size-sm: 14px;
|
|
21
|
+
$xt-font-size-md: 16px;
|
|
22
|
+
$xt-font-size-lg: 18px;
|
|
23
|
+
$xt-font-size-xl: 20px;
|
|
24
|
+
|
|
25
|
+
$xt-spacing-xs: 4px;
|
|
26
|
+
$xt-spacing-sm: 8px;
|
|
27
|
+
$xt-spacing-md: 16px;
|
|
28
|
+
$xt-spacing-lg: 24px;
|
|
29
|
+
$xt-spacing-xl: 32px;
|
|
30
|
+
|
|
31
|
+
$xt-border-radius-sm: 4px;
|
|
32
|
+
$xt-border-radius-md: 6px;
|
|
33
|
+
$xt-border-radius-lg: 8px;
|
|
34
|
+
|
|
35
|
+
$xt-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
|
|
36
|
+
$xt-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
37
|
+
$xt-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
38
|
+
|
|
39
|
+
$xt-transition-fast: 0.15s ease;
|
|
40
|
+
$xt-transition-normal: 0.2s ease;
|
|
41
|
+
$xt-transition-slow: 0.3s ease;
|
package/vue.config.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// 关闭生产环境 sourcemap
|
|
3
|
+
productionSourceMap: false,
|
|
4
|
+
|
|
5
|
+
css: {
|
|
6
|
+
// 开启 CSS 提取(打包成独立 css 文件,给 npm 使用)
|
|
7
|
+
extract: true,
|
|
8
|
+
// 启用 CSS sourcemap
|
|
9
|
+
sourceMap: false,
|
|
10
|
+
// 给 scss 传入全局变量(主题色、字体大小)
|
|
11
|
+
loaderOptions: {
|
|
12
|
+
scss: {
|
|
13
|
+
// 这里可以自动注入全局 SCSS 变量文件(非常重要)
|
|
14
|
+
additionalData: `@import "~@/styles/variables.scss";`
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
// 配置 Webpack 外部扩展(不打包进组件库)
|
|
20
|
+
configureWebpack: {
|
|
21
|
+
externals: {
|
|
22
|
+
vue: "Vue",
|
|
23
|
+
"element-ui": "ElementUI",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
// 组件库打包配置
|
|
28
|
+
chainWebpack: (config) => {
|
|
29
|
+
if (process.env.NODE_ENV === "production") {
|
|
30
|
+
// 入口改为组件库总入口
|
|
31
|
+
config.entry("index").clear().add("./src/index.js").end();
|
|
32
|
+
|
|
33
|
+
// 输出 UMD 格式(支持 npm / script 引入)
|
|
34
|
+
config.output
|
|
35
|
+
.filename("index.js")
|
|
36
|
+
.library("xt-element-ui")
|
|
37
|
+
.libraryTarget("umd")
|
|
38
|
+
.umdNamedDefine(true);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
};
|