flat: 合并, 报错修复
This commit is contained in:
@@ -372,7 +372,7 @@ const addressColumn = [
|
||||
},
|
||||
{
|
||||
value: '185',
|
||||
label: "绵竹市"
|
||||
label: "广汉市"
|
||||
},
|
||||
{
|
||||
value: '143',
|
||||
|
||||
@@ -414,8 +414,7 @@
|
||||
}
|
||||
},
|
||||
cityNamed() {
|
||||
console.log('val', this.info, this.area.dic)
|
||||
if (this.info && this.info.cityId !== -1 && this.area.dic) {
|
||||
if (this.info && typeof this.info.cityId !== 'undefined' && this.info.cityId !== -1 && this.area.dic) {
|
||||
return this.area.dic[this.info.cityId].label
|
||||
} else {
|
||||
return '无'
|
||||
|
||||
@@ -1,36 +1,18 @@
|
||||
<template>
|
||||
<view
|
||||
class="u-icon"
|
||||
@tap="clickHandler"
|
||||
:class="['u-icon--' + labelPos]"
|
||||
>
|
||||
<image
|
||||
class="u-icon__img"
|
||||
v-if="isImg"
|
||||
:src="name"
|
||||
:mode="imgMode"
|
||||
:style="[imgStyle, $u.addStyle(customStyle)]"
|
||||
></image>
|
||||
<text
|
||||
v-else
|
||||
class="u-icon__icon"
|
||||
:class="uClasses"
|
||||
:style="[iconStyle, $u.addStyle(customStyle)]"
|
||||
:hover-class="hoverClass"
|
||||
>{{icon}}</text>
|
||||
<view class="u-icon" @tap="clickHandler" :class="['u-icon--' + labelPos]">
|
||||
<image class="u-icon__img" v-if="isImg" :src="name" :mode="imgMode"
|
||||
:style="[imgStyle, $u.addStyle(customStyle)]"></image>
|
||||
<text v-else class="u-icon__icon" :class="uClasses" :style="[iconStyle, $u.addStyle(customStyle)]"
|
||||
:hover-class="hoverClass">{{icon}}</text>
|
||||
<!-- 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 -->
|
||||
<text
|
||||
v-if="label !== ''"
|
||||
class="u-icon__label"
|
||||
:style="{
|
||||
<text v-if="label !== ''" class="u-icon__label" :style="{
|
||||
color: labelColor,
|
||||
fontSize: $u.addUnit(labelSize),
|
||||
marginLeft: labelPos == 'right' ? $u.addUnit(space) : 0,
|
||||
marginTop: labelPos == 'bottom' ? $u.addUnit(space) : 0,
|
||||
marginRight: labelPos == 'left' ? $u.addUnit(space) : 0,
|
||||
marginBottom: labelPos == 'top' ? $u.addUnit(space) : 0,
|
||||
}"
|
||||
>{{ label }}</text>
|
||||
}">{{ label }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -84,7 +66,7 @@
|
||||
|
||||
}
|
||||
},
|
||||
mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
|
||||
mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
|
||||
computed: {
|
||||
uClasses() {
|
||||
let classes = []
|
||||
@@ -154,13 +136,13 @@
|
||||
$u-icon-info: $u-info !default;
|
||||
$u-icon-warning: $u-warning !default;
|
||||
$u-icon-error: $u-error !default;
|
||||
$u-icon-label-line-height:1 !default;
|
||||
$u-icon-label-line-height: 1 !default;
|
||||
|
||||
/* #ifndef APP-NVUE */
|
||||
// 非nvue下加载字体
|
||||
@font-face {
|
||||
font-family: 'uicon-iconfont';
|
||||
src: url('https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf') format('truetype');
|
||||
src: url('/static/font/font_2225171_8kdcwk4po24.ttf') format('truetype');
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
@@ -3,7 +3,7 @@ module.exports = {
|
||||
port: 1887,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://192.168.1.106:8000',
|
||||
target: 'http://10.165.0.173:8000',
|
||||
ws: true,
|
||||
pathRewrite: {
|
||||
'^/api': '/'
|
||||
|
||||
Reference in New Issue
Block a user