亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

uniapp-vue3-彈出選擇組件wo-pop-selector使用示例

 更新時間:2023年10月10日 09:33:01   作者:狼性書生  
wo-pop-selector彈出選擇組件采用uniapp-vue3實現(xiàn), 支持H5、微信小程序,本文給大家介紹uniapp-vue3-彈出選擇組件wo-pop-selector及使用示例,感興趣的朋友一起看看吧

wo-pop-selector彈出選擇組件采用uniapp-vue3實現(xiàn), 支持H5、微信小程序(其他小程序未測試過,可自行嘗試)

可到插件市場下載嘗試: https://ext.dcloud.net.cn/plugin?id=14879

使用示例

<template>
	<view>
		<view class="name">彈出選擇器: pop-selector</view>
		<view class="card">
			<view class="header">屬性-基本用法(disabled禁用):</view>
			<view class="content">
				<pop-selector :select-options="state.options" :default-value="state.value" @changeSelect="onChangeSelect">
					<view class="button">
						狀態(tài)選擇:{{ state.options[state.value]?.label }}
					</view>
				</pop-selector>
			</view>
		</view>
		<view class="card">
			<view class="header">屬性-自定義激活顏色:</view>
			<view class="content">
				<pop-selector :active-color="'#0086D1'" :select-options="state.options" :default-value="state.value" @changeSelect="onChangeSelect">
					<view class="button">
						狀態(tài)選擇:{{ state.options[state.value]?.label }}
					</view>
				</pop-selector>
			</view>
		</view>
		<view class="card">
			<view class="header">屬性-自定義彈窗高度:</view>
			<view class="content">
				<pop-selector :max-height="'200rpx'" :select-options="state.options" :default-value="state.value" @changeSelect="onChangeSelect">
					<view class="button">
						狀態(tài)選擇:{{ state.options[state.value]?.label }}
					</view>
				</pop-selector>
			</view>
		</view>
		<view class="card">
			<view class="header">屬性-自定義彈窗樣式:</view>
			<view class="content">
				<pop-selector :card-style="state.darkStyle" :select-options="state.options" :default-value="state.value" @changeSelect="onChangeSelect">
					<view class="button">
						狀態(tài)選擇:{{ state.options[state.value]?.label }}
					</view>
				</pop-selector>
			</view>
		</view>
		<view class="card">
			<view class="header">插槽-自定義彈窗頭部:</view>
			<view class="content">
				<pop-selector :active-color="'#0086D1'" :select-options="state.options" :default-value="state.value" @changeSelect="onChangeSelect">
					<view class="button">
						狀態(tài)選擇:{{ state.options[state.value]?.label }}
					</view>
					<template v-slot:header>
						<view style="padding: 12rpx 20rpx; color: grey;">請選擇訂單狀態(tài)</view>
					</template>
				</pop-selector>
			</view>
		</view>
		<view class="card">
			<view class="header">插槽-自定義右邊圖標:</view>
			<view class="content">
				<pop-selector :select-options="state.options" :default-value="state.value" @changeSelect="onChangeSelect">
					<view class="button">
						狀態(tài)選擇:{{ state.options[state.value]?.label }}
					</view>
					<template v-slot:right>
						<view>?</view>
					</template>
				</pop-selector>
			</view>
		</view>
	</view>
</template>
<script setup lang="ts">
import popSelector from './popSelector.vue'
import { reactive } from 'vue';
const state = reactive({
  options: [
		{
			label: '全部',
			value: 0,
		},
		{
			label: '成功',
			value: 1,
		},
		{
			label: '失敗',
			value: 2,
		},
		{
			label: '禁用',
			disabled: true,
			value: 3,
		},
	],
	value: 0,
	darkStyle: {
		color: '#fff',
		background: '#000',
		border: '1px solid #ebeef5',
		borderRadius: '6px',
		boxShadow: '0 2px 12px 0 rgba(0, 0, 0, 0.1)',
		padding: '4px 0',
		fontSize: '26rpx'
	}
});
const onChangeSelect = (e: any) => {
	console.log(e);
  state.value = e.value;
};
</script>
<style scoped>
.flex-center {
	display: flex;
	justify-content: center;
	align-items: center;
}
.name {
	font-weight: bold;
	padding: 40rpx 0 10rpx 20rpx;
}
.card {
	display: flex;
	justify-content: space-between;
	background: #f1f1f1;
	margin: 40rpx 10rpx;
	padding: 30rpx;
	border-radius: 12rpx;
}
.header {
	display: flex;
	align-items: center;
}
.button {
	background: #fff;
	padding: 16rpx 30rpx;
	border-radius: 10rpx;
}
</style>

到此這篇關于uniapp-vue3-彈出選擇組件wo-pop-selector的文章就介紹到這了,更多相關uniapp-vue3彈出選擇組件內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!

相關文章

  • 使用Vant完成Dialog彈框案例

    使用Vant完成Dialog彈框案例

    這篇文章主要介紹了使用Vant完成Dialog彈框案例,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2020-11-11
  • VUE引入DataV報錯解決實戰(zhàn)記錄

    VUE引入DataV報錯解決實戰(zhàn)記錄

    在使用vue開發(fā)大屏時,發(fā)現(xiàn)了一個很好用的可視化組件庫DataV,下面這篇文章主要給大家介紹了關于VUE引入DataV報錯解決的實戰(zhàn)記錄,文中通過代碼介紹的非常詳細,需要的朋友可以參考下
    2024-04-04
  • 解決Vue2.x父組件與子組件之間的雙向綁定問題

    解決Vue2.x父組件與子組件之間的雙向綁定問題

    這篇文章主要介紹了解決Vue2.x父組件與子組件之間的雙向綁定問題,需要的朋友可以參考下
    2018-03-03
  • Vue中使用event的坑及解決event is not defined

    Vue中使用event的坑及解決event is not defined

    這篇文章主要介紹了Vue中使用event的坑及解決event is not defined,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2024-03-03
  • Vue中render方法的使用詳解

    Vue中render方法的使用詳解

    這篇文章主要為大家詳細介紹了Vue中render方法的使用,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2018-01-01
  • vue3+vite+ts父子組件之間的傳值

    vue3+vite+ts父子組件之間的傳值

    隨著vue2的落幕,vue3越來成熟,有必要更新一下vue3的父子組件之間的傳值方式,這里介紹下vue3+vite+ts父子組件之間的傳值方式實例詳解,感興趣的朋友一起看看吧
    2023-12-12
  • Vue中父子組件的值傳遞與方法傳遞

    Vue中父子組件的值傳遞與方法傳遞

    這篇文章主要介紹了Vue中父子組件的值傳遞與方法傳遞,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2020-09-09
  • Vue實現(xiàn)點擊導航欄當前標簽后變色功能

    Vue實現(xiàn)點擊導航欄當前標簽后變色功能

    這篇文章主要為大家詳細介紹了Vue實現(xiàn)點擊導航欄當前標簽后變色功能,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2020-08-08
  • vue使用webSocket更新實時天氣的方法

    vue使用webSocket更新實時天氣的方法

    本文將結合實例代碼,介紹vue使用webSocket更新實時天氣的方法,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2021-06-06
  • Vue實現(xiàn)動態(tài)表單的示例詳解

    Vue實現(xiàn)動態(tài)表單的示例詳解

    在前端開發(fā)中,我們經(jīng)常遇到根據(jù)用戶輸入動態(tài)生成不同表單項的需求,本文將詳細講解如何使用?Vue?3?的響應式特性,逐步構建一個遞歸動態(tài)表單,感興趣的可以了解下
    2024-12-12

最新評論