Skip to content

Commit

Permalink
fix: 部分针对抖音小程序进行visualhost特别判断
Browse files Browse the repository at this point in the history
  • Loading branch information
18148764734 committed Apr 23, 2024
1 parent bc06834 commit 0f1448f
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 135 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,9 @@
components: {
uploadImage,
uploadFile
},
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
options: {
virtualHost: true
},
emits: ['select', 'success', 'fail', 'progress', 'delete', 'update:modelValue', 'input'],
props: {
Expand Down
11 changes: 3 additions & 8 deletions uni_modules/uni-forms/components/uni-forms/uni-forms.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,9 @@
*/
export default {
name: 'uniForms',
emits: ['validate', 'submit'],
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
emits: ['validate', 'submit'],
options: {
virtualHost: true
},
props: {
// 即将弃用
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@
}
.uni-numbox .uni-numbox--disabled {
color: #c0c0c0;
color: #c0c0c0 !important;
/* #ifdef H5 */
cursor: not-allowed;
/* #endif */
}
</style>
</style>
11 changes: 3 additions & 8 deletions uni_modules/uni-row/components/uni-col/uni-col.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,9 @@
// -1 默认值,因为在微信小程序端只给Number会有默认值0
export default {
name: 'uniCol',
// #ifdef MP-WEIXIN
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
// #ifdef MP-WEIXIN
options: {
virtualHost: true // 在微信小程序中将组件节点渲染为虚拟节点,更加接近Vue组件的表现
},
// #endif
props: {
Expand Down
13 changes: 5 additions & 8 deletions uni_modules/uni-row/components/uni-row/uni-row.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,12 @@
export default {
name: 'uniRow',
componentName: 'uniRow',
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifdef MP-WEIXIN
virtualHost: true
// #endif
componentName: 'uniRow',
// #ifdef MP-WEIXIN
options: {
virtualHost: true // 在微信小程序中将组件节点渲染为虚拟节点,更加接近Vue组件的表现,可使用flex布局
},
// #endif
props: {
type: String,
gutter: Number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,4 @@
}
/* #endif */
</style>
</style>
23 changes: 9 additions & 14 deletions uni_modules/uni-table/components/uni-table/uni-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,10 @@
* @event {Function} selection-change 开启多选时,当选择项发生变化时会触发该事件
*/
export default {
name: 'uniTable',
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
name: 'uniTable',
options: {
virtualHost: true
},
emits:['selection-change'],
props: {
data: {
Expand Down Expand Up @@ -95,10 +90,10 @@ export default {
if (this.theadChildren) {
rowspan = this.theadChildren.rowspan
}
// this.trChildren.length - rowspan
this.noData = false
// this.noData = newVal.length === 0
// this.noData = newVal.length === 0
}
},
created() {
Expand Down Expand Up @@ -252,9 +247,9 @@ export default {
if (!this.theadChildren) {
theadChildren = this.trChildren[0]
}
let childDomIndex = this.trChildren.findIndex((item, index) => child === item)
if(childDomIndex < 0){
childDomIndex = this.data.findIndex(v=>v[this.rowKey] === keyValue) + 1
Expand Down
35 changes: 14 additions & 21 deletions uni_modules/uni-table/components/uni-tbody/uni-tbody.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,24 @@
</tbody>
<!-- #endif -->
<!-- #ifndef H5 -->
<view>
<slot></slot>
</view>
<view><slot></slot></view>
<!-- #endif -->
</template>

<script>
export default {
name: 'uniBody',
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
data() {
return {
}
},
created() {},
methods: {}
}
export default {
name: 'uniBody',
options: {
virtualHost: true
},
data() {
return {
}
},
created() {},
methods: {}
}
</script>

<style>
Expand Down
13 changes: 4 additions & 9 deletions uni_modules/uni-table/components/uni-td/uni-td.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<slot></slot>
</view>
<!-- #endif -->

</template>

<script>
Expand All @@ -21,14 +21,9 @@
* @property {Number} align = [left|center|right] 单元格对齐方式
*/
export default {
name: 'uniTd',
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
name: 'uniTd',
options: {
virtualHost: true
},
props: {
width: {
Expand Down
7 changes: 1 addition & 6 deletions uni_modules/uni-table/components/uni-th/filter-dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,7 @@
checkBox
},
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
props: {
filterType: {
Expand Down Expand Up @@ -298,7 +293,7 @@

<style lang="scss">
$uni-primary: #1890ff !default;
.flex-r {
display: flex;
flex-direction: row;
Expand Down
13 changes: 4 additions & 9 deletions uni_modules/uni-table/components/uni-th/uni-th.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,10 @@
* @event {Function} sort-change 排序触发事件
*/
export default {
name: 'uniTh',
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
name: 'uniTh',
options: {
virtualHost: true
},
components: {
// #ifdef H5
dropdown
Expand Down
38 changes: 0 additions & 38 deletions uni_modules/uni-ui/changelog.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,3 @@
## 1.5.5(2024-03-31)
- uni-data-select 修复 在vue2下:style动态绑定导致编译失败的bug
- uni-easyinput 修复 在头条小程序下丢失事件绑定的问题
- uni-popup 修复 uni-popup-dialog 双向绑定时初始化逻辑修正
- uni-segmented-control 修复 在vue2下:style动态绑定导致编译失败的bug
- uni-steps 修复 uni-steps为竖排列时,文本长度过长引起点错乱的bug
## 1.5.3(2024-03-22)
- uni-collapse 修复 titleBorder类型修正
- uni-data-checkbox 修复 单选模式下选中样式不生效的bug
- uni-easyinput 修复 在密码输入情况下 清除和小眼睛覆盖bug 在edge浏览器下显示双眼睛bug
- uni-file-picker 补充 删除文件时返回文件下标
- uni-number-box 新增 设置宽度属性width(单位:px)
- uni-popup 修复 uni-popup-dialog 数据输入时修正为双向绑定
- uni-search-bar 修复 清空按钮emit值错误的bug
- uni-segmented-control 新增 inActiveColor属性,可供配置未激活时的颜色
- uni-tag 优化 app下边框过窄导致不显示的bug
- uni-tooltip 修复 弹出位置修正
## 1.5.2(2024-02-22)
- uni-countdown 新增 支持控制小时,分钟的显隐:showHour showMinute
- uni-datetime-picker 修复 日历的close事件触发异常的bug [详情](https://github.com/dcloudio/uni-ui/issues/844)
- uni-datetime-picker 修复 h5平台 右边日历的月份默认+1的bug [详情](https://github.com/dcloudio/uni-ui/issues/841)
- uni-easyinput 新增 左侧插槽:left
- uni-file-picker 新增 微信小程序选择视频时改用chooseMedia,并返回视频缩略图
- uni-number-box 修复 step步长小于1时,键盘类型为number的bug
- uni-popup 修复 uni-popup 在微信小程序下出现文字向上闪动的bug
- uni-search-bar 新增 设置输入框字体颜色:textColor
- uni-search-bar 修复 uni-search-bar在支付宝小程序下样式兼容问题
## 1.5.1(2024-02-19)
- uni-data-checkbox 修复 修复错别字chagne为change
- uni-datetime-picker 修复 隐藏“秒”时,在IOS15及以下版本时出现 结束时间在开始时间之前 的bug [详情](https://github.com/dcloudio/uni-ui/issues/788)
- uni-easyinput 修复 onBlur的emit传值错误
- uni-easyinput 补充 adjust-position文档属性补充
- uni-easyinput 补充 adjust-position属性传递值:(Boolean)当键盘弹起时,是否自动上推页面
- uni-number-box 修复 加减号垂直位置偏移样式问题
- uni-popup 新增 uni-popup-dialog 新增属性focus:input模式下,是否自动自动聚焦
- uni-popup 新增 uni-popup-dialog 新增属性maxLength:限制输入框字数
- uni-popup 新增 uni-popup-dialog 新增属性showClose:控制关闭按钮的显示
- uni-search-bar 修复 uni-search-bar居中问题,现在默认居左,并修复样式偏移问题
## 1.5.0(2024-01-13)
- 修复 npm包结构目录错误的问题
- uni-calendar 修复 回到今天时,月份显示不一致问题
Expand Down
6 changes: 3 additions & 3 deletions uni_modules/uni-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"id": "uni-ui",
"displayName": "uni-ui",
"version": "1.5.5",
"version": "1.5.0",
"description": "uni-ui 是基于uni-app的、全端兼容的、高性能UI框架",
"keywords": [
"uni-ui",
"uniui",
"UI组件库",
"ui框架",
"ui库"
],
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "^3.2.10"
Expand Down Expand Up @@ -126,4 +126,4 @@
}
}
}
}
}

0 comments on commit 0f1448f

Please sign in to comment.