Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
wen-gang committed Nov 15, 2021
1 parent 32ca82d commit 3203a72
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 54 deletions.
6 changes: 3 additions & 3 deletions pages/login/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
</block>
<block v-if="tabCur == 1">
<ui-form ui="ui-BG mt-4">
<ui-form-group><ui-input v-model="login.phone" placeholder="手机号" ></ui-input></ui-form-group>
<ui-form-group>
<ui-input v-model="login.code" placeholder="验证码" ></ui-input>
<ui-form-group icon="cicon-mobile text-gray"><ui-input v-model="login.phone" placeholder="手机号" ></ui-input></ui-form-group>
<ui-form-group icon="cicon-numcode text-gray">
<ui-input v-model="login.code" placeholder="验证码"></ui-input>
<block slot="action"><button class="ui-btn bg-blue-gradient">发送验证码</button></block>
</ui-form-group>
</ui-form>
Expand Down
6 changes: 1 addition & 5 deletions ui/components/ui-avatar/ui-avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
export default {
name: 'UiAvatar',
data() {
return {
slots: {}
return {
};
},
props: {
Expand Down Expand Up @@ -66,9 +65,6 @@ export default {
return false;
}
},
mounted() {
this.slots = this.$scopedSlots;
},
methods: {}
};
</script>
Expand Down
13 changes: 4 additions & 9 deletions ui/components/ui-card/ui-card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<image :src="img" class="ui-card-image" :style="[{position:imgHeight=='auto'?'relative':'absolute'}]" :mode="imgHeight=='auto'?'widthFix':'aspectFill'"></image>
<view class="text-cut text-lg text-bold ui-card-fixedTitle bg-mask-bottom" v-if="title && fixedTitle">
<view class="">
<text v-if="!slots.title">{{ title }}</text>
<text v-if="!$scopedSlots.title">{{ title }}</text>
<slot name="title"></slot>
</view>
</view>
<view class="ui-card-tag" v-if="slots.tag">
<view class="ui-card-tag" v-if="$scopedSlots.tag">
<slot name="tag"></slot>
</view>
</view>
<view class="ui-card-content">
<view class="text-cut text-lg text-bold ui-card-title" v-if="title && !fixedTitle">
<text v-if="!slots.title">{{ title }}</text>
<text v-if="!$scopedSlots.title">{{ title }}</text>
<slot name="title"></slot>
</view>
<view class="ui-TC-3 mt-2 text-linecut-2 ui-card-desc" v-if="desc">{{ desc }}</view>
Expand All @@ -28,8 +28,7 @@
export default {
name: 'UiCard',
data() {
return {
slots: {}
return {
};
},
props: {
Expand All @@ -56,10 +55,6 @@ export default {
type: String
},
},
mounted() {
this.slots = this.$scopedSlots;
},
methods: {
_getParent() {
let parent = this.$parent;
Expand Down
9 changes: 2 additions & 7 deletions ui/components/ui-form-group/ui-form-group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
<text class="ui-form-required" v-if="required">*</text>
</view>
<view class="ui-form-content" :class="[contentui]"><slot></slot></view>
<view class="ui-form-action" v-if="slots.action"><slot name="action"></slot></view>
<view class="ui-form-action" v-if="$scopedSlots.action"><slot name="action"></slot></view>
</view>
</template>

<script>
export default {
name: 'UiFormGroup',
data() {
return {
slots: {}
return {
};
},
props: {
Expand Down Expand Up @@ -68,10 +67,6 @@ export default {
return this.title.length + (this.icon?1.2:0)
}
}
},
mounted() {
this.slots = this.$scopedSlots;
},
methods: {
/**
Expand Down
8 changes: 2 additions & 6 deletions ui/components/ui-loading/ui-loading.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<view class="ui-loading-box" :class="[size ? `text-${size}` : ``, { loop: slots.default||img },ui]">
<view class="ui-loading-box" :class="[size ? `text-${size}` : ``, { loop: $scopedSlots.default||img },ui]">
<view class="ui-loading">
<view class="ui-loading-cut"><view class="ui-loading-loop" :class="[color == true ? 'color' : `default ${color}`]"></view></view>
</view>
Expand All @@ -18,8 +18,7 @@ let _this = null;
export default {
name: 'UiLoading',
data() {
return {
slots: {}
return {
};
},
props: {
Expand All @@ -46,9 +45,6 @@ export default {
immediate: true
}
},
mounted() {
this.slots = this.$scopedSlots;
},
created() {
_this = this;
},
Expand Down
12 changes: 4 additions & 8 deletions ui/components/ui-menu-item/ui-menu-item.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<view class="ui-menu-item" :class="[{ 'arrow': arrow },{'first-item':isFirstChild},ui]">
<view class="ui-menu-item-icon">
<template v-if="slots.icon">
<template v-if="$scopedSlots.icon">
<slot name="icon"></slot>
</template>
<template v-else>
Expand All @@ -12,7 +12,7 @@
<view class="ui-menu-item-title">
{{ title }}
</view>
<view class="ui-menu-item-action" v-if="slots.action">
<view class="ui-menu-item-action" v-if="$scopedSlots.action">
<slot name="action"></slot>
</view>
</view>
Expand All @@ -24,8 +24,7 @@
export default {
name: 'UiMenuItem',
data() {
return {
slots: {}
return {
};
},
props: {
Expand Down Expand Up @@ -59,10 +58,7 @@ export default {
}
return false
}
},
mounted() {
this.slots = this.$scopedSlots;
},
},
watch: {},
methods: {
}
Expand Down
16 changes: 6 additions & 10 deletions ui/components/ui-navbar/ui-navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ui-fixed :noFixed="noFixed" :val="0" :index="1000" noNav :bg="bg" :ui="ui" :opacity="opacity" :opacityVal="opacityVal" :placeholder="placeholder">
<view class="ui-navbar-box" :class="[{'border-bottom':!opacity&&bg!='bg-none'}]" :style="{ paddingTop: sys_statusBar + 'px', height: sys_navBar + 'px' }">
<view class="ui-bar" :class="status == '' ? `text-a` : status == 'light' ? 'text-white' : 'text-black'" :style="[{ height: sys_navBar - sys_statusBar + 'px' }]">
<block v-if="slots.default"><slot></slot></block>
<block v-if="$scopedSlots.default"><slot></slot></block>
<block v-else>
<view class="left">
<view class="back" @tap="_navback" v-if="back && !capsule">
Expand All @@ -15,9 +15,9 @@
</view>
<slot name="left"></slot>
</view>
<view class="center" v-if="slots.center"><slot name="center"></slot></view>
<view class="right" v-if="slots.center && !slots.right"></view>
<view class="right" v-if="slots.right">
<view class="center" v-if="$scopedSlots.center"><slot name="center"></slot></view>
<view class="right" v-if="$scopedSlots.center && !$scopedSlots.right"></view>
<view class="right" v-if="$scopedSlots.right">
<view class="right-content"><slot name="right"></slot></view>
<!-- #ifdef MP -->
<view :style="[capsuleStyle]"></view>
Expand All @@ -35,8 +35,7 @@ export default {
return {
statusCur: '',
capsuleStyle: {},
capsuleBack: {},
slots: {},
capsuleBack: {},
opacityVal: 0
};
},
Expand Down Expand Up @@ -130,10 +129,7 @@ export default {
// #endif
},
mounted() {
this.slots = this.$scopedSlots;
console.log(this.sys_isFirstPage);
mounted() {
// //设置 statusBarStyle App端必须在渲染后
this.changeStatus();
},
Expand Down
7 changes: 1 addition & 6 deletions ui/components/ui-progress/ui-progress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
export default {
name: 'UiProgress',
data() {
return {
slots: {}
return {
};
},
props: {
Expand Down Expand Up @@ -81,10 +80,6 @@
default: ''
}
},
mounted() {
this.slots = this.$scopedSlots;
},
methods: {}
};
</script>
Expand Down

0 comments on commit 3203a72

Please sign in to comment.