mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 10:22:44 +08:00
[improvement] update css extension name (#662)
This commit is contained in:
parent
b8fb181b66
commit
fe4024cdc9
@ -8,15 +8,15 @@ const rename = require('gulp-rename');
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
const src = path.join(__dirname, '../packages');
|
||||
const dist = path.join(__dirname, isProduction ? '../dist' : '../example/dist');
|
||||
const ext = ['js', 'ts', 'pcss', 'json', 'wxml'];
|
||||
const ext = ['js', 'ts', 'css', 'json', 'wxml'];
|
||||
|
||||
function copy(ext) {
|
||||
return gulp.src([src + '/**/*.' + ext]).pipe(gulp.dest(dist));
|
||||
}
|
||||
|
||||
gulp.task('compile-pcss', () => {
|
||||
gulp.task('compile-css', () => {
|
||||
return gulp
|
||||
.src([src + '/**/*.pcss'])
|
||||
.src([src + '/**/*.css'])
|
||||
.pipe(postcss())
|
||||
.pipe(cssmin())
|
||||
.pipe(
|
||||
|
8
dist/area/index.js
vendored
8
dist/area/index.js
vendored
@ -61,13 +61,13 @@ VantComponent({
|
||||
displayColumns = _this$data2.displayColumns;
|
||||
var index = pickerValue.findIndex(function (item, index) {
|
||||
return item !== value[index];
|
||||
}); // 没有变更 或 选中项序号小于0 不处理
|
||||
});
|
||||
var values = displayColumns[index];
|
||||
|
||||
if (index < 0 || value[index] < 0) {
|
||||
if (!value[index] || !values[value[index]]) {
|
||||
return;
|
||||
}
|
||||
|
||||
var values = displayColumns[index];
|
||||
this.code = values[value[index]].code;
|
||||
this.setValues();
|
||||
this.$emit('change', {
|
||||
@ -113,7 +113,7 @@ VantComponent({
|
||||
return 0;
|
||||
},
|
||||
setValues: function setValues() {
|
||||
var code = this.code || Object.keys(this.data.areaList.county_list)[0] || '';
|
||||
var code = this.code || Object.keys(this.data.areaList.county_list || {})[0] || '';
|
||||
var province = this.getList('province');
|
||||
var city = this.getList('city', code.slice(0, 2));
|
||||
this.setData({
|
||||
|
@ -41,7 +41,6 @@
|
||||
"gulp-rename": "^1.2.2",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"postcss-calc": "^6.0.2",
|
||||
"postcss-easy-import": "^3.0.0",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"precss": "^3.1.2",
|
||||
"progress-bar-webpack-plugin": "^1.11.0",
|
||||
|
@ -1,5 +1,5 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/hairline.pcss';
|
||||
@import '../common/style/var.css';
|
||||
@import '../common/style/hairline.css';
|
||||
|
||||
.van-action-sheet {
|
||||
color: $text-color;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-picker {
|
||||
-webkit-text-size-adjust: 100%; /* avoid iOS text size adjust */
|
@ -70,7 +70,6 @@ VantComponent({
|
||||
const index = pickerValue.findIndex((item, index) => item !== value[index]);
|
||||
const values = displayColumns[index];
|
||||
|
||||
// 没有变更 或 选中项序号小于0 不处理
|
||||
if (!value[index] || !values[value[index]]) {
|
||||
return;
|
||||
}
|
||||
|
6
packages/badge-group/index.css
Normal file
6
packages/badge-group/index.css
Normal file
@ -0,0 +1,6 @@
|
||||
@import '../common/style/var.css';
|
||||
@import '../common/style/hairline.css';
|
||||
|
||||
.van-badge-group {
|
||||
width: 85px;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/hairline.pcss';
|
||||
|
||||
.van-badge-group {
|
||||
width: 85px;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/hairline.pcss';
|
||||
@import '../common/style/var.css';
|
||||
@import '../common/style/hairline.css';
|
||||
|
||||
.van-badge {
|
||||
display: block;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-button {
|
||||
position: relative;
|
@ -1,5 +1,5 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/mixins/ellipsis.pcss';
|
||||
@import '../common/style/var.css';
|
||||
@import '../common/style/mixins/ellipsis.css';
|
||||
|
||||
.van-card {
|
||||
color: $text-color;
|
2
packages/cell-group/index.css
Normal file
2
packages/cell-group/index.css
Normal file
@ -0,0 +1,2 @@
|
||||
@import '../common/style/var.css';
|
||||
@import '../common/style/hairline.css';
|
@ -1,2 +0,0 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/hairline.pcss';
|
@ -1,5 +1,5 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/hairline.pcss';
|
||||
@import '../common/style/var.css';
|
||||
@import '../common/style/hairline.css';
|
||||
|
||||
.van-cell {
|
||||
width: 100%;
|
8
packages/common/index.css
Normal file
8
packages/common/index.css
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Entry of basic styles
|
||||
*/
|
||||
|
||||
@import "./style/var.css";
|
||||
@import "./style/ellipsis.css";
|
||||
@import "./style/clearfix.css";
|
||||
@import "./style/hairline.css";
|
@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Entry of basic styles
|
||||
*/
|
||||
|
||||
@import "./style/var.pcss";
|
||||
@import "./style/ellipsis.pcss";
|
||||
@import "./style/clearfix.pcss";
|
||||
@import "./style/hairline.pcss";
|
@ -1,4 +1,4 @@
|
||||
@import './mixins/clearfix.pcss';
|
||||
@import './mixins/clearfix.css';
|
||||
|
||||
.van-clearfix {
|
||||
@include clearfix;
|
@ -1,4 +1,4 @@
|
||||
@import './mixins/ellipsis.pcss';
|
||||
@import './mixins/ellipsis.css';
|
||||
|
||||
.van-ellipsis {
|
||||
@include ellipsis;
|
@ -1,4 +1,4 @@
|
||||
@import "./mixins/hairline.pcss";
|
||||
@import "./mixins/hairline.css";
|
||||
|
||||
.van-hairline,
|
||||
.van-hairline--top,
|
@ -1,5 +1,5 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/hairline.pcss';
|
||||
@import '../common/style/var.css';
|
||||
@import '../common/style/hairline.css';
|
||||
|
||||
.van-dialog {
|
||||
width: 85%;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-field {
|
||||
&__body {
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
@font-face {
|
||||
font-style: normal;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-loading {
|
||||
z-index: 0;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-nav-bar {
|
||||
height: 46px;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-notify {
|
||||
top: 0;
|
@ -1,5 +1,5 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/hairline.pcss';
|
||||
@import '../common/style/var.css';
|
||||
@import '../common/style/hairline.css';
|
||||
|
||||
.van-panel {
|
||||
background: $white;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-popup {
|
||||
top: 50%;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-progress {
|
||||
height: 4px;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
$van-radio-size: 20px;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
$van-radio-size: 20px;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-search {
|
||||
display: flex;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-slider {
|
||||
position: relative;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-stepper {
|
||||
font-size: 0;
|
@ -1,5 +1,5 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/hairline.pcss';
|
||||
@import '../common/style/var.css';
|
||||
@import '../common/style/hairline.css';
|
||||
|
||||
.van-steps {
|
||||
overflow: hidden;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-submit-bar {
|
||||
z-index: 100;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-switch-cell {
|
||||
padding-top: 8px;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-switch {
|
||||
height: 1em;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-tabbar-item {
|
||||
float: left;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-tabbar {
|
||||
width: 100%;
|
@ -1,5 +1,5 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/hairline.pcss';
|
||||
@import '../common/style/var.css';
|
||||
@import '../common/style/hairline.css';
|
||||
|
||||
$van-tabs-line-height: 44px;
|
||||
$van-tabs-card-height: 30px;
|
@ -1,5 +1,5 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/hairline.pcss';
|
||||
@import '../common/style/var.css';
|
||||
@import '../common/style/hairline.css';
|
||||
|
||||
.van-tag {
|
||||
display: inline-block;
|
@ -1,4 +1,4 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/var.css';
|
||||
|
||||
.van-toast {
|
||||
display: flex;
|
@ -1,5 +1,5 @@
|
||||
@import '../common/style/var.pcss';
|
||||
@import '../common/style/ellipsis.pcss';
|
||||
@import '../common/style/var.css';
|
||||
@import '../common/style/ellipsis.css';
|
||||
|
||||
.tree-select {
|
||||
user-select: none;
|
@ -1,8 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
'postcss-easy-import': {
|
||||
extensions: ['.wxss', '.css', '.pcss']
|
||||
},
|
||||
'precss': {},
|
||||
'postcss-calc': {},
|
||||
'autoprefixer': {}
|
||||
|
31
yarn.lock
31
yarn.lock
@ -4774,7 +4774,7 @@ pbkdf2@^3.0.3:
|
||||
safe-buffer "^5.0.1"
|
||||
sha.js "^2.4.8"
|
||||
|
||||
pify@^2.0.0, pify@^2.3.0:
|
||||
pify@^2.0.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
|
||||
|
||||
@ -4915,19 +4915,6 @@ postcss-dir-pseudo-class@^3.0.0:
|
||||
postcss "^6.0.20"
|
||||
postcss-selector-parser "^3.1.1"
|
||||
|
||||
postcss-easy-import@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-easy-import/-/postcss-easy-import-3.0.0.tgz#8eaaf5ae59566083d0cae98735dfd803e3ab194d"
|
||||
dependencies:
|
||||
globby "^6.1.0"
|
||||
is-glob "^4.0.0"
|
||||
lodash "^4.17.4"
|
||||
object-assign "^4.0.1"
|
||||
pify "^3.0.0"
|
||||
postcss "^6.0.11"
|
||||
postcss-import "^10.0.0"
|
||||
resolve "^1.1.7"
|
||||
|
||||
postcss-extend-rule@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-extend-rule/-/postcss-extend-rule-1.1.0.tgz#11e4d590ffe4253b853ef1fc03be7167da607d38"
|
||||
@ -4953,16 +4940,6 @@ postcss-font-variant@^3.0.0:
|
||||
dependencies:
|
||||
postcss "^6.0.1"
|
||||
|
||||
postcss-import@^10.0.0:
|
||||
version "10.0.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-10.0.0.tgz#4c85c97b099136cc5ea0240dc1dfdbfde4e2ebbe"
|
||||
dependencies:
|
||||
object-assign "^4.0.1"
|
||||
postcss "^6.0.1"
|
||||
postcss-value-parser "^3.2.3"
|
||||
read-cache "^1.0.0"
|
||||
resolve "^1.1.7"
|
||||
|
||||
postcss-initial@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-initial/-/postcss-initial-2.0.0.tgz#72715f7336e0bb79351d99ee65c4a253a8441ba4"
|
||||
@ -5325,12 +5302,6 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7:
|
||||
minimist "^1.2.0"
|
||||
strip-json-comments "~2.0.1"
|
||||
|
||||
read-cache@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"
|
||||
dependencies:
|
||||
pify "^2.3.0"
|
||||
|
||||
read-pkg-up@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07"
|
||||
|
Loading…
x
Reference in New Issue
Block a user