diff --git a/App.vue b/App.vue
index 43c1c25..7740ceb 100644
--- a/App.vue
+++ b/App.vue
@@ -15,4 +15,5 @@
diff --git a/assets/style/common.scss b/assets/style/common.scss
index 07660f7..8995d93 100644
--- a/assets/style/common.scss
+++ b/assets/style/common.scss
@@ -1,145 +1,97 @@
-page {
- // background-color: #FFF8F8;
- background-color: #F1F1F1;
- // min-height: 100%;
- height: 100%;
- font-size: 28rpx;
- line-height: 1.2; //
- color: #000;
- }
-
- page .tabpage{
- // 怪异盒模型
- -webkit-overflow-scrolling: touch;
- box-sizing: border-box;
- /* #ifdef H5 */
- //貌似不需要了,已经是去除了tabbar的高度了
- //自定义tabbar的时候需要
- // 底部tab栏高度
- margin-bottom: 0;//var(--window-bottom);
- /* #endif */
- /* #ifndef H5 */
- margin-bottom: 0;
- /* #endif */
- // 触发BFC
- // overflow-x: hidden;
- // overflow-y: scroll;
- min-height: 100%;
- }
- page .page{
- // 怪异盒模型
- -webkit-overflow-scrolling: touch;
- box-sizing: border-box;
- // 触发BFC
- // overflow-x: hidden;
- // overflow-y: scroll;
- min-height: 100%;
- }
-
- ::-webkit-scrollbar {
- width: 0;
- height: 0;
- color: transparent;
- display: none;
- }
-
- page *{
- box-sizing: border-box;
- }
- .a-flexbox{
- display: flex;
- &.a-flexbox--fixed{
- flex-shrink: 0;
- flex-grow: 0;
- }
- &.a-flexbox--inline{
- display: inline-flex;
- }
- &.a-flexbox__column{
- flex-direction: column;
- }
- &.a-flexbox__row{
- flex-direction: row;
- }
- &.a-flexbox__wrap{
- flex-wrap: wrap;
- }
- &.a-flexbox__center{
- align-items: center;
- justify-content: center;
- }
- &.a-flexbox__center--x{
- justify-content: center;
- }
- &.a-flexbox--around{
- justify-content: space-around;
- }
- &.a-flexbox--between{
- justify-content: space-between;
- }
- &.a-flexbox__start--x{
- justify-content: flex-start;
- }
- &.a-flexbox__end--x{
- justify-content: flex-end;
- }
- &.a-flexbox__center--y{
- align-items: center;
- }
- &.a-flexbox__start--y{
- align-items: flex-start;
- }
- &.a-flexbox__end--y{
- align-items: flex-end;
- }
- .a-flexbox__noshrink{
- flex-shrink: 0;
- }
- .a-flexbox__full{
- flex: 1;
- width: 0;
- }
- .a-flexbox__full--h{
- flex: 1;
- height: 0;
- }
- }
-// 单行省略号
-.a-ov{
- @include ellipsis(1)
-}
-// 两行省略号
-.a-ov2{
- @include ellipsis(2)
-}
+// .a-flexbox{
+// display: flex;
+// &.a-flexbox--fixed{
+// flex-shrink: 0;
+// flex-grow: 0;
+// }
+// &.a-flexbox--inline{
+// display: inline-flex;
+// }
+// &.a-flexbox__column{
+// flex-direction: column;
+// }
+// &.a-flexbox__row{
+// flex-direction: row;
+// }
+// &.a-flexbox__wrap{
+// flex-wrap: wrap;
+// }
+// &.a-flexbox__center{
+// align-items: center;
+// justify-content: center;
+// }
+// &.a-flexbox__center--x{
+// justify-content: center;
+// }
+// &.a-flexbox--around{
+// justify-content: space-around;
+// }
+// &.a-flexbox--between{
+// justify-content: space-between;
+// }
+// &.a-flexbox__start--x{
+// justify-content: flex-start;
+// }
+// &.a-flexbox__end--x{
+// justify-content: flex-end;
+// }
+// &.a-flexbox__center--y{
+// align-items: center;
+// }
+// &.a-flexbox__start--y{
+// align-items: flex-start;
+// }
+// &.a-flexbox__end--y{
+// align-items: flex-end;
+// }
+// .a-flexbox__noshrink{
+// flex-shrink: 0;
+// }
+// .a-flexbox__full{
+// flex: 1;
+// width: 0;
+// }
+// .a-flexbox__full--h{
+// flex: 1;
+// height: 0;
+// }
+// }
+// // 单行省略号
+// .a-ov{
+// @include ellipsis(1)
+// }
+// // 两行省略号
+// .a-ov2{
+// @include ellipsis(2)
+// }
-// 包裹输入框
-.a-wrapinput{
- position:relative;
- display: flex;
- align-items: center;
- // height: 100%;
- >input{
- width: 0;
- flex: 1;
- // height: 100%;
- font-size: inherit;
- line-height: inherit;
- }
- .sub{
- display: flex;
- align-items: center;
- margin-right: 8rpx;
- }
- }
- // 包裹文本域
- .a-wraptextarea{
- min-height: 160rpx;
- height: 160rpx;
- >textarea{
- font-size: inherit;
- width: 100%;
- height: 100%;
- }
- }
+// // 包裹输入框
+// .a-wrapinput{
+// position:relative;
+// display: flex;
+// align-items: center;
+// // height: 100%;
+// >input{
+// width: 0;
+// flex: 1;
+// // height: 100%;
+// font-size: inherit;
+// line-height: inherit;
+// }
+// .sub{
+// display: flex;
+// align-items: center;
+// margin-right: 8rpx;
+// }
+// }
+// // 包裹文本域
+// .a-wraptextarea{
+// min-height: 160rpx;
+// height: 160rpx;
+// >textarea{
+// font-size: inherit;
+// width: 100%;
+// height: 100%;
+// }
+// }
diff --git a/assets/style/global.scss b/assets/style/global.scss
index 5049e0c..81bb49b 100644
--- a/assets/style/global.scss
+++ b/assets/style/global.scss
@@ -1,112 +1,113 @@
-/*
-* 内部通用scss
-*/
+// /*
+// * 内部通用scss
+// */
-@mixin clearfix {
- &:after {
- clear: both;
- content: '.';
- display: block;
- height: 0;
- line-height: 0;
- overflow: hidden;
- }
- // *height: 1%;
-}
+// @mixin clearfix {
+// &:after {
+// clear: both;
+// content: '.';
+// display: block;
+// height: 0;
+// line-height: 0;
+// overflow: hidden;
+// }
+// // *height: 1%;
+// }
-@mixin hairline {
- &::after {
- content: " ";
- box-sizing: border-box;
- pointer-events: none;
- border: 0 solid #ebedf0;
- position: absolute;
- top: -50%;
- right: -50%;
- bottom: -50%;
- left: -50%;
- -webkit-transform: scale(0.5);
- transform: scale(0.5);
- @content
- }
-};
-@mixin hairline--no {
- @include hairline{
- border: 0;
- };
-}
-@mixin hairline--all {
- @include hairline{
- border-width: 1px;
- };
-}
-@mixin hairline--right {
- @include hairline{
- border-right-width: 1px;
- };
-}
-@mixin hairline--left {
- @include hairline{
- border-left-width: 1px;
- };
-}
-@mixin hairline--bottom {
- @include hairline{
- border-bottom-width: 1px;
- };
-}
+// @mixin hairline {
+// &::after {
+// content: " ";
+// box-sizing: border-box;
+// pointer-events: none;
+// border: 0 solid #ebedf0;
+// position: absolute;
+// top: -50%;
+// right: -50%;
+// bottom: -50%;
+// left: -50%;
+// -webkit-transform: scale(0.5);
+// transform: scale(0.5);
+// @content
+// }
+// };
+// @mixin hairline--no {
+// @include hairline{
+// border: 0;
+// };
+// }
+// @mixin hairline--all {
+// @include hairline{
+// border-width: 1px;
+// };
+// }
+// @mixin hairline--right {
+// @include hairline{
+// border-right-width: 1px;
+// };
+// }
+// @mixin hairline--left {
+// @include hairline{
+// border-left-width: 1px;
+// };
+// }
-@mixin hairline--top {
- @include hairline{
- border-top-width: 1px;
- };
-}
-@mixin hairline--right--bottom {
- @include hairline{
- border-left-width: 0;
- border-top-width: 0;
- border-right-width: 1px;
- border-bottom-width: 1px;
- };
-}
-@mixin hairline--left--top {
- @include hairline{
- border-right-width: 0;
- border-bottom-width: 0;
- border-left-width: 1px;
- border-top-width: 1px;
- };
-}
-//一行溢出
-@mixin text-overflow{
- white-space: nowrap;
- text-overflow: ellipsis;
- overflow: hidden;
- word-break: break-all;
-};
+// @mixin hairline--bottom {
+// @include hairline{
+// border-bottom-width: 1px;
+// };
+// }
-//两行溢出
-@mixin ov($num: 2){
- text-overflow: -o-ellipsis-lastline;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: $num;
- line-clamp: $num;
- -webkit-box-orient: vertical;
-}
-@mixin ellipsis($lines: 1) {
- @if ($lines==1) {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- } @else {
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: $lines;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- }
-}
\ No newline at end of file
+// @mixin hairline--top {
+// @include hairline{
+// border-top-width: 1px;
+// };
+// }
+// @mixin hairline--right--bottom {
+// @include hairline{
+// border-left-width: 0;
+// border-top-width: 0;
+// border-right-width: 1px;
+// border-bottom-width: 1px;
+// };
+// }
+// @mixin hairline--left--top {
+// @include hairline{
+// border-right-width: 0;
+// border-bottom-width: 0;
+// border-left-width: 1px;
+// border-top-width: 1px;
+// };
+// }
+// //一行溢出
+// @mixin text-overflow{
+// white-space: nowrap;
+// text-overflow: ellipsis;
+// overflow: hidden;
+// word-break: break-all;
+// };
+
+// //两行溢出
+// @mixin ov($num: 2){
+// text-overflow: -o-ellipsis-lastline;
+// overflow: hidden;
+// text-overflow: ellipsis;
+// display: -webkit-box;
+// -webkit-line-clamp: $num;
+// line-clamp: $num;
+// -webkit-box-orient: vertical;
+// }
+// @mixin ellipsis($lines: 1) {
+// @if ($lines==1) {
+// overflow: hidden;
+// text-overflow: ellipsis;
+// white-space: nowrap;
+// } @else {
+// display: -webkit-box;
+// -webkit-box-orient: vertical;
+// -webkit-line-clamp: $lines;
+// overflow: hidden;
+// text-overflow: ellipsis;
+// word-break: break-all;
+// }
+// }
\ No newline at end of file
diff --git a/main.js b/main.js
index b1f97d0..ce9b546 100644
--- a/main.js
+++ b/main.js
@@ -13,5 +13,5 @@ Vue.use(niuUI)
const app = new Vue({
...App
})
-setTimeout(function() {toast.success("asd")}, 10);
+
app.$mount()
diff --git a/pages.json b/pages.json
index 4bf5776..0e1d8d1 100644
--- a/pages.json
+++ b/pages.json
@@ -4,7 +4,10 @@
"path": "pages/index/index",
"style": {
"navigationStyle": "custom",
- "navigationBarTitleText": "uni-app"
+ "navigationBarTitleText": "uni-app",
+ "app-plus": {
+ "bounce": "none"
+ }
}
}
,{
diff --git a/pages/Sub/Tabs/Tabs.vue b/pages/Sub/Tabs/Tabs.vue
index 938af97..acb2eb0 100644
--- a/pages/Sub/Tabs/Tabs.vue
+++ b/pages/Sub/Tabs/Tabs.vue
@@ -1,9 +1,11 @@
-
+
Tabs
-
+
+
+
@@ -23,9 +25,10 @@
]">
-
+
-
+
-
-
+
+
爱能森组件库
+
+ asd
+
组件池
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..c5c394e
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,8 @@
+# niu-ui
+
+第一个版本,目前仅供个人使用
+
+```
+import niuUI, {toast} from '@/uni_modules/niu-ui'
+Vue.use(niuUI)
+```
\ No newline at end of file
diff --git a/uni.scss b/uni.scss
index da0b382..d469d8d 100644
--- a/uni.scss
+++ b/uni.scss
@@ -13,7 +13,7 @@
*/
/* 颜色变量 */
-@import '~@/assets/style/global.scss';
+@import '~@/uni_modules/niu-ui/assets/style/global.scss';
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
diff --git a/uni_modules/niu-ui/assets/style/common.scss b/uni_modules/niu-ui/assets/style/common.scss
index 07660f7..4c109a6 100644
--- a/uni_modules/niu-ui/assets/style/common.scss
+++ b/uni_modules/niu-ui/assets/style/common.scss
@@ -1,14 +1,12 @@
-page {
- // background-color: #FFF8F8;
+ page {
background-color: #F1F1F1;
- // min-height: 100%;
height: 100%;
font-size: 28rpx;
line-height: 1.2; //
color: #000;
+ color: darkred;
}
-
- page .tabpage{
+ page .tabpage {
// 怪异盒模型
-webkit-overflow-scrolling: touch;
box-sizing: border-box;
@@ -16,7 +14,7 @@ page {
//貌似不需要了,已经是去除了tabbar的高度了
//自定义tabbar的时候需要
// 底部tab栏高度
- margin-bottom: 0;//var(--window-bottom);
+ margin-bottom: 0; //var(--window-bottom);
/* #endif */
/* #ifndef H5 */
margin-bottom: 0;
@@ -26,7 +24,8 @@ page {
// overflow-y: scroll;
min-height: 100%;
}
- page .page{
+
+ page .page {
// 怪异盒模型
-webkit-overflow-scrolling: touch;
box-sizing: border-box;
@@ -37,109 +36,19 @@ page {
}
::-webkit-scrollbar {
- width: 0;
- height: 0;
- color: transparent;
- display: none;
+ width: 0;
+ height: 0;
+ color: transparent;
+ display: none;
}
- page *{
+ page * {
box-sizing: border-box;
}
-
- .a-flexbox{
- display: flex;
- &.a-flexbox--fixed{
- flex-shrink: 0;
- flex-grow: 0;
- }
- &.a-flexbox--inline{
- display: inline-flex;
- }
- &.a-flexbox__column{
- flex-direction: column;
- }
- &.a-flexbox__row{
- flex-direction: row;
- }
- &.a-flexbox__wrap{
- flex-wrap: wrap;
- }
- &.a-flexbox__center{
- align-items: center;
- justify-content: center;
- }
- &.a-flexbox__center--x{
- justify-content: center;
- }
- &.a-flexbox--around{
- justify-content: space-around;
- }
- &.a-flexbox--between{
- justify-content: space-between;
- }
- &.a-flexbox__start--x{
- justify-content: flex-start;
- }
- &.a-flexbox__end--x{
- justify-content: flex-end;
- }
- &.a-flexbox__center--y{
- align-items: center;
- }
- &.a-flexbox__start--y{
- align-items: flex-start;
- }
- &.a-flexbox__end--y{
- align-items: flex-end;
- }
- .a-flexbox__noshrink{
- flex-shrink: 0;
- }
- .a-flexbox__full{
- flex: 1;
- width: 0;
- }
- .a-flexbox__full--h{
- flex: 1;
- height: 0;
- }
- }
-// 单行省略号
-.a-ov{
- @include ellipsis(1)
-}
-// 两行省略号
-.a-ov2{
- @include ellipsis(2)
-}
-
-// 包裹输入框
-.a-wrapinput{
- position:relative;
- display: flex;
- align-items: center;
- // height: 100%;
- >input{
- width: 0;
- flex: 1;
- // height: 100%;
- font-size: inherit;
- line-height: inherit;
- }
- .sub{
- display: flex;
- align-items: center;
- margin-right: 8rpx;
- }
+ ::-webkit-scrollbar {
+ width: 0;
+ height: 0;
+ color: transparent;
+ display: none;
}
- // 包裹文本域
- .a-wraptextarea{
- min-height: 160rpx;
- height: 160rpx;
- >textarea{
- font-size: inherit;
- width: 100%;
- height: 100%;
- }
- }
+
\ No newline at end of file
diff --git a/uni_modules/niu-ui/assets/style/global.scss b/uni_modules/niu-ui/assets/style/global.scss
index 5049e0c..63c9b8a 100644
--- a/uni_modules/niu-ui/assets/style/global.scss
+++ b/uni_modules/niu-ui/assets/style/global.scss
@@ -51,6 +51,7 @@
border-left-width: 1px;
};
}
+
@mixin hairline--bottom {
@include hairline{
border-bottom-width: 1px;
diff --git a/uni_modules/niu-ui/changelog.md b/uni_modules/niu-ui/changelog.md
index e69de29..0097369 100644
--- a/uni_modules/niu-ui/changelog.md
+++ b/uni_modules/niu-ui/changelog.md
@@ -0,0 +1,4 @@
+## 0.0.1.alpha.1(2022-07-18)
+版本修改
+## 0.0.1(2022-07-18)
+第一个版本
diff --git a/uni_modules/niu-ui/components/niu-navbar/niu-navbar.vue b/uni_modules/niu-ui/components/niu-navbar/niu-navbar.vue
index 9cd838f..861e49b 100644
--- a/uni_modules/niu-ui/components/niu-navbar/niu-navbar.vue
+++ b/uni_modules/niu-ui/components/niu-navbar/niu-navbar.vue
@@ -17,7 +17,7 @@
backgroundColor: !gradient?bg:'transparent'
}" :class="[toFixed?'fixed':'',border?'border':'']">
+ :style="{color: color,height: x_height?(x_height+'px'):'',lineHeight: x_height?(x_height+'px'):'',top: x_statusHeight?(x_statusHeight+'px'):'', width: middleLayout=='left'?'auto':'', padding: middleLayout=='left'?'0 10rpx':''}">
-
+
@@ -11,14 +11,6 @@
Tab: {
type: Boolean,
default: false
- },
- className: {
- type: String || Array,
- default: ''
- },
- inStyle:{
- type: String || Object,
- default: ''
}
},
data() {
@@ -33,12 +25,8 @@
this.curPage = pages[len - 1];
this._curDeep = len;
},
- methods:{
-
+ methods: {
+
}
}
-
-
-
+
\ No newline at end of file
diff --git a/uni_modules/niu-ui/components/niu-tabs/niu-tabs.vue b/uni_modules/niu-ui/components/niu-tabs/niu-tabs.vue
index 675d990..e1873af 100644
--- a/uni_modules/niu-ui/components/niu-tabs/niu-tabs.vue
+++ b/uni_modules/niu-ui/components/niu-tabs/niu-tabs.vue
@@ -12,8 +12,9 @@
{{item[akey]}}
-
-
+
+
+
@@ -26,7 +27,7 @@
:item="list[value]"
:props="{normalColor, activeColor}"
>
-
+
@@ -201,7 +202,9 @@
if (isClick && this.value == index) return
if (this.allLeft.length) {
this.$emit("change", index)
+ console.log(this.allLeft, this.barPer);
this.barWidth = this.allLeft[index][1] * this.barPer
+ console.log(this.barWidth);
this.barLeft = this.allLeft[index][0] + (this.allLeft[index][1] - this.barWidth)/2
this.left = (this.allLeft[index][0] - this.allLeft[index][1] * 2)
}
diff --git a/uni_modules/niu-ui/components/niu-ui/niu-ui.vue b/uni_modules/niu-ui/components/niu-ui/niu-ui.vue
new file mode 100644
index 0000000..02409e3
--- /dev/null
+++ b/uni_modules/niu-ui/components/niu-ui/niu-ui.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uni_modules/niu-ui/index.js b/uni_modules/niu-ui/index.js
index f1b308b..147209d 100644
--- a/uni_modules/niu-ui/index.js
+++ b/uni_modules/niu-ui/index.js
@@ -6,11 +6,14 @@ export {
util
}
export default {
- install(Vue) {
+ install(Vue, options = {}) {
const data = Vue.observable({
data: {},
util: util,
- toast: toast
+ toast: toast,
+ config: {
+ mainColor: "#39b54a"
+ },
})
Vue.mixin({
computed: {
diff --git a/uni_modules/niu-ui/package.json b/uni_modules/niu-ui/package.json
index 00e3648..ae51068 100644
--- a/uni_modules/niu-ui/package.json
+++ b/uni_modules/niu-ui/package.json
@@ -1,11 +1,11 @@
{
"id": "niu-ui",
"displayName": "niu-ui",
- "version": "1.0.0",
+ "version": "0.0.1.alpha.1",
"description": "niu-ui",
"keywords": [
- "niu-ui"
- ],
+ "niu-ui"
+ ],
"main": "index.js",
"repository": "",
"engines": {
@@ -28,9 +28,9 @@
"qq": ""
},
"declaration": {
- "ads": "",
- "data": "",
- "permissions": ""
+ "ads": "无",
+ "data": "插件不采集任何数据",
+ "permissions": "无"
},
"npmurl": ""
},
@@ -39,8 +39,8 @@
"encrypt": [],
"platforms": {
"cloud": {
- "tcb": "u",
- "aliyun": "u"
+ "tcb": "y",
+ "aliyun": "y"
},
"client": {
"App": {
diff --git a/uni_modules/niu-ui/readme.md b/uni_modules/niu-ui/readme.md
index e1cdd64..c5c394e 100644
--- a/uni_modules/niu-ui/readme.md
+++ b/uni_modules/niu-ui/readme.md
@@ -1 +1,8 @@
-# niu-ui
\ No newline at end of file
+# niu-ui
+
+第一个版本,目前仅供个人使用
+
+```
+import niuUI, {toast} from '@/uni_modules/niu-ui'
+Vue.use(niuUI)
+```
\ No newline at end of file