@xjw_/vue2-npm-system 1.0.16 → 1.0.18
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/package.json +1 -3
- package/es/assets/svg/filter.svg +0 -3
- package/es/assets/svg/search.svg +0 -1
- package/es/components/SvgIcon.vue +0 -62
- package/es/components/XSearchBar.vue +0 -174
- package/es/index.js +0 -34
- package/es/plugins/svg-icon.js +0 -143
- package/es/styles/variables.scss +0 -56
- package/es/styles/x-ui.scss +0 -156
- package/es/utils/validate.js +0 -8
package/package.json
CHANGED
package/es/assets/svg/filter.svg
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
2
|
-
<path d="M783.808 160c13.696 0 21.12 15.616 12.416 25.728L577.024 436.352v411.84c0 11.712-12.736 19.392-23.488 14.08l-161.472-78.528a15.616 15.616 0 0 1-8.96-14.144V436.352L163.84 185.728c-8.832-10.112-1.472-25.728 12.224-25.728z m29.12 569.6c10.56 0 19.2 7.104 19.072 16v38.4c0 8.832-8.64 16-19.2 16h-153.6c-10.56 0-19.2-7.168-19.2-16v-38.4c0-8.768 8.64-16 19.2-16z m0-140.8c10.56 0 19.2 7.168 19.072 15.936v38.4c0 8.832-8.64 16-19.2 16h-153.6c-10.56 0-19.2-7.168-19.2-16v-38.4c0-8.768 8.64-16 19.2-16z m0-140.8c10.56 0 19.2 7.168 19.072 16v38.4c0 8.768-8.64 16-19.2 16h-153.6c-10.56 0-19.2-7.232-19.2-16v-38.4c0-8.832 8.64-16 19.2-16z"/>
|
|
3
|
-
</svg>
|
package/es/assets/svg/search.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M124.884 109.812L94.256 79.166c-.357-.357-.757-.629-1.129-.914a50.366 50.366 0 0 0 8.186-27.59C101.327 22.689 78.656 0 50.67 0 22.685 0 0 22.688 0 50.663c0 27.989 22.685 50.663 50.656 50.663 10.186 0 19.643-3.03 27.6-8.201.286.385.557.771.9 1.114l30.628 30.632a10.633 10.633 0 0 0 7.543 3.129c2.728 0 5.457-1.043 7.543-3.115 4.171-4.157 4.171-10.915.014-15.073M50.671 85.338C31.557 85.338 16 69.78 16 50.663c0-19.102 15.557-34.661 34.67-34.661 19.115 0 34.657 15.559 34.657 34.675 0 19.102-15.557 34.661-34.656 34.661"/></svg>
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
|
|
3
|
-
<svg v-else :class="svgClass" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" v-on="$listeners">
|
|
4
|
-
<use :href="iconName" :xlink:href="iconName" />
|
|
5
|
-
</svg>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script>
|
|
9
|
-
// doc: https://panjiachen.github.io/vue-element-admin-site/feature/component/svg-icon.html#usage
|
|
10
|
-
import { isExternal } from '../utils/validate.js'
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
name: 'SvgIcon',
|
|
14
|
-
props: {
|
|
15
|
-
iconClass: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: true
|
|
18
|
-
},
|
|
19
|
-
className: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: ''
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
computed: {
|
|
25
|
-
isExternal() {
|
|
26
|
-
return isExternal(this.iconClass)
|
|
27
|
-
},
|
|
28
|
-
iconName() {
|
|
29
|
-
return `#icon-${this.iconClass}`
|
|
30
|
-
},
|
|
31
|
-
svgClass() {
|
|
32
|
-
if (this.className) {
|
|
33
|
-
return 'svg-icon ' + this.className
|
|
34
|
-
} else {
|
|
35
|
-
return 'svg-icon'
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
styleExternalIcon() {
|
|
39
|
-
return {
|
|
40
|
-
mask: `url(${this.iconClass}) no-repeat 50% 50%`,
|
|
41
|
-
'-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%`
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<style scoped>
|
|
49
|
-
.svg-icon {
|
|
50
|
-
width: 1em;
|
|
51
|
-
height: 1em;
|
|
52
|
-
vertical-align: -0.15em;
|
|
53
|
-
fill: currentColor;
|
|
54
|
-
overflow: hidden;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.svg-external-icon {
|
|
58
|
-
background-color: currentColor;
|
|
59
|
-
mask-size: cover!important;
|
|
60
|
-
display: inline-block;
|
|
61
|
-
}
|
|
62
|
-
</style>
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="search">
|
|
3
|
-
<div class="search-top">
|
|
4
|
-
<div class="">
|
|
5
|
-
<div class="h-flex justify-content-between">
|
|
6
|
-
<div class="h-flex">
|
|
7
|
-
<div class="h-flex">
|
|
8
|
-
<span style="color: #000;font-size: 13px;line-height: 32px">快捷搜索:</span>
|
|
9
|
-
<div class=" search-top-input h-w246 h-h32 align-items-center">
|
|
10
|
-
<el-input type="text" class="" @keyup.enter.native="searchParentList" v-model="combinedQueries"
|
|
11
|
-
:placeholder="placeholder"
|
|
12
|
-
@input="$emit('input', $event)"
|
|
13
|
-
>
|
|
14
|
-
<svg-icon slot="prefix" icon-class="search" class-name="svg-icon-22"></svg-icon>
|
|
15
|
-
</el-input>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="h-ml-20 h-flex align-items-center">
|
|
18
|
-
<slot></slot>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="h-flex search-top-filter align-items-center h-ml-12 h-pl-4 h-pr-8 h-cursor-pointer"
|
|
22
|
-
@click="showMore = !showMore"
|
|
23
|
-
>
|
|
24
|
-
<svg-icon icon-class="filter" class-name="h-t-primary svg-icon-22"></svg-icon>
|
|
25
|
-
<span class="btn_more">更多</span>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="">
|
|
29
|
-
<el-button plain @click="reset">重 置</el-button>
|
|
30
|
-
<el-button type="primary" class="" @click="searchParentList">查 询</el-button>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
<div class="search-form" v-show="showMore">
|
|
36
|
-
<div class="h-plr-16 h-pt-16 h-pb-16 h-flex">
|
|
37
|
-
<!-- <el-form :rules="rules" :model="queryForm" ref="queryForm" inline label-position="top" label-suffix=":" hide-required-asterisk show-message>
|
|
38
|
-
</el-form>-->
|
|
39
|
-
<slot name="form"></slot>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</template>
|
|
44
|
-
|
|
45
|
-
<script>
|
|
46
|
-
import SvgIcon from "./SvgIcon.vue";
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @author xjw
|
|
50
|
-
* @date 2025/5/19 20:35
|
|
51
|
-
* @version 1.0
|
|
52
|
-
*/
|
|
53
|
-
export default {
|
|
54
|
-
name: 'XSearchBar',
|
|
55
|
-
components: {SvgIcon},
|
|
56
|
-
props: {
|
|
57
|
-
value: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: () => {
|
|
60
|
-
return ''
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
placeholder: {
|
|
64
|
-
type: String,
|
|
65
|
-
default: '可输入户号/户名/联系电话'
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
data() {
|
|
69
|
-
return {
|
|
70
|
-
showMore: false,
|
|
71
|
-
combinedQueries: ''
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
computed: {},
|
|
75
|
-
watch: {
|
|
76
|
-
value: {
|
|
77
|
-
immediate: true,
|
|
78
|
-
handler(newVal) {
|
|
79
|
-
this.combinedQueries = newVal;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
created() {
|
|
84
|
-
},
|
|
85
|
-
methods: {
|
|
86
|
-
reset() {
|
|
87
|
-
this.$emit('data-reset')
|
|
88
|
-
},
|
|
89
|
-
// 查询
|
|
90
|
-
searchParentList() {
|
|
91
|
-
this.showMore = false
|
|
92
|
-
this.$emit('data-update')
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
</script>
|
|
97
|
-
|
|
98
|
-
<style lang="scss" scoped>
|
|
99
|
-
.justify-content-between {
|
|
100
|
-
justify-content: space-between;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.align-items-center {
|
|
104
|
-
align-items: center;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.svg-icon-22 {
|
|
108
|
-
width: 22px;
|
|
109
|
-
height: 22px;
|
|
110
|
-
display: block;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.h-w246 {
|
|
114
|
-
width: 246px;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.h-h32 {
|
|
118
|
-
height: 32px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.search {
|
|
122
|
-
position: relative;
|
|
123
|
-
&-top {
|
|
124
|
-
padding: 12px 16px;
|
|
125
|
-
background: #FFFFFF;
|
|
126
|
-
border: 1px solid #eaf1fa;
|
|
127
|
-
|
|
128
|
-
&-input {
|
|
129
|
-
box-shadow: 0px -1px 8px 0px rgba(0, 105, 255, 0.1);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
&-filter {
|
|
133
|
-
background: #FFFFFF;
|
|
134
|
-
box-shadow: 0px -1px 8px 0px rgba(0, 105, 255, 0.1);
|
|
135
|
-
border-radius: 2px;
|
|
136
|
-
border: 1px solid #EEEEEE;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&-form {
|
|
141
|
-
position: absolute;
|
|
142
|
-
left: 0;
|
|
143
|
-
top: 58px;
|
|
144
|
-
background: #FFFFFF;
|
|
145
|
-
border-radius: 2px;
|
|
146
|
-
border: 1px solid #E1EBFA;
|
|
147
|
-
width: 100%;
|
|
148
|
-
z-index: 1000;
|
|
149
|
-
box-shadow: 0px -1px 8px 0px rgba(0, 105, 255, 0.1);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
&-title {
|
|
153
|
-
color: #000000;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
::v-deep {
|
|
157
|
-
.el-input__prefix {
|
|
158
|
-
display: flex;
|
|
159
|
-
align-items: center;
|
|
160
|
-
}
|
|
161
|
-
.vxe-input.size--small {
|
|
162
|
-
height: 32px;
|
|
163
|
-
}
|
|
164
|
-
.el-button--small {
|
|
165
|
-
padding: 9px 18px;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
.btn_more {
|
|
169
|
-
font-weight: 400;
|
|
170
|
-
font-size: 14px;
|
|
171
|
-
color: #666666;
|
|
172
|
-
line-height: 20px;
|
|
173
|
-
}
|
|
174
|
-
</style>
|
package/es/index.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// 导入所有组件
|
|
2
|
-
import './plugins/svg-icon';
|
|
3
|
-
import './styles/x-ui.scss';
|
|
4
|
-
import XSearchBar from './components/XSearchBar';
|
|
5
|
-
import SvgIcon from './components/SvgIcon';
|
|
6
|
-
|
|
7
|
-
// 存储组件列表(对外暴露的组件)
|
|
8
|
-
var components = [XSearchBar];
|
|
9
|
-
|
|
10
|
-
// 内部组件列表(不对外暴露)
|
|
11
|
-
var internalComponents = [SvgIcon];
|
|
12
|
-
|
|
13
|
-
// 安装方法
|
|
14
|
-
var install = function install(Vue) {
|
|
15
|
-
// 注册所有对外组件
|
|
16
|
-
components.forEach(function (component) {
|
|
17
|
-
Vue.component(component.name, component);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
// 注册内部组件
|
|
21
|
-
internalComponents.forEach(function (component) {
|
|
22
|
-
Vue.component(component.name, component);
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
// 导出的对象(只导出公开组件)
|
|
27
|
-
export default {
|
|
28
|
-
version: '1.0.0',
|
|
29
|
-
install: install,
|
|
30
|
-
XSearchBar: XSearchBar
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// 单独导出各个组件(只导出公开组件)
|
|
34
|
-
export { XSearchBar };
|
package/es/plugins/svg-icon.js
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
// 使用 require.context 自动导入所有 SVG 图标
|
|
2
|
-
var req = require.context('../assets/svg', false, /\.svg$/);
|
|
3
|
-
var loadingSymbols = {};
|
|
4
|
-
|
|
5
|
-
// 在 DOM ready 后执行
|
|
6
|
-
function initSvgSprite() {
|
|
7
|
-
if (document.readyState === 'loading') {
|
|
8
|
-
document.addEventListener('DOMContentLoaded', createSvgSprite);
|
|
9
|
-
} else {
|
|
10
|
-
createSvgSprite();
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
function prefixIds(svgElement, prefix) {
|
|
14
|
-
var idMap = {};
|
|
15
|
-
var elementsWithId = svgElement.querySelectorAll('[id]');
|
|
16
|
-
elementsWithId.forEach(function (el) {
|
|
17
|
-
var oldId = el.getAttribute('id');
|
|
18
|
-
var newId = "".concat(prefix, "-").concat(oldId);
|
|
19
|
-
idMap[oldId] = newId;
|
|
20
|
-
el.setAttribute('id', newId);
|
|
21
|
-
});
|
|
22
|
-
var attrs = ['href', 'xlink:href', 'fill', 'stroke', 'filter', 'clip-path', 'mask', 'marker-start', 'marker-mid', 'marker-end'];
|
|
23
|
-
var allElements = svgElement.querySelectorAll('*');
|
|
24
|
-
allElements.forEach(function (el) {
|
|
25
|
-
attrs.forEach(function (attr) {
|
|
26
|
-
var val = el.getAttribute(attr);
|
|
27
|
-
if (!val) return;
|
|
28
|
-
var next = val;
|
|
29
|
-
Object.keys(idMap).forEach(function (oldId) {
|
|
30
|
-
var newId = idMap[oldId];
|
|
31
|
-
next = next.replace(new RegExp("url\\(#".concat(oldId, "\\)"), 'g'), "url(#".concat(newId, ")"));
|
|
32
|
-
next = next.replace(new RegExp("#".concat(oldId, "(?![\\w-])"), 'g'), "#".concat(newId));
|
|
33
|
-
});
|
|
34
|
-
if (next !== val) {
|
|
35
|
-
el.setAttribute(attr, next);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
var style = el.getAttribute('style');
|
|
39
|
-
if (style) {
|
|
40
|
-
var nextStyle = style;
|
|
41
|
-
Object.keys(idMap).forEach(function (oldId) {
|
|
42
|
-
var newId = idMap[oldId];
|
|
43
|
-
nextStyle = nextStyle.replace(new RegExp("url\\(#".concat(oldId, "\\)"), 'g'), "url(#".concat(newId, ")"));
|
|
44
|
-
nextStyle = nextStyle.replace(new RegExp("#".concat(oldId, "(?![\\w-])"), 'g'), "#".concat(newId));
|
|
45
|
-
});
|
|
46
|
-
if (nextStyle !== style) {
|
|
47
|
-
el.setAttribute('style', nextStyle);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function parseSvgElement(content) {
|
|
53
|
-
var normalizedSvg = String(content).replace(/<\?xml[\s\S]*?\?>/gi, '').replace(/<!doctype[\s\S]*?>/gi, '');
|
|
54
|
-
var parser = new DOMParser();
|
|
55
|
-
var doc = parser.parseFromString(normalizedSvg, 'image/svg+xml');
|
|
56
|
-
var svgElement = doc.documentElement;
|
|
57
|
-
if (svgElement && svgElement.nodeName !== 'parsererror') {
|
|
58
|
-
return svgElement;
|
|
59
|
-
}
|
|
60
|
-
var match = normalizedSvg.match(/<svg[\s\S]*<\/svg>/i);
|
|
61
|
-
if (!match) {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
var fallbackDoc = parser.parseFromString(match[0], 'image/svg+xml');
|
|
65
|
-
var fallbackSvgElement = fallbackDoc.documentElement;
|
|
66
|
-
if (!fallbackSvgElement || fallbackSvgElement.nodeName === 'parsererror') {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
return fallbackSvgElement;
|
|
70
|
-
}
|
|
71
|
-
function appendSymbol(defs, symbolId, svgElement) {
|
|
72
|
-
var existsInSprite = Array.from(defs.children).some(function (node) {
|
|
73
|
-
return node.id === symbolId;
|
|
74
|
-
});
|
|
75
|
-
if (existsInSprite) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
prefixIds(svgElement, symbolId);
|
|
79
|
-
var symbol = document.createElementNS('http://www.w3.org/2000/svg', 'symbol');
|
|
80
|
-
symbol.setAttribute('id', symbolId);
|
|
81
|
-
symbol.setAttribute('viewBox', svgElement.getAttribute('viewBox') || '0 0 128 128');
|
|
82
|
-
Array.from(svgElement.childNodes).forEach(function (node) {
|
|
83
|
-
symbol.appendChild(node.cloneNode(true));
|
|
84
|
-
});
|
|
85
|
-
defs.appendChild(symbol);
|
|
86
|
-
}
|
|
87
|
-
function createSvgSprite() {
|
|
88
|
-
var svg = document.getElementById('svg-sprite');
|
|
89
|
-
if (!svg) {
|
|
90
|
-
svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
91
|
-
svg.id = 'svg-sprite';
|
|
92
|
-
svg.setAttribute('aria-hidden', 'true');
|
|
93
|
-
svg.style.position = 'absolute';
|
|
94
|
-
svg.style.width = '0';
|
|
95
|
-
svg.style.height = '0';
|
|
96
|
-
svg.style.overflow = 'hidden';
|
|
97
|
-
document.body.insertBefore(svg, document.body.firstChild);
|
|
98
|
-
}
|
|
99
|
-
var defs = document.getElementById('svg-sprite-defs');
|
|
100
|
-
if (!defs) {
|
|
101
|
-
defs = document.createElementNS('http://www.w3.org/2000/svg', 'defs');
|
|
102
|
-
defs.id = 'svg-sprite-defs';
|
|
103
|
-
svg.appendChild(defs);
|
|
104
|
-
}
|
|
105
|
-
req.keys().forEach(function (key) {
|
|
106
|
-
var fileName = key.replace(/(\.\/|\.svg)/g, '');
|
|
107
|
-
var symbolId = "icon-".concat(fileName);
|
|
108
|
-
var existsInSprite = Array.from(defs.children).some(function (node) {
|
|
109
|
-
return node.id === symbolId;
|
|
110
|
-
});
|
|
111
|
-
if (existsInSprite || loadingSymbols[symbolId]) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
var rawSvg = req(key);
|
|
115
|
-
var svgContent = rawSvg && rawSvg["default"] ? rawSvg["default"] : rawSvg;
|
|
116
|
-
if (!svgContent) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
var svgText = String(svgContent);
|
|
120
|
-
loadingSymbols[symbolId] = true;
|
|
121
|
-
if (/<svg[\s>]/i.test(svgText)) {
|
|
122
|
-
var svgElement = parseSvgElement(svgText);
|
|
123
|
-
if (svgElement) {
|
|
124
|
-
appendSymbol(defs, symbolId, svgElement);
|
|
125
|
-
}
|
|
126
|
-
delete loadingSymbols[symbolId];
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
fetch(svgText).then(function (res) {
|
|
130
|
-
return res.text();
|
|
131
|
-
}).then(function (content) {
|
|
132
|
-
var svgElement = parseSvgElement(content);
|
|
133
|
-
if (svgElement) {
|
|
134
|
-
appendSymbol(defs, symbolId, svgElement);
|
|
135
|
-
}
|
|
136
|
-
})["finally"](function () {
|
|
137
|
-
delete loadingSymbols[symbolId];
|
|
138
|
-
})["catch"](function () {
|
|
139
|
-
delete loadingSymbols[symbolId];
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
initSvgSprite();
|
package/es/styles/variables.scss
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// Element UI 主题颜色变量
|
|
2
|
-
// 主色调
|
|
3
|
-
$--color-primary: #409EFF !default;
|
|
4
|
-
$--color-primary-light-3: mix(#fff, $--color-primary, 30%) !default; // 53a8ff
|
|
5
|
-
$--color-primary-light-5: mix(#fff, $--color-primary, 50%) !default; // 66b1ff
|
|
6
|
-
$--color-primary-light-7: mix(#fff, $--color-primary, 70%) !default; // 79bbff
|
|
7
|
-
$--color-primary-light-8: mix(#fff, $--color-primary, 80%) !default; // 8cc5ff
|
|
8
|
-
$--color-primary-light-9: mix(#fff, $--color-primary, 90%) !default; // a0cfff
|
|
9
|
-
|
|
10
|
-
// 辅助色
|
|
11
|
-
$--color-success: #67C23A !default;
|
|
12
|
-
$--color-warning: #E6A23C !default;
|
|
13
|
-
$--color-danger: #F56C6C !default;
|
|
14
|
-
$--color-info: #909399 !default;
|
|
15
|
-
|
|
16
|
-
// 中性色
|
|
17
|
-
$--color-black: #000000 !default;
|
|
18
|
-
$--color-white: #FFFFFF !default;
|
|
19
|
-
|
|
20
|
-
$--color-text-primary: #303133 !default;
|
|
21
|
-
$--color-text-regular: #606266 !default;
|
|
22
|
-
$--color-text-secondary: #909399 !default;
|
|
23
|
-
$--color-text-placeholder: #C0C4CC !default;
|
|
24
|
-
|
|
25
|
-
// 边框颜色
|
|
26
|
-
$--border-color-base: #DCDFE6 !default;
|
|
27
|
-
$--border-color-light: #E4E7ED !default;
|
|
28
|
-
$--border-color-lighter: #EBEEF5 !default;
|
|
29
|
-
$--border-color-extra-light: #F2F6FC !default;
|
|
30
|
-
|
|
31
|
-
// 背景色
|
|
32
|
-
$--background-color-base: #F5F7FA !default;
|
|
33
|
-
|
|
34
|
-
:root {
|
|
35
|
-
--el-color-primary: #{$--color-primary};
|
|
36
|
-
--el-color-primary-light-3: #{$--color-primary-light-3};
|
|
37
|
-
--el-color-primary-light-5: #{$--color-primary-light-5};
|
|
38
|
-
--el-color-primary-light-7: #{$--color-primary-light-7};
|
|
39
|
-
--el-color-primary-light-8: #{$--color-primary-light-8};
|
|
40
|
-
--el-color-primary-light-9: #{$--color-primary-light-9};
|
|
41
|
-
--el-color-success: #{$--color-success};
|
|
42
|
-
--el-color-warning: #{$--color-warning};
|
|
43
|
-
--el-color-danger: #{$--color-danger};
|
|
44
|
-
--el-color-info: #{$--color-info};
|
|
45
|
-
--el-color-black: #{$--color-black};
|
|
46
|
-
--el-color-white: #{$--color-white};
|
|
47
|
-
--el-text-color-primary: #{$--color-text-primary};
|
|
48
|
-
--el-text-color-regular: #{$--color-text-regular};
|
|
49
|
-
--el-text-color-secondary: #{$--color-text-secondary};
|
|
50
|
-
--el-text-color-placeholder: #{$--color-text-placeholder};
|
|
51
|
-
--el-border-color-base: #{$--border-color-base};
|
|
52
|
-
--el-border-color-light: #{$--border-color-light};
|
|
53
|
-
--el-border-color-lighter: #{$--border-color-lighter};
|
|
54
|
-
--el-border-color-extra-light: #{$--border-color-extra-light};
|
|
55
|
-
--el-background-color-base: #{$--background-color-base};
|
|
56
|
-
}
|
package/es/styles/x-ui.scss
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
@import './variables';
|
|
2
|
-
|
|
3
|
-
/* ==================
|
|
4
|
-
文字对齐
|
|
5
|
-
==================== */
|
|
6
|
-
.h-text-center { text-align: center; }
|
|
7
|
-
.h-text-right { text-align: right; }
|
|
8
|
-
.h-text-left { text-align: left; }
|
|
9
|
-
|
|
10
|
-
/* ==================
|
|
11
|
-
flex 弹性布局
|
|
12
|
-
==================== */
|
|
13
|
-
.h-flex { display: flex; }
|
|
14
|
-
.h-flex-column { display: flex; flex-direction: column; }
|
|
15
|
-
.h-flex--column { display: flex; flex-direction: column; }
|
|
16
|
-
.h-flex-wrap { display: flex; flex-wrap: wrap; }
|
|
17
|
-
.h-flex--wrap { display: flex; flex-wrap: wrap; }
|
|
18
|
-
|
|
19
|
-
.h-flex-1 { flex: 1; }
|
|
20
|
-
.h-flex-2 { flex: 2; }
|
|
21
|
-
.h-flex-3 { flex: 3; }
|
|
22
|
-
.h-flex-none { flex: none; }
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.h-justify-start { justify-content: flex-start; }
|
|
26
|
-
.h-justify-end { justify-content: flex-end; }
|
|
27
|
-
.h-justify-center { justify-content: center; }
|
|
28
|
-
.h-justify-between { justify-content: space-between; }
|
|
29
|
-
.h-justify-around { justify-content: space-around; }
|
|
30
|
-
|
|
31
|
-
.h-align-start { align-items: flex-start; }
|
|
32
|
-
.h-align-end { align-items: flex-end; }
|
|
33
|
-
.h-align-center { align-items: center; }
|
|
34
|
-
.h-align-stretch { align-items: stretch; }
|
|
35
|
-
.h-align-baseline { align-items: baseline; }
|
|
36
|
-
|
|
37
|
-
.h-self-start { align-self: flex-start; }
|
|
38
|
-
.h-self-center { align-self: center; }
|
|
39
|
-
.h-self-end { align-self: flex-end; }
|
|
40
|
-
.h-self-stretch { align-self: stretch; }
|
|
41
|
-
.h-self-baseline { align-self: baseline; }
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/* ==================
|
|
45
|
-
文本
|
|
46
|
-
==================== */
|
|
47
|
-
|
|
48
|
-
/* --文本行数限制-- */
|
|
49
|
-
.h-line-1 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
50
|
-
.h-line-2, .h-line-3, .h-line-4, .h-line-5 {
|
|
51
|
-
overflow: hidden;
|
|
52
|
-
word-break: break-all;
|
|
53
|
-
text-overflow: ellipsis;
|
|
54
|
-
display: -webkit-box;
|
|
55
|
-
-webkit-box-orient: vertical;
|
|
56
|
-
}
|
|
57
|
-
.h-line-2 { -webkit-line-clamp: 2; }
|
|
58
|
-
.h-line-3 { -webkit-line-clamp: 3; }
|
|
59
|
-
.h-line-4 { -webkit-line-clamp: 4; }
|
|
60
|
-
.h-line-5 { -webkit-line-clamp: 5; }
|
|
61
|
-
|
|
62
|
-
/* --文本大小-- */
|
|
63
|
-
@for $i from 0 through 119 {
|
|
64
|
-
.h-font-#{$i} {
|
|
65
|
-
font-size: #{$i}px;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.h-bold {
|
|
70
|
-
font-weight: bold;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
/* ==================
|
|
75
|
-
内外边距
|
|
76
|
-
==================== */
|
|
77
|
-
@for $i from 1 through 50 {
|
|
78
|
-
.h-p-#{$i} { padding: #{$i}px; }
|
|
79
|
-
.h-m-#{$i} { padding: #{$i}px; }
|
|
80
|
-
}
|
|
81
|
-
@for $i from 1 through 50 {
|
|
82
|
-
.h-plr-#{$i} { padding-left: #{$i}px; padding-right: #{$i}px; }
|
|
83
|
-
.h-ptb-#{$i} { padding-top: #{$i}px; padding-bottom: #{$i}px; }
|
|
84
|
-
.h-pt-#{$i} { padding-top: #{$i}px; }
|
|
85
|
-
.h-pr-#{$i} { padding-right: #{$i}px; }
|
|
86
|
-
.h-pb-#{$i} { padding-bottom: #{$i}px; }
|
|
87
|
-
.h-pl-#{$i} { padding-left: #{$i}px; }
|
|
88
|
-
|
|
89
|
-
.h-mlr-#{$i} { margin-left: #{$i}px; margin-right: #{$i}px; }
|
|
90
|
-
.h-mtb-#{$i} { margin-top: #{$i}px; margin-bottom: #{$i}px; }
|
|
91
|
-
.h-mt-#{$i} { margin-top: #{$i}px; }
|
|
92
|
-
.h-mr-#{$i} { margin-right: #{$i}px; }
|
|
93
|
-
.h-mb-#{$i} { margin-bottom: #{$i}px; }
|
|
94
|
-
.h-ml-#{$i} { margin-left: #{$i}px; }
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/* ==================
|
|
98
|
-
圆角
|
|
99
|
-
==================== */
|
|
100
|
-
@for $i from 1 through 100 {
|
|
101
|
-
.h-radius-#{$i} {
|
|
102
|
-
border-radius: #{$i}px;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
.h-round {
|
|
106
|
-
border-radius: 50%;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* ==================
|
|
110
|
-
定位
|
|
111
|
-
==================== */
|
|
112
|
-
.h-relative {
|
|
113
|
-
position: relative;
|
|
114
|
-
}
|
|
115
|
-
.h-absolute {
|
|
116
|
-
position: absolute;
|
|
117
|
-
}
|
|
118
|
-
.h-fixed {
|
|
119
|
-
position: fixed;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
/* ==================
|
|
124
|
-
其它
|
|
125
|
-
==================== */
|
|
126
|
-
.h-overflow {
|
|
127
|
-
overflow: hidden;
|
|
128
|
-
}
|
|
129
|
-
.h-scroll {
|
|
130
|
-
overflow: scroll;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.h-full {
|
|
134
|
-
width: 100%;
|
|
135
|
-
height: 100%;
|
|
136
|
-
}
|
|
137
|
-
.h-full-w {
|
|
138
|
-
width: 100%;
|
|
139
|
-
}
|
|
140
|
-
.h-full-h {
|
|
141
|
-
height: 100%;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.h-cursor {
|
|
145
|
-
cursor: pointer;
|
|
146
|
-
}
|
|
147
|
-
.h-cursor-pointer {
|
|
148
|
-
cursor: pointer;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.h-t-primary {
|
|
152
|
-
color: $--color-primary;
|
|
153
|
-
}
|
|
154
|
-
.h-t-primary2 {
|
|
155
|
-
color: #67C23A;
|
|
156
|
-
}
|