Commit 5d91e65e authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

# Conflicts:
#	pages.json
parents eb119c61 5db16318
......@@ -740,7 +740,13 @@
{
"path": "baomingorder" //报名订单
}, {
"path": "brand/list" //品牌列表
"path": "brand/list" ,//品牌列表
"style": {
"navigationStyle": "custom"
},
"globalStyle": {
"navigationStyle": "custom"
}
}, {
"path": "brand/detail" //品牌详情
// "enablePullDownRefresh": true,
......@@ -758,26 +764,32 @@
},
{
"path": "brand/detail_new" //品牌详情-新版
}, {
"path": "carrier/detail", //品牌列表
},{
"path": "carrier/detail_carrier", //新载体详情
"enablePullDownRefresh": true,
"style": {
"navigationStyle": "custom"
}
}, {
"path": "carrier/detail_carrier", //新载体详情
},{
"path": "carrier/detail_building", //楼宇信息
"enablePullDownRefresh": true,
"style": {
"navigationStyle": "custom"
}
},{
"path": "carrier/detail_building", //楼宇信息
}, {
"path": "carrier/detail", //品牌列表
"enablePullDownRefresh": true,
"style": {
"navigationStyle": "custom"
}
}, {
"path": "carrier/list" //品牌详情
"path": "carrier/list", //载体列表
"style": {
"navigationStyle": "custom"
},
"globalStyle": {
"navigationStyle": "custom"
}
}, {
"path": "identification" //身份识别
}, {
......@@ -817,13 +829,9 @@
}, {
"path": "signSuccse" //报名成功页面
},{
"path": "CarrierBuildingIndex" //载体楼宇首页
},{
"path": "CarrierBuilding/detail" //载体楼宇详情
},{
"path": "BrandEnterprise/list" //品牌服务首页
"path": "CarrierBuildingIndex" //载体首页
},{
"path": "BrandEnterprise/detail" //品牌服务详情
"path": "CarrierBuilding/detail" //载体详情
}
]
......
<template>
<view class="carrHeader">
<view class="carrHeaderBox">
<view class="carrHeader-left">
<!-- <view class="carrHeader-left-icon" @click="goBack">
<u-icon name="arrow-left" size="38" color="#000"></u-icon>
</view> -->
</view>
<view class="carrHeader-title">
<slot>{{title}}</slot>
</view>
</view>
</view>
</template>
<script>
export default {
props:['title'],
data() {
return {
}
},
mounted() {
},
methods:{
goBack(){
uni.navigateBack({delta:-1})
}
}
}
</script>
<style>
.carrHeader-title{
width: 100%;
position: relative;
left: 0;
right: 0;
text-align: center;
font-size: 32rpx;
}
.carrHeader-left{
position: absolute;
left: 32rpx;
}
.carrHeaderBox{
width: 100%;
height: 88rpx;
padding: 0 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
}
.carrHeader{
padding-top: 48rpx;
}
</style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -6,9 +6,9 @@
overflow: 'hidden',
}"
>
<view style="padding: 5px 10px">
<u-search
:placeholder="`搜索${msg.BuildingCarrierType==1?'载体':'楼宇'}名称`"
<view class="carrierSearch" style="padding: 5px 10px">
<!-- <u-search
:placeholder="`搜索载体名称`"
:focus="false"
:show-action="false"
:clearabled="true"
......@@ -17,7 +17,14 @@
@search="searchHandler"
@custom="searchHandler"
bg-color="#FFF"
></u-search>
></u-search> -->
<view class="carrierSearch-left">
<text>全部首店</text>
<u-icon name="arrow-down" size="28" :color="mainColor"></u-icon>
</view>
<view>
<input v-model="msg.CarrierName" :placeholder="`请输入载体名称`"></input>
</view>
</view>
<view style="display: flex; align-items: center">
<view style="flex: 1; overflow: hidden">
......@@ -166,7 +173,7 @@
MetroNum: "",//地铁路线
Developers: "",//开发商
OpeningStatus: 1,//开业状态0即将开业1-已开业
// FirstStoreTest: "",//首店试验场0否1-是
IsChengDu: -1,//首店类型 1成都 0宜宾
},
loadText: {
loadmore: "轻轻上拉,加载更多",
......@@ -178,6 +185,20 @@
g: [],
contentHeight: 0,
PrizeList: [], //首店年份列表
ShopTypeList: [
{
text: '全部',
value: 1
},
{
text: '成都首店',
value: 1
},
{
text: '宜宾商载通',
value: 2
},
],
};
},
onShareTimeline() {
......@@ -400,7 +421,20 @@
};
</script>
<style>
<style>
.carrierSearch-left text{
margin-right: 10px;
font-size: 28rpx;
}
.carrierSearch-left{
display: flex;
flex-direction: row;
align-items: center;
}
.carrierSearch{
display: flex;
flex-direction: row;
}
.good_study_two {
position: relative;
margin-bottom: 12px;
......@@ -597,4 +631,3 @@
font-weight: 500;
}
</style>
\ No newline at end of file
<template>
<u-row gutter="24">
<u-col span="6" v-for="(x, i) in g" :key="i">
<view
class="good_study_two"
@click="openGood(x.ID)"
:style="{ borderRadius: '20rpx' }"
>
<view class="img-box">
<view class="img-show">
<image
style="
width: 100%;
height: 100%;
border-radius: 20rpx 20rpx 0 0;
"
mode="aspectFill"
:src="x.BannerList[0]"
/>
</view>
</view>
<view class="good-info">
<view class="good-name">{{ x.BrandName }}</view>
<view class="good-price-info">
<span class="price">{{ x.CategoryName }}</span>
</view>
</view>
</view>
</u-col>
</u-row>
</template>
<script>
export default {
props:['g'],
data() {
return {
replace: null
}
},
onLoad(options) {
},
mounted() {
let uid = uni.getStorageSync("mall_UserInfo")
this.replace = uni.getStorageSync('replace_page_index')
},
methods:{
openGood(id) {
return
if(this.replace.state=='1'){
uni.navigateTo({
url: "/pages/kotra/brand/detail?id=" + id,
});
}else{
}
},
}
}
</script>
\ No newline at end of file
......@@ -6,78 +6,116 @@
overflow: 'hidden',
}"
>
<view style="padding: 5px 10px">
<u-search
placeholder="搜索品牌名称"
:focus="false"
:show-action="false"
:clearabled="true"
radius="40"
v-model="msg.BrandName"
@search="searchHandler"
@custom="searchHandler"
bg-color="#FFF"
></u-search>
</view>
<view style="display: flex; align-items: center">
<view style="flex: 1; overflow: hidden">
<u-tabs
bg-color="#f6f6f6"
:is-scroll="true"
name="ClassName"
:list="typeList"
:active-color="mainColor"
:current="active"
@change="changeHandler"
:show-bar="true"
:activeFontSize="34"
:bold="true"
height="100"
duration="0"
font-size="28"
></u-tabs>
<view class="brandHeadBgBox"
:style="{'background': TenantId!=18?`linear-gradient(-3deg, #eff8ff, #c6e6ff)`:''}">
<headers :title="replace.state=='1'?'品牌列表':'企业列表'"></headers>
<view v-if="TenantId==18" style="padding: 5px 10px">
<u-search
placeholder="搜索品牌名称"
:focus="false"
:show-action="false"
:clearabled="true"
radius="40"
v-model="msg.BrandName"
@search="searchHandler"
@custom="searchHandler"
bg-color="#FFF"
></u-search>
</view>
<!-- <div style="width: 64rpx;height: 48rpx;display: table-cell; vertical-align: middle;text-align: right;">
<u-icon name="filter-o" color="#111" size="42"></u-icon>
</div> -->
</view>
<view class="carrierScreen" >
<view
class="statusBox"
v-if="msg.IsInChengdu == 0"
@click="changeFirstStoreTest(-1)"
>
未在成都落地
</view>
<view
class="statusBox2"
v-if="msg.IsInChengdu == -1"
@click="changeFirstStoreTest(0)"
>
未在成都落地
</view>
</view>
<view class="screenBox" v-if="PrizeList.length > 0">
<view
v-for="(item, index) in PrizeList"
:key="index"
class="screenBoxItem"
@click="chooseYear(item)"
>
<view v-else class="brandSearch" style="padding: 5px 10px;margin-top: 6rpx;">
<view class="brandSearch-right">
<input v-model="msg.BrandName"
:placeholder="`搜索${replace.state=='1'?'品牌':'企业'}名称`"
@input="ResetQuery"></input>
</view>
</view>
<template v-if="TenantId==18">
<view style="display: flex; align-items: center">
<view style="flex: 1; overflow: hidden">
<u-tabs
bg-color="#f6f6f6"
:is-scroll="true"
name="ClassName"
:list="typeList"
:active-color="mainColor"
:current="active"
@change="changeHandler"
:show-bar="true"
:activeFontSize="34"
:bold="true"
height="100"
duration="0"
font-size="28"
></u-tabs>
</view>
<!-- <div style="width: 64rpx;height: 48rpx;display: table-cell; vertical-align: middle;text-align: right;">
<u-icon name="filter-o" color="#111" size="42"></u-icon>
</div> -->
</view>
<view class="brandScreen" >
<view
class="screenBoxItemYear"
:class="{ activeYear: item.Id == msg.PrizeId }"
>{{ item.YearInfo }}</view
><view
class="screenBoxItemName"
:class="{ activeName: item.Id == msg.PrizeId }"
>{{ item.Name }}</view
class="statusBox"
v-if="msg.IsInChengdu == 0"
@click="changeFirstStoreTest(-1)"
>
未在成都落地
</view>
<view
class="statusBox2"
v-if="msg.IsInChengdu == -1"
@click="changeFirstStoreTest(0)"
>
未在成都落地
</view>
</view>
<view class="screenBox" v-if="PrizeList.length > 0">
<view
v-for="(item, index) in PrizeList"
:key="index"
class="screenBoxItem"
@click="chooseYear(item)"
>
<view
class="screenBoxItemYear"
:class="{ activeYear: item.Id == msg.PrizeId }"
>{{ item.YearInfo }}</view
><view
class="screenBoxItemName"
:class="{ activeName: item.Id == msg.PrizeId }"
>{{ item.Name }}</view
>
</view>
</view>
</template>
<view v-else style="display: flex; align-items: center;padding: 28rpx 0;">
<view style="flex: 1; overflow: hidden;padding-left: 32rpx;"
class="brandTabBox">
<u-tabs
bg-color="none"
:is-scroll="true"
name="ClassName"
:list="typeList"
:active-color="mainColor"
inactive-color="#000000"
:active-item-style="activeItemStyleBrand"
:current="active"
@change="changeHandler"
:show-bar="false"
:activeFontSize="23"
:bold="true"
height="45"
duration="0"
font-size="23"
gutter="29"
></u-tabs>
</view>
</view>
</view>
<u-empty v-if="g.length == 0" text="暂无内容" mode="list"></u-empty>
<view
style="height: calc(100% - 127px); padding: 2px 10px"
style="height: calc(100% - 192px); padding: 2px 10px"
v-if="g.length > 0"
>
<scroll-view
......@@ -85,9 +123,9 @@
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
style="height: 100%; padding-bottom: 0px"
style="height: 100%; padding-bottom: 0px;padding-top: 20rpx;"
>
<u-row gutter="24">
<u-row v-if="TenantId==18" gutter="24">
<u-col span="6" v-for="(x, i) in g" :key="i">
<view
class="good_study_two"
......@@ -124,6 +162,9 @@
</u-col>
</u-row>
<template v-else>
<brandComponent v-if="g&&g.length>0" :g="g"></brandComponent>
</template>
<u-loadmore
:status="status"
:load-text="loadText"
......@@ -143,10 +184,14 @@
<script>
import auth from "@/components/auth/index.vue";
import tabbars from "@/components/tabbar/index";
import headers from "@/pages/components/header";
import brandComponent from "./brandComponent";
export default {
components: {
tabbars,
auth
auth,
headers,
brandComponent
},
data() {
return {
......@@ -171,7 +216,8 @@ export default {
XinFeng: -1,
BrandClassId: 0,
PrizeId: 0, //
IsInChengdu:-1,//是否已在成都落地
IsInChengdu:-1,//是否已在成都落地
BrandEnterpriseType:null,
},
loadText: {
loadmore: "轻轻上拉,加载更多",
......@@ -183,6 +229,21 @@ export default {
g: [],
contentHeight: 0,
PrizeList: [], //首店年份列表
activeItemStyleBrand:{
"font-size": "23rpx",
"font-family": "PingFang SC",
"font-weight": "Bold",
color: "#017EDF",
"border": "1rpx solid #017EDF",
"border-radius": "10rpx",
"height": "50rpx",
"line-height": "45rpx",
"padding": "0 22rpx",
"background": "#FFF"
},
TenantId: 18,
replace: null,
secondary: null,
};
},
onShareTimeline() {
......@@ -244,6 +305,11 @@ export default {
};
},
onLoad(options) {
let uid = uni.getStorageSync("mall_UserInfo")
this.TenantId = uid.TenantId
this.replace = uni.getStorageSync('replace_page_index')
this.msg.BrandEnterpriseType = this.replace.state=='1'?1:2
if (options && options.id) {
this.msg.BrandClassId = options.id;
}
......@@ -284,10 +350,14 @@ export default {
this.showAuth = false
},
GetBrandClassList() {
let BrandCategory = ''
if(this.TenantId!=18) BrandCategory = this.replace.state=='1' ? 3 : 4
this.request2(
{
url: "/api/AppletTrade/GetBrandClassList",
data: {},
data: {
BrandCategory
},
},
(res) => {
if (res.resultCode == 1) {
......@@ -313,10 +383,20 @@ export default {
);
this.init();
},
ResetQuery(){
this.g = []
this.msg.pageIndex=1
this.init()
},
init() {
let url = "/api/AppletTrade/GetBrandPageList"
if(this.TenantId!=18&&this.replace.state){
if(this.replace.state=='1') url = "/api/AppletTrade/GetBrandEnterprisePageList"
else url = "/api/AppletTrade/GetEnterpriseServicesPageList"
}
this.request2(
{
url: "/api/AppletTrade/GetBrandPageList",
url: url,
data: this.msg,
},
(res) => {
......@@ -401,6 +481,24 @@ export default {
</script>
<style>
.brandSearch-right>input::placeholder{
color: #95AAB9;
}
.brandSearch-right{
font-size: 27rpx;
font-weight: 100;
}
.brandSearch{
height: 76rpx;
display: flex;
flex-direction: row;
align-items: center;
z-index: 101;
margin: 0 32rpx;
background: #EEF7FF;
border-radius: 18rpx;
position: relative;
}
.good_study_two {
position: relative;
margin-bottom: 12px;
......@@ -560,7 +658,7 @@ export default {
top: 0;
left: 0;
}
.carrierScreen {
.brandScreen {
height: 50rpx;
margin: 20rpx 0;
display: flex;
......
<template>
<view>
<view v-for="(item, index) in dataList" :key="index">
<div
class="good_study_one"
@click="openGood(item.ID, item.CategoryName)"
:style="{
borderRadius: '15px',
}"
>
<view class="carriertag" v-if="item.IsChengDu||item.IsChengDu>=0">
<view class="carriertagsub1">{{item.IsChengDu?'成都':'宜宾'}}</view>
</view>
<view class="img-box">
<view class="img-show">
<image
style="
width: 100%;
height: 100%;
border-radius: 10rpx 10rpx 0 0;
"
mode="aspectFill"
:src="item.BannerList[0]"
/>
</view>
</view>
<div class="good-info">
<div class="good-name">
<div class="span-name" style="display: flex">
<div class="span-name-sub">{{ item.CarrierName }}</div>
</div>
<div class="span-type">
{{ item.CategoryName }}
<text
v-if="item.OpeningStatus == 0"
style="
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #f70027;
margin-left: 10rpx;
"
>即将开业</text
>
<text
v-if="item.OpeningStatus == 1"
style="
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
margin-left: 10rpx;
"
>已开业</text
>
</div>
</div>
<div class="good-price-info">
<u-icon name="location" color="#999" size="24"></u-icon>
<span class="price" style="margin-left: 5px">{{
item.Address
}}</span>
</div>
</div>
</div>
</view>
</view>
</template>
<script>
export default {
props:['dataList'],
data() {
return {
replace: null
}
},
onLoad(options) {
},
mounted() {
let uid = uni.getStorageSync("mall_UserInfo")
this.replace = uni.getStorageSync('replace_page_index')
},
methods:{
openGood(id, type) {
if(this.replace.state=='1'){
uni.navigateTo({
url: "/pages/kotra/carrier/detail_carrier?id=" + id + "&&type=" + type,
});
}else{
uni.navigateTo({
url: "/pages/kotra/carrier/detail_building?id=" + id + "&&type=" + type,
});
}
},
}
}
</script>
\ No newline at end of file
This diff is collapsed.
## 1.0.2(2024-09-21)
- 新增 clearAble属性
## 1.0.1(2021-11-23)
- 优化 label、label-width 属性
## 1.0.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-combox](https://uniapp.dcloud.io/component/uniui/uni-combox)
## 0.1.0(2021-07-30)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 0.0.6(2021-05-12)
- 新增 组件示例地址
## 0.0.5(2021-04-21)
- 优化 添加依赖 uni-icons, 导入后自动下载依赖
## 0.0.4(2021-02-05)
- 优化 组件引用关系,通过uni_modules引用组件
## 0.0.3(2021-02-04)
- 调整为uni_modules目录规范
<template>
<view class="uni-combox" :class="border ? '' : 'uni-combox__no-border'">
<view v-if="label" class="uni-combox__label" :style="labelStyle">
<text>{{label}}</text>
</view>
<view class="uni-combox__input-box">
<input class="uni-combox__input" type="text" :placeholder="placeholder" placeholder-class="uni-combox__input-plac"
v-model="inputVal" @input="onInput" @focus="onFocus" @blur="onBlur" />
<uni-icons v-if="!inputVal || !clearAble" :type="showSelector? 'top' : 'bottom'" size="14" color="#999" @click="toggleSelector">
</uni-icons>
<uni-icons v-if="inputVal && clearAble" type="clear" size="24" color="#999" @click="clean">
</uni-icons>
</view>
<view class="uni-combox__selector" v-if="showSelector">
<view class="uni-popper__arrow"></view>
<scroll-view scroll-y="true" class="uni-combox__selector-scroll">
<view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0">
<text>{{emptyTips}}</text>
</view>
<view class="uni-combox__selector-item" v-for="(item,index) in filterCandidates" :key="index"
@click="onSelectorClick(index)">
<text>{{item}}</text>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
/**
* Combox 组合输入框
* @description 组合输入框一般用于既可以输入也可以选择的场景
* @tutorial https://ext.dcloud.net.cn/plugin?id=1261
* @property {String} label 左侧文字
* @property {String} labelWidth 左侧内容宽度
* @property {String} placeholder 输入框占位符
* @property {Array} candidates 候选项列表
* @property {String} emptyTips 筛选结果为空时显示的文字
* @property {String} value 组合框的值
*/
export default {
name: 'uniCombox',
emits: ['input', 'update:modelValue'],
props: {
clearAble: {
type: Boolean,
default: false
},
border: {
type: Boolean,
default: true
},
label: {
type: String,
default: ''
},
labelWidth: {
type: String,
default: 'auto'
},
placeholder: {
type: String,
default: ''
},
candidates: {
type: Array,
default () {
return []
}
},
emptyTips: {
type: String,
default: '无匹配项'
},
// #ifndef VUE3
value: {
type: [String, Number],
default: ''
},
// #endif
// #ifdef VUE3
modelValue: {
type: [String, Number],
default: ''
},
// #endif
},
data() {
return {
showSelector: false,
inputVal: ''
}
},
computed: {
labelStyle() {
if (this.labelWidth === 'auto') {
return ""
}
return `width: ${this.labelWidth}`
},
filterCandidates() {
return this.candidates.filter((item) => {
return item.toString().indexOf(this.inputVal) > -1
})
},
filterCandidatesLength() {
return this.filterCandidates.length
}
},
watch: {
// #ifndef VUE3
value: {
handler(newVal) {
this.inputVal = newVal
},
immediate: true
},
// #endif
// #ifdef VUE3
modelValue: {
handler(newVal) {
this.inputVal = newVal
},
immediate: true
},
// #endif
},
methods: {
toggleSelector() {
this.showSelector = !this.showSelector
},
onFocus() {
this.showSelector = true
},
onBlur() {
setTimeout(() => {
this.showSelector = false
}, 153)
},
onSelectorClick(index) {
this.inputVal = this.filterCandidates[index]
this.showSelector = false
this.$emit('input', this.inputVal)
this.$emit('update:modelValue', this.inputVal)
},
onInput() {
setTimeout(() => {
this.$emit('input', this.inputVal)
this.$emit('update:modelValue', this.inputVal)
})
},
clean() {
this.inputVal = ''
this.onInput()
}
}
}
</script>
<style lang="scss" scoped>
.uni-combox {
font-size: 14px;
border: 1px solid #DCDFE6;
border-radius: 4px;
padding: 6px 10px;
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
// height: 40px;
flex-direction: row;
align-items: center;
// border-bottom: solid 1px #DDDDDD;
}
.uni-combox__label {
font-size: 16px;
line-height: 22px;
padding-right: 10px;
color: #999999;
}
.uni-combox__input-box {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: row;
align-items: center;
}
.uni-combox__input {
flex: 1;
font-size: 14px;
height: 22px;
line-height: 22px;
}
.uni-combox__input-plac {
font-size: 14px;
color: #999;
}
.uni-combox__selector {
/* #ifndef APP-NVUE */
box-sizing: border-box;
/* #endif */
position: absolute;
top: calc(100% + 12px);
left: 0;
width: 100%;
background-color: #FFFFFF;
border: 1px solid #EBEEF5;
border-radius: 6px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
z-index: 2;
padding: 4px 0;
}
.uni-combox__selector-scroll {
/* #ifndef APP-NVUE */
max-height: 200px;
box-sizing: border-box;
/* #endif */
}
.uni-combox__selector-empty,
.uni-combox__selector-item {
/* #ifndef APP-NVUE */
display: flex;
cursor: pointer;
/* #endif */
line-height: 36px;
font-size: 14px;
text-align: center;
// border-bottom: solid 1px #DDDDDD;
padding: 0px 10px;
}
.uni-combox__selector-item:hover {
background-color: #f9f9f9;
}
.uni-combox__selector-empty:last-child,
.uni-combox__selector-item:last-child {
/* #ifndef APP-NVUE */
border-bottom: none;
/* #endif */
}
// picker 弹出层通用的指示小三角
.uni-popper__arrow,
.uni-popper__arrow::after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 6px;
}
.uni-popper__arrow {
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
top: -6px;
left: 10%;
margin-right: 3px;
border-top-width: 0;
border-bottom-color: #EBEEF5;
}
.uni-popper__arrow::after {
content: " ";
top: 1px;
margin-left: -6px;
border-top-width: 0;
border-bottom-color: #fff;
}
.uni-combox__no-border {
border: none;
}
</style>
{
"id": "uni-combox",
"displayName": "uni-combox 组合框",
"version": "1.0.2",
"description": "可以选择也可以输入的表单项 ",
"keywords": [
"uni-ui",
"uniui",
"combox",
"组合框",
"select"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": [
"uni-scss",
"uni-icons"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "n"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}
## Combox 组合框
> **组件名:uni-combox**
> 代码块: `uCombox`
组合框组件。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-combox)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
## 1.0.8(2024-03-28)
- 修复 在vue2下:style动态绑定导致编译失败的bug
## 1.0.7(2024-01-20)
- 修复 长文本回显超过容器的bug,超过容器部分显示省略号
## 1.0.6(2023-04-12)
- 修复 微信小程序点击时会改变背景颜色的 bug
## 1.0.5(2023-02-03)
- 修复 禁用时会显示清空按钮
## 1.0.4(2023-02-02)
- 优化 查询条件短期内多次变更只查询最后一次变更后的结果
- 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue
## 1.0.3(2023-01-16)
- 修复 不关联服务空间报错的问题
## 1.0.2(2023-01-14)
- 新增 属性 `format` 可用于格式化显示选项内容
## 1.0.1(2022-12-06)
- 修复 当where变化时,数据不会自动更新的问题
## 0.1.9(2022-09-05)
- 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框
## 0.1.8(2022-08-29)
- 修复 点击的位置不准确
## 0.1.7(2022-08-12)
- 新增 支持 disabled 属性
## 0.1.6(2022-07-06)
- 修复 pc端宽度异常的bug
## 0.1.5
- 修复 pc端宽度异常的bug
## 0.1.4(2022-07-05)
- 优化 显示样式
## 0.1.3(2022-06-02)
- 修复 localdata 赋值不生效的 bug
- 新增 支持 uni.scss 修改颜色
- 新增 支持选项禁用(数据选项设置 disabled: true 即禁用)
## 0.1.2(2022-05-08)
- 修复 当 value 为 0 时选择不生效的 bug
## 0.1.1(2022-05-07)
- 新增 记住上次的选项(仅 collection 存在时有效)
## 0.1.0(2022-04-22)
- 初始化
{
"id": "uni-data-select",
"displayName": "uni-data-select 下拉框选择器",
"version": "1.0.8",
"description": "通过数据驱动的下拉框选择器",
"keywords": [
"uni-ui",
"select",
"uni-data-select",
"下拉框",
"下拉选"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "^3.1.1"
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": ["uni-load-more"],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"App": {
"app-vue": "u",
"app-nvue": "n"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}
## DataSelect 下拉框选择器
> **组件名:uni-data-select**
> 代码块: `uDataSelect`
当选项过多时,使用下拉菜单展示并选择内容
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-select)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
## 2.0.10(2024-06-07)
- 优化 uni-app x 中,size 属性的类型
## 2.0.9(2024-01-12)
fix: 修复图标大小默认值错误的问题
## 2.0.8(2023-12-14)
- 修复 项目未使用 ts 情况下,打包报错的bug
## 2.0.7(2023-12-14)
- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug
## 2.0.6(2023-12-11)
- 优化 兼容老版本icon类型,如 top ,bottom 等
## 2.0.5(2023-12-11)
- 优化 兼容老版本icon类型,如 top ,bottom 等
## 2.0.4(2023-12-06)
- 优化 uni-app x 下示例项目图标排序
## 2.0.3(2023-12-06)
- 修复 nvue下引入组件报错的bug
## 2.0.2(2023-12-05)
-优化 size 属性支持单位
## 2.0.1(2023-12-05)
- 新增 uni-app x 支持定义图标
## 1.3.5(2022-01-24)
- 优化 size 属性可以传入不带单位的字符串数值
## 1.3.4(2022-01-24)
......
<template>
<text class="uni-icons" :style="styleObj">
<slot>{{unicode}}</slot>
</text>
</template>
<script>
import { fontData, IconsDataItem } from './uniicons_file'
/**
* Icons 图标
* @description 用于展示 icon 图标
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
* @property {Number,String} size 图标大小
* @property {String} type 图标图案,参考示例
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @event {Function} click 点击 Icon 触发事件
*/
export default {
name: "uni-icons",
props: {
type: {
type: String,
default: ''
},
color: {
type: String,
default: '#333333'
},
size: {
type: [Number, String],
default: 16
},
fontFamily: {
type: String,
default: ''
}
},
data() {
return {};
},
computed: {
unicode() : string {
let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
if (codes !== null) {
return codes.unicode
}
return ''
},
iconSize() : string {
const size = this.size
if (typeof size == 'string') {
const reg = /^[0-9]*$/g
return reg.test(size as string) ? '' + size + 'px' : '' + size;
// return '' + this.size
}
return this.getFontSize(size as number)
},
styleObj() : UTSJSONObject {
if (this.fontFamily !== '') {
return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
}
return { color: this.color, fontSize: this.iconSize }
}
},
created() { },
methods: {
/**
* 字体大小
*/
getFontSize(size : number) : string {
return size + 'px';
},
},
}
</script>
<style scoped>
@font-face {
font-family: UniIconsFontFamily;
src: url('./uniicons.ttf');
}
.uni-icons {
font-family: UniIconsFontFamily;
font-size: 18px;
font-style: normal;
color: #333;
}
</style>
<template>
<!-- #ifdef APP-NVUE -->
<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text>
<text :style="styleObj" class="uni-icons" @click="_onClick">{{unicode}}</text>
<!-- #endif -->
<!-- #ifndef APP-NVUE -->
<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text>
<text :style="styleObj" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
<slot></slot>
</text>
<!-- #endif -->
</template>
<script>
import icons from './icons.js';
import { fontData } from './uniicons_file_vue.js';
const getVal = (val) => {
const reg = /^[0-9]*$/g
return (typeof val === 'number' || reg.test(val) )? val + 'px' : val;
}
return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;
}
// #ifdef APP-NVUE
var domModule = weex.requireModule('dom');
import iconUrl from './uniicons.ttf'
domModule.addRule('fontFace', {
'fontFamily': "uniicons",
'src': "url('"+iconUrl+"')"
'src': "url('" + iconUrl + "')"
});
// #endif
......@@ -34,7 +38,7 @@
*/
export default {
name: 'UniIcons',
emits:['click'],
emits: ['click'],
props: {
type: {
type: String,
......@@ -48,26 +52,36 @@
type: [Number, String],
default: 16
},
customPrefix:{
customPrefix: {
type: String,
default: ''
},
fontFamily: {
type: String,
default: ''
}
},
data() {
return {
icons: icons.glyphs
icons: fontData
}
},
computed:{
unicode(){
let code = this.icons.find(v=>v.font_class === this.type)
if(code){
return unescape(`%u${code.unicode}`)
computed: {
unicode() {
let code = this.icons.find(v => v.font_class === this.type)
if (code) {
return code.unicode
}
return ''
},
iconSize(){
iconSize() {
return getVal(this.size)
},
styleObj() {
if (this.fontFamily !== '') {
return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`
}
return `color: ${this.color}; font-size: ${this.iconSize};`
}
},
methods: {
......@@ -81,9 +95,10 @@
<style lang="scss">
/* #ifndef APP-NVUE */
@import './uniicons.css';
@font-face {
font-family: uniicons;
src: url('./uniicons.ttf') format('truetype');
src: url('./uniicons.ttf');
}
/* #endif */
......@@ -92,5 +107,4 @@
text-decoration: none;
text-align: center;
}
</style>
.uniui-cart-filled:before {
content: "\e6d0";
}
.uniui-gift-filled:before {
content: "\e6c4";
}
.uniui-color:before {
content: "\e6cf";
}
......@@ -58,10 +67,6 @@
content: "\e6c3";
}
.uniui-gift-filled:before {
content: "\e6c4";
}
.uniui-fire-filled:before {
content: "\e6c5";
}
......@@ -82,6 +87,18 @@
content: "\e698";
}
.uniui-arrowthinleft:before {
content: "\e6d2";
}
.uniui-arrowthinup:before {
content: "\e6d3";
}
.uniui-arrowthindown:before {
content: "\e6d4";
}
.uniui-back:before {
content: "\e6b9";
}
......@@ -94,55 +111,43 @@
content: "\e6bb";
}
.uniui-arrowthinright:before {
content: "\e6bb";
}
.uniui-arrow-left:before {
content: "\e6bc";
}
.uniui-arrowthinleft:before {
content: "\e6bc";
}
.uniui-arrow-up:before {
content: "\e6bd";
}
.uniui-arrowthinup:before {
content: "\e6bd";
}
.uniui-arrow-down:before {
content: "\e6be";
}
.uniui-arrowthindown:before {
content: "\e6be";
.uniui-arrowthinright:before {
content: "\e6d1";
}
.uniui-bottom:before {
.uniui-down:before {
content: "\e6b8";
}
.uniui-arrowdown:before {
.uniui-bottom:before {
content: "\e6b8";
}
.uniui-right:before {
content: "\e6b5";
.uniui-arrowright:before {
content: "\e6d5";
}
.uniui-arrowright:before {
.uniui-right:before {
content: "\e6b5";
}
.uniui-top:before {
.uniui-up:before {
content: "\e6b6";
}
.uniui-arrowup:before {
.uniui-top:before {
content: "\e6b6";
}
......@@ -150,8 +155,8 @@
content: "\e6b7";
}
.uniui-arrowleft:before {
content: "\e6b7";
.uniui-arrowup:before {
content: "\e6d6";
}
.uniui-eye:before {
......@@ -638,10 +643,6 @@
content: "\e627";
}
.uniui-cart-filled:before {
content: "\e629";
}
.uniui-checkbox:before {
content: "\e62b";
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment