Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uview-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李晖
uview-ui
Commits
82db6570
Commit
82db6570
authored
Aug 25, 2020
by
wlxuqu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nvue调整
parent
6da64e23
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
133 deletions
+3
-133
page-nav.vue
components/page-nav/page-nav.vue
+3
-5
manifest.json
manifest.json
+0
-4
index.nvue
pages/componentsC/test/index.nvue
+0
-52
components.nvue
pages/example/components.nvue
+0
-72
No files found.
components/page-nav/page-nav.vue
View file @
82db6570
...
...
@@ -46,7 +46,6 @@
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"@/uview-ui/libs/css/style.components.scss"
;
.nav-wrap
{
padding
:
30rpx
;
position
:
relative
;
...
...
@@ -59,8 +58,7 @@
}
.nav-title
{
@include
vue-flex
;
flex-direction
:
row
;
display
:
flex
;
align-items
:
center
;
}
...
...
@@ -69,7 +67,7 @@
}
.nav-title__text
{
@include
vue-
flex
;
display
:
flex
;
color
:
$u-main-color
;
font-size
:
50rpx
;
font-weight
:
bold
;
...
...
manifest.json
View file @
82db6570
...
...
@@ -6,10 +6,6 @@
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"app-plus"
:
{
//
定义nvue页面的flex布局默认为row排列
"nvue "
:
{
"flex-direction"
:
"row"
},
//
APP-VUE分包,可提APP升启动速度,
2.7
.
12
开始支持,兼容微信小程序分包方案,默认关闭
"optimization"
:
{
"subPackages"
:
true
...
...
pages/componentsC/test/index.nvue
deleted
100644 → 0
View file @
6da64e23
<template>
<view class="">
<u-dropdown ref="uDropdown" @open="open" @close="close">
<u-dropdown-item v-model="value1" title="距离" :options="options1" @change="change"></u-dropdown-item>
<u-dropdown-item v-model="value2" title="温度" :options="options2"></u-dropdown-item>
</u-dropdown>
</view>
</template>
<script>
export default {
data() {
return {
value1: 1,
value2: 2,
options1: [{
label: '默认排序',
value: 1,
},
{
label: '距离优先',
value: 2,
}
],
options2: [{
label: '去冰',
value: 1,
},
{
label: '加冰',
value: 2,
},
],
}
},
methods: {
open(index) {
// 展开某个下来菜单时,先关闭原来的其他菜单高亮
// 同时内部会自动给当前展开项进行高亮
this.$refs.uDropdown.highlight();
},
close(index) {
// 关闭的时候,给当前项加上高亮
// 当然,您也可以通过监听dropdown-item的@change事件进行处理
this.$refs.uDropdown.highlight(index);
},
change() {
// 更多的细节,请自行实现
}
}
}
</script>
\ No newline at end of file
pages/example/components.nvue
deleted
100644 → 0
View file @
6da64e23
<template>
<view class="wrap">
<page-nav :desc="desc" title="nav.components"></page-nav>
<view class="list-wrap">
<u-cell-group title-bg-color="rgb(243, 244, 246)" :title="getGroupTitle(item)" v-for="(item, index) in list" :key="index">
<u-cell-item :titleStyle="{fontWeight: 500}" @click="openPage(item1.path)" :title="getFieldTitle(item1)"
v-for="(item1, index1) in item.list" :key="index1">
<image slot="icon" class="u-cell-icon" :src="getIcon(item1.icon)" mode="widthFix"></image>
</u-cell-item>
</u-cell-group>
</view>
<u-gap height="70"></u-gap>
<u-tabbar :list="vuex_tabbar" :mid-button="true"></u-tabbar>
</view>
</template>
<script>
import list from "./components.config.js";
export default {
data() {
return {
list: list,
//desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
}
},
computed: {
getIcon() {
return path => {
return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
}
},
desc() {
return this.$t('components.desc');
}
},
onShow() {
uni.setNavigationBarTitle({
title: this.$t('nav.components')
});
},
created() {
},
methods: {
openPage(path) {
this.$u.route({
url: path
})
},
getGroupTitle(item) {
return this.$i18n.locale == 'zh' ? item.groupName : item.groupName_en
},
getFieldTitle(item) {
return this.$i18n.locale == 'zh' ? item.title : item.title_en
}
}
}
</script>
<style>
/* page {
background-color: rgb(240, 242, 244);
} */
</style>
<style lang="scss" scoped>
.u-cell-icon {
width: 36rpx;
height: 36rpx;
margin-right: 8rpx;
}
</style>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment