提交 1f98f637 编写于 作者: Neuromancer255's avatar Neuromancer255

单选列表编辑器修改

上级 e7649fbf
<template>
<ion-list class="app-mobile-radio-list">
<van-radio-group v-model="curValue" direction="horizontal" @change="change">
<van-radio v-for="(item,index) in options" :key="index" :disabled="item.disabled" :name="item.value">{{item.text}}</van-radio>
</van-radio-group>
</ion-list>
<van-radio-group class="app-mobile-radio-list" v-model="curValue" :disabled="disabled" direction="horizontal" @change="change">
<van-radio v-for="(item,index) in options" :key="index" :name="item.value">{{item.text}}</van-radio>
</van-radio-group>
</template>
<script lang="ts">
......@@ -113,48 +111,6 @@ export default class AppMobRadio extends Vue {
this.options = this.$store.getters.getCodeListItems(this.tag);
}
}
/**
* vue 生命周期
*
* @memberof AppMobRadio
*/
public mounted() {
this.changeLabelStyle();
}
/**
* 修改label默认样式
* @memberof AppMobPicture
*/
public changeLabelStyle() {
document.querySelectorAll(".app-mobile-radio-list").forEach((element: any) => {
let prev = this.getNearEle(element, 1);
if (prev) {
prev.style.transform = 'none';
}
})
}
/**
* 查找相邻前一个元素
*
* @memberof AppMobPicture
*/
public getNearEle(ele: any, type: any) {
type = type == 1 ? "previousSibling" : "nextSibling";
var nearEle = ele[type];
while (nearEle) {
if (nearEle.nodeType === 1) {
return nearEle;
}
nearEle = nearEle[type];
if (!nearEle) {
break;
}
}
return null;
}
}
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册