Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

weui

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weui - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

src/example/actionsheet/actionsheet.html

15

CHANGELOG.md

@@ -0,1 +1,16 @@

### v2.3.0 (2020-03-04)
#### Features
* feat: input的placeholder更改颜色
* feat: 更改cell的点击态背景颜色
#### Bugfixes
* fix: msg的title没有适配黑暗模式
* fix: input placeholder的样式
* fix: fix default 按钮的点击态
* fix: form表单的验证码样式
* fix: darkmode右滑组件、修复图片预览组件刘海屏安全间距问题
* fix: 搜索框的文本没有适配黑暗模式
### [v2.2.0](https://github.com/Tencent/weui/compare/v2.1.4...v2.2.0) (2020-02-17)

@@ -2,0 +17,0 @@

20

dist/example/example.js

@@ -5,2 +5,3 @@ /**

*/
const footerTmpl = $('#footerTmpl').html();
$(function () {

@@ -271,11 +272,14 @@ var pageManager = {

.setPageAppend(function($html){
var $foot = $html.find('.page__ft');
if($foot.length < 1) return;
$html.eq(0).append(footerTmpl);
setTimeout(() => {
var $foot = $html.find('.page__ft');
if($foot.length < 1) return;
var winH = $(window).height();
if($foot.position().top + $foot.height() < winH){
$foot.addClass('j_bottom');
}else{
$foot.removeClass('j_bottom');
}
var winH = $(window).height();
if($foot.position().top + $foot.height() < winH){
$foot.addClass('j_bottom');
}else{
$foot.removeClass('j_bottom');
}
});
})

@@ -282,0 +286,0 @@ .setDefault('home')

228

gulpfile.js

@@ -19,14 +19,14 @@ var path = require('path');

var yargs = require('yargs').options({
w: {
alias: 'watch',
type: 'boolean'
},
s: {
alias: 'server',
type: 'boolean'
},
p: {
alias: 'port',
type: 'number'
}
w: {
alias: 'watch',
type: 'boolean',
},
s: {
alias: 'server',
type: 'boolean',
},
p: {
alias: 'port',
type: 'number',
},
}).argv;

@@ -37,34 +37,34 @@

function exec (cmd) {
return new Promise((resolve, reject) => {
const process = childProcess.exec(cmd, (error) => {
if (error) {
reject(error);
} else {
resolve();
}
function exec(cmd) {
return new Promise((resolve, reject) => {
const process = childProcess.exec(cmd, (error) => {
if (error) {
reject(error);
} else {
resolve();
}
});
process.stdout.on('data', function(data) {
console.log(data);
});
});
process.stdout.on('data', function(data) {
console.log(data);
});
});
}
gulp.task('build:style', function() {
var banner = [
'/*!',
' * WeUI v<%= pkg.version %> (<%= pkg.homepage %>)',
' * Copyright <%= new Date().getFullYear() %> Tencent, Inc.',
' * Licensed under the <%= pkg.license %> license',
' */',
''
].join('\n');
gulp
var banner = [
'/*!',
' * WeUI v<%= pkg.version %> (<%= pkg.homepage %>)',
' * Copyright <%= new Date().getFullYear() %> Tencent, Inc.',
' * Licensed under the <%= pkg.license %> license',
' */',
'',
].join('\n');
gulp
.src('src/style/weui.less', option)
.pipe(sourcemaps.init())
.pipe(
less().on('error', function(e) {
console.error(e.message);
this.emit('end');
})
less().on('error', function(e) {
console.error(e.message);
this.emit('end');
}),
)

@@ -78,12 +78,12 @@ .pipe(postcss([autoprefixer(['iOS >= 7', 'Android >= 4.1']), comments()]))

.pipe(
nano({
zindex: false,
autoprefixer: false,
svgo: false
})
nano({
zindex: false,
autoprefixer: false,
svgo: false,
}),
)
.pipe(
rename(function(path) {
path.basename += '.min';
})
rename(function(path) {
path.basename += '.min';
}),
)

@@ -94,3 +94,3 @@ .pipe(gulp.dest(dist));

gulp.task('build:example:assets', function() {
gulp
gulp
.src('src/example/**/*.?(png|jpg|gif|js)', option)

@@ -102,16 +102,16 @@ .pipe(gulp.dest(dist))

gulp.task('build:example:style', function() {
gulp
gulp
.src('src/example/example.less', option)
.pipe(
less().on('error', function(e) {
console.error(e.message);
this.emit('end');
})
less().on('error', function(e) {
console.error(e.message);
this.emit('end');
}),
)
.pipe(postcss([autoprefixer(['iOS >= 7', 'Android >= 4.1'])]))
.pipe(
nano({
zindex: false,
autoprefixer: false
})
nano({
zindex: false,
autoprefixer: false,
}),
)

@@ -123,25 +123,25 @@ .pipe(gulp.dest(dist))

gulp.task('build:example:html', function() {
gulp
gulp
.src('src/example/index.html', option)
.pipe(
tap(function(file) {
var dir = path.dirname(file.path);
var contents = file.contents.toString();
contents = contents.replace(
/<link\s+rel="import"\s+href="(.*)">/gi,
function(match, $1) {
var filename = path.join(dir, $1);
var id = path.basename(filename, '.html');
var content = fs.readFileSync(filename, 'utf-8');
return (
'<script type="text/html" id="tpl_' +
id +
'">\n' +
content +
'\n</script>'
tap(function(file) {
var dir = path.dirname(file.path);
var contents = file.contents.toString();
contents = contents.replace(
/<link\s+rel="import"\s+href="(.*)">/gi,
function(match, $1) {
var filename = path.join(dir, $1);
var id = path.basename(filename, '.html');
var content = fs.readFileSync(filename, 'utf-8');
return (
'<script type="text/html" id="tpl_' +
id +
'">\n' +
content +
'\n</script>'
);
},
);
}
);
file.contents = new Buffer(contents);
})
file.contents = new Buffer(contents);
}),
)

@@ -153,5 +153,5 @@ .pipe(gulp.dest(dist))

gulp.task('build:example', [
'build:example:assets',
'build:example:style',
'build:example:html'
'build:example:assets',
'build:example:style',
'build:example:html',
]);

@@ -162,23 +162,47 @@

gulp.task('watch', ['build'], function() {
gulp.watch('src/style/**/*', ['build:style']);
gulp.watch('src/example/example.less', ['build:example:style']);
gulp.watch('src/example/**/*.?(png|jpg|gif|js)', ['build:example:assets']);
gulp.watch('src/**/*.html', ['build:example:html']);
var list = [
{
path: 'src/style/**/*',
task: ['build:style'],
},
{
path: 'src/example/example.less',
task: ['build:example:style'],
},
{
path: 'src/example/**/*.?(png|jpg|gif|js)',
task: ['build:example:assets'],
},
{
path: 'src/**/*.html',
task: ['build:example:html'],
},
];
list.forEach((item) => {
var timeout = null;
gulp.watch(path.resolve(__dirname, item.path)).on('change', function() {
clearTimeout(timeout);
timeout = setTimeout(() => {
gulp.run(item.task);
}, 300);
});
});
});
gulp.task('server', function() {
yargs.p = yargs.p || 8080;
browserSync.init({
server: {
baseDir: './dist'
},
ui: {
port: yargs.p + 1,
weinre: {
port: yargs.p + 2
}
},
port: yargs.p,
startPath: '/example'
});
yargs.p = yargs.p || 8080;
browserSync.init({
server: {
baseDir: './dist',
},
ui: {
port: yargs.p + 1,
weinre: {
port: yargs.p + 2,
},
},
port: yargs.p,
startPath: '/example',
});
});

@@ -191,9 +215,9 @@

gulp.task('default', ['build'], function() {
if (yargs.s) {
gulp.start('server');
}
if (yargs.s) {
gulp.start('server');
}
if (yargs.w) {
gulp.start('watch');
}
if (yargs.w) {
gulp.start('watch');
}
});
{
"name": "weui",
"version": "2.2.0",
"version": "2.3.0",
"description": "A UI library by WeChat official design team, includes the most useful widgets/modules in mobile web applications.",

@@ -21,3 +21,3 @@ "keywords": [

"build": "gulp build",
"version": "npm run build && npm run changelog && git add -A .",
"version": "git add -A .",
"postversion": "git push && git push --tags",

@@ -24,0 +24,0 @@ "lint": "stylelint src",

@@ -5,2 +5,3 @@ /**

*/
const footerTmpl = $('#footerTmpl').html();
$(function () {

@@ -271,11 +272,14 @@ var pageManager = {

.setPageAppend(function($html){
var $foot = $html.find('.page__ft');
if($foot.length < 1) return;
$html.eq(0).append(footerTmpl);
setTimeout(() => {
var $foot = $html.find('.page__ft');
if($foot.length < 1) return;
var winH = $(window).height();
if($foot.position().top + $foot.height() < winH){
$foot.addClass('j_bottom');
}else{
$foot.removeClass('j_bottom');
}
var winH = $(window).height();
if($foot.position().top + $foot.height() < winH){
$foot.addClass('j_bottom');
}else{
$foot.removeClass('j_bottom');
}
});
})

@@ -282,0 +286,0 @@ .setDefault('home')

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc