Skip to content

Commit

Permalink
add: 增加uni-app-x工程
Browse files Browse the repository at this point in the history
  • Loading branch information
jry committed Aug 25, 2024
1 parent 2cbb6c4 commit 586655a
Show file tree
Hide file tree
Showing 245 changed files with 25,848 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// "^u-(.*)": "uview-plus/components/up-$1/up-$1.vue",
// "^up-(.*)": "uview-plus/components/up-$1/up-$1.vue",
// "^u-(.*)": "uview-plus/components/up-$1/up-$1.vue",
"^up-(.*)": "@/uni_modules/uview-plus/components/up-$1/up-$1.vue",
"^up-(.*)": "@/uni_modules/uview-plus/components/up-$1/up-$1.vue"
}
},
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ $up-button-square-border-top-right-radius: 3px !default;
$up-button-square-border-top-left-radius: 3px !default;
$up-button-square-border-bottom-left-radius: 3px !default;
$up-button-square-border-bottom-right-radius: 3px !default;
$up-button-icon-min-width: 1em !default;
$up-button-icon-min-width: 4px !default;
$up-button-plain-background-color: #fff !default;
$up-button-hairline-border-width: 0.5px !default;
$up-button-active-opacity:0.75 !default;
Expand Down Expand Up @@ -432,8 +432,8 @@ $up-button-active-opacity:0.75 !default;

&__icon {
min-width: $up-button-icon-min-width;
line-height: inherit !important;
vertical-align: top;
// line-height: inherit !important;
// vertical-align: top;
}

&--plain {
Expand Down
6 changes: 5 additions & 1 deletion src/uni_modules/uview-plus/components/up-button/vue.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ $up-button-plain-up-button-warning-color:$up-error;
left:$up-button-before-left;
width:$up-button-before-width;
height:$up-button-before-height;
/* #ifndef UNI-APP-X */
border: inherit;
border-radius: inherit;
/* #endif */
transform:$up-button-before-transform;
opacity:$up-button-before-opacity;
content: " ";
// content: " ";
background-color:$up-button-before-background-color;
border-color:$up-button-before-border-color;
}
Expand All @@ -44,7 +46,9 @@ $up-button-plain-up-button-warning-color:$up-error;
}
}

/* #ifndef UNI-APP-X */
&__icon+&__text:not(:empty),
/* #endif */
&__loading-text {
margin-left:$up-button-icon-margin-left;
}
Expand Down
3 changes: 0 additions & 3 deletions src/uni_modules/uview-plus/components/up-cell/up-cell.uvue
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,6 @@

&--disabled {
color: $up-cell-disabled-color;
/* #ifndef APP-NVUE */
cursor: not-allowed;
/* #endif */
}

&--center {
Expand Down
1 change: 0 additions & 1 deletion src/uni_modules/uview-plus/components/up-icon/up-icon.uvue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@

<style lang="scss" scoped>
@import "../../libs/css/components.scss";
@import "/static/iconfont/iconfont.css";

// 变量定义
$up-icon-primary: $up-primary !default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
* @event {Function} load 图片加载成功时触发
* @example <up-image width="100%" height="300px" :src="src"></up-image>
*/
import defProps from '../../libs/config/props'
export default {
name: 'up-image',
mixins: [mpMixin, mixin, propsImage],
Expand Down
2 changes: 1 addition & 1 deletion src/uni_modules/uview-plus/libs/mixin/button.uts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineMixin } from '../vue.uts'
import { defineMixin } from 'vue'

export const buttonMixin = defineMixin({
props: {
Expand Down
2 changes: 1 addition & 1 deletion src/uni_modules/uview-plus/libs/mixin/mixin.uts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineMixin } from '../vue.uts'
import { defineMixin } from 'vue'
import {
array as testArray
} from '../function/test.uts'
Expand Down
2 changes: 1 addition & 1 deletion src/uni_modules/uview-plus/libs/mixin/mpMixin.uts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineMixin } from '../vue.uts'
import { defineMixin } from 'vue'

export const mpMixin = defineMixin({
// #ifdef MP-WEIXIN
Expand Down
2 changes: 1 addition & 1 deletion src/uni_modules/uview-plus/libs/mixin/openType.uts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineMixin } from '../vue.uts'
import { defineMixin } from 'vue'

export const openType = defineMixin({
props: {
Expand Down
10 changes: 10 additions & 0 deletions uni-app-x/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/unpackage/dist/*
/unpackage/cache/*
/unpackage/release/*
/node_modules/*
/.idea/*
/dist/
deploy.sh
/.hbuilderx/
/*-lock.*
/stats.html
48 changes: 48 additions & 0 deletions uni-app-x/App.uvue
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<script lang="uts">
let firstBackTime = 0
import { loadFont } from '@/uni_modules/uview-plus/index.uts'
export default {
onLaunch: function () {
console.log('App Launch')
loadFont()
},
onShow: function () {
console.log('App Show')
},
onHide: function () {
console.log('App Hide')
},
// #ifdef APP-ANDROID
onLastPageBackPress: function () {
console.log('App LastPageBackPress')
if (firstBackTime == 0) {
uni.showToast({
title: '再按一次退出应用',
position: 'bottom',
})
firstBackTime = Date.now()
setTimeout(() => {
firstBackTime = 0
}, 2000)
} else if (Date.now() - firstBackTime < 2000) {
firstBackTime = Date.now()
uni.exit()
}
},
// #endif
onExit: function () {
console.log('App Exit')
},
}
</script>

<style> /* @import "@/uni_modules/uview-plus/index.scss"; @import "common/demo.scss"; */
/*每个页面公共css */
.uni-row {
flex-direction: row;
}

.uni-column {
flex-direction: column;
}
</style>
Expand Down
3 changes: 3 additions & 0 deletions uni-app-x/common/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const { http } = uni.$u
// 获取菜单
export const fetchMenu = (params, config = {}) => http.post('/ebapi/public_api/index', params, config)
1 change: 1 addition & 0 deletions uni-app-x/common/area.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions uni-app-x/common/city.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 586655a

Please sign in to comment.