欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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

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

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

可到插件市場(chǎng)下載嘗試: 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;">請(qǐng)選擇訂單狀態(tài)</view>
					</template>
				</pop-selector>
			</view>
		</view>
		<view class="card">
			<view class="header">插槽-自定義右邊圖標(biāo):</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>

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

相關(guān)文章

  • 使用Vant完成Dialog彈框案例

    使用Vant完成Dialog彈框案例

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

    VUE引入DataV報(bào)錯(cuò)解決實(shí)戰(zhàn)記錄

    在使用vue開發(fā)大屏?xí)r,發(fā)現(xiàn)了一個(gè)很好用的可視化組件庫(kù)DataV,下面這篇文章主要給大家介紹了關(guān)于VUE引入DataV報(bào)錯(cuò)解決的實(shí)戰(zhàn)記錄,文中通過代碼介紹的非常詳細(xì),需要的朋友可以參考下
    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,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2024-03-03
  • Vue中render方法的使用詳解

    Vue中render方法的使用詳解

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

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

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

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

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

    Vue實(shí)現(xiàn)點(diǎn)擊導(dǎo)航欄當(dāng)前標(biāo)簽后變色功能

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

    vue使用webSocket更新實(shí)時(shí)天氣的方法

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

    Vue實(shí)現(xiàn)動(dòng)態(tài)表單的示例詳解

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

最新評(píng)論