@lx-frontend/wrap-element-ui 0.4.2-beta.1 → 0.4.3-beta.1
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/.tool-versions +1 -0
- package/README.md +54 -54
- package/babel.config.js +5 -5
- package/global.d.ts +23 -23
- package/package.json +48 -48
- package/packages/AddMembers/index.js +11 -11
- package/packages/AddMembers/src/AddMembers.vue +127 -127
- package/packages/AuditSteps/index.js +7 -7
- package/packages/AuditSteps/src/AuditSteps.vue +85 -85
- package/packages/DemoComponent/index.js +7 -7
- package/packages/DemoComponent/src/DemoComponent.vue +10 -10
- package/packages/Ellipsis/index.js +7 -7
- package/packages/Ellipsis/src/Ellipsis.vue +119 -119
- package/packages/Ellipsis/src/MultilineEllipsis.vue +141 -141
- package/packages/LxTable/index.js +11 -11
- package/packages/LxTable/src/LxTable.vue +281 -281
- package/packages/PopoverForm/index.js +7 -7
- package/packages/PopoverForm/src/PopoverForm.vue +66 -66
- package/packages/SearchForm/index.js +7 -7
- package/packages/SearchForm/src/SearchForm.vue +217 -224
- package/packages/SearchSelect/index.js +7 -7
- package/packages/SearchSelect/src/SearchSelect.vue +150 -150
- package/packages/index.js +59 -59
- package/packages/lib/AddMembers.js +1 -0
- package/packages/lib/AuditSteps.js +1 -0
- package/packages/lib/DemoComponent.js +1 -0
- package/packages/lib/Ellipsis.js +1 -0
- package/packages/lib/LxTable.js +21 -0
- package/packages/lib/PopoverForm.js +1 -0
- package/packages/lib/SearchForm.js +1 -0
- package/packages/lib/SearchSelect.js +1 -0
- package/packages/lib/index.js +21 -0
- package/packages/singleMessage/index.ts +44 -44
- package/packages/theme-default/gulpfile.js +25 -25
- package/packages/theme-default/package.json +23 -23
- package/packages/theme-default/src/AuditSteps.scss +52 -52
- package/packages/theme-default/src/DemoComponent.scss +9 -9
- package/packages/theme-default/src/index.css +11 -11
- package/packages/theme-default/src/index.scss +2 -2
- package/plugins/wrap.js +22 -22
- package/postcss.config.js +5 -5
- package/tsconfig.json +41 -41
- package/yarn.lock +0 -12226
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { Message } from 'element-ui';
|
|
2
|
-
import MessageType from 'element-ui/packages/message';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let messageInstance: MessageType = null;
|
|
6
|
-
|
|
7
|
-
const closeMsg = (message: MessageType) => {
|
|
8
|
-
message.singleTimer = setTimeout(() => {
|
|
9
|
-
message.singleTimer && clearTimeout(message.singleTimer);
|
|
10
|
-
message.close();
|
|
11
|
-
messageInstance = null;
|
|
12
|
-
}, 3000);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const singleMessage: MessageType = (options: any) => {
|
|
16
|
-
if (
|
|
17
|
-
messageInstance
|
|
18
|
-
&& (messageInstance.message !== options.message || messageInstance.type !== options.type)
|
|
19
|
-
) {
|
|
20
|
-
messageInstance.close();
|
|
21
|
-
messageInstance = Message({ ...options, duration: 0 });
|
|
22
|
-
return closeMsg(messageInstance);
|
|
23
|
-
}
|
|
24
|
-
if (messageInstance) {
|
|
25
|
-
messageInstance.singleTimer && clearTimeout(messageInstance.singleTimer);
|
|
26
|
-
return closeMsg(messageInstance);
|
|
27
|
-
}
|
|
28
|
-
messageInstance = Message({ ...options, duration: 0 });
|
|
29
|
-
closeMsg(messageInstance);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
['error', 'success', 'info', 'warning'].forEach(type => {
|
|
33
|
-
singleMessage[type] = options => {
|
|
34
|
-
if (typeof options === 'string') {
|
|
35
|
-
options = {
|
|
36
|
-
message: options,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
options.type = type;
|
|
40
|
-
return singleMessage(options);
|
|
41
|
-
};
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export default singleMessage;
|
|
1
|
+
import { Message } from 'element-ui';
|
|
2
|
+
import MessageType from 'element-ui/packages/message';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
let messageInstance: MessageType = null;
|
|
6
|
+
|
|
7
|
+
const closeMsg = (message: MessageType) => {
|
|
8
|
+
message.singleTimer = setTimeout(() => {
|
|
9
|
+
message.singleTimer && clearTimeout(message.singleTimer);
|
|
10
|
+
message.close();
|
|
11
|
+
messageInstance = null;
|
|
12
|
+
}, 3000);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const singleMessage: MessageType = (options: any) => {
|
|
16
|
+
if (
|
|
17
|
+
messageInstance
|
|
18
|
+
&& (messageInstance.message !== options.message || messageInstance.type !== options.type)
|
|
19
|
+
) {
|
|
20
|
+
messageInstance.close();
|
|
21
|
+
messageInstance = Message({ ...options, duration: 0 });
|
|
22
|
+
return closeMsg(messageInstance);
|
|
23
|
+
}
|
|
24
|
+
if (messageInstance) {
|
|
25
|
+
messageInstance.singleTimer && clearTimeout(messageInstance.singleTimer);
|
|
26
|
+
return closeMsg(messageInstance);
|
|
27
|
+
}
|
|
28
|
+
messageInstance = Message({ ...options, duration: 0 });
|
|
29
|
+
closeMsg(messageInstance);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
['error', 'success', 'info', 'warning'].forEach(type => {
|
|
33
|
+
singleMessage[type] = options => {
|
|
34
|
+
if (typeof options === 'string') {
|
|
35
|
+
options = {
|
|
36
|
+
message: options,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
options.type = type;
|
|
40
|
+
return singleMessage(options);
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export default singleMessage;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var gulp = require('gulp');
|
|
4
|
-
var sass = require('gulp-sass');
|
|
5
|
-
var autoprefixer = require('gulp-autoprefixer');
|
|
6
|
-
var cssmin = require('gulp-cssmin');
|
|
7
|
-
|
|
8
|
-
gulp.task('compile', function() {
|
|
9
|
-
return gulp.src('./src/*.scss')
|
|
10
|
-
.pipe(sass.sync())
|
|
11
|
-
.pipe(autoprefixer({
|
|
12
|
-
browsers: ['ie > 9', 'last 2 versions'],
|
|
13
|
-
cascade: false
|
|
14
|
-
}))
|
|
15
|
-
.pipe(cssmin())
|
|
16
|
-
.pipe(gulp.dest('./lib'));
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
gulp.task('copyfont', function() {
|
|
20
|
-
return gulp.src('./src/fonts/**')
|
|
21
|
-
.pipe(cssmin())
|
|
22
|
-
.pipe(gulp.dest('./lib/fonts'));
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
gulp.task('build', ['compile', 'copyfont']);
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var gulp = require('gulp');
|
|
4
|
+
var sass = require('gulp-sass');
|
|
5
|
+
var autoprefixer = require('gulp-autoprefixer');
|
|
6
|
+
var cssmin = require('gulp-cssmin');
|
|
7
|
+
|
|
8
|
+
gulp.task('compile', function() {
|
|
9
|
+
return gulp.src('./src/*.scss')
|
|
10
|
+
.pipe(sass.sync())
|
|
11
|
+
.pipe(autoprefixer({
|
|
12
|
+
browsers: ['ie > 9', 'last 2 versions'],
|
|
13
|
+
cascade: false
|
|
14
|
+
}))
|
|
15
|
+
.pipe(cssmin())
|
|
16
|
+
.pipe(gulp.dest('./lib'));
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
gulp.task('copyfont', function() {
|
|
20
|
+
return gulp.src('./src/fonts/**')
|
|
21
|
+
.pipe(cssmin())
|
|
22
|
+
.pipe(gulp.dest('./lib/fonts'));
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
gulp.task('build', ['compile', 'copyfont']);
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "wrap-element-ui-theme-default",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"description": "wrap-element-ui component default theme.",
|
|
5
|
-
"main": "lib/index.css",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "gulp build && gulp watch",
|
|
8
|
-
"build": "gulp build"
|
|
9
|
-
},
|
|
10
|
-
"keywords": [
|
|
11
|
-
"wrap-element-ui",
|
|
12
|
-
"theme"
|
|
13
|
-
],
|
|
14
|
-
"author": "Vic",
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"gulp": "^3.9.1",
|
|
18
|
-
"gulp-cssmin": "^0.1.7",
|
|
19
|
-
"gulp-postcss": "^6.1.1",
|
|
20
|
-
"postcss-salad": "^1.0.5"
|
|
21
|
-
},
|
|
22
|
-
"dependencies": {}
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "wrap-element-ui-theme-default",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "wrap-element-ui component default theme.",
|
|
5
|
+
"main": "lib/index.css",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "gulp build && gulp watch",
|
|
8
|
+
"build": "gulp build"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"wrap-element-ui",
|
|
12
|
+
"theme"
|
|
13
|
+
],
|
|
14
|
+
"author": "Vic",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"gulp": "^3.9.1",
|
|
18
|
+
"gulp-cssmin": "^0.1.7",
|
|
19
|
+
"gulp-postcss": "^6.1.1",
|
|
20
|
+
"postcss-salad": "^1.0.5"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {}
|
|
23
|
+
}
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
.audit-steps {
|
|
2
|
-
width: 612px;
|
|
3
|
-
|
|
4
|
-
.el-step__head {
|
|
5
|
-
display: none;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
&__step-item {
|
|
9
|
-
min-height: 43px;
|
|
10
|
-
max-height: 43px;
|
|
11
|
-
margin-bottom: 35px;
|
|
12
|
-
|
|
13
|
-
.el-select {
|
|
14
|
-
width: 400px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.el-icon-delete {
|
|
18
|
-
margin-left: 10px;
|
|
19
|
-
font-size: 16px;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&__step-order {
|
|
25
|
-
cursor: default;
|
|
26
|
-
margin-right: 8px;
|
|
27
|
-
position: relative;
|
|
28
|
-
display: inline-block;
|
|
29
|
-
text-align: center;
|
|
30
|
-
width: 20px;
|
|
31
|
-
height: 20px;
|
|
32
|
-
border-radius: 50%;
|
|
33
|
-
border: 1px solid #aaa;
|
|
34
|
-
background: #aaa;
|
|
35
|
-
color: #fff;
|
|
36
|
-
|
|
37
|
-
&:not(.first):before{
|
|
38
|
-
position: absolute;
|
|
39
|
-
content: '';
|
|
40
|
-
display: block;
|
|
41
|
-
width: 1px;
|
|
42
|
-
height: 60px;
|
|
43
|
-
background: #aaa;
|
|
44
|
-
top: -60px;
|
|
45
|
-
left: 50%;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&__add {
|
|
50
|
-
margin-top: -10px;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
1
|
+
.audit-steps {
|
|
2
|
+
width: 612px;
|
|
3
|
+
|
|
4
|
+
.el-step__head {
|
|
5
|
+
display: none;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&__step-item {
|
|
9
|
+
min-height: 43px;
|
|
10
|
+
max-height: 43px;
|
|
11
|
+
margin-bottom: 35px;
|
|
12
|
+
|
|
13
|
+
.el-select {
|
|
14
|
+
width: 400px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.el-icon-delete {
|
|
18
|
+
margin-left: 10px;
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__step-order {
|
|
25
|
+
cursor: default;
|
|
26
|
+
margin-right: 8px;
|
|
27
|
+
position: relative;
|
|
28
|
+
display: inline-block;
|
|
29
|
+
text-align: center;
|
|
30
|
+
width: 20px;
|
|
31
|
+
height: 20px;
|
|
32
|
+
border-radius: 50%;
|
|
33
|
+
border: 1px solid #aaa;
|
|
34
|
+
background: #aaa;
|
|
35
|
+
color: #fff;
|
|
36
|
+
|
|
37
|
+
&:not(.first):before{
|
|
38
|
+
position: absolute;
|
|
39
|
+
content: '';
|
|
40
|
+
display: block;
|
|
41
|
+
width: 1px;
|
|
42
|
+
height: 60px;
|
|
43
|
+
background: #aaa;
|
|
44
|
+
top: -60px;
|
|
45
|
+
left: 50%;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__add {
|
|
50
|
+
margin-top: -10px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
$--test: 30px;
|
|
2
|
-
|
|
3
|
-
.demo-component {
|
|
4
|
-
|
|
5
|
-
&__input {
|
|
6
|
-
width: $--test;
|
|
7
|
-
border-color: red;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
$--test: 30px;
|
|
2
|
+
|
|
3
|
+
.demo-component {
|
|
4
|
+
|
|
5
|
+
&__input {
|
|
6
|
+
width: $--test;
|
|
7
|
+
border-color: red;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@import "button.css";
|
|
2
|
-
@import "row.css";
|
|
3
|
-
@import "col.css";
|
|
4
|
-
@import "icon.css";
|
|
5
|
-
@import "tag.css";
|
|
6
|
-
@import "transiton.css";
|
|
7
|
-
@import "show-more.css";
|
|
8
|
-
@import "limit-textarea.css";
|
|
9
|
-
@import "alert.css";
|
|
10
|
-
@import "loading-bar.css";
|
|
11
|
-
@import "skeleton.css";
|
|
1
|
+
@import "button.css";
|
|
2
|
+
@import "row.css";
|
|
3
|
+
@import "col.css";
|
|
4
|
+
@import "icon.css";
|
|
5
|
+
@import "tag.css";
|
|
6
|
+
@import "transiton.css";
|
|
7
|
+
@import "show-more.css";
|
|
8
|
+
@import "limit-textarea.css";
|
|
9
|
+
@import "alert.css";
|
|
10
|
+
@import "loading-bar.css";
|
|
11
|
+
@import "skeleton.css";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import "./DemoComponent.scss";
|
|
2
|
-
@import "./AuditSteps.scss";
|
|
1
|
+
@import "./DemoComponent.scss";
|
|
2
|
+
@import "./AuditSteps.scss";
|
package/plugins/wrap.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
install: function (Vue, options) {
|
|
5
|
-
/* 数字转千分位(支持添加前缀,如"$") */
|
|
6
|
-
Vue.filter('toThousands', (num = 0, prefix = '¥') => {
|
|
7
|
-
num = num.toString()
|
|
8
|
-
let result = ''
|
|
9
|
-
while (num.length > 3) {
|
|
10
|
-
result = ',' + num.slice(-3) + result
|
|
11
|
-
num = num.slice(0, num.length - 3)
|
|
12
|
-
}
|
|
13
|
-
if (num) { result = num + result; }
|
|
14
|
-
return prefix + result
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
Vue.filter('fenToYuan', (val) => {
|
|
18
|
-
return val ? (val / 100).toFixed(2) : '--'
|
|
19
|
-
})
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
install: function (Vue, options) {
|
|
5
|
+
/* 数字转千分位(支持添加前缀,如"$") */
|
|
6
|
+
Vue.filter('toThousands', (num = 0, prefix = '¥') => {
|
|
7
|
+
num = num.toString()
|
|
8
|
+
let result = ''
|
|
9
|
+
while (num.length > 3) {
|
|
10
|
+
result = ',' + num.slice(-3) + result
|
|
11
|
+
num = num.slice(0, num.length - 3)
|
|
12
|
+
}
|
|
13
|
+
if (num) { result = num + result; }
|
|
14
|
+
return prefix + result
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
Vue.filter('fenToYuan', (val) => {
|
|
18
|
+
return val ? (val / 100).toFixed(2) : '--'
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
package/postcss.config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
plugins: {
|
|
3
|
-
autoprefixer: {}
|
|
4
|
-
}
|
|
5
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
plugins: {
|
|
3
|
+
autoprefixer: {}
|
|
4
|
+
}
|
|
5
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "esnext",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"strict": true,
|
|
6
|
-
"jsx": "preserve",
|
|
7
|
-
"importHelpers": true,
|
|
8
|
-
"moduleResolution": "node",
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"allowSyntheticDefaultImports": true,
|
|
11
|
-
"allowJs": true,
|
|
12
|
-
"sourceMap": true,
|
|
13
|
-
"baseUrl": ".",
|
|
14
|
-
"types": [
|
|
15
|
-
"webpack-env",
|
|
16
|
-
"jest"
|
|
17
|
-
],
|
|
18
|
-
"paths": {
|
|
19
|
-
"@/*": [
|
|
20
|
-
"src/*"
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
|
-
"lib": [
|
|
24
|
-
"esnext",
|
|
25
|
-
"dom",
|
|
26
|
-
"dom.iterable",
|
|
27
|
-
"scripthost"
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
"include": [
|
|
31
|
-
"src/**/*.ts",
|
|
32
|
-
"src/**/*.js",
|
|
33
|
-
"src/**/*.tsx",
|
|
34
|
-
"src/**/*.vue",
|
|
35
|
-
"tests/**/*.ts",
|
|
36
|
-
"tests/**/*.tsx"
|
|
37
|
-
],
|
|
38
|
-
"exclude": [
|
|
39
|
-
"node_modules"
|
|
40
|
-
]
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"strict": true,
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"importHelpers": true,
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"allowSyntheticDefaultImports": true,
|
|
11
|
+
"allowJs": true,
|
|
12
|
+
"sourceMap": true,
|
|
13
|
+
"baseUrl": ".",
|
|
14
|
+
"types": [
|
|
15
|
+
"webpack-env",
|
|
16
|
+
"jest"
|
|
17
|
+
],
|
|
18
|
+
"paths": {
|
|
19
|
+
"@/*": [
|
|
20
|
+
"src/*"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"lib": [
|
|
24
|
+
"esnext",
|
|
25
|
+
"dom",
|
|
26
|
+
"dom.iterable",
|
|
27
|
+
"scripthost"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"include": [
|
|
31
|
+
"src/**/*.ts",
|
|
32
|
+
"src/**/*.js",
|
|
33
|
+
"src/**/*.tsx",
|
|
34
|
+
"src/**/*.vue",
|
|
35
|
+
"tests/**/*.ts",
|
|
36
|
+
"tests/**/*.tsx"
|
|
37
|
+
],
|
|
38
|
+
"exclude": [
|
|
39
|
+
"node_modules"
|
|
40
|
+
]
|
|
41
|
+
}
|