项目初始化
This commit is contained in:
155
uni_modules/vk-uview-ui/libs/css/color.scss
Normal file
155
uni_modules/vk-uview-ui/libs/css/color.scss
Normal file
@@ -0,0 +1,155 @@
|
||||
.u-type-primary-light {
|
||||
color: $u-type-primary-light;
|
||||
}
|
||||
|
||||
.u-type-warning-light {
|
||||
color: $u-type-warning-light;
|
||||
}
|
||||
|
||||
.u-type-success-light {
|
||||
color: $u-type-success-light;
|
||||
}
|
||||
|
||||
.u-type-error-light {
|
||||
color: $u-type-error-light;
|
||||
}
|
||||
|
||||
.u-type-info-light {
|
||||
color: $u-type-info-light;
|
||||
}
|
||||
|
||||
.u-type-primary-light-bg {
|
||||
background-color: $u-type-primary-light;
|
||||
}
|
||||
|
||||
.u-type-warning-light-bg {
|
||||
background-color: $u-type-warning-light;
|
||||
}
|
||||
|
||||
.u-type-success-light-bg {
|
||||
background-color: $u-type-success-light;
|
||||
}
|
||||
|
||||
.u-type-error-light-bg {
|
||||
background-color: $u-type-error-light;
|
||||
}
|
||||
|
||||
.u-type-info-light-bg {
|
||||
background-color: $u-type-info-light;
|
||||
}
|
||||
|
||||
.u-type-primary-dark {
|
||||
color: $u-type-primary-dark;
|
||||
}
|
||||
|
||||
.u-type-warning-dark {
|
||||
color: $u-type-warning-dark;
|
||||
}
|
||||
|
||||
.u-type-success-dark {
|
||||
color: $u-type-success-dark;
|
||||
}
|
||||
|
||||
.u-type-error-dark {
|
||||
color: $u-type-error-dark;
|
||||
}
|
||||
|
||||
.u-type-info-dark {
|
||||
color: $u-type-info-dark;
|
||||
}
|
||||
|
||||
.u-type-primary-dark-bg {
|
||||
background-color: $u-type-primary-dark;
|
||||
}
|
||||
|
||||
.u-type-warning-dark-bg {
|
||||
background-color: $u-type-warning-dark;
|
||||
}
|
||||
|
||||
.u-type-success-dark-bg {
|
||||
background-color: $u-type-success-dark;
|
||||
}
|
||||
|
||||
.u-type-error-dark-bg {
|
||||
background-color: $u-type-error-dark;
|
||||
}
|
||||
|
||||
.u-type-info-dark-bg {
|
||||
background-color: $u-type-info-dark;
|
||||
}
|
||||
|
||||
.u-type-primary-disabled {
|
||||
color: $u-type-primary-disabled;
|
||||
}
|
||||
|
||||
.u-type-warning-disabled {
|
||||
color: $u-type-warning-disabled;
|
||||
}
|
||||
|
||||
.u-type-success-disabled {
|
||||
color: $u-type-success-disabled;
|
||||
}
|
||||
|
||||
.u-type-error-disabled {
|
||||
color: $u-type-error-disabled;
|
||||
}
|
||||
|
||||
.u-type-info-disabled {
|
||||
color: $u-type-info-disabled;
|
||||
}
|
||||
|
||||
.u-type-primary {
|
||||
color: $u-type-primary;
|
||||
}
|
||||
|
||||
.u-type-warning {
|
||||
color: $u-type-warning;
|
||||
}
|
||||
|
||||
.u-type-success {
|
||||
color: $u-type-success;
|
||||
}
|
||||
|
||||
.u-type-error {
|
||||
color: $u-type-error;
|
||||
}
|
||||
|
||||
.u-type-info {
|
||||
color: $u-type-info;
|
||||
}
|
||||
|
||||
.u-type-primary-bg {
|
||||
background-color: $u-type-primary;
|
||||
}
|
||||
|
||||
.u-type-warning-bg {
|
||||
background-color: $u-type-warning;
|
||||
}
|
||||
|
||||
.u-type-success-bg {
|
||||
background-color: $u-type-success;
|
||||
}
|
||||
|
||||
.u-type-error-bg {
|
||||
background-color: $u-type-error;
|
||||
}
|
||||
|
||||
.u-type-info-bg {
|
||||
background-color: $u-type-info;
|
||||
}
|
||||
|
||||
.u-main-color {
|
||||
color: $u-main-color;
|
||||
}
|
||||
|
||||
.u-content-color {
|
||||
color: $u-content-color;
|
||||
}
|
||||
|
||||
.u-tips-color {
|
||||
color: $u-tips-color;
|
||||
}
|
||||
|
||||
.u-light-color {
|
||||
color: $u-light-color;
|
||||
}
|
176
uni_modules/vk-uview-ui/libs/css/common.scss
Normal file
176
uni_modules/vk-uview-ui/libs/css/common.scss
Normal file
@@ -0,0 +1,176 @@
|
||||
.u-relative,
|
||||
.u-rela {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.u-absolute,
|
||||
.u-abso {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
// nvue不能用标签命名样式,不能放在微信组件中,否则微信开发工具会报警告,无法使用标签名当做选择器
|
||||
/* #ifndef APP-NVUE */
|
||||
image {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
// 在weex,也即nvue中,所有元素默认为border-box
|
||||
view,
|
||||
text {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/* #endif */
|
||||
|
||||
.u-font-xs {
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.u-font-sm {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.u-font-md {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.u-font-lg {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.u-font-xl {
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.u-flex {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.u-flex-wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.u-flex-nowrap {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.u-col-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.u-col-top {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.u-col-bottom {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.u-row-center {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.u-row-left {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.u-row-right {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.u-row-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.u-row-around {
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.u-text-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.u-text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.u-text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.u-flex-col {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
// 定义flex等分
|
||||
@for $i from 0 through 12 {
|
||||
.u-flex-#{$i} {
|
||||
flex: $i;
|
||||
}
|
||||
}
|
||||
|
||||
// 定义字体(px)单位,小于20都为px单位字体
|
||||
@for $i from 9 to 20 {
|
||||
.u-font-#{$i} {
|
||||
font-size: $i + px;
|
||||
}
|
||||
}
|
||||
|
||||
// 定义字体(rpx)单位,大于或等于20的都为rpx单位字体
|
||||
@for $i from 20 through 40 {
|
||||
.u-font-#{$i} {
|
||||
font-size: $i + rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 定义内外边距,历遍1-80
|
||||
@for $i from 0 through 80 {
|
||||
// 只要双数和能被5除尽的数
|
||||
@if $i % 2 == 0 or $i % 5 == 0 {
|
||||
// 得出:u-margin-30或者u-m-30
|
||||
.u-margin-#{$i}, .u-m-#{$i} {
|
||||
margin: $i + rpx!important;
|
||||
}
|
||||
|
||||
// 得出:u-padding-30或者u-p-30
|
||||
.u-padding-#{$i}, .u-p-#{$i} {
|
||||
padding: $i + rpx!important;
|
||||
}
|
||||
|
||||
@each $short, $long in l left, t top, r right, b bottom {
|
||||
// 缩写版,结果如: u-m-l-30
|
||||
// 定义外边距
|
||||
.u-m-#{$short}-#{$i} {
|
||||
margin-#{$long}: $i + rpx!important;
|
||||
}
|
||||
|
||||
// 定义内边距
|
||||
.u-p-#{$short}-#{$i} {
|
||||
padding-#{$long}: $i + rpx!important;
|
||||
}
|
||||
|
||||
// 完整版,结果如:u-margin-left-30
|
||||
// 定义外边距
|
||||
.u-margin-#{$long}-#{$i} {
|
||||
margin-#{$long}: $i + rpx!important;
|
||||
}
|
||||
|
||||
// 定义内边距
|
||||
.u-padding-#{$long}-#{$i} {
|
||||
padding-#{$long}: $i + rpx!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 重置nvue的默认关于flex的样式
|
||||
.u-reset-nvue {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
7
uni_modules/vk-uview-ui/libs/css/style.components.scss
Normal file
7
uni_modules/vk-uview-ui/libs/css/style.components.scss
Normal file
@@ -0,0 +1,7 @@
|
||||
// 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错
|
||||
@mixin vue-flex($direction: row) {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
flex-direction: $direction;
|
||||
/* #endif */
|
||||
}
|
8
uni_modules/vk-uview-ui/libs/css/style.h5.scss
Normal file
8
uni_modules/vk-uview-ui/libs/css/style.h5.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
/* H5的时候,隐藏滚动条 */
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
-webkit-appearance: none;
|
||||
background: transparent;
|
||||
}
|
72
uni_modules/vk-uview-ui/libs/css/style.mp.scss
Normal file
72
uni_modules/vk-uview-ui/libs/css/style.mp.scss
Normal file
@@ -0,0 +1,72 @@
|
||||
/* start--微信小程序编译后页面有组件名的元素,特别处理--start */
|
||||
/* #ifdef MP-WEIXIN || MP-QQ */
|
||||
u-td, u-th {
|
||||
flex: 1;
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
.u-td {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
u-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
// 各家小程序宫格组件外层设置为100%,避免受到父元素display: flex;的影响
|
||||
u-grid {
|
||||
width: 100%;
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
|
||||
// 避免小程序线条组件因为父组件display: flex;而失效
|
||||
u-line {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
u-switch {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
u-dropdown {
|
||||
flex: 1;
|
||||
}
|
||||
/* #endif */
|
||||
/* end-微信小程序编译后页面有组件名的元素,特别处理--end */
|
||||
|
||||
|
||||
/* #ifdef MP-QQ || MP-TOUTIAO */
|
||||
// 需要做这一切额外的兼容,都是因为TX的无能
|
||||
u-icon {
|
||||
line-height: 0;
|
||||
}
|
||||
/* #endif */
|
||||
|
||||
/* start--头条小程序编译后页面有组件名的元素,特别处理--start */
|
||||
// 由于头条小程序不支持直接组件名形式写样式,目前只能在写组件的时候给组件加上对应的类名
|
||||
/* #ifdef MP-TOUTIAO */
|
||||
.u-td, .u-th, .u-tr {
|
||||
flex: 1;
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
.u-row, .u-col {
|
||||
flex: 1;
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
// 避免小程序线条组件因为父组件display: flex;而失效
|
||||
.u-line {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.u-dropdown {
|
||||
flex: 1;
|
||||
}
|
||||
/* #endif */
|
||||
/* end-头条小程序编译后页面有组件名的元素,特别处理--end */
|
||||
|
||||
|
||||
|
3
uni_modules/vk-uview-ui/libs/css/style.nvue.scss
Normal file
3
uni_modules/vk-uview-ui/libs/css/style.nvue.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
.nvue {
|
||||
font-size: 24rpx;
|
||||
}
|
175
uni_modules/vk-uview-ui/libs/css/style.vue.scss
Normal file
175
uni_modules/vk-uview-ui/libs/css/style.vue.scss
Normal file
@@ -0,0 +1,175 @@
|
||||
page {
|
||||
color: $u-main-color;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
/* start--去除webkit的默认样式--start */
|
||||
.u-fix-ios-appearance {
|
||||
-webkit-appearance:none;
|
||||
}
|
||||
/* end--去除webkit的默认样式--end */
|
||||
|
||||
/* start--icon图标外层套一个view,让其达到更好的垂直居中的效果--start */
|
||||
.u-icon-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
/* end-icon图标外层套一个view,让其达到更好的垂直居中的效果--end */
|
||||
|
||||
/* start--iPhoneX底部安全区定义--start */
|
||||
.safe-area-inset-bottom {
|
||||
padding-bottom: 0;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
/* end-iPhoneX底部安全区定义--end */
|
||||
|
||||
/* start--各种hover点击反馈相关的类名-start */
|
||||
.u-hover-class {
|
||||
// background-color: #f7f8f9!important;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.u-cell-hover {
|
||||
background-color: #f7f8f9!important;
|
||||
}
|
||||
/* end--各种hover点击反馈相关的类名--end */
|
||||
|
||||
/* start--文本行数限制--start */
|
||||
.u-line-1 {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.u-line-2 {
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.u-line-3 {
|
||||
-webkit-line-clamp: 3;
|
||||
}
|
||||
|
||||
.u-line-4 {
|
||||
-webkit-line-clamp: 4;
|
||||
}
|
||||
|
||||
.u-line-5 {
|
||||
-webkit-line-clamp: 5;
|
||||
}
|
||||
|
||||
.u-line-2, .u-line-3, .u-line-4, .u-line-5 {
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box; // 弹性伸缩盒
|
||||
-webkit-box-orient: vertical; // 设置伸缩盒子元素排列方式
|
||||
}
|
||||
|
||||
/* end--文本行数限制--end */
|
||||
|
||||
|
||||
/* start--Retina 屏幕下的 1px 边框--start */
|
||||
.u-border,
|
||||
.u-border-bottom,
|
||||
.u-border-left,
|
||||
.u-border-right,
|
||||
.u-border-top,
|
||||
.u-border-top-bottom {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.u-border-bottom:after,
|
||||
.u-border-left:after,
|
||||
.u-border-right:after,
|
||||
.u-border-top-bottom:after,
|
||||
.u-border-top:after,
|
||||
.u-border:after {
|
||||
/* #ifndef APP-NVUE */
|
||||
content: ' ';
|
||||
/* #endif */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
pointer-events: none;
|
||||
box-sizing: border-box;
|
||||
-webkit-transform-origin: 0 0;
|
||||
transform-origin: 0 0;
|
||||
// 多加0.1%,能解决有时候边框缺失的问题
|
||||
width: 199.8%;
|
||||
height: 199.7%;
|
||||
transform: scale(0.5, 0.5);
|
||||
border: 0 solid $u-border-color;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.u-border-top:after {
|
||||
border-top-width: 1px
|
||||
}
|
||||
|
||||
.u-border-left:after {
|
||||
border-left-width: 1px
|
||||
}
|
||||
|
||||
.u-border-right:after {
|
||||
border-right-width: 1px
|
||||
}
|
||||
|
||||
.u-border-bottom:after {
|
||||
border-bottom-width: 1px
|
||||
}
|
||||
|
||||
.u-border-top-bottom:after {
|
||||
border-width: 1px 0
|
||||
}
|
||||
|
||||
.u-border:after {
|
||||
border-width: 1px
|
||||
}
|
||||
/* end--Retina 屏幕下的 1px 边框--end */
|
||||
|
||||
|
||||
/* start--clearfix--start */
|
||||
.u-clearfix:after,
|
||||
.clearfix:after {
|
||||
/* #ifndef APP-NVUE */
|
||||
content: '';
|
||||
/* #endif */
|
||||
display: table;
|
||||
clear: both
|
||||
}
|
||||
/* end--clearfix--end */
|
||||
|
||||
/* start--高斯模糊tabbar底部处理--start */
|
||||
.u-blur-effect-inset {
|
||||
width: 750rpx;
|
||||
height: var(--window-bottom);
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
/* end--高斯模糊tabbar底部处理--end */
|
||||
|
||||
/* start--提升H5端uni.toast()的层级,避免被uView的modal等遮盖--start */
|
||||
/* #ifdef H5 */
|
||||
uni-toast {
|
||||
z-index: 10090;
|
||||
}
|
||||
uni-toast .uni-toast {
|
||||
z-index: 10090;
|
||||
}
|
||||
/* #endif */
|
||||
/* end--提升H5端uni.toast()的层级,避免被uView的modal等遮盖--end */
|
||||
|
||||
/* start--去除button的所有默认样式--start */
|
||||
.u-reset-button {
|
||||
padding: 0;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
background-color: transparent;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.u-reset-button::after {
|
||||
border: none;
|
||||
}
|
||||
/* end--去除button的所有默认样式--end */
|
||||
|
Reference in New Issue
Block a user