firstcommit
commit
966e6449d1
@ -0,0 +1,2 @@
|
|||||||
|
/node_modules
|
||||||
|
/unpackage
|
@ -0,0 +1,28 @@
|
|||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
onLaunch: function () {
|
||||||
|
console.log("App onLaunch");
|
||||||
|
},
|
||||||
|
ononReady: function () {
|
||||||
|
console.log("App Ready");
|
||||||
|
},
|
||||||
|
onShow: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
onHide: function () {
|
||||||
|
console.log("App Hide");
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
/* 引入的uview-ui的index.scss放第一行引入 */
|
||||||
|
@import "uview-ui/index.scss";
|
||||||
|
@import "common/index.scss";
|
||||||
|
/*每个页面公共css */
|
||||||
|
page {
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-attachment: fixed;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,125 @@
|
|||||||
|
/**
|
||||||
|
* 通用消息框
|
||||||
|
* @param content string 消息内容
|
||||||
|
* @param fn function 回调
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
import api from "@/http/";
|
||||||
|
import apiUrl from "../http/api.js";
|
||||||
|
const msgToast = (content, fn, type = "none") => {
|
||||||
|
uni.showToast({
|
||||||
|
title: content,
|
||||||
|
duration: 2000,
|
||||||
|
icon: type,
|
||||||
|
success: fn
|
||||||
|
? () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
fn();
|
||||||
|
}, 1500);
|
||||||
|
}
|
||||||
|
: function () {},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 手机号验证 */
|
||||||
|
const vefTel = (key) => {
|
||||||
|
let reg_tel =
|
||||||
|
/^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
|
||||||
|
///^(((13[0-9]{1})|(15[0-9]{1})|(16[0-9]{1})|(17[3-8]{1})|(18[0-9]{1})|(19[0-9]{1})|(14[5-7]{1}))+\d{8})$/; // 11位手机号
|
||||||
|
if (key === "" || key === undefined || key === null) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "请输入手机号",
|
||||||
|
duration: 2000,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
} else if (!reg_tel.test(key)) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "手机号码格式不正确",
|
||||||
|
duration: 2000,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 非空验证 */
|
||||||
|
const vefEmpty = (key, msg) => {
|
||||||
|
if (key === "" || key === undefined || key === null) {
|
||||||
|
uni.showToast({
|
||||||
|
title: msg,
|
||||||
|
duration: 2000,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const logout = () => {
|
||||||
|
msgToast("登录已过期,请重新登录", () => {
|
||||||
|
uni.removeStorageSync("userInfo");
|
||||||
|
uni.redirectTo({
|
||||||
|
url: "../login/login",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* @description: H5 App通用方案 解决H5刷新返回失败问题
|
||||||
|
* @param {*} params
|
||||||
|
*/
|
||||||
|
const navigateBack = (params) => {
|
||||||
|
const pages = getCurrentPages();
|
||||||
|
if (pages.length === 1) {
|
||||||
|
if (typeof params === "number") {
|
||||||
|
history.go(-params);
|
||||||
|
} else {
|
||||||
|
history.back();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* @description: 获取url参数
|
||||||
|
* @param {*} params
|
||||||
|
*/
|
||||||
|
const getLocationParams = (name) => {
|
||||||
|
const pages = getCurrentPages();
|
||||||
|
const curPage = pages[pages.length - 1];
|
||||||
|
return name ? curPage.options[name] : curPage.options;
|
||||||
|
};
|
||||||
|
const getOpenId = async () => {
|
||||||
|
const res = await api.request("/api/appointment/wx/info", null, "GET");
|
||||||
|
console.log(res);
|
||||||
|
if (res.status === 0) {
|
||||||
|
uni.setStorageSync("open_id", res.data.wxUser.openID);
|
||||||
|
} else {
|
||||||
|
console.log("没有open_id");
|
||||||
|
if (!document.cookie) {
|
||||||
|
console.log("没有cookie");
|
||||||
|
// 设置cookie
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.href = `${
|
||||||
|
apiUrl.backUrl
|
||||||
|
}/api/appointment/wx?notifyUrl=${encodeURIComponent(
|
||||||
|
window.location.href
|
||||||
|
)}`;
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
msgToast,
|
||||||
|
vefTel,
|
||||||
|
vefEmpty,
|
||||||
|
logout,
|
||||||
|
navigateBack,
|
||||||
|
getLocationParams,
|
||||||
|
getOpenId,
|
||||||
|
};
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,416 @@
|
|||||||
|
<template>
|
||||||
|
<view class="superwei-combox" :class="border ? '' : 'superwei-combox__no-border'">
|
||||||
|
<view v-if="label" class="superwei-combox__label" :style="labelStyle">
|
||||||
|
<text>{{label}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="superwei-combox__input-box">
|
||||||
|
<input class="superwei-combox__input" type="text" :placeholder="placeholder"
|
||||||
|
placeholder-class="superwei-combox__input-plac" v-model="inputVal" @input="onInput" @focus="onFocus"
|
||||||
|
@blur="onBlur" />
|
||||||
|
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" @click="toggleSelector" v-if="!inputVal"></uni-icons>
|
||||||
|
<image src="@/static/image/close-icon.png" mode="" style="width: 28upx;height: 28upx;" v-if="inputVal" @click="clear"></image>
|
||||||
|
</view>
|
||||||
|
<view class="superwei-combox__selector" v-if="showSelector">
|
||||||
|
<view class="uni-popper__arrow"></view>
|
||||||
|
<scroll-view scroll-y="true" class="superwei-combox__selector-scroll">
|
||||||
|
<view class="superwei-combox__selector-empty" v-if="filterCandidatesLength === 0">
|
||||||
|
<text>{{emptyTips}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="superwei-combox__selector-item" v-for="(item,index) in filterCandidates" :key="index">
|
||||||
|
<template v-if="(isJSON?(item.disabled?true:false):false)">
|
||||||
|
<text
|
||||||
|
:style="'color:'+disabledColor+';cursor: not-allowed;'">{{isJSON?item[keyName]?item[keyName]:'字段'+keyName+'不存在':item}}</text>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<text @click="onSelectorClick(index)"
|
||||||
|
:style="(isJSON?item[keyName]?item[keyName]==inputVal:false:item==inputVal)?'font-weight: bold;background-color: '+selectedBackground+';color: '+selectedColor:''">{{isJSON?item[keyName]?item[keyName]:'字段'+keyName+'不存在':item}}</text>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="search-combox">
|
||||||
|
<view class="uni-combox__input-box" :style="showSelector ?'z-index: 997;': ''">
|
||||||
|
<input class="uni-combox__input" type="text" :placeholder="placeholder" placeholder-class="uni-combox__input-plac"
|
||||||
|
v-model="inputVal" @input="onInput" @focus="onFocus" @blur="onBlur" />
|
||||||
|
<view class="icon-box">
|
||||||
|
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#fff" @click="toggleSelector" v-if="!inputVal && icon=='icon'"></uni-icons>
|
||||||
|
<image src="@/static/image/order/search.png" mode="" style="width: 28upx;height: 28upx;" v-if="iconShow && icon =='search'" @click="searchGet"></image>
|
||||||
|
<image src="@/static/image/close-icon.png" mode="" style="width: 28upx;height: 28upx;" v-if="inputVal" @click="clear"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="uni-combox__selector" v-if="showSelector">
|
||||||
|
<view class="uni-popper__arrow"></view>
|
||||||
|
<scroll-view scroll-y="true" class="uni-combox__selector-scroll">
|
||||||
|
<view class="uni-combox__selector-empty" v-if="searchList.length == 0">
|
||||||
|
<text>{{emptyTips}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="uni-combox__selector-item" v-for="(item,index) in searchList" :key="index" @click="onSelectorClick(index)">
|
||||||
|
<text>{{item.value}}</text>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* Combox 组合输入框
|
||||||
|
* @description 组合输入框一般用于既可以输入也可以选择的场景
|
||||||
|
* @property {String} label 左侧文字
|
||||||
|
* @property {String} labelWidth 左侧内容宽度
|
||||||
|
* @property {String} placeholder 输入框占位符
|
||||||
|
* @property {Array} candidates 候选项列表
|
||||||
|
* @property {String} emptyTips 筛选结果为空时显示的文字
|
||||||
|
* @property {String} value 组合框的值
|
||||||
|
* @property {String} selectedBackground 选中项背景颜色
|
||||||
|
* @property {String} selectedColor 选中项文字颜色
|
||||||
|
* @property {Boolean} isJSON 是否是json数组
|
||||||
|
* @property {String} keyName json数组显示的字段值
|
||||||
|
* @property {String} disabledColor 禁用项文字颜色
|
||||||
|
* @property {Boolean} isAllowCreate 是否允许用户创建新条目
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
name:"inputSelect",
|
||||||
|
emits: ['input', 'update:modelValue', 'select'],
|
||||||
|
props: {
|
||||||
|
isAllowCreate: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
disabledColor: {
|
||||||
|
type: String,
|
||||||
|
default: '#ababac'
|
||||||
|
},
|
||||||
|
isJSON: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
keyName: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
selectedBackground: {
|
||||||
|
type: String,
|
||||||
|
default: '#f5f7fa'
|
||||||
|
},
|
||||||
|
selectedColor: {
|
||||||
|
type: String,
|
||||||
|
default: '#409eff'
|
||||||
|
},
|
||||||
|
border: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
labelWidth: {
|
||||||
|
type: String,
|
||||||
|
default: 'auto'
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
candidates: {
|
||||||
|
type: Array,
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emptyTips: {
|
||||||
|
type: String,
|
||||||
|
default: '无匹配项'
|
||||||
|
},
|
||||||
|
// #ifndef VUE3
|
||||||
|
value: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
modelValue: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isInput: false,
|
||||||
|
showSelector: false,
|
||||||
|
isSelector: false,
|
||||||
|
inputVal: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
labelStyle() {
|
||||||
|
if (this.labelWidth === 'auto') {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return `width: ${this.labelWidth}`
|
||||||
|
},
|
||||||
|
filterCandidates() {
|
||||||
|
if (this.isInput) {
|
||||||
|
if (this.isJSON) {
|
||||||
|
return this.candidates.filter((item) => {
|
||||||
|
return item[this.keyName].toString().indexOf(this.inputVal) > -1
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return this.candidates.filter((item) => {
|
||||||
|
return item.toString().indexOf(this.inputVal) > -1
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return this.candidates
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filterCandidatesLength() {
|
||||||
|
return this.filterCandidates.length
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// #ifndef VUE3
|
||||||
|
value: {
|
||||||
|
handler(newVal) {
|
||||||
|
this.inputVal = newVal
|
||||||
|
this.isInput = true
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
modelValue: {
|
||||||
|
handler(newVal) {
|
||||||
|
this.inputVal = newVal
|
||||||
|
this.isInput = true
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggleSelector() {
|
||||||
|
this.showSelector = !this.showSelector
|
||||||
|
this.isInput = false
|
||||||
|
},
|
||||||
|
onFocus() {
|
||||||
|
this.showSelector = true
|
||||||
|
this.isInput = false
|
||||||
|
},
|
||||||
|
onChange() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showSelector = false
|
||||||
|
this.isInput = false
|
||||||
|
}, 200)
|
||||||
|
},
|
||||||
|
onBlur() {
|
||||||
|
if (!this.isInput) {
|
||||||
|
this.onChange()
|
||||||
|
} else {
|
||||||
|
if (this.inputVal && !this.isAllowCreate) {
|
||||||
|
let index = this.candidates.findIndex((item) => {
|
||||||
|
if (this.isJSON) {
|
||||||
|
return item[this.keyName].toString() == this.inputVal && !item.disabled
|
||||||
|
} else {
|
||||||
|
return item.toString() == this.inputVal
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (index == -1) {
|
||||||
|
if (this.filterCandidatesLength > 0) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showSelector = false
|
||||||
|
this.isInput = false
|
||||||
|
if (!this.isSelector) {
|
||||||
|
this.inputVal = ''
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal)
|
||||||
|
}
|
||||||
|
}, 200)
|
||||||
|
this.isSelector = false
|
||||||
|
} else {
|
||||||
|
this.showSelector = false
|
||||||
|
this.isInput = false
|
||||||
|
this.inputVal = ''
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.onChange()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.onChange()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSelectorClick(index) {
|
||||||
|
let item = this.filterCandidates[index]
|
||||||
|
if (this.isJSON) {
|
||||||
|
this.inputVal = item[this.keyName]
|
||||||
|
} else {
|
||||||
|
this.inputVal = item
|
||||||
|
}
|
||||||
|
this.showSelector = false
|
||||||
|
this.isSelector = true
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal)
|
||||||
|
this.$emit('select', item)
|
||||||
|
},
|
||||||
|
onInput() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
searchGet() {
|
||||||
|
this.iconShow = false
|
||||||
|
this.$emit('search',true)
|
||||||
|
},
|
||||||
|
clear() {
|
||||||
|
this.inputVal = '';
|
||||||
|
this.iconShow = true;
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal)
|
||||||
|
this.$emit('select', {})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.superwei-combox {
|
||||||
|
font-size: 24upx;
|
||||||
|
// border: 1px solid #DCDFE6;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
// height: 40px;
|
||||||
|
flex-direction: row;
|
||||||
|
box-sizing: border-box;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 32upx;
|
||||||
|
height: 60upx;
|
||||||
|
padding: 0 20upx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
z-index: 99999999999;
|
||||||
|
// border-bottom: solid 1px #DDDDDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__label {
|
||||||
|
font-size: 24upx;
|
||||||
|
line-height: 22px;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__input-box {
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__input {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 24upx;
|
||||||
|
height: 22px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__input-plac {
|
||||||
|
font-size: 24upx;
|
||||||
|
color: #ccc; //placeholder-style="color:#FFFFFF"
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__selector {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 12px);
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border: 1px solid #EBEEF5;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 2;
|
||||||
|
padding: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__selector-scroll {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
max-height: 200px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__selector-empty,
|
||||||
|
.superwei-combox__selector-item {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
cursor: pointer;
|
||||||
|
/* #endif */
|
||||||
|
line-height: 36px;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: center;
|
||||||
|
// border-bottom: solid 1px #DDDDDD;
|
||||||
|
padding: 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__selector-empty text,
|
||||||
|
.superwei-combox__selector-item text {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__selector-item:hover {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__selector-empty:last-child,
|
||||||
|
.superwei-combox__selector-item:last-child {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
border-bottom: none;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
// picker 弹出层通用的指示小三角
|
||||||
|
.uni-popper__arrow,
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow {
|
||||||
|
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
||||||
|
top: -6px;
|
||||||
|
left: 10%;
|
||||||
|
margin-right: 3px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #EBEEF5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
content: " ";
|
||||||
|
top: 1px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__no-border {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,113 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="status_bar">
|
||||||
|
<!-- 这里是状态栏 -->
|
||||||
|
</view>
|
||||||
|
<view style="height: 86upx">
|
||||||
|
<u-sticky offset-top="0" v-if="stickyShow">
|
||||||
|
<u-navbar
|
||||||
|
:is-back="false"
|
||||||
|
:title="navTitle"
|
||||||
|
:bgColor="background"
|
||||||
|
:titleStyle="titleStyle"
|
||||||
|
>
|
||||||
|
<view slot="left">
|
||||||
|
<u-icon
|
||||||
|
name="arrow-left"
|
||||||
|
v-if="isBack"
|
||||||
|
color="#fff"
|
||||||
|
size="26"
|
||||||
|
@click="navigateBack"
|
||||||
|
></u-icon>
|
||||||
|
</view>
|
||||||
|
<view v-if="slotRight" slot="right">
|
||||||
|
<slot name="right"></slot>
|
||||||
|
</view>
|
||||||
|
</u-navbar>
|
||||||
|
</u-sticky>
|
||||||
|
<u-navbar
|
||||||
|
:is-back="false"
|
||||||
|
:title="navTitle"
|
||||||
|
:bgColor="background1"
|
||||||
|
:titleStyle="titleStyle"
|
||||||
|
>
|
||||||
|
<view slot="left">
|
||||||
|
<u-icon
|
||||||
|
name="arrow-left"
|
||||||
|
v-if="isBack"
|
||||||
|
color="#fff"
|
||||||
|
size="26"
|
||||||
|
@click="navigateBack"
|
||||||
|
></u-icon>
|
||||||
|
</view>
|
||||||
|
<view v-if="slotRight" slot="right">
|
||||||
|
<slot name="right"></slot>
|
||||||
|
</view>
|
||||||
|
</u-navbar>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "navBar",
|
||||||
|
props: {
|
||||||
|
isBack: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
navTitle: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
stickyShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
backToUrl: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
slotRight: false,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
background: "rgb(16,16,16,0.2)",
|
||||||
|
background1: "rgb(16,16,16,0.2)",
|
||||||
|
titleStyle: {
|
||||||
|
color: "#fff",
|
||||||
|
fontSize: "36upx",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
navigateBack(params) {
|
||||||
|
const pages = getCurrentPages();
|
||||||
|
if (this.backToUrl.length > 0) {
|
||||||
|
console.log(this.backToUrl);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: this.backToUrl,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (pages.length === 1) {
|
||||||
|
if (typeof params === "number") {
|
||||||
|
history.go(-params);
|
||||||
|
} else {
|
||||||
|
history.back();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.status_bar {
|
||||||
|
height: var(--status-bar-height);
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
uni-page {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uni-page.animation-before {
|
||||||
|
transform: translateY(20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
uni-page.animation-leave {
|
||||||
|
transition: all .3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
uni-page.animation-enter {
|
||||||
|
transition: all .3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
uni-page.animation-show {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
uni-page.animation-after {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
|||||||
|
<script>
|
||||||
|
import './index.css'
|
||||||
|
export default {
|
||||||
|
// #ifdef H5
|
||||||
|
onLaunch: function() {
|
||||||
|
this.show()
|
||||||
|
this.$router.beforeEach((to, from, next) => {
|
||||||
|
this.hide(next)
|
||||||
|
})
|
||||||
|
this.$router.afterEach(() => {
|
||||||
|
setTimeout(this.show, 50)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
hide(callback) {
|
||||||
|
const classList = document.querySelector('uni-page').classList
|
||||||
|
classList.add('animation-before', 'animation-leave')
|
||||||
|
classList.remove('animation-show')
|
||||||
|
setTimeout(() => {
|
||||||
|
classList.remove('animation-before', 'animation-leave')
|
||||||
|
callback && callback()
|
||||||
|
}, 300)
|
||||||
|
},
|
||||||
|
show() {
|
||||||
|
const classList = document.querySelector('uni-page').classList
|
||||||
|
classList.add('animation-before')
|
||||||
|
setTimeout(() => {
|
||||||
|
classList.add('animation-enter', 'animation-after', 'animation-show')
|
||||||
|
setTimeout(() => {
|
||||||
|
classList.remove('animation-before', 'animation-after', 'animation-enter')
|
||||||
|
}, 300)
|
||||||
|
}, 20)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,383 @@
|
|||||||
|
<template>
|
||||||
|
<view class="rpickerBox">
|
||||||
|
<view :class="{'pickerMask':showPicker}" @click="maskClick" @touchmove.stop.prevent="returnHandle">
|
||||||
|
<view class="r-dtpicker" :class="{'r-dtpicker-show':showPicker}">
|
||||||
|
<view class="rdtBtn" @touchmove.stop.prevent="returnHandle" @tap.stop="returnHandle">
|
||||||
|
<view @click="pickerCancel">取消</view>
|
||||||
|
<view :style="{color:themeColor}" @click="pickerConfirm">确定</view>
|
||||||
|
</view>
|
||||||
|
<view class="rangeBox" @touchmove.stop.prevent="returnHandle" @tap.stop="returnHandle">
|
||||||
|
<input type="text" disabled placeholder="开始时间" :value="startDate" :style="{color:themeColor,'border-color':themeColor,opacity:dateType=='startDate'?1:.5}" @tap="changeDateType('startDate')">至<input type="text" disabled placeholder="结束时间" :style="{color:themeColor,'border-color':themeColor,opacity:dateType=='endDate'?1:.5}" :value="endDate" @tap="changeDateType('endDate')">
|
||||||
|
</view>
|
||||||
|
<picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChangeMul">
|
||||||
|
<block>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="picker-item" v-for="(item,index) in yearArr" :key="index">{{item}}</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column v-if="fields!='year'">
|
||||||
|
<view class="picker-item" v-for="(item,index) in monthArr" :key="index">{{item}}</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column v-if="fields=='day'">
|
||||||
|
<view class="picker-item" v-for="(item,index) in dayArr" :key="index">{{item}}</view>
|
||||||
|
</picker-view-column>
|
||||||
|
</block>
|
||||||
|
</picker-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'range-dtpicker',
|
||||||
|
props: {
|
||||||
|
//粒度
|
||||||
|
fields:{
|
||||||
|
type: String,
|
||||||
|
default: 'day'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* picker允许选中的最小值
|
||||||
|
*/
|
||||||
|
start: {
|
||||||
|
type: String,
|
||||||
|
default: '1900-01-01'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* picker允许选中的最大值
|
||||||
|
*/
|
||||||
|
end: {
|
||||||
|
type: String,
|
||||||
|
default: '2200-12-01'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* picker默认展示的值
|
||||||
|
*/
|
||||||
|
value: {
|
||||||
|
type: Array,
|
||||||
|
default(){
|
||||||
|
return [0,0]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//是否显示
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
主题色
|
||||||
|
*/
|
||||||
|
themeColor:{
|
||||||
|
type: String,
|
||||||
|
default: '#4C83D6'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showPicker: this.show,
|
||||||
|
dayArr:[],
|
||||||
|
pickerValue:this.fields=='year'?[0]:this.fields=='month'?[0,0]:[0,0,0],
|
||||||
|
dateType:"startDate",
|
||||||
|
startDate:'',
|
||||||
|
endDate:""
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value(value){
|
||||||
|
this.value=value;
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
show(isShow) {
|
||||||
|
this.showPicker = isShow;
|
||||||
|
},
|
||||||
|
start(){
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
end(){
|
||||||
|
this.init()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
yearArr(){
|
||||||
|
var arr = [],start = parseInt(this.start.slice(0,4)),end=parseInt(this.end.slice(0,4));
|
||||||
|
for(var i=0;i<=end-start;i++){
|
||||||
|
arr.push(start+i)
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
},
|
||||||
|
monthArr(){
|
||||||
|
var arr = [];
|
||||||
|
for(var i=1;i<=12;i++){
|
||||||
|
var v = i;
|
||||||
|
if(v<10)v="0"+v;
|
||||||
|
if(this.start.length>4&&this.end.length>4&&(this.start.slice(0,4)==this.end.slice(0,4))){
|
||||||
|
if(parseInt(v)>=this.start.slice(5,7)&&parseInt(v)<=this.end.slice(5,7)){
|
||||||
|
arr.push(v.toString())
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
arr.push(v.toString())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
returnHandle(){},
|
||||||
|
init(){
|
||||||
|
var that = this,pickerValue="";
|
||||||
|
if((this.fields=='year'&&this.start.length!=4)||(this.fields=='month'&&this.start.length!=7)||(this.fields=='day'&&this.start.length!=10)){
|
||||||
|
console.error("最小值格式与粒度格式不符");return;
|
||||||
|
}else if((this.fields=='year'&&this.end.length!=4)||(this.fields=='month'&&this.end.length!=7)||(this.fields=='day'&&this.end.length!=10)){
|
||||||
|
console.error("最大值格式与粒度格式不符");return;
|
||||||
|
}
|
||||||
|
var start=this.fields=='year'?this.start.slice(0,4):this.fields=='month'?this.start.slice(0,7):this.start,
|
||||||
|
end=this.fields=='year'?this.end.slice(0,4):this.fields=='month'?this.end.slice(0,7):this.end;
|
||||||
|
if(!start||!end){
|
||||||
|
console.error("时间不能为空");return;
|
||||||
|
}else if(start>end){
|
||||||
|
console.error("结束时间必须大等于开始时间");return;
|
||||||
|
}
|
||||||
|
if(this.value[0]){
|
||||||
|
if((this.fields=='year'&&this.value[0].length!=4)||(this.fields=='month'&&this.value[0].length!=7)||(this.fields=='day'&&this.value[0].length!=10)){
|
||||||
|
console.error("默认值格式与粒度格式不符");return;
|
||||||
|
}
|
||||||
|
this.startDate=this.value[0];
|
||||||
|
if(this.value[1]){
|
||||||
|
if((this.fields=='year'&&this.value[1].length!=4)||(this.fields=='month'&&this.value[1].length!=7)||(this.fields=='day'&&this.value[1].length!=10)){
|
||||||
|
console.error("默认值格式与粒度格式不符");return;
|
||||||
|
}
|
||||||
|
this.endDate=this.value[1];
|
||||||
|
this.dateType="endDate";
|
||||||
|
if(this.fields=='day')this.dayArr=this.getMonthDay(this.value[1].slice(0,4),this.value[1].slice(5,7));
|
||||||
|
pickerValue=this.getIndex(this.value[1]);
|
||||||
|
}else{
|
||||||
|
this.dateType="startDate";
|
||||||
|
if(this.fields=='day')this.dayArr=this.getMonthDay(this.value[0].slice(0,4),this.value[0].slice(5,7));
|
||||||
|
pickerValue=this.getIndex(this.value[0]);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.startDate=start;
|
||||||
|
pickerValue=this.getIndex(start);
|
||||||
|
if(this.fields=='day')this.dayArr=this.getMonthDay(start.slice(0,4),start.slice(5,7));
|
||||||
|
}
|
||||||
|
if(pickerValue)setTimeout(function(){that.pickerValue=pickerValue},20)
|
||||||
|
},
|
||||||
|
maskClick(){
|
||||||
|
this.$emit("showchange",false);
|
||||||
|
},
|
||||||
|
pickerConfirm(){
|
||||||
|
if(this.endDate<this.startDate){
|
||||||
|
uni.showToast({
|
||||||
|
title:"结束时间不得小于开始时间",
|
||||||
|
icon:"none",
|
||||||
|
mask:true
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$emit("change",[this.startDate,this.endDate]);
|
||||||
|
this.$emit("showchange",false);
|
||||||
|
},
|
||||||
|
pickerCancel(){
|
||||||
|
this.$emit("cancel");
|
||||||
|
this.$emit("showchange",false);
|
||||||
|
},
|
||||||
|
changeDateType(dateType){
|
||||||
|
var that = this;
|
||||||
|
this.dateType=dateType;
|
||||||
|
if(this[dateType]){
|
||||||
|
this.pickerValue=this.getIndex(this[dateType])
|
||||||
|
}else{
|
||||||
|
var dateTxt=this.fields=='year'?this.yearArr[this.pickerValue[0]]:this.fields=='month'?this.yearArr[this.pickerValue[0]]+'-'+this.monthArr[this.pickerValue[1]]:this.yearArr[this.pickerValue[0]]+'-'+this.monthArr[this.pickerValue[1]]+'-'+this.dayArr[this.pickerValue[2]];
|
||||||
|
this[dateType]=dateTxt;
|
||||||
|
this.pickerValue=this.fields=='year'?[this.pickerValue[0]]:this.fields=='month'?[this.pickerValue[0],this.pickerValue[1]]:[this.pickerValue[0],this.pickerValue[1],this.pickerValue[2]];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pickerChangeMul(e){
|
||||||
|
var that=this,val = e.detail.value,dateTxt="";
|
||||||
|
if(this.fields=='day'&&(val[0]!=this.pickerValue[0]||val[1]!=this.pickerValue[1])){
|
||||||
|
this.dayArr=this.getMonthDay(this.yearArr[val[0]],this.monthArr[val[1]])
|
||||||
|
function returnMax(){
|
||||||
|
if(!that.dayArr[val[2]]){
|
||||||
|
val[2]=(val[2]-1)
|
||||||
|
returnMax()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
returnMax()
|
||||||
|
}
|
||||||
|
dateTxt=this.yearArr[val[0]]+'-'+this.monthArr[val[1]]+'-'+this.dayArr[val[2]];
|
||||||
|
this[this.dateType]=this.fields=='year'?dateTxt.slice(0,4):this.fields=='month'?dateTxt.slice(0,7):dateTxt;
|
||||||
|
this.pickerValue=this.getIndex(this[this.dateType]);
|
||||||
|
},
|
||||||
|
getIndex(value){
|
||||||
|
var year = value.slice(0,4),month=value.slice(5,7),day=value.slice(8,10),y=0,m=0,d=0;
|
||||||
|
for(var i in this.yearArr){
|
||||||
|
if(year==this.yearArr[i]){
|
||||||
|
y=i;break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(var i in this.monthArr){
|
||||||
|
if(month==this.monthArr[i]){
|
||||||
|
m=i;break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(var i in this.dayArr){
|
||||||
|
if(day==this.dayArr[i]){
|
||||||
|
d=i;break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var value = [];
|
||||||
|
switch (this.fields){
|
||||||
|
case 'year':value = [Number(y)]
|
||||||
|
break;
|
||||||
|
case 'month':value = [Number(y),Number(m)]
|
||||||
|
break;
|
||||||
|
default:value = [Number(y),Number(m),Number(d)]
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
withData: (num) => {
|
||||||
|
let param = parseInt(num);
|
||||||
|
return param < 10 ? '0' + param : '' + param;
|
||||||
|
},
|
||||||
|
getLoopArray(start, end,specialDay){
|
||||||
|
var start = start || 0;
|
||||||
|
var end = end || 1;
|
||||||
|
var array = [];
|
||||||
|
if(specialDay){
|
||||||
|
array=specialDay;
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
for (var i = start; i <= end; i++) {
|
||||||
|
array.push(this.withData(i));
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
},
|
||||||
|
getMonthDay(year, month,specialDay){
|
||||||
|
var flag = year % 400 == 0 || (year % 4 == 0 && year % 100 != 0), array = null;
|
||||||
|
|
||||||
|
switch (month) {
|
||||||
|
case '01':
|
||||||
|
case '03':
|
||||||
|
case '05':
|
||||||
|
case '07':
|
||||||
|
case '08':
|
||||||
|
case '10':
|
||||||
|
case '12':
|
||||||
|
array = this.getLoopArray(1, 31,specialDay)
|
||||||
|
break;
|
||||||
|
case '04':
|
||||||
|
case '06':
|
||||||
|
case '09':
|
||||||
|
case '11':
|
||||||
|
array = this.getLoopArray(1, 30,specialDay)
|
||||||
|
break;
|
||||||
|
case '02':
|
||||||
|
array = flag ? this.getLoopArray(1, 29,specialDay) : this.getLoopArray(1, 28,specialDay)
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
array = '月份格式不正确,请重新输入!'
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.pickerMask {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 998;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.r-dtpicker {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
transform: translateY(100%);
|
||||||
|
z-index: 998;
|
||||||
|
}
|
||||||
|
|
||||||
|
.r-dtpicker-show {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rdtBtn {
|
||||||
|
display: flex;
|
||||||
|
padding: 9px 15px;
|
||||||
|
background-color: #fff;
|
||||||
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rdtBtn:after {
|
||||||
|
content: ' ';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 1px;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
color: #e5e5e5;
|
||||||
|
transform-origin: 0 100%;
|
||||||
|
transform: scaleY(0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rdtBtn view{
|
||||||
|
display: block;
|
||||||
|
flex: 1;
|
||||||
|
color: #1aad19;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rdtBtn view:first-child {
|
||||||
|
text-align: left;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rdtBtn view:last-child {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.picker-item {
|
||||||
|
text-align: center;
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mpvue-picker-view {
|
||||||
|
position: relative;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 238px;
|
||||||
|
background-color: rgba(255, 255, 255, 1);
|
||||||
|
}
|
||||||
|
.rangeBox{
|
||||||
|
background: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 15px 0;
|
||||||
|
font-size: 16px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.rangeBox input{
|
||||||
|
width: 180upx;
|
||||||
|
margin: 0 10px;
|
||||||
|
text-align: center;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
min-height: auto;
|
||||||
|
border-bottom: 1px solid #000;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,97 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="status_bar">
|
||||||
|
<!-- 这里是状态栏 -->
|
||||||
|
</view>
|
||||||
|
<u-tabbar
|
||||||
|
:value="current"
|
||||||
|
@change="changeTab"
|
||||||
|
:fixed="true"
|
||||||
|
:placeholder="false"
|
||||||
|
:safeAreaInsetBottom="true"
|
||||||
|
:border="false"
|
||||||
|
activeColor="#FCB462"
|
||||||
|
inactiveColor="#6D6D6D"
|
||||||
|
>
|
||||||
|
<u-tabbar-item
|
||||||
|
v-for="(item, index) in tabBarList"
|
||||||
|
:key="index"
|
||||||
|
:text="item.text"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
class="u-page__item__slot-icon"
|
||||||
|
slot="inactive-icon"
|
||||||
|
:src="item.iconPath"
|
||||||
|
></image>
|
||||||
|
<image
|
||||||
|
class="u-page__item__slot-icon"
|
||||||
|
slot="active-icon"
|
||||||
|
:src="item.selectedIconPath"
|
||||||
|
></image>
|
||||||
|
</u-tabbar-item>
|
||||||
|
</u-tabbar>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from "vuex";
|
||||||
|
export default {
|
||||||
|
name: "tabBar",
|
||||||
|
props: {
|
||||||
|
currentPage: String,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
current: 0,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(["tabBarList"]),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
changeTab(e) {
|
||||||
|
console.log(e);
|
||||||
|
console.log(this.tabBarList);
|
||||||
|
let page = "/" + this.tabBarList[e].pagePath;
|
||||||
|
console.log(page);
|
||||||
|
uni.switchTab({
|
||||||
|
url: page,
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res);
|
||||||
|
},
|
||||||
|
fail: (e) => {
|
||||||
|
console.log(e);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
//隐藏原生tabbar
|
||||||
|
uni.hideTabBar();
|
||||||
|
// 当前选中的菜单
|
||||||
|
this.tabBarList.forEach((i, index) => {
|
||||||
|
if (i.pagePath == this.currentPage) {
|
||||||
|
this.current = index;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.status_bar {
|
||||||
|
height: var(--status-bar-height);
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.u-page__item__slot-icon {
|
||||||
|
width: 68rpx;
|
||||||
|
height: 68rpx;
|
||||||
|
}
|
||||||
|
.u-tabbar /deep/ .u-tabbar--fixed {
|
||||||
|
width: 92%;
|
||||||
|
padding: 9px;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
bottom: 10px;
|
||||||
|
left: 1.7%;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,131 @@
|
|||||||
|
|
||||||
|
<template>
|
||||||
|
<u-popup :show="show" mode="bottom">
|
||||||
|
<view class="box">
|
||||||
|
<view class="head">
|
||||||
|
<view>请选择参观时间段</view>
|
||||||
|
<u-icon name="close-circle" size="48rpx" @click="close"></u-icon>
|
||||||
|
</view>
|
||||||
|
<u-divider lineColor="#868686"></u-divider>
|
||||||
|
<view class="container">
|
||||||
|
<view :class="[{'active':current === index},'card']" @click="handelInfo(index,item)" v-for="(item,index) in appointmentTimeList" :key="index">
|
||||||
|
<view class="time">
|
||||||
|
<view>{{item.date}}</view>
|
||||||
|
<view>{{item.time}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="count" v-if="item.residue>0">*剩余{{item.residue}}人</view>
|
||||||
|
<view class="count" v-else>*满员</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-divider lineColor="#868686"></u-divider>
|
||||||
|
<view class="foot">
|
||||||
|
<u-button text="确定" class="btn" @click="onConfirm"></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</u-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
current:-1,
|
||||||
|
currentObj:{}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: ['show','appointmentTimeList'],
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.$emit("update:show", false)
|
||||||
|
},
|
||||||
|
handelInfo(index,item) {
|
||||||
|
this.current = index
|
||||||
|
this.currentObj = item
|
||||||
|
},
|
||||||
|
onConfirm() {
|
||||||
|
if(!Object.keys(this.currentObj).length){
|
||||||
|
return this.$common.msgToast("请选择一个参观时间段", null, "error");
|
||||||
|
}
|
||||||
|
this.$emit("onConfirm", this.currentObj)
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
/deep/ .u-transition {
|
||||||
|
height: 752rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
padding: 30rpx;
|
||||||
|
|
||||||
|
.head {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
height: 410rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
.card {
|
||||||
|
margin: 5rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 220rpx;
|
||||||
|
height: 140rpx;
|
||||||
|
border: 2px solid #1836C8;
|
||||||
|
border-radius: 32rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding-right: 10rpx;
|
||||||
|
padding-bottom: 12rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
|
||||||
|
.time {
|
||||||
|
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.count {
|
||||||
|
font-size: 16rpx;
|
||||||
|
color: #9DADFE;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.active{
|
||||||
|
background-color: #1936C9;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.foot {
|
||||||
|
.btn {
|
||||||
|
width: 436rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border-radius: 32rpx;
|
||||||
|
background-color: #1936C9;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.container::after {
|
||||||
|
content: '';
|
||||||
|
flex: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@
|
|||||||
|
.w-picker-flex2 {
|
||||||
|
flex: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w-picker-flex1 {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w-picker-view {
|
||||||
|
width: 100%;
|
||||||
|
height: 540upx;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: rgba(255, 255, 255, 1);
|
||||||
|
z-index: 666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.d-picker-view {
|
||||||
|
height: 75%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w-picker-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
/* height: 88upx; */
|
||||||
|
/* line-height: 88upx; */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: 30upx;
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
export default {
|
||||||
|
// backUrl: 'http://172.16.100.93:9023',
|
||||||
|
// backUrl: 'https://appointtest.szjixun.cn',
|
||||||
|
// backUrl: 'https://appoint.szjixun.cn',
|
||||||
|
// backUrl: "https://appointtest2.szjixun.cn",
|
||||||
|
backUrl: "http://114.218.158.24:9020",
|
||||||
|
};
|
@ -0,0 +1,13 @@
|
|||||||
|
import http from './interface'
|
||||||
|
|
||||||
|
export const request = (url, data, type) => {
|
||||||
|
return http.request({
|
||||||
|
url: url,
|
||||||
|
method: type || 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
request,
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<script>
|
||||||
|
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||||
|
CSS.supports('top: constant(a)'))
|
||||||
|
document.write(
|
||||||
|
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||||
|
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||||
|
</script>
|
||||||
|
<title></title>
|
||||||
|
<!--preload-links-->
|
||||||
|
<!--app-context-->
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="app">
|
||||||
|
<!--app-html-->
|
||||||
|
</div>
|
||||||
|
<script type="module" src="/main.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,24 @@
|
|||||||
|
import App from "./App";
|
||||||
|
|
||||||
|
import Vue from "vue";
|
||||||
|
import uView from "uview-ui";
|
||||||
|
import store from "./store/index.js";
|
||||||
|
import common from "./common/index.js";
|
||||||
|
import api from "@/http/";
|
||||||
|
import moment from "moment";
|
||||||
|
import ww from "chinese-workday";
|
||||||
|
|
||||||
|
Vue.use(uView);
|
||||||
|
Vue.prototype.$api = api;
|
||||||
|
Vue.prototype.$common = common;
|
||||||
|
Vue.prototype.$moment = moment;
|
||||||
|
Vue.prototype.$isWorkday = ww.isWorkday;
|
||||||
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
|
// Vue.config.ignoredElements.push("wx-open-launch-weapp");
|
||||||
|
App.mpType = "app";
|
||||||
|
const app = new Vue({
|
||||||
|
...App,
|
||||||
|
store,
|
||||||
|
});
|
||||||
|
app.$mount();
|
@ -0,0 +1,139 @@
|
|||||||
|
{
|
||||||
|
"name" : "FONCHAT",
|
||||||
|
"appid" : "__UNI__84B5B31",
|
||||||
|
"description" : "",
|
||||||
|
"versionName" : "1.0.1",
|
||||||
|
"versionCode" : 101,
|
||||||
|
"transformPx" : false,
|
||||||
|
/* 5+App特有相关 */
|
||||||
|
"app-plus" : {
|
||||||
|
"usingComponents" : true,
|
||||||
|
"nvueStyleCompiler" : "uni-app",
|
||||||
|
"compilerVersion" : 3,
|
||||||
|
"splashscreen" : {
|
||||||
|
"alwaysShowBeforeRender" : true,
|
||||||
|
"waiting" : true,
|
||||||
|
"autoclose" : true,
|
||||||
|
"delay" : 0
|
||||||
|
},
|
||||||
|
/* 模块配置 */
|
||||||
|
"modules" : {},
|
||||||
|
/* 应用发布信息 */
|
||||||
|
"distribute" : {
|
||||||
|
/* android打包配置 */
|
||||||
|
"android" : {
|
||||||
|
"permissions" : [
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
|
],
|
||||||
|
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
|
||||||
|
},
|
||||||
|
/* ios打包配置 */
|
||||||
|
"ios" : {
|
||||||
|
"dSYMs" : false
|
||||||
|
},
|
||||||
|
/* SDK配置 */
|
||||||
|
"sdkConfigs" : {
|
||||||
|
"ad" : {}
|
||||||
|
},
|
||||||
|
"icons" : {
|
||||||
|
"android" : {
|
||||||
|
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||||
|
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||||
|
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||||
|
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||||
|
},
|
||||||
|
"ios" : {
|
||||||
|
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||||
|
"ipad" : {
|
||||||
|
"app" : "unpackage/res/icons/76x76.png",
|
||||||
|
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||||
|
"notification" : "unpackage/res/icons/20x20.png",
|
||||||
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
|
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||||
|
"settings" : "unpackage/res/icons/29x29.png",
|
||||||
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
|
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||||
|
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||||
|
},
|
||||||
|
"iphone" : {
|
||||||
|
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||||
|
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||||
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
|
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||||
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
|
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||||
|
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||||
|
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* 快应用特有相关 */
|
||||||
|
"quickapp" : {},
|
||||||
|
/* 小程序特有相关 */
|
||||||
|
"mp-weixin" : {
|
||||||
|
"appid" : "",
|
||||||
|
"setting" : {
|
||||||
|
"urlCheck" : false
|
||||||
|
},
|
||||||
|
"usingComponents" : true,
|
||||||
|
"unipush" : {
|
||||||
|
"enable" : false
|
||||||
|
},
|
||||||
|
"permission" : {
|
||||||
|
"scope.userLocation" : {
|
||||||
|
"desc" : ""
|
||||||
|
},
|
||||||
|
"permission" : {
|
||||||
|
"jsApiDomain" : "https://appointteam.szjixun.cn"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mp-alipay" : {
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"mp-baidu" : {
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"mp-toutiao" : {
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : false
|
||||||
|
},
|
||||||
|
"vueVersion" : "2",
|
||||||
|
"h5" : {
|
||||||
|
"template" : "",
|
||||||
|
"sdkConfigs" : {
|
||||||
|
"maps" : {
|
||||||
|
"amap" : {
|
||||||
|
"key" : "e152c1daf64d0f1d1b2370d4e58ebed7",
|
||||||
|
"securityJsCode" : "23a195cc14b23f62e7203f3ad91fd43c",
|
||||||
|
"serviceHost" : ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"publicPath" : "./",
|
||||||
|
"router" : {
|
||||||
|
"base" : ""
|
||||||
|
},
|
||||||
|
"devServer" : {
|
||||||
|
"https" : false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
"name": "日期区间picker",
|
||||||
|
"version": "1.0.7",
|
||||||
|
"lockfileVersion": 2,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "日期区间picker",
|
||||||
|
"version": "1.0.7",
|
||||||
|
"dependencies": {
|
||||||
|
"chinese-workday": "^1.9.0",
|
||||||
|
"jweixin-module": "^1.6.0",
|
||||||
|
"moment": "^2.29.4",
|
||||||
|
"weixin-js-sdk": "^1.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/chinese-workday": {
|
||||||
|
"version": "1.9.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/chinese-workday/-/chinese-workday-1.9.0.tgz",
|
||||||
|
"integrity": "sha512-qXxFBFpMQzCaHOBs4VnVEVnTySWkCfxE/1fSbibtrJIB+qnjioDrjgQtXAzCvaqKndhYKS6PVl4BPtv/gMCO+w=="
|
||||||
|
},
|
||||||
|
"node_modules/jweixin-module": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/jweixin-module/-/jweixin-module-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
|
||||||
|
},
|
||||||
|
"node_modules/moment": {
|
||||||
|
"version": "2.29.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
|
||||||
|
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==",
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/weixin-js-sdk": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-3IYQH7aalJGFJrwdT3epvTdR1MboMiH7vIZ5BRL2eYOJ12BNah7csoMkmSZzkq1+l92sSq29XdTCVjCJoK2sBQ=="
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"chinese-workday": {
|
||||||
|
"version": "1.9.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/chinese-workday/-/chinese-workday-1.9.0.tgz",
|
||||||
|
"integrity": "sha512-qXxFBFpMQzCaHOBs4VnVEVnTySWkCfxE/1fSbibtrJIB+qnjioDrjgQtXAzCvaqKndhYKS6PVl4BPtv/gMCO+w=="
|
||||||
|
},
|
||||||
|
"jweixin-module": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/jweixin-module/-/jweixin-module-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
|
||||||
|
},
|
||||||
|
"moment": {
|
||||||
|
"version": "2.29.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
|
||||||
|
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
|
||||||
|
},
|
||||||
|
"weixin-js-sdk": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-3IYQH7aalJGFJrwdT3epvTdR1MboMiH7vIZ5BRL2eYOJ12BNah7csoMkmSZzkq1+l92sSq29XdTCVjCJoK2sBQ=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"id": "pyh-rdtpicker",
|
||||||
|
"name": "日期区间picker",
|
||||||
|
"version": "1.0.7",
|
||||||
|
"description": "日期区间选择组件,可选粒度,可自定义主题",
|
||||||
|
"keywords": [
|
||||||
|
"日期",
|
||||||
|
"区间",
|
||||||
|
"时间",
|
||||||
|
"组件",
|
||||||
|
"选择"
|
||||||
|
],
|
||||||
|
"dcloudext": {
|
||||||
|
"category": [
|
||||||
|
"前端组件",
|
||||||
|
"通用组件"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"chinese-workday": "^1.9.0",
|
||||||
|
"jweixin-module": "^1.6.0",
|
||||||
|
"moment": "^2.29.4",
|
||||||
|
"weixin-js-sdk": "^1.6.0"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"easycom": {
|
||||||
|
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
||||||
|
},
|
||||||
|
"pages": [
|
||||||
|
{
|
||||||
|
// 首页
|
||||||
|
"path": "pages/index/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "FONCHAT",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": false // 禁用原生导航
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
"globalStyle": {
|
||||||
|
"navigationBarTextStyle": "black",
|
||||||
|
"navigationBarTitleText": "uni-app",
|
||||||
|
"navigationBarBackgroundColor": "#F8F8F8",
|
||||||
|
"backgroundColor": "#F8F8F8"
|
||||||
|
},
|
||||||
|
|
||||||
|
"uniIdRouter": {}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"appid": "wx1e155fd041eda3be",
|
||||||
|
"compileType": "miniprogram",
|
||||||
|
"libVersion": "2.31.1",
|
||||||
|
"packOptions": {
|
||||||
|
"ignore": [],
|
||||||
|
"include": []
|
||||||
|
},
|
||||||
|
"setting": {
|
||||||
|
"coverView": true,
|
||||||
|
"es6": true,
|
||||||
|
"postcss": true,
|
||||||
|
"minified": true,
|
||||||
|
"enhance": true,
|
||||||
|
"showShadowRootInWxmlPanel": true,
|
||||||
|
"packNpmRelationList": [],
|
||||||
|
"babelSetting": {
|
||||||
|
"ignore": [],
|
||||||
|
"disablePlugins": [],
|
||||||
|
"outputPath": ""
|
||||||
|
},
|
||||||
|
"condition": false
|
||||||
|
},
|
||||||
|
"condition": {},
|
||||||
|
"editorSetting": {
|
||||||
|
"tabIndent": "insertSpaces",
|
||||||
|
"tabSize": 2
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
@ -0,0 +1,16 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import Vuex from 'vuex'
|
||||||
|
|
||||||
|
Vue.use(Vuex)
|
||||||
|
|
||||||
|
const store = new Vuex.Store({
|
||||||
|
state: {
|
||||||
|
},
|
||||||
|
getters: {
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
export default store
|
@ -0,0 +1,10 @@
|
|||||||
|
uni.addInterceptor({
|
||||||
|
returnValue (res) {
|
||||||
|
if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
res.then((res) => res[0] ? reject(res[0]) : resolve(res[1]));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
@ -0,0 +1,381 @@
|
|||||||
|
<template>
|
||||||
|
<view class="superwei-combox" :class="border ? '' : 'superwei-combox__no-border'">
|
||||||
|
<view v-if="label" class="superwei-combox__label" :style="labelStyle">
|
||||||
|
<text>{{label}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="superwei-combox__input-box">
|
||||||
|
<input class="superwei-combox__input" type="text" :placeholder="placeholder"
|
||||||
|
placeholder-class="superwei-combox__input-plac" v-model="inputVal" @input="onInput" @focus="onFocus"
|
||||||
|
@blur="onBlur" />
|
||||||
|
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" @click="toggleSelector">
|
||||||
|
</uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="superwei-combox__selector" v-if="showSelector">
|
||||||
|
<view class="uni-popper__arrow"></view>
|
||||||
|
<scroll-view scroll-y="true" class="superwei-combox__selector-scroll">
|
||||||
|
<view class="superwei-combox__selector-empty" v-if="filterCandidatesLength === 0">
|
||||||
|
<text>{{emptyTips}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="superwei-combox__selector-item" v-for="(item,index) in filterCandidates" :key="index">
|
||||||
|
<template v-if="(isJSON?(item.disabled?true:false):false)">
|
||||||
|
<text
|
||||||
|
:style="'color:'+disabledColor+';cursor: not-allowed;'">{{isJSON?item[keyName]?item[keyName]:'字段'+keyName+'不存在':item}}</text>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<text @click="onSelectorClick(index)"
|
||||||
|
:style="(isJSON?item[keyName]?item[keyName]==inputVal:false:item==inputVal)?'font-weight: bold;background-color: '+selectedBackground+';color: '+selectedColor:''">{{isJSON?item[keyName]?item[keyName]:'字段'+keyName+'不存在':item}}</text>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* Combox 组合输入框
|
||||||
|
* @description 组合输入框一般用于既可以输入也可以选择的场景
|
||||||
|
* @property {String} label 左侧文字
|
||||||
|
* @property {String} labelWidth 左侧内容宽度
|
||||||
|
* @property {String} placeholder 输入框占位符
|
||||||
|
* @property {Array} candidates 候选项列表
|
||||||
|
* @property {String} emptyTips 筛选结果为空时显示的文字
|
||||||
|
* @property {String} value 组合框的值
|
||||||
|
* @property {String} selectedBackground 选中项背景颜色
|
||||||
|
* @property {String} selectedColor 选中项文字颜色
|
||||||
|
* @property {Boolean} isJSON 是否是json数组
|
||||||
|
* @property {String} keyName json数组显示的字段值
|
||||||
|
* @property {String} disabledColor 禁用项文字颜色
|
||||||
|
* @property {Boolean} isAllowCreate 是否允许用户创建新条目
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
name: 'superweiCombox',
|
||||||
|
emits: ['input', 'update:modelValue', 'select'],
|
||||||
|
props: {
|
||||||
|
isAllowCreate: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
disabledColor: {
|
||||||
|
type: String,
|
||||||
|
default: '#ababac'
|
||||||
|
},
|
||||||
|
isJSON: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
keyName: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
selectedBackground: {
|
||||||
|
type: String,
|
||||||
|
default: '#f5f7fa'
|
||||||
|
},
|
||||||
|
selectedColor: {
|
||||||
|
type: String,
|
||||||
|
default: '#409eff'
|
||||||
|
},
|
||||||
|
border: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
labelWidth: {
|
||||||
|
type: String,
|
||||||
|
default: 'auto'
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
candidates: {
|
||||||
|
type: Array,
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emptyTips: {
|
||||||
|
type: String,
|
||||||
|
default: '无匹配项'
|
||||||
|
},
|
||||||
|
// #ifndef VUE3
|
||||||
|
value: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
modelValue: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isInput: false,
|
||||||
|
showSelector: false,
|
||||||
|
isSelector: false,
|
||||||
|
inputVal: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
labelStyle() {
|
||||||
|
if (this.labelWidth === 'auto') {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return `width: ${this.labelWidth}`
|
||||||
|
},
|
||||||
|
filterCandidates() {
|
||||||
|
if (this.isInput) {
|
||||||
|
if (this.isJSON) {
|
||||||
|
return this.candidates.filter((item) => {
|
||||||
|
return item[this.keyName].toString().indexOf(this.inputVal) > -1
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return this.candidates.filter((item) => {
|
||||||
|
return item.toString().indexOf(this.inputVal) > -1
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return this.candidates
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filterCandidatesLength() {
|
||||||
|
return this.filterCandidates.length
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// #ifndef VUE3
|
||||||
|
value: {
|
||||||
|
handler(newVal) {
|
||||||
|
this.inputVal = newVal
|
||||||
|
this.isInput = true
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
modelValue: {
|
||||||
|
handler(newVal) {
|
||||||
|
this.inputVal = newVal
|
||||||
|
this.isInput = true
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggleSelector() {
|
||||||
|
this.showSelector = !this.showSelector
|
||||||
|
this.isInput = false
|
||||||
|
},
|
||||||
|
onFocus() {
|
||||||
|
this.showSelector = true
|
||||||
|
this.isInput = false
|
||||||
|
},
|
||||||
|
onChange() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showSelector = false
|
||||||
|
this.isInput = false
|
||||||
|
}, 200)
|
||||||
|
},
|
||||||
|
onBlur() {
|
||||||
|
if (!this.isInput) {
|
||||||
|
this.onChange()
|
||||||
|
} else {
|
||||||
|
if (this.inputVal && !this.isAllowCreate) {
|
||||||
|
let index = this.candidates.findIndex((item) => {
|
||||||
|
if (this.isJSON) {
|
||||||
|
return item[this.keyName].toString() == this.inputVal && !item.disabled
|
||||||
|
} else {
|
||||||
|
return item.toString() == this.inputVal
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (index == -1) {
|
||||||
|
if (this.filterCandidatesLength > 0) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showSelector = false
|
||||||
|
this.isInput = false
|
||||||
|
if (!this.isSelector) {
|
||||||
|
this.inputVal = ''
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal)
|
||||||
|
}
|
||||||
|
}, 200)
|
||||||
|
this.isSelector = false
|
||||||
|
} else {
|
||||||
|
this.showSelector = false
|
||||||
|
this.isInput = false
|
||||||
|
this.inputVal = ''
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.onChange()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.onChange()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSelectorClick(index) {
|
||||||
|
let item = this.filterCandidates[index]
|
||||||
|
if (this.isJSON) {
|
||||||
|
this.inputVal = item[this.keyName]
|
||||||
|
} else {
|
||||||
|
this.inputVal = item
|
||||||
|
}
|
||||||
|
this.showSelector = false
|
||||||
|
this.isSelector = true
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal)
|
||||||
|
this.$emit('select', item)
|
||||||
|
},
|
||||||
|
onInput() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.superwei-combox {
|
||||||
|
font-size: 24upx;
|
||||||
|
// border: 1px solid #DCDFE6;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
// height: 40px;
|
||||||
|
flex-direction: row;
|
||||||
|
box-sizing: border-box;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 32upx;
|
||||||
|
height: 60upx;
|
||||||
|
padding: 0 10upx;
|
||||||
|
// border-bottom: solid 1px #DDDDDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__label {
|
||||||
|
font-size: 24upx;
|
||||||
|
line-height: 22px;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__input-box {
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__input {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 24upx;
|
||||||
|
height: 22px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__input-plac {
|
||||||
|
font-size: 24upx;
|
||||||
|
color: #ccc; //placeholder-style="color:#FFFFFF"
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__selector {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 12px);
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border: 1px solid #EBEEF5;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 2;
|
||||||
|
padding: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__selector-scroll {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
max-height: 200px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__selector-empty,
|
||||||
|
.superwei-combox__selector-item {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
cursor: pointer;
|
||||||
|
/* #endif */
|
||||||
|
line-height: 36px;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: center;
|
||||||
|
// border-bottom: solid 1px #DDDDDD;
|
||||||
|
padding: 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__selector-empty text,
|
||||||
|
.superwei-combox__selector-item text {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__selector-item:hover {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__selector-empty:last-child,
|
||||||
|
.superwei-combox__selector-item:last-child {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
border-bottom: none;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
// picker 弹出层通用的指示小三角
|
||||||
|
.uni-popper__arrow,
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow {
|
||||||
|
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
||||||
|
top: -6px;
|
||||||
|
left: 10%;
|
||||||
|
margin-right: 3px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #EBEEF5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
content: " ";
|
||||||
|
top: 1px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superwei-combox__no-border {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,104 @@
|
|||||||
|
## 基本用法
|
||||||
|
在 ``template`` 中使用组件
|
||||||
|
```html
|
||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<span class="title">非JSON数组模式</span>
|
||||||
|
<superwei-combox :candidates="candidates" placeholder="请选择或输入" v-model="inputValue" @input="input"
|
||||||
|
@select="select"></superwei-combox>
|
||||||
|
|
||||||
|
<span class="title">JSON数组模式</span>
|
||||||
|
<superwei-combox :candidates="candidates_json" :isJSON="true" keyName="name" placeholder="请选择或输入"
|
||||||
|
v-model="inputValue_json" @input="input_json" @select="select_json"></superwei-combox>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
inputValue: '',
|
||||||
|
candidates: ['选项一', '选项二', '选项三', '选项四', '选项五', '选项六', '...'],
|
||||||
|
|
||||||
|
inputValue_json: '',
|
||||||
|
candidates_json: [{
|
||||||
|
id: '1',
|
||||||
|
name: '选项一'
|
||||||
|
}, {
|
||||||
|
id: '2',
|
||||||
|
name: '选项二',
|
||||||
|
disabled: true // 单独设置disabled后即可禁用该选项
|
||||||
|
}, {
|
||||||
|
id: '3',
|
||||||
|
name: '选项三'
|
||||||
|
}, {
|
||||||
|
id: '4',
|
||||||
|
name: '选项四'
|
||||||
|
}, {
|
||||||
|
id: '5',
|
||||||
|
name: '选项五',
|
||||||
|
disabled: true // 单独设置disabled后即可禁用该选项
|
||||||
|
}, {
|
||||||
|
id: '6',
|
||||||
|
name: '...'
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
input(e) {
|
||||||
|
console.log(e) // 选项一
|
||||||
|
},
|
||||||
|
select(e) {
|
||||||
|
console.log(e) // 选项一
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
input_json(e) {
|
||||||
|
console.log(e) // 选项一
|
||||||
|
},
|
||||||
|
select_json(e) {
|
||||||
|
console.log(e) // {id: '1',name: '选项一'}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
```
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
### Combox Props
|
||||||
|
|
||||||
|
|属性名 |类型 |默认值 |说明 |
|
||||||
|
|:-: |:-: |:-: |:-: |
|
||||||
|
|label |String |- |标签文字 |
|
||||||
|
|value |String |- |combox的值 |
|
||||||
|
|labelWidth |String |auto |标签宽度,有单位字符串,如:'100px' |
|
||||||
|
|placeholder|String |- |输入框占位符 |
|
||||||
|
|candidates |Array/String |[] |候选字段 |
|
||||||
|
|emptyTips |String |无匹配项 |无匹配项时的提示语 |
|
||||||
|
|selectedBackground |String |#f5f7fa |选中项背景颜色 |
|
||||||
|
|selectedColor |String |#409eff |选中项文字颜色 |
|
||||||
|
|isJSON |Boolean |false |候选字段是否是json数组 |
|
||||||
|
|keyName |String |- |json数组显示的字段值 |
|
||||||
|
|disabledColor |String |#ababac |禁用项文字颜色 |
|
||||||
|
|isAllowCreate |Boolean |true |是否允许用户创建新条目 |
|
||||||
|
|
||||||
|
### Combox Events
|
||||||
|
|
||||||
|
|事件称名 |说明 |返回值 |
|
||||||
|
|:-: |:-: |:-: |
|
||||||
|
|@input |combox输入事件 |返回combox输入值|
|
||||||
|
|@select|combox选择事件 |返回combox选项值|
|
@ -0,0 +1,275 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-combox" :class="border ? '' : 'uni-combox__no-border'">
|
||||||
|
<view v-if="label" class="uni-combox__label" :style="labelStyle">
|
||||||
|
<text>{{label}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="uni-combox__input-box">
|
||||||
|
<input class="uni-combox__input" type="text" :placeholder="placeholder"
|
||||||
|
placeholder-class="uni-combox__input-plac" v-model="inputVal" @input="onInput" @focus="onFocus"
|
||||||
|
@blur="onBlur" />
|
||||||
|
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" @click="toggleSelector">
|
||||||
|
</uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="uni-combox__selector" v-if="showSelector">
|
||||||
|
<view class="uni-popper__arrow"></view>
|
||||||
|
<scroll-view scroll-y="true" class="uni-combox__selector-scroll">
|
||||||
|
<view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0">
|
||||||
|
<text>{{emptyTips}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="uni-combox__selector-item" v-for="(item,index) in filterCandidates" :key="index"
|
||||||
|
@click="onSelectorClick(index)">
|
||||||
|
<text>{{item}}</text>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* Combox 组合输入框
|
||||||
|
* @description 组合输入框一般用于既可以输入也可以选择的场景
|
||||||
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=1261
|
||||||
|
* @property {String} label 左侧文字
|
||||||
|
* @property {String} labelWidth 左侧内容宽度
|
||||||
|
* @property {String} placeholder 输入框占位符
|
||||||
|
* @property {Array} candidates 候选项列表
|
||||||
|
* @property {String} emptyTips 筛选结果为空时显示的文字
|
||||||
|
* @property {String} value 组合框的值
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
name: 'uniCombox',
|
||||||
|
emits: ['input', 'update:modelValue'],
|
||||||
|
props: {
|
||||||
|
border: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
labelWidth: {
|
||||||
|
type: String,
|
||||||
|
default: 'auto'
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
candidates: {
|
||||||
|
type: Array,
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emptyTips: {
|
||||||
|
type: String,
|
||||||
|
default: '无匹配项'
|
||||||
|
},
|
||||||
|
// #ifndef VUE3
|
||||||
|
value: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
modelValue: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSelector: false,
|
||||||
|
inputVal: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
labelStyle() {
|
||||||
|
if (this.labelWidth === 'auto') {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return `width: ${this.labelWidth}`
|
||||||
|
},
|
||||||
|
filterCandidates() {
|
||||||
|
return this.candidates.filter((item) => {
|
||||||
|
return item.toString().indexOf(this.inputVal) > -1
|
||||||
|
})
|
||||||
|
},
|
||||||
|
filterCandidatesLength() {
|
||||||
|
return this.filterCandidates.length
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// #ifndef VUE3
|
||||||
|
value: {
|
||||||
|
handler(newVal) {
|
||||||
|
this.inputVal = newVal
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
modelValue: {
|
||||||
|
handler(newVal) {
|
||||||
|
this.inputVal = newVal
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggleSelector() {
|
||||||
|
this.showSelector = !this.showSelector
|
||||||
|
},
|
||||||
|
onFocus() {
|
||||||
|
this.showSelector = true
|
||||||
|
},
|
||||||
|
onBlur() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showSelector = false
|
||||||
|
}, 153)
|
||||||
|
},
|
||||||
|
onSelectorClick(index) {
|
||||||
|
this.inputVal = this.filterCandidates[index]
|
||||||
|
this.showSelector = false
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal)
|
||||||
|
},
|
||||||
|
onInput() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.uni-combox {
|
||||||
|
font-size: 14px;
|
||||||
|
border: 1px solid #DCDFE6;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 6px 10px;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
// height: 40px;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
// border-bottom: solid 1px #DDDDDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__label {
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 22px;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__input-box {
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__input {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 14px;
|
||||||
|
height: 22px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__input-plac {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__selector {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 12px);
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border: 1px solid #EBEEF5;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 2;
|
||||||
|
padding: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__selector-scroll {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
max-height: 200px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__selector-empty,
|
||||||
|
.uni-combox__selector-item {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
cursor: pointer;
|
||||||
|
/* #endif */
|
||||||
|
line-height: 36px;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: center;
|
||||||
|
// border-bottom: solid 1px #DDDDDD;
|
||||||
|
padding: 0px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__selector-item:hover {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__selector-empty:last-child,
|
||||||
|
.uni-combox__selector-item:last-child {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
border-bottom: none;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
// picker 弹出层通用的指示小三角
|
||||||
|
.uni-popper__arrow,
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow {
|
||||||
|
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
||||||
|
top: -6px;
|
||||||
|
left: 10%;
|
||||||
|
margin-right: 3px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #EBEEF5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
content: " ";
|
||||||
|
top: 1px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__no-border {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,90 @@
|
|||||||
|
{
|
||||||
|
"id": "uni-combox",
|
||||||
|
"displayName": "uni-combox 组合框",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"description": "可以选择也可以输入的表单项 ",
|
||||||
|
"keywords": [
|
||||||
|
"uni-ui",
|
||||||
|
"uniui",
|
||||||
|
"combox",
|
||||||
|
"组合框",
|
||||||
|
"select"
|
||||||
|
],
|
||||||
|
"repository": "https://github.com/dcloudio/uni-ui",
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": ""
|
||||||
|
},
|
||||||
|
"directories": {
|
||||||
|
"example": "../../temps/example_temps"
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"category": [
|
||||||
|
"前端组件",
|
||||||
|
"通用组件"
|
||||||
|
],
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "无",
|
||||||
|
"data": "无",
|
||||||
|
"permissions": "无"
|
||||||
|
},
|
||||||
|
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": [
|
||||||
|
"uni-scss",
|
||||||
|
"uni-icons"
|
||||||
|
],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "y",
|
||||||
|
"aliyun": "y"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"App": {
|
||||||
|
"app-vue": "y",
|
||||||
|
"app-nvue": "n"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "y",
|
||||||
|
"Android Browser": "y",
|
||||||
|
"微信浏览器(Android)": "y",
|
||||||
|
"QQ浏览器(Android)": "y"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "y",
|
||||||
|
"IE": "y",
|
||||||
|
"Edge": "y",
|
||||||
|
"Firefox": "y",
|
||||||
|
"Safari": "y"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "y",
|
||||||
|
"阿里": "y",
|
||||||
|
"百度": "y",
|
||||||
|
"字节跳动": "y",
|
||||||
|
"QQ": "y"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "u",
|
||||||
|
"联盟": "u"
|
||||||
|
},
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "y",
|
||||||
|
"vue3": "y"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,187 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-calendar-item__weeks-box" :class="{
|
||||||
|
'uni-calendar-item--disable':weeks.disable,
|
||||||
|
'uni-calendar-item--before-checked-x':weeks.beforeMultiple,
|
||||||
|
'uni-calendar-item--multiple': weeks.multiple,
|
||||||
|
'uni-calendar-item--after-checked-x':weeks.afterMultiple,
|
||||||
|
}" @click="choiceDate(weeks)" @mouseenter="handleMousemove(weeks)">
|
||||||
|
<view class="uni-calendar-item__weeks-box-item" :class="{
|
||||||
|
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && (calendar.userChecked || !checkHover),
|
||||||
|
'uni-calendar-item--checked-range-text': checkHover,
|
||||||
|
'uni-calendar-item--before-checked':weeks.beforeMultiple,
|
||||||
|
'uni-calendar-item--multiple': weeks.multiple,
|
||||||
|
'uni-calendar-item--after-checked':weeks.afterMultiple,
|
||||||
|
'uni-calendar-item--disable':weeks.disable,
|
||||||
|
}">
|
||||||
|
<text v-if="selected&&weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
|
||||||
|
<text class="uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text">{{weeks.date}}</text>
|
||||||
|
</view>
|
||||||
|
<view :class="{'uni-calendar-item--isDay': weeks.isDay}"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
weeks: {
|
||||||
|
type: Object,
|
||||||
|
default () {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selected: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lunar: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
checkHover: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
choiceDate(weeks) {
|
||||||
|
this.$emit('change', weeks)
|
||||||
|
},
|
||||||
|
handleMousemove(weeks) {
|
||||||
|
this.$emit('handleMouse', weeks)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" >
|
||||||
|
$uni-primary: #007aff !default;
|
||||||
|
|
||||||
|
.uni-calendar-item__weeks-box {
|
||||||
|
flex: 1;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin: 1px 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item__weeks-box-text {
|
||||||
|
font-size: 14px;
|
||||||
|
// font-family: Lato-Bold, Lato;
|
||||||
|
font-weight: bold;
|
||||||
|
color: darken($color: $uni-primary, $amount: 40%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item__weeks-lunar-text {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item__weeks-box-item {
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
/* #ifdef H5 */
|
||||||
|
cursor: pointer;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.uni-calendar-item__weeks-box-circle {
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 5px;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: #dd524d;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item__weeks-box .uni-calendar-item--disable {
|
||||||
|
// background-color: rgba(249, 249, 249, $uni-opacity-disabled);
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--disable .uni-calendar-item__weeks-box-text-disable {
|
||||||
|
color: #D1D1D1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--isDay {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
right: 17%;
|
||||||
|
background-color: #dd524d;
|
||||||
|
width:6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--extra {
|
||||||
|
color: #dd524d;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item__weeks-box .uni-calendar-item--checked {
|
||||||
|
background-color: $uni-primary;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 3px solid #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--checked .uni-calendar-item--checked-text {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--multiple .uni-calendar-item--checked-range-text {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--multiple {
|
||||||
|
background-color: #F6F7FC;
|
||||||
|
// color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--multiple .uni-calendar-item--before-checked,
|
||||||
|
.uni-calendar-item--multiple .uni-calendar-item--after-checked {
|
||||||
|
background-color: $uni-primary;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 3px solid #F6F7FC;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--before-checked .uni-calendar-item--checked-text,
|
||||||
|
.uni-calendar-item--after-checked .uni-calendar-item--checked-text {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--before-checked-x {
|
||||||
|
border-top-left-radius: 50px;
|
||||||
|
border-bottom-left-radius: 50px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #F6F7FC;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--after-checked-x {
|
||||||
|
border-top-right-radius: 50px;
|
||||||
|
border-bottom-right-radius: 50px;
|
||||||
|
background-color: #F6F7FC;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"uni-datetime-picker.selectDate": "select date",
|
||||||
|
"uni-datetime-picker.selectTime": "select time",
|
||||||
|
"uni-datetime-picker.selectDateTime": "select datetime",
|
||||||
|
"uni-datetime-picker.startDate": "start date",
|
||||||
|
"uni-datetime-picker.endDate": "end date",
|
||||||
|
"uni-datetime-picker.startTime": "start time",
|
||||||
|
"uni-datetime-picker.endTime": "end time",
|
||||||
|
"uni-datetime-picker.ok": "ok",
|
||||||
|
"uni-datetime-picker.clear": "clear",
|
||||||
|
"uni-datetime-picker.cancel": "cancel",
|
||||||
|
"uni-datetime-picker.year": "-",
|
||||||
|
"uni-datetime-picker.month": "",
|
||||||
|
"uni-calender.MON": "MON",
|
||||||
|
"uni-calender.TUE": "TUE",
|
||||||
|
"uni-calender.WED": "WED",
|
||||||
|
"uni-calender.THU": "THU",
|
||||||
|
"uni-calender.FRI": "FRI",
|
||||||
|
"uni-calender.SAT": "SAT",
|
||||||
|
"uni-calender.SUN": "SUN",
|
||||||
|
"uni-calender.confirm": "confirm"
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
import en from './en.json'
|
||||||
|
import zhHans from './zh-Hans.json'
|
||||||
|
import zhHant from './zh-Hant.json'
|
||||||
|
export default {
|
||||||
|
en,
|
||||||
|
'zh-Hans': zhHans,
|
||||||
|
'zh-Hant': zhHant
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"uni-datetime-picker.selectDate": "选择日期",
|
||||||
|
"uni-datetime-picker.selectTime": "选择时间",
|
||||||
|
"uni-datetime-picker.selectDateTime": "选择日期时间",
|
||||||
|
"uni-datetime-picker.startDate": "开始日期",
|
||||||
|
"uni-datetime-picker.endDate": "结束日期",
|
||||||
|
"uni-datetime-picker.startTime": "开始时间",
|
||||||
|
"uni-datetime-picker.endTime": "结束时间",
|
||||||
|
"uni-datetime-picker.ok": "确定",
|
||||||
|
"uni-datetime-picker.clear": "清除",
|
||||||
|
"uni-datetime-picker.cancel": "取消",
|
||||||
|
"uni-datetime-picker.year": "年",
|
||||||
|
"uni-datetime-picker.month": "月",
|
||||||
|
"uni-calender.SUN": "日",
|
||||||
|
"uni-calender.MON": "一",
|
||||||
|
"uni-calender.TUE": "二",
|
||||||
|
"uni-calender.WED": "三",
|
||||||
|
"uni-calender.THU": "四",
|
||||||
|
"uni-calender.FRI": "五",
|
||||||
|
"uni-calender.SAT": "六",
|
||||||
|
"uni-calender.confirm": "确认"
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"uni-datetime-picker.selectDate": "選擇日期",
|
||||||
|
"uni-datetime-picker.selectTime": "選擇時間",
|
||||||
|
"uni-datetime-picker.selectDateTime": "選擇日期時間",
|
||||||
|
"uni-datetime-picker.startDate": "開始日期",
|
||||||
|
"uni-datetime-picker.endDate": "結束日期",
|
||||||
|
"uni-datetime-picker.startTime": "開始时间",
|
||||||
|
"uni-datetime-picker.endTime": "結束时间",
|
||||||
|
"uni-datetime-picker.ok": "確定",
|
||||||
|
"uni-datetime-picker.clear": "清除",
|
||||||
|
"uni-datetime-picker.cancel": "取消",
|
||||||
|
"uni-datetime-picker.year": "年",
|
||||||
|
"uni-datetime-picker.month": "月",
|
||||||
|
"uni-calender.SUN": "日",
|
||||||
|
"uni-calender.MON": "一",
|
||||||
|
"uni-calender.TUE": "二",
|
||||||
|
"uni-calender.WED": "三",
|
||||||
|
"uni-calender.THU": "四",
|
||||||
|
"uni-calender.FRI": "五",
|
||||||
|
"uni-calender.SAT": "六",
|
||||||
|
"uni-calender.confirm": "確認"
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
// #ifdef H5
|
||||||
|
export default {
|
||||||
|
name: 'Keypress',
|
||||||
|
props: {
|
||||||
|
disable: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
const keyNames = {
|
||||||
|
esc: ['Esc', 'Escape'],
|
||||||
|
tab: 'Tab',
|
||||||
|
enter: 'Enter',
|
||||||
|
space: [' ', 'Spacebar'],
|
||||||
|
up: ['Up', 'ArrowUp'],
|
||||||
|
left: ['Left', 'ArrowLeft'],
|
||||||
|
right: ['Right', 'ArrowRight'],
|
||||||
|
down: ['Down', 'ArrowDown'],
|
||||||
|
delete: ['Backspace', 'Delete', 'Del']
|
||||||
|
}
|
||||||
|
const listener = ($event) => {
|
||||||
|
if (this.disable) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const keyName = Object.keys(keyNames).find(key => {
|
||||||
|
const keyName = $event.key
|
||||||
|
const value = keyNames[key]
|
||||||
|
return value === keyName || (Array.isArray(value) && value.includes(keyName))
|
||||||
|
})
|
||||||
|
if (keyName) {
|
||||||
|
// 避免和其他按键事件冲突
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$emit(keyName, {})
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.addEventListener('keyup', listener)
|
||||||
|
this.$once('hook:beforeDestroy', () => {
|
||||||
|
document.removeEventListener('keyup', listener)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
render: () => {}
|
||||||
|
}
|
||||||
|
// #endif
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,87 @@
|
|||||||
|
{
|
||||||
|
"id": "uni-datetime-picker",
|
||||||
|
"displayName": "uni-datetime-picker 日期选择器",
|
||||||
|
"version": "2.2.11",
|
||||||
|
"description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
|
||||||
|
"keywords": [
|
||||||
|
"uni-datetime-picker",
|
||||||
|
"uni-ui",
|
||||||
|
"uniui",
|
||||||
|
"日期时间选择器",
|
||||||
|
"日期时间"
|
||||||
|
],
|
||||||
|
"repository": "https://github.com/dcloudio/uni-ui",
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": ""
|
||||||
|
},
|
||||||
|
"directories": {
|
||||||
|
"example": "../../temps/example_temps"
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "无",
|
||||||
|
"data": "无",
|
||||||
|
"permissions": "无"
|
||||||
|
},
|
||||||
|
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
||||||
|
"type": "component-vue"
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": [
|
||||||
|
"uni-scss",
|
||||||
|
"uni-icons"
|
||||||
|
],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "y",
|
||||||
|
"aliyun": "y"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"App": {
|
||||||
|
"app-vue": "y",
|
||||||
|
"app-nvue": "n"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "y",
|
||||||
|
"Android Browser": "y",
|
||||||
|
"微信浏览器(Android)": "y",
|
||||||
|
"QQ浏览器(Android)": "y"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "y",
|
||||||
|
"IE": "y",
|
||||||
|
"Edge": "y",
|
||||||
|
"Firefox": "y",
|
||||||
|
"Safari": "y"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "y",
|
||||||
|
"阿里": "y",
|
||||||
|
"百度": "y",
|
||||||
|
"字节跳动": "y",
|
||||||
|
"QQ": "y"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "u",
|
||||||
|
"联盟": "u"
|
||||||
|
},
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "y",
|
||||||
|
"vue3": "y"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,663 @@
|
|||||||
|
.uniui-color:before {
|
||||||
|
content: "\e6cf";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-wallet:before {
|
||||||
|
content: "\e6b1";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-settings-filled:before {
|
||||||
|
content: "\e6ce";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-auth-filled:before {
|
||||||
|
content: "\e6cc";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-shop-filled:before {
|
||||||
|
content: "\e6cd";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-staff-filled:before {
|
||||||
|
content: "\e6cb";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-vip-filled:before {
|
||||||
|
content: "\e6c6";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-plus-filled:before {
|
||||||
|
content: "\e6c7";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-folder-add-filled:before {
|
||||||
|
content: "\e6c8";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-color-filled:before {
|
||||||
|
content: "\e6c9";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-tune-filled:before {
|
||||||
|
content: "\e6ca";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-calendar-filled:before {
|
||||||
|
content: "\e6c0";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-notification-filled:before {
|
||||||
|
content: "\e6c1";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-wallet-filled:before {
|
||||||
|
content: "\e6c2";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-medal-filled:before {
|
||||||
|
content: "\e6c3";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-gift-filled:before {
|
||||||
|
content: "\e6c4";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-fire-filled:before {
|
||||||
|
content: "\e6c5";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-refreshempty:before {
|
||||||
|
content: "\e6bf";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-location-filled:before {
|
||||||
|
content: "\e6af";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-person-filled:before {
|
||||||
|
content: "\e69d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-personadd-filled:before {
|
||||||
|
content: "\e698";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-back:before {
|
||||||
|
content: "\e6b9";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-forward:before {
|
||||||
|
content: "\e6ba";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrow-right:before {
|
||||||
|
content: "\e6bb";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowthinright:before {
|
||||||
|
content: "\e6bb";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrow-left:before {
|
||||||
|
content: "\e6bc";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowthinleft:before {
|
||||||
|
content: "\e6bc";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrow-up:before {
|
||||||
|
content: "\e6bd";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowthinup:before {
|
||||||
|
content: "\e6bd";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrow-down:before {
|
||||||
|
content: "\e6be";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowthindown:before {
|
||||||
|
content: "\e6be";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-bottom:before {
|
||||||
|
content: "\e6b8";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowdown:before {
|
||||||
|
content: "\e6b8";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-right:before {
|
||||||
|
content: "\e6b5";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowright:before {
|
||||||
|
content: "\e6b5";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-top:before {
|
||||||
|
content: "\e6b6";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowup:before {
|
||||||
|
content: "\e6b6";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-left:before {
|
||||||
|
content: "\e6b7";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowleft:before {
|
||||||
|
content: "\e6b7";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-eye:before {
|
||||||
|
content: "\e651";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-eye-filled:before {
|
||||||
|
content: "\e66a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-eye-slash:before {
|
||||||
|
content: "\e6b3";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-eye-slash-filled:before {
|
||||||
|
content: "\e6b4";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-info-filled:before {
|
||||||
|
content: "\e649";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-reload:before {
|
||||||
|
content: "\e6b2";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-micoff-filled:before {
|
||||||
|
content: "\e6b0";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-map-pin-ellipse:before {
|
||||||
|
content: "\e6ac";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-map-pin:before {
|
||||||
|
content: "\e6ad";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-location:before {
|
||||||
|
content: "\e6ae";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-starhalf:before {
|
||||||
|
content: "\e683";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-star:before {
|
||||||
|
content: "\e688";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-star-filled:before {
|
||||||
|
content: "\e68f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-calendar:before {
|
||||||
|
content: "\e6a0";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-fire:before {
|
||||||
|
content: "\e6a1";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-medal:before {
|
||||||
|
content: "\e6a2";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-font:before {
|
||||||
|
content: "\e6a3";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-gift:before {
|
||||||
|
content: "\e6a4";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-link:before {
|
||||||
|
content: "\e6a5";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-notification:before {
|
||||||
|
content: "\e6a6";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-staff:before {
|
||||||
|
content: "\e6a7";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-vip:before {
|
||||||
|
content: "\e6a8";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-folder-add:before {
|
||||||
|
content: "\e6a9";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-tune:before {
|
||||||
|
content: "\e6aa";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-auth:before {
|
||||||
|
content: "\e6ab";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-person:before {
|
||||||
|
content: "\e699";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-email-filled:before {
|
||||||
|
content: "\e69a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-phone-filled:before {
|
||||||
|
content: "\e69b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-phone:before {
|
||||||
|
content: "\e69c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-email:before {
|
||||||
|
content: "\e69e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-personadd:before {
|
||||||
|
content: "\e69f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-chatboxes-filled:before {
|
||||||
|
content: "\e692";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-contact:before {
|
||||||
|
content: "\e693";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-chatbubble-filled:before {
|
||||||
|
content: "\e694";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-contact-filled:before {
|
||||||
|
content: "\e695";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-chatboxes:before {
|
||||||
|
content: "\e696";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-chatbubble:before {
|
||||||
|
content: "\e697";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-upload-filled:before {
|
||||||
|
content: "\e68e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-upload:before {
|
||||||
|
content: "\e690";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-weixin:before {
|
||||||
|
content: "\e691";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-compose:before {
|
||||||
|
content: "\e67f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-qq:before {
|
||||||
|
content: "\e680";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-download-filled:before {
|
||||||
|
content: "\e681";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-pyq:before {
|
||||||
|
content: "\e682";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-sound:before {
|
||||||
|
content: "\e684";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-trash-filled:before {
|
||||||
|
content: "\e685";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-sound-filled:before {
|
||||||
|
content: "\e686";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-trash:before {
|
||||||
|
content: "\e687";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-videocam-filled:before {
|
||||||
|
content: "\e689";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-spinner-cycle:before {
|
||||||
|
content: "\e68a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-weibo:before {
|
||||||
|
content: "\e68b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-videocam:before {
|
||||||
|
content: "\e68c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-download:before {
|
||||||
|
content: "\e68d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-help:before {
|
||||||
|
content: "\e679";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-navigate-filled:before {
|
||||||
|
content: "\e67a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-plusempty:before {
|
||||||
|
content: "\e67b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-smallcircle:before {
|
||||||
|
content: "\e67c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-minus-filled:before {
|
||||||
|
content: "\e67d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-micoff:before {
|
||||||
|
content: "\e67e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-closeempty:before {
|
||||||
|
content: "\e66c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-clear:before {
|
||||||
|
content: "\e66d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-navigate:before {
|
||||||
|
content: "\e66e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-minus:before {
|
||||||
|
content: "\e66f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-image:before {
|
||||||
|
content: "\e670";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-mic:before {
|
||||||
|
content: "\e671";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-paperplane:before {
|
||||||
|
content: "\e672";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-close:before {
|
||||||
|
content: "\e673";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-help-filled:before {
|
||||||
|
content: "\e674";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-paperplane-filled:before {
|
||||||
|
content: "\e675";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-plus:before {
|
||||||
|
content: "\e676";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-mic-filled:before {
|
||||||
|
content: "\e677";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-image-filled:before {
|
||||||
|
content: "\e678";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-locked-filled:before {
|
||||||
|
content: "\e668";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-info:before {
|
||||||
|
content: "\e669";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-locked:before {
|
||||||
|
content: "\e66b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-camera-filled:before {
|
||||||
|
content: "\e658";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-chat-filled:before {
|
||||||
|
content: "\e659";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-camera:before {
|
||||||
|
content: "\e65a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-circle:before {
|
||||||
|
content: "\e65b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-checkmarkempty:before {
|
||||||
|
content: "\e65c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-chat:before {
|
||||||
|
content: "\e65d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-circle-filled:before {
|
||||||
|
content: "\e65e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-flag:before {
|
||||||
|
content: "\e65f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-flag-filled:before {
|
||||||
|
content: "\e660";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-gear-filled:before {
|
||||||
|
content: "\e661";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-home:before {
|
||||||
|
content: "\e662";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-home-filled:before {
|
||||||
|
content: "\e663";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-gear:before {
|
||||||
|
content: "\e664";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-smallcircle-filled:before {
|
||||||
|
content: "\e665";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-map-filled:before {
|
||||||
|
content: "\e666";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-map:before {
|
||||||
|
content: "\e667";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-refresh-filled:before {
|
||||||
|
content: "\e656";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-refresh:before {
|
||||||
|
content: "\e657";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-cloud-upload:before {
|
||||||
|
content: "\e645";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-cloud-download-filled:before {
|
||||||
|
content: "\e646";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-cloud-download:before {
|
||||||
|
content: "\e647";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-cloud-upload-filled:before {
|
||||||
|
content: "\e648";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-redo:before {
|
||||||
|
content: "\e64a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-images-filled:before {
|
||||||
|
content: "\e64b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-undo-filled:before {
|
||||||
|
content: "\e64c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-more:before {
|
||||||
|
content: "\e64d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-more-filled:before {
|
||||||
|
content: "\e64e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-undo:before {
|
||||||
|
content: "\e64f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-images:before {
|
||||||
|
content: "\e650";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-paperclip:before {
|
||||||
|
content: "\e652";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-settings:before {
|
||||||
|
content: "\e653";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-search:before {
|
||||||
|
content: "\e654";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-redo-filled:before {
|
||||||
|
content: "\e655";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-list:before {
|
||||||
|
content: "\e644";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-mail-open-filled:before {
|
||||||
|
content: "\e63a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-hand-down-filled:before {
|
||||||
|
content: "\e63c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-hand-down:before {
|
||||||
|
content: "\e63d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-hand-up-filled:before {
|
||||||
|
content: "\e63e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-hand-up:before {
|
||||||
|
content: "\e63f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-heart-filled:before {
|
||||||
|
content: "\e641";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-mail-open:before {
|
||||||
|
content: "\e643";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-heart:before {
|
||||||
|
content: "\e639";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-loop:before {
|
||||||
|
content: "\e633";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-pulldown:before {
|
||||||
|
content: "\e632";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-scan:before {
|
||||||
|
content: "\e62a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-bars:before {
|
||||||
|
content: "\e627";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-cart-filled:before {
|
||||||
|
content: "\e629";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-checkbox:before {
|
||||||
|
content: "\e62b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-checkbox-filled:before {
|
||||||
|
content: "\e62c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-shop:before {
|
||||||
|
content: "\e62f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-headphones:before {
|
||||||
|
content: "\e630";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-cart:before {
|
||||||
|
content: "\e631";
|
||||||
|
}
|
Binary file not shown.
@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"id": "uni-icons",
|
||||||
|
"displayName": "uni-icons 图标",
|
||||||
|
"version": "1.3.5",
|
||||||
|
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
|
||||||
|
"keywords": [
|
||||||
|
"uni-ui",
|
||||||
|
"uniui",
|
||||||
|
"icon",
|
||||||
|
"图标"
|
||||||
|
],
|
||||||
|
"repository": "https://github.com/dcloudio/uni-ui",
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": "^3.2.14"
|
||||||
|
},
|
||||||
|
"directories": {
|
||||||
|
"example": "../../temps/example_temps"
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"category": [
|
||||||
|
"前端组件",
|
||||||
|
"通用组件"
|
||||||
|
],
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "无",
|
||||||
|
"data": "无",
|
||||||
|
"permissions": "无"
|
||||||
|
},
|
||||||
|
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": ["uni-scss"],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "y",
|
||||||
|
"aliyun": "y"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"App": {
|
||||||
|
"app-vue": "y",
|
||||||
|
"app-nvue": "y"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "y",
|
||||||
|
"Android Browser": "y",
|
||||||
|
"微信浏览器(Android)": "y",
|
||||||
|
"QQ浏览器(Android)": "y"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "y",
|
||||||
|
"IE": "y",
|
||||||
|
"Edge": "y",
|
||||||
|
"Firefox": "y",
|
||||||
|
"Safari": "y"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "y",
|
||||||
|
"阿里": "y",
|
||||||
|
"百度": "y",
|
||||||
|
"字节跳动": "y",
|
||||||
|
"QQ": "y"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "u",
|
||||||
|
"联盟": "u"
|
||||||
|
},
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "y",
|
||||||
|
"vue3": "y"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
@import './styles/index.scss';
|
@ -0,0 +1,7 @@
|
|||||||
|
@import './setting/_variables.scss';
|
||||||
|
@import './setting/_border.scss';
|
||||||
|
@import './setting/_color.scss';
|
||||||
|
@import './setting/_space.scss';
|
||||||
|
@import './setting/_radius.scss';
|
||||||
|
@import './setting/_text.scss';
|
||||||
|
@import './setting/_styles.scss';
|
@ -0,0 +1,3 @@
|
|||||||
|
.uni-border {
|
||||||
|
border: 1px $uni-border-1 solid;
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
@mixin radius($r,$d:null ,$important: false){
|
||||||
|
$radius-value:map-get($uni-radius, $r) if($important, !important, null);
|
||||||
|
// Key exists within the $uni-radius variable
|
||||||
|
@if (map-has-key($uni-radius, $r) and $d){
|
||||||
|
@if $d == t {
|
||||||
|
border-top-left-radius:$radius-value;
|
||||||
|
border-top-right-radius:$radius-value;
|
||||||
|
}@else if $d == r {
|
||||||
|
border-top-right-radius:$radius-value;
|
||||||
|
border-bottom-right-radius:$radius-value;
|
||||||
|
}@else if $d == b {
|
||||||
|
border-bottom-left-radius:$radius-value;
|
||||||
|
border-bottom-right-radius:$radius-value;
|
||||||
|
}@else if $d == l {
|
||||||
|
border-top-left-radius:$radius-value;
|
||||||
|
border-bottom-left-radius:$radius-value;
|
||||||
|
}@else if $d == tl {
|
||||||
|
border-top-left-radius:$radius-value;
|
||||||
|
}@else if $d == tr {
|
||||||
|
border-top-right-radius:$radius-value;
|
||||||
|
}@else if $d == br {
|
||||||
|
border-bottom-right-radius:$radius-value;
|
||||||
|
}@else if $d == bl {
|
||||||
|
border-bottom-left-radius:$radius-value;
|
||||||
|
}
|
||||||
|
}@else{
|
||||||
|
border-radius:$radius-value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $key, $child in $uni-radius {
|
||||||
|
@if($key){
|
||||||
|
.uni-radius-#{"" + $key} {
|
||||||
|
@include radius($key)
|
||||||
|
}
|
||||||
|
}@else{
|
||||||
|
.uni-radius {
|
||||||
|
@include radius($key)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $direction in t, r, b, l,tl, tr, br, bl {
|
||||||
|
@each $key, $child in $uni-radius {
|
||||||
|
@if($key){
|
||||||
|
.uni-radius-#{"" + $direction}-#{"" + $key} {
|
||||||
|
@include radius($key,$direction,false)
|
||||||
|
}
|
||||||
|
}@else{
|
||||||
|
.uni-radius-#{$direction} {
|
||||||
|
@include radius($key,$direction,false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
|
||||||
|
@mixin fn($space,$direction,$size,$n) {
|
||||||
|
@if $n {
|
||||||
|
#{$space}-#{$direction}: #{$size*$uni-space-root}px
|
||||||
|
} @else {
|
||||||
|
#{$space}-#{$direction}: #{-$size*$uni-space-root}px
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin get-styles($direction,$i,$space,$n){
|
||||||
|
@if $direction == t {
|
||||||
|
@include fn($space, top,$i,$n);
|
||||||
|
}
|
||||||
|
@if $direction == r {
|
||||||
|
@include fn($space, right,$i,$n);
|
||||||
|
}
|
||||||
|
@if $direction == b {
|
||||||
|
@include fn($space, bottom,$i,$n);
|
||||||
|
}
|
||||||
|
@if $direction == l {
|
||||||
|
@include fn($space, left,$i,$n);
|
||||||
|
}
|
||||||
|
@if $direction == x {
|
||||||
|
@include fn($space, left,$i,$n);
|
||||||
|
@include fn($space, right,$i,$n);
|
||||||
|
}
|
||||||
|
@if $direction == y {
|
||||||
|
@include fn($space, top,$i,$n);
|
||||||
|
@include fn($space, bottom,$i,$n);
|
||||||
|
}
|
||||||
|
@if $direction == a {
|
||||||
|
@if $n {
|
||||||
|
#{$space}:#{$i*$uni-space-root}px;
|
||||||
|
} @else {
|
||||||
|
#{$space}:#{-$i*$uni-space-root}px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $orientation in m,p {
|
||||||
|
$space: margin;
|
||||||
|
@if $orientation == m {
|
||||||
|
$space: margin;
|
||||||
|
} @else {
|
||||||
|
$space: padding;
|
||||||
|
}
|
||||||
|
@for $i from 0 through 16 {
|
||||||
|
@each $direction in t, r, b, l, x, y, a {
|
||||||
|
.uni-#{$orientation}#{$direction}-#{$i} {
|
||||||
|
@include get-styles($direction,$i,$space,true);
|
||||||
|
}
|
||||||
|
.uni-#{$orientation}#{$direction}-n#{$i} {
|
||||||
|
@include get-styles($direction,$i,$space,false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,167 @@
|
|||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
|
||||||
|
$-color-white:#fff;
|
||||||
|
$-color-black:#000;
|
||||||
|
@mixin base-style($color) {
|
||||||
|
color: #fff;
|
||||||
|
background-color: $color;
|
||||||
|
border-color: mix($-color-black, $color, 8%);
|
||||||
|
&:not([hover-class]):active {
|
||||||
|
background: mix($-color-black, $color, 10%);
|
||||||
|
border-color: mix($-color-black, $color, 20%);
|
||||||
|
color: $-color-white;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin is-color($color) {
|
||||||
|
@include base-style($color);
|
||||||
|
&[loading] {
|
||||||
|
@include base-style($color);
|
||||||
|
&::before {
|
||||||
|
margin-right:5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&[disabled] {
|
||||||
|
&,
|
||||||
|
&[loading],
|
||||||
|
&:not([hover-class]):active {
|
||||||
|
color: $-color-white;
|
||||||
|
border-color: mix(darken($color,10%), $-color-white);
|
||||||
|
background-color: mix($color, $-color-white);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@mixin base-plain-style($color) {
|
||||||
|
color:$color;
|
||||||
|
background-color: mix($-color-white, $color, 90%);
|
||||||
|
border-color: mix($-color-white, $color, 70%);
|
||||||
|
&:not([hover-class]):active {
|
||||||
|
background: mix($-color-white, $color, 80%);
|
||||||
|
color: $color;
|
||||||
|
outline: none;
|
||||||
|
border-color: mix($-color-white, $color, 50%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin is-plain($color){
|
||||||
|
&[plain] {
|
||||||
|
@include base-plain-style($color);
|
||||||
|
&[loading] {
|
||||||
|
@include base-plain-style($color);
|
||||||
|
&::before {
|
||||||
|
margin-right:5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&[disabled] {
|
||||||
|
&,
|
||||||
|
&:active {
|
||||||
|
color: mix($-color-white, $color, 40%);
|
||||||
|
background-color: mix($-color-white, $color, 90%);
|
||||||
|
border-color: mix($-color-white, $color, 80%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.uni-btn {
|
||||||
|
margin: 5px;
|
||||||
|
color: #393939;
|
||||||
|
border:1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 200;
|
||||||
|
background-color: #F9F9F9;
|
||||||
|
// TODO 暂时处理边框隐藏一边的问题
|
||||||
|
overflow: visible;
|
||||||
|
&::after{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not([type]),&[type=default] {
|
||||||
|
color: #999;
|
||||||
|
&[loading] {
|
||||||
|
background: none;
|
||||||
|
&::before {
|
||||||
|
margin-right:5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
&[disabled]{
|
||||||
|
color: mix($-color-white, #999, 60%);
|
||||||
|
&,
|
||||||
|
&[loading],
|
||||||
|
&:active {
|
||||||
|
color: mix($-color-white, #999, 60%);
|
||||||
|
background-color: mix($-color-white,$-color-black , 98%);
|
||||||
|
border-color: mix($-color-white, #999, 85%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[plain] {
|
||||||
|
color: #999;
|
||||||
|
background: none;
|
||||||
|
border-color: $uni-border-1;
|
||||||
|
&:not([hover-class]):active {
|
||||||
|
background: none;
|
||||||
|
color: mix($-color-white, $-color-black, 80%);
|
||||||
|
border-color: mix($-color-white, $-color-black, 90%);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
&[disabled]{
|
||||||
|
&,
|
||||||
|
&[loading],
|
||||||
|
&:active {
|
||||||
|
background: none;
|
||||||
|
color: mix($-color-white, #999, 60%);
|
||||||
|
border-color: mix($-color-white, #999, 85%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not([hover-class]):active {
|
||||||
|
color: mix($-color-white, $-color-black, 50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
&[size=mini] {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 200;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
&.uni-btn-small {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
&.uni-btn-mini {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.uni-btn-radius {
|
||||||
|
border-radius: 999px;
|
||||||
|
}
|
||||||
|
&[type=primary] {
|
||||||
|
@include is-color($uni-primary);
|
||||||
|
@include is-plain($uni-primary)
|
||||||
|
}
|
||||||
|
&[type=success] {
|
||||||
|
@include is-color($uni-success);
|
||||||
|
@include is-plain($uni-success)
|
||||||
|
}
|
||||||
|
&[type=error] {
|
||||||
|
@include is-color($uni-error);
|
||||||
|
@include is-plain($uni-error)
|
||||||
|
}
|
||||||
|
&[type=warning] {
|
||||||
|
@include is-color($uni-warning);
|
||||||
|
@include is-plain($uni-warning)
|
||||||
|
}
|
||||||
|
&[type=info] {
|
||||||
|
@include is-color($uni-info);
|
||||||
|
@include is-plain($uni-info)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #endif */
|
@ -0,0 +1,24 @@
|
|||||||
|
@mixin get-styles($k,$c) {
|
||||||
|
@if $k == size or $k == weight{
|
||||||
|
font-#{$k}:#{$c}
|
||||||
|
}@else{
|
||||||
|
#{$k}:#{$c}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $key, $child in $uni-headings {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
.uni-#{$key} {
|
||||||
|
@each $k, $c in $child {
|
||||||
|
@include get-styles($k,$c)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP-NVUE */
|
||||||
|
.container .uni-#{$key} {
|
||||||
|
@each $k, $c in $child {
|
||||||
|
@include get-styles($k,$c)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
// 合并 map
|
||||||
|
@function map-deep-merge($parent-map, $child-map){
|
||||||
|
$result: $parent-map;
|
||||||
|
@each $key, $child in $child-map {
|
||||||
|
$parent-has-key: map-has-key($result, $key);
|
||||||
|
$parent-value: map-get($result, $key);
|
||||||
|
$parent-type: type-of($parent-value);
|
||||||
|
$child-type: type-of($child);
|
||||||
|
$parent-is-map: $parent-type == map;
|
||||||
|
$child-is-map: $child-type == map;
|
||||||
|
|
||||||
|
@if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
|
||||||
|
$result: map-merge($result, ( $key: $child ));
|
||||||
|
}@else {
|
||||||
|
$result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@return $result;
|
||||||
|
};
|
@ -0,0 +1,31 @@
|
|||||||
|
// 间距基础倍数
|
||||||
|
$uni-space-root: 2;
|
||||||
|
// 边框半径默认值
|
||||||
|
$uni-radius-root:5px;
|
||||||
|
// 主色
|
||||||
|
$uni-primary: #2979ff;
|
||||||
|
// 辅助色
|
||||||
|
$uni-success: #4cd964;
|
||||||
|
// 警告色
|
||||||
|
$uni-warning: #f0ad4e;
|
||||||
|
// 错误色
|
||||||
|
$uni-error: #dd524d;
|
||||||
|
// 描述色
|
||||||
|
$uni-info: #909399;
|
||||||
|
// 中性色
|
||||||
|
$uni-main-color: #303133;
|
||||||
|
$uni-base-color: #606266;
|
||||||
|
$uni-secondary-color: #909399;
|
||||||
|
$uni-extra-color: #C0C4CC;
|
||||||
|
// 背景色
|
||||||
|
$uni-bg-color: #f5f5f5;
|
||||||
|
// 边框颜色
|
||||||
|
$uni-border-1: #DCDFE6;
|
||||||
|
$uni-border-2: #E4E7ED;
|
||||||
|
$uni-border-3: #EBEEF5;
|
||||||
|
$uni-border-4: #F2F6FC;
|
||||||
|
|
||||||
|
// 常规色
|
||||||
|
$uni-black: #000000;
|
||||||
|
$uni-white: #ffffff;
|
||||||
|
$uni-transparent: rgba($color: #000000, $alpha: 0);
|
@ -0,0 +1,29 @@
|
|||||||
|
<template>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<tbody>
|
||||||
|
<slot></slot>
|
||||||
|
</tbody>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifndef H5 -->
|
||||||
|
<view><slot></slot></view>
|
||||||
|
<!-- #endif -->
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'uniBody',
|
||||||
|
options: {
|
||||||
|
virtualHost: true
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
@ -0,0 +1,90 @@
|
|||||||
|
<template>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<td class="uni-table-td" :rowspan="rowspan" :colspan="colspan" :class="{'table--border':border}" :style="{width:width + 'px','text-align':align}">
|
||||||
|
<slot></slot>
|
||||||
|
</td>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifndef H5 -->
|
||||||
|
<!-- :class="{'table--border':border}" -->
|
||||||
|
<view class="uni-table-td" :class="{'table--border':border}" :style="{width:width + 'px','text-align':align}">
|
||||||
|
<slot></slot>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* Td 单元格
|
||||||
|
* @description 表格中的标准单元格组件
|
||||||
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=3270
|
||||||
|
* @property {Number} align = [left|center|right] 单元格对齐方式
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
name: 'uniTd',
|
||||||
|
options: {
|
||||||
|
virtualHost: true
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
width: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
align: {
|
||||||
|
type: String,
|
||||||
|
default: 'left'
|
||||||
|
},
|
||||||
|
rowspan: {
|
||||||
|
type: [Number,String],
|
||||||
|
default: 1
|
||||||
|
},
|
||||||
|
colspan: {
|
||||||
|
type: [Number,String],
|
||||||
|
default: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
border: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.root = this.getTable()
|
||||||
|
this.border = this.root.border
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 获取父元素实例
|
||||||
|
*/
|
||||||
|
getTable() {
|
||||||
|
let parent = this.$parent;
|
||||||
|
let parentName = parent.$options.name;
|
||||||
|
while (parentName !== 'uniTable') {
|
||||||
|
parent = parent.$parent;
|
||||||
|
if (!parent) return false;
|
||||||
|
parentName = parent.$options.name;
|
||||||
|
}
|
||||||
|
return parent;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
$border-color:#EBEEF5;
|
||||||
|
|
||||||
|
.uni-table-td {
|
||||||
|
display: table-cell;
|
||||||
|
padding: 8px 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
border-bottom: 1px $border-color solid;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #606266;
|
||||||
|
line-height: 23px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table--border {
|
||||||
|
border-right: 1px $border-color solid;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,503 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-filter-dropdown">
|
||||||
|
<view class="dropdown-btn" @click="onDropdown">
|
||||||
|
<view class="icon-select" :class="{active: canReset}" v-if="isSelect || isRange"></view>
|
||||||
|
<view class="icon-search" :class="{active: canReset}" v-if="isSearch">
|
||||||
|
<view class="icon-search-0"></view>
|
||||||
|
<view class="icon-search-1"></view>
|
||||||
|
</view>
|
||||||
|
<view class="icon-calendar" :class="{active: canReset}" v-if="isDate">
|
||||||
|
<view class="icon-calendar-0"></view>
|
||||||
|
<view class="icon-calendar-1"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="uni-dropdown-cover" v-if="isOpened" @click="handleClose"></view>
|
||||||
|
<view class="dropdown-popup dropdown-popup-right" v-if="isOpened" @click.stop>
|
||||||
|
<!-- select-->
|
||||||
|
<view v-if="isSelect" class="list">
|
||||||
|
<label class="flex-r a-i-c list-item" v-for="(item,index) in dataList" :key="index"
|
||||||
|
@click="onItemClick($event, index)">
|
||||||
|
<check-box class="check" :checked="item.checked" />
|
||||||
|
<view class="checklist-content">
|
||||||
|
<text class="checklist-text" :style="item.styleIconText">{{item[map.text]}}</text>
|
||||||
|
</view>
|
||||||
|
</label>
|
||||||
|
</view>
|
||||||
|
<view v-if="isSelect" class="flex-r opera-area">
|
||||||
|
<view class="flex-f btn btn-default" :class="{disable: !canReset}" @click="handleSelectReset">
|
||||||
|
{{resource.reset}}</view>
|
||||||
|
<view class="flex-f btn btn-submit" @click="handleSelectSubmit">{{resource.submit}}</view>
|
||||||
|
</view>
|
||||||
|
<!-- search -->
|
||||||
|
<view v-if="isSearch" class="search-area">
|
||||||
|
<input class="search-input" v-model="filterValue" />
|
||||||
|
</view>
|
||||||
|
<view v-if="isSearch" class="flex-r opera-area">
|
||||||
|
<view class="flex-f btn btn-submit" @click="handleSearchSubmit">{{resource.search}}</view>
|
||||||
|
<view class="flex-f btn btn-default" :class="{disable: !canReset}" @click="handleSearchReset">
|
||||||
|
{{resource.reset}}</view>
|
||||||
|
</view>
|
||||||
|
<!-- range -->
|
||||||
|
<view v-if="isRange">
|
||||||
|
<view class="input-label">{{resource.gt}}</view>
|
||||||
|
<input class="input" v-model="gtValue" />
|
||||||
|
<view class="input-label">{{resource.lt}}</view>
|
||||||
|
<input class="input" v-model="ltValue" />
|
||||||
|
</view>
|
||||||
|
<view v-if="isRange" class="flex-r opera-area">
|
||||||
|
<view class="flex-f btn btn-default" :class="{disable: !canReset}" @click="handleRangeReset">
|
||||||
|
{{resource.reset}}</view>
|
||||||
|
<view class="flex-f btn btn-submit" @click="handleRangeSubmit">{{resource.submit}}</view>
|
||||||
|
</view>
|
||||||
|
<!-- date -->
|
||||||
|
<view v-if="isDate">
|
||||||
|
<uni-datetime-picker ref="datetimepicker" :value="dateRange" type="datetimerange" return-type="timestamp" @change="datetimechange" @maskClick="timepickerclose">
|
||||||
|
<view></view>
|
||||||
|
</uni-datetime-picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import checkBox from '../uni-tr/table-checkbox.vue'
|
||||||
|
|
||||||
|
const resource = {
|
||||||
|
"reset": "重置",
|
||||||
|
"search": "搜索",
|
||||||
|
"submit": "确定",
|
||||||
|
"filter": "筛选",
|
||||||
|
"gt": "大于等于",
|
||||||
|
"lt": "小于等于",
|
||||||
|
"date": "日期范围"
|
||||||
|
}
|
||||||
|
|
||||||
|
const DropdownType = {
|
||||||
|
Select: "select",
|
||||||
|
Search: "search",
|
||||||
|
Range: "range",
|
||||||
|
Date: "date",
|
||||||
|
Timestamp: "timestamp"
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'FilterDropdown',
|
||||||
|
emits:['change'],
|
||||||
|
components: {
|
||||||
|
checkBox
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
virtualHost: true
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
filterType: {
|
||||||
|
type: String,
|
||||||
|
default: DropdownType.Select
|
||||||
|
},
|
||||||
|
filterData: {
|
||||||
|
type: Array,
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mode: {
|
||||||
|
type: String,
|
||||||
|
default: 'default'
|
||||||
|
},
|
||||||
|
map: {
|
||||||
|
type: Object,
|
||||||
|
default () {
|
||||||
|
return {
|
||||||
|
text: 'text',
|
||||||
|
value: 'value'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
canReset() {
|
||||||
|
if (this.isSearch) {
|
||||||
|
return this.filterValue.length > 0
|
||||||
|
}
|
||||||
|
if (this.isSelect) {
|
||||||
|
return this.checkedValues.length > 0
|
||||||
|
}
|
||||||
|
if (this.isRange) {
|
||||||
|
return (this.gtValue.length > 0 && this.ltValue.length > 0)
|
||||||
|
}
|
||||||
|
if (this.isDate) {
|
||||||
|
return this.dateSelect.length > 0
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
isSelect() {
|
||||||
|
return this.filterType === DropdownType.Select
|
||||||
|
},
|
||||||
|
isSearch() {
|
||||||
|
return this.filterType === DropdownType.Search
|
||||||
|
},
|
||||||
|
isRange() {
|
||||||
|
return this.filterType === DropdownType.Range
|
||||||
|
},
|
||||||
|
isDate() {
|
||||||
|
return (this.filterType === DropdownType.Date || this.filterType === DropdownType.Timestamp)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
filterData(newVal) {
|
||||||
|
this._copyFilters()
|
||||||
|
},
|
||||||
|
indeterminate(newVal) {
|
||||||
|
this.isIndeterminate = newVal
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
resource,
|
||||||
|
enabled: true,
|
||||||
|
isOpened: false,
|
||||||
|
dataList: [],
|
||||||
|
filterValue: '',
|
||||||
|
checkedValues: [],
|
||||||
|
gtValue: '',
|
||||||
|
ltValue: '',
|
||||||
|
dateRange: [],
|
||||||
|
dateSelect: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this._copyFilters()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
_copyFilters() {
|
||||||
|
let dl = JSON.parse(JSON.stringify(this.filterData))
|
||||||
|
for (let i = 0; i < dl.length; i++) {
|
||||||
|
if (dl[i].checked === undefined) {
|
||||||
|
dl[i].checked = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.dataList = dl
|
||||||
|
},
|
||||||
|
openPopup() {
|
||||||
|
this.isOpened = true
|
||||||
|
if (this.isDate) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (!this.dateRange.length) {
|
||||||
|
this.resetDate()
|
||||||
|
}
|
||||||
|
this.$refs.datetimepicker.show()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
closePopup() {
|
||||||
|
this.isOpened = false
|
||||||
|
},
|
||||||
|
handleClose(e) {
|
||||||
|
this.closePopup()
|
||||||
|
},
|
||||||
|
resetDate() {
|
||||||
|
let date = new Date()
|
||||||
|
let dateText = date.toISOString().split('T')[0]
|
||||||
|
this.dateRange = [dateText + ' 0:00:00', dateText + ' 23:59:59']
|
||||||
|
},
|
||||||
|
onDropdown(e) {
|
||||||
|
this.openPopup()
|
||||||
|
},
|
||||||
|
onItemClick(e, index) {
|
||||||
|
let items = this.dataList
|
||||||
|
let listItem = items[index]
|
||||||
|
if (listItem.checked === undefined) {
|
||||||
|
items[index].checked = true
|
||||||
|
} else {
|
||||||
|
items[index].checked = !listItem.checked
|
||||||
|
}
|
||||||
|
|
||||||
|
let checkvalues = []
|
||||||
|
for (let i = 0; i < items.length; i++) {
|
||||||
|
const item = items[i]
|
||||||
|
if (item.checked) {
|
||||||
|
checkvalues.push(item.value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.checkedValues = checkvalues
|
||||||
|
},
|
||||||
|
datetimechange(e) {
|
||||||
|
this.closePopup()
|
||||||
|
this.dateRange = e
|
||||||
|
this.dateSelect = e
|
||||||
|
this.$emit('change', {
|
||||||
|
filterType: this.filterType,
|
||||||
|
filter: e
|
||||||
|
})
|
||||||
|
},
|
||||||
|
timepickerclose(e) {
|
||||||
|
this.closePopup()
|
||||||
|
},
|
||||||
|
handleSelectSubmit() {
|
||||||
|
this.closePopup()
|
||||||
|
this.$emit('change', {
|
||||||
|
filterType: this.filterType,
|
||||||
|
filter: this.checkedValues
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSelectReset() {
|
||||||
|
if (!this.canReset) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var items = this.dataList
|
||||||
|
for (let i = 0; i < items.length; i++) {
|
||||||
|
let item = items[i]
|
||||||
|
this.$set(item, 'checked', false)
|
||||||
|
}
|
||||||
|
this.checkedValues = []
|
||||||
|
this.handleSelectSubmit()
|
||||||
|
},
|
||||||
|
handleSearchSubmit() {
|
||||||
|
this.closePopup()
|
||||||
|
this.$emit('change', {
|
||||||
|
filterType: this.filterType,
|
||||||
|
filter: this.filterValue
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSearchReset() {
|
||||||
|
if (!this.canReset) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.filterValue = ''
|
||||||
|
this.handleSearchSubmit()
|
||||||
|
},
|
||||||
|
handleRangeSubmit(isReset) {
|
||||||
|
this.closePopup()
|
||||||
|
this.$emit('change', {
|
||||||
|
filterType: this.filterType,
|
||||||
|
filter: isReset === true ? [] : [parseInt(this.gtValue), parseInt(this.ltValue)]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleRangeReset() {
|
||||||
|
if (!this.canReset) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.gtValue = ''
|
||||||
|
this.ltValue = ''
|
||||||
|
this.handleRangeSubmit(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.flex-r {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-f {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.a-i-c {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.j-c-c {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-select {
|
||||||
|
width: 14px;
|
||||||
|
height: 16px;
|
||||||
|
border: solid 6px transparent;
|
||||||
|
border-top: solid 6px #ddd;
|
||||||
|
border-bottom: none;
|
||||||
|
background-color: #ddd;
|
||||||
|
background-clip: content-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-select.active {
|
||||||
|
background-color: #1890ff;
|
||||||
|
border-top-color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-search {
|
||||||
|
width: 12px;
|
||||||
|
height: 16px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-search-0 {
|
||||||
|
border: 2px solid #ddd;
|
||||||
|
border-radius: 8px;
|
||||||
|
width: 7px;
|
||||||
|
height: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-search-1 {
|
||||||
|
position: absolute;
|
||||||
|
top: 8px;
|
||||||
|
right: 0;
|
||||||
|
width: 1px;
|
||||||
|
height: 7px;
|
||||||
|
background-color: #ddd;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-search.active .icon-search-0 {
|
||||||
|
border-color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-search.active .icon-search-1 {
|
||||||
|
background-color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-calendar {
|
||||||
|
color: #ddd;
|
||||||
|
width: 14px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-calendar-0 {
|
||||||
|
height: 4px;
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-bottom: 1px;
|
||||||
|
background-color: #ddd;
|
||||||
|
border-radius: 2px 2px 1px 1px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.icon-calendar-0:before, .icon-calendar-0:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: -3px;
|
||||||
|
width: 4px;
|
||||||
|
height: 3px;
|
||||||
|
border-radius: 1px;
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
.icon-calendar-0:before {
|
||||||
|
left: 2px;
|
||||||
|
}
|
||||||
|
.icon-calendar-0:after {
|
||||||
|
right: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-calendar-1 {
|
||||||
|
height: 9px;
|
||||||
|
background-color: #ddd;
|
||||||
|
border-radius: 1px 1px 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-calendar.active {
|
||||||
|
color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-calendar.active .icon-calendar-0,
|
||||||
|
.icon-calendar.active .icon-calendar-1,
|
||||||
|
.icon-calendar.active .icon-calendar-0:before,
|
||||||
|
.icon-calendar.active .icon-calendar-0:after {
|
||||||
|
background-color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-filter-dropdown {
|
||||||
|
position: relative;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-popup {
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d;
|
||||||
|
min-width: 150px;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-popup-left {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-popup-right {
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-dropdown-cover {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: transparent;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-item {
|
||||||
|
padding: 5px 10px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-item:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-area {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input {
|
||||||
|
font-size: 12px;
|
||||||
|
border: 1px solid #f0f0f0;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
min-width: 150px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-label {
|
||||||
|
margin: 10px 10px 5px 10px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
font-size: 12px;
|
||||||
|
border: 1px solid #f0f0f0;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin: 10px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
min-width: 150px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.opera-area {
|
||||||
|
cursor: default;
|
||||||
|
border-top: 1px solid #ddd;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.opera-area .btn {
|
||||||
|
font-size: 12px;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin: 5px;
|
||||||
|
padding: 4px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-default {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-default.disable {
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-submit {
|
||||||
|
background-color: #1890ff;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,129 @@
|
|||||||
|
<template>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<thead class="uni-table-thead">
|
||||||
|
<tr class="uni-table-tr">
|
||||||
|
<th :rowspan="rowspan" colspan="1" class="checkbox" :class="{ 'tr-table--border': border }">
|
||||||
|
<table-checkbox :indeterminate="indeterminate" :checked="checked" @checkboxSelected="checkboxSelected"></table-checkbox>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<slot></slot>
|
||||||
|
</thead>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifndef H5 -->
|
||||||
|
<view class="uni-table-thead"><slot></slot></view>
|
||||||
|
<!-- #endif -->
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import tableCheckbox from '../uni-tr/table-checkbox.vue'
|
||||||
|
export default {
|
||||||
|
name: 'uniThead',
|
||||||
|
components: {
|
||||||
|
tableCheckbox
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
virtualHost: true
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
border: false,
|
||||||
|
selection: false,
|
||||||
|
rowspan: 1,
|
||||||
|
indeterminate: false,
|
||||||
|
checked: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.root = this.getTable()
|
||||||
|
// #ifdef H5
|
||||||
|
this.root.theadChildren = this
|
||||||
|
// #endif
|
||||||
|
this.border = this.root.border
|
||||||
|
this.selection = this.root.type
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(self) {
|
||||||
|
this.rowspan++
|
||||||
|
},
|
||||||
|
checkboxSelected(e) {
|
||||||
|
this.indeterminate = false
|
||||||
|
const backIndexData = this.root.backIndexData
|
||||||
|
const data = this.root.trChildren.filter(v => !v.disabled && v.keyValue)
|
||||||
|
if (backIndexData.length === data.length) {
|
||||||
|
this.checked = false
|
||||||
|
this.root.clearSelection()
|
||||||
|
} else {
|
||||||
|
this.checked = true
|
||||||
|
this.root.selectionAll()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取父元素实例
|
||||||
|
*/
|
||||||
|
getTable(name = 'uniTable') {
|
||||||
|
let parent = this.$parent
|
||||||
|
let parentName = parent.$options.name
|
||||||
|
while (parentName !== name) {
|
||||||
|
parent = parent.$parent
|
||||||
|
if (!parent) return false
|
||||||
|
parentName = parent.$options.name
|
||||||
|
}
|
||||||
|
return parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
$border-color: #ebeef5;
|
||||||
|
|
||||||
|
.uni-table-thead {
|
||||||
|
display: table-header-group;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-table-tr {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: table-row;
|
||||||
|
transition: all 0.3s;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
border: 1px red solid;
|
||||||
|
background-color: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox {
|
||||||
|
padding: 0 8px;
|
||||||
|
width: 26px;
|
||||||
|
padding-left: 12px;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: middle;
|
||||||
|
/* #endif */
|
||||||
|
color: #333;
|
||||||
|
font-weight: 500;
|
||||||
|
border-bottom: 1px $border-color solid;
|
||||||
|
font-size: 14px;
|
||||||
|
// text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tr-table--border {
|
||||||
|
border-right: 1px $border-color solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
.uni-table-tr {
|
||||||
|
::v-deep .uni-table-th {
|
||||||
|
&.table--border:last-child {
|
||||||
|
// border-right: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .uni-table-td {
|
||||||
|
&.table--border:last-child {
|
||||||
|
// border-right: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
</style>
|
@ -0,0 +1,179 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-table-checkbox" @click="selected">
|
||||||
|
<view v-if="!indeterminate" class="checkbox__inner" :class="{'is-checked':isChecked,'is-disable':isDisabled}">
|
||||||
|
<view class="checkbox__inner-icon"></view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="checkbox__inner checkbox--indeterminate">
|
||||||
|
<view class="checkbox__inner-icon"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'TableCheckbox',
|
||||||
|
emits:['checkboxSelected'],
|
||||||
|
props: {
|
||||||
|
indeterminate: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
checked: {
|
||||||
|
type: [Boolean,String],
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
index: {
|
||||||
|
type: Number,
|
||||||
|
default: -1
|
||||||
|
},
|
||||||
|
cellData: {
|
||||||
|
type: Object,
|
||||||
|
default () {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
checked(newVal){
|
||||||
|
if(typeof this.checked === 'boolean'){
|
||||||
|
this.isChecked = newVal
|
||||||
|
}else{
|
||||||
|
this.isChecked = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
indeterminate(newVal){
|
||||||
|
this.isIndeterminate = newVal
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isChecked: false,
|
||||||
|
isDisabled: false,
|
||||||
|
isIndeterminate:false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if(typeof this.checked === 'boolean'){
|
||||||
|
this.isChecked = this.checked
|
||||||
|
}
|
||||||
|
this.isDisabled = this.disabled
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
selected() {
|
||||||
|
if (this.isDisabled) return
|
||||||
|
this.isIndeterminate = false
|
||||||
|
this.isChecked = !this.isChecked
|
||||||
|
this.$emit('checkboxSelected', {
|
||||||
|
checked: this.isChecked,
|
||||||
|
data: this.cellData
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
$checked-color: #007aff;
|
||||||
|
$border-color: #DCDFE6;
|
||||||
|
$disable:0.4;
|
||||||
|
|
||||||
|
.uni-table-checkbox {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
position: relative;
|
||||||
|
margin: 5px 0;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
// 多选样式
|
||||||
|
.checkbox__inner {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
flex-shrink: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
position: relative;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
border: 1px solid $border-color;
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: #fff;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
.checkbox__inner-icon {
|
||||||
|
position: absolute;
|
||||||
|
/* #ifdef APP-NVUE */
|
||||||
|
top: 2px;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
top: 2px;
|
||||||
|
/* #endif */
|
||||||
|
left: 5px;
|
||||||
|
height: 7px;
|
||||||
|
width: 3px;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
border-left: 0;
|
||||||
|
border-top: 0;
|
||||||
|
opacity: 0;
|
||||||
|
transform-origin: center;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.checkbox--indeterminate {
|
||||||
|
border-color: $checked-color;
|
||||||
|
background-color: $checked-color;
|
||||||
|
|
||||||
|
.checkbox__inner-icon {
|
||||||
|
position: absolute;
|
||||||
|
opacity: 1;
|
||||||
|
transform: rotate(0deg);
|
||||||
|
height: 2px;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
margin: auto;
|
||||||
|
left: 0px;
|
||||||
|
right: 0px;
|
||||||
|
bottom: 0;
|
||||||
|
width: auto;
|
||||||
|
border: none;
|
||||||
|
border-radius: 2px;
|
||||||
|
transform: scale(0.5);
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:hover{
|
||||||
|
border-color: $checked-color;
|
||||||
|
}
|
||||||
|
// 禁用
|
||||||
|
&.is-disable {
|
||||||
|
/* #ifdef H5 */
|
||||||
|
cursor: not-allowed;
|
||||||
|
/* #endif */
|
||||||
|
background-color: #F2F6FC;
|
||||||
|
border-color: $border-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选中
|
||||||
|
&.is-checked {
|
||||||
|
border-color: $checked-color;
|
||||||
|
background-color: $checked-color;
|
||||||
|
|
||||||
|
.checkbox__inner-icon {
|
||||||
|
opacity: 1;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选中禁用
|
||||||
|
&.is-disable {
|
||||||
|
opacity: $disable;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,171 @@
|
|||||||
|
<template>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<tr class="uni-table-tr">
|
||||||
|
<th v-if="selection === 'selection' && ishead" class="checkbox" :class="{ 'tr-table--border': border }">
|
||||||
|
<table-checkbox :checked="checked" :indeterminate="indeterminate" :disabled="disabled" @checkboxSelected="checkboxSelected"></table-checkbox>
|
||||||
|
</th>
|
||||||
|
<slot></slot>
|
||||||
|
<!-- <uni-th class="th-fixed">123</uni-th> -->
|
||||||
|
</tr>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifndef H5 -->
|
||||||
|
<view class="uni-table-tr">
|
||||||
|
<view v-if="selection === 'selection' " class="checkbox" :class="{ 'tr-table--border': border }">
|
||||||
|
<table-checkbox :checked="checked" :indeterminate="indeterminate" :disabled="disabled" @checkboxSelected="checkboxSelected"></table-checkbox>
|
||||||
|
</view>
|
||||||
|
<slot></slot>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import tableCheckbox from './table-checkbox.vue'
|
||||||
|
/**
|
||||||
|
* Tr 表格行组件
|
||||||
|
* @description 表格行组件 仅包含 th,td 组件
|
||||||
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
name: 'uniTr',
|
||||||
|
components: { tableCheckbox },
|
||||||
|
props: {
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
keyValue: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
virtualHost: true
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
value: false,
|
||||||
|
border: false,
|
||||||
|
selection: false,
|
||||||
|
widthThArr: [],
|
||||||
|
ishead: true,
|
||||||
|
checked: false,
|
||||||
|
indeterminate:false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.root = this.getTable()
|
||||||
|
this.head = this.getTable('uniThead')
|
||||||
|
if (this.head) {
|
||||||
|
this.ishead = false
|
||||||
|
this.head.init(this)
|
||||||
|
}
|
||||||
|
this.border = this.root.border
|
||||||
|
this.selection = this.root.type
|
||||||
|
this.root.trChildren.push(this)
|
||||||
|
const rowData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue)
|
||||||
|
if(rowData){
|
||||||
|
this.rowData = rowData
|
||||||
|
}
|
||||||
|
this.root.isNodata()
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.widthThArr.length > 0) {
|
||||||
|
const selectionWidth = this.selection === 'selection' ? 50 : 0
|
||||||
|
this.root.minWidth = this.widthThArr.reduce((a, b) => Number(a) + Number(b)) + selectionWidth
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// #ifndef VUE3
|
||||||
|
destroyed() {
|
||||||
|
const index = this.root.trChildren.findIndex(i => i === this)
|
||||||
|
this.root.trChildren.splice(index, 1)
|
||||||
|
this.root.isNodata()
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
unmounted() {
|
||||||
|
const index = this.root.trChildren.findIndex(i => i === this)
|
||||||
|
this.root.trChildren.splice(index, 1)
|
||||||
|
this.root.isNodata()
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
methods: {
|
||||||
|
minWidthUpdate(width) {
|
||||||
|
this.widthThArr.push(width)
|
||||||
|
},
|
||||||
|
// 选中
|
||||||
|
checkboxSelected(e) {
|
||||||
|
let rootData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue)
|
||||||
|
this.checked = e.checked
|
||||||
|
this.root.check(rootData||this, e.checked,rootData? this.keyValue:null)
|
||||||
|
},
|
||||||
|
change(e) {
|
||||||
|
this.root.trChildren.forEach(item => {
|
||||||
|
if (item === this) {
|
||||||
|
this.root.check(this, e.detail.value.length > 0 ? true : false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取父元素实例
|
||||||
|
*/
|
||||||
|
getTable(name = 'uniTable') {
|
||||||
|
let parent = this.$parent
|
||||||
|
let parentName = parent.$options.name
|
||||||
|
while (parentName !== name) {
|
||||||
|
parent = parent.$parent
|
||||||
|
if (!parent) return false
|
||||||
|
parentName = parent.$options.name
|
||||||
|
}
|
||||||
|
return parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
$border-color: #ebeef5;
|
||||||
|
|
||||||
|
.uni-table-tr {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: table-row;
|
||||||
|
transition: all 0.3s;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox {
|
||||||
|
padding: 0 8px;
|
||||||
|
width: 26px;
|
||||||
|
padding-left: 12px;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: middle;
|
||||||
|
/* #endif */
|
||||||
|
color: #333;
|
||||||
|
font-weight: 500;
|
||||||
|
border-bottom: 1px $border-color solid;
|
||||||
|
font-size: 14px;
|
||||||
|
// text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tr-table--border {
|
||||||
|
border-right: 1px $border-color solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
.uni-table-tr {
|
||||||
|
::v-deep .uni-table-th {
|
||||||
|
&.table--border:last-child {
|
||||||
|
// border-right: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .uni-table-td {
|
||||||
|
&.table--border:last-child {
|
||||||
|
// border-right: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
</style>
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"filter-dropdown.reset": "Reset",
|
||||||
|
"filter-dropdown.search": "Search",
|
||||||
|
"filter-dropdown.submit": "Submit",
|
||||||
|
"filter-dropdown.filter": "Filter",
|
||||||
|
"filter-dropdown.gt": "Greater or equal to",
|
||||||
|
"filter-dropdown.lt": "Less than or equal to",
|
||||||
|
"filter-dropdown.date": "Date"
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"filter-dropdown.reset": "Reiniciar",
|
||||||
|
"filter-dropdown.search": "Búsqueda",
|
||||||
|
"filter-dropdown.submit": "Entregar",
|
||||||
|
"filter-dropdown.filter": "Filtrar",
|
||||||
|
"filter-dropdown.gt": "Mayor o igual a",
|
||||||
|
"filter-dropdown.lt": "Menos que o igual a",
|
||||||
|
"filter-dropdown.date": "Fecha"
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"filter-dropdown.reset": "Réinitialiser",
|
||||||
|
"filter-dropdown.search": "Chercher",
|
||||||
|
"filter-dropdown.submit": "Soumettre",
|
||||||
|
"filter-dropdown.filter": "Filtre",
|
||||||
|
"filter-dropdown.gt": "Supérieur ou égal à",
|
||||||
|
"filter-dropdown.lt": "Inférieur ou égal à",
|
||||||
|
"filter-dropdown.date": "Date"
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
import en from './en.json'
|
||||||
|
import es from './es.json'
|
||||||
|
import fr from './fr.json'
|
||||||
|
import zhHans from './zh-Hans.json'
|
||||||
|
import zhHant from './zh-Hant.json'
|
||||||
|
export default {
|
||||||
|
en,
|
||||||
|
es,
|
||||||
|
fr,
|
||||||
|
'zh-Hans': zhHans,
|
||||||
|
'zh-Hant': zhHant
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"filter-dropdown.reset": "重置",
|
||||||
|
"filter-dropdown.search": "搜索",
|
||||||
|
"filter-dropdown.submit": "确定",
|
||||||
|
"filter-dropdown.filter": "筛选",
|
||||||
|
"filter-dropdown.gt": "大于等于",
|
||||||
|
"filter-dropdown.lt": "小于等于",
|
||||||
|
"filter-dropdown.date": "日期范围"
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"filter-dropdown.reset": "重置",
|
||||||
|
"filter-dropdown.search": "搜索",
|
||||||
|
"filter-dropdown.submit": "確定",
|
||||||
|
"filter-dropdown.filter": "篩選",
|
||||||
|
"filter-dropdown.gt": "大於等於",
|
||||||
|
"filter-dropdown.lt": "小於等於",
|
||||||
|
"filter-dropdown.date": "日期範圍"
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"id": "uni-table",
|
||||||
|
"displayName": "uni-table 表格",
|
||||||
|
"version": "1.2.1",
|
||||||
|
"description": "表格组件,多用于展示多条结构类似的数据,如",
|
||||||
|
"keywords": [
|
||||||
|
"uni-ui",
|
||||||
|
"uniui",
|
||||||
|
"table",
|
||||||
|
"表格"
|
||||||
|
],
|
||||||
|
"repository": "https://github.com/dcloudio/uni-ui",
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": ""
|
||||||
|
},
|
||||||
|
"directories": {
|
||||||
|
"example": "../../temps/example_temps"
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"category": [
|
||||||
|
"前端组件",
|
||||||
|
"通用组件"
|
||||||
|
],
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "无",
|
||||||
|
"data": "无",
|
||||||
|
"permissions": "无"
|
||||||
|
},
|
||||||
|
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": ["uni-scss","uni-datetime-picker"],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "y",
|
||||||
|
"aliyun": "y"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"App": {
|
||||||
|
"app-vue": "y",
|
||||||
|
"app-nvue": "n"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "y",
|
||||||
|
"Android Browser": "y",
|
||||||
|
"微信浏览器(Android)": "y",
|
||||||
|
"QQ浏览器(Android)": "y"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "y",
|
||||||
|
"IE": "y",
|
||||||
|
"Edge": "y",
|
||||||
|
"Firefox": "y",
|
||||||
|
"Safari": "y"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "y",
|
||||||
|
"阿里": "y",
|
||||||
|
"百度": "y",
|
||||||
|
"字节跳动": "n",
|
||||||
|
"QQ": "y"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "n",
|
||||||
|
"联盟": "n"
|
||||||
|
},
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "y",
|
||||||
|
"vue3": "y"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue