main
张宇 2 years ago
parent 48cb65941e
commit e368285be3

@ -2,109 +2,114 @@
<view class="content pt-2">
<kevyloading v-if="loading" type="bsm-loader" color="#618af8" transparent></kevyloading>
<view class="px-2 my-1">
<div class="relative flex flex-col rounded-xl bg-white p-4 shadow-sm">
<div class="mb-2 pointer-events-auto relative inline-flex bg-white font-medium ">
<div class="flex items-baseline text-xs px-2">
<span class="mr-2 warn-state warn-status-processing bg-emerald-400"></span>
基础功能
<wd-transition :duration="320" :show="true" name="zoom-in">
<view class="px-2 my-1">
<div class="relative flex flex-col rounded-xl bg-white p-4 shadow-sm">
<div class="mb-2 pointer-events-auto relative inline-flex bg-white font-medium ">
<div class="flex items-baseline text-xs px-2">
<span class="mr-2 warn-state warn-status-processing bg-emerald-400"></span>
基础功能
</div>
</div>
</div>
<view class="grid grid-cols-3 gap-3">
<div @click="utils.toUrl('/mall/cat/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
商品分类
</div>
<view class="grid grid-cols-3 gap-3">
<div @click="utils.toUrl('/mall/goods/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
商品管理
</div>
<div @click="utils.toUrl('/mall/cat/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
商品分类
</div>
</view>
<div @click="utils.toUrl('/mall/goods/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
商品管理
</div>
</div>
</view>
</view>
<view class="px-2 my-1">
<div class="relative flex flex-col rounded-xl bg-white p-4 shadow-sm">
<div class="mb-2 pointer-events-auto relative inline-flex bg-white font-medium ">
<div class="flex items-baseline text-xs px-2">
<span class="mr-2 warn-state warn-status-processing bg-yellow-600"></span>
订单管理
</div>
</div>
<view class="grid grid-cols-3 gap-3">
<div @click="utils.toUrl('/mall/order/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
普通订单
</div>
<div @click="utils.toUrl('/mall/pickUp/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
自提订单
</view>
</wd-transition>
<wd-transition :duration="340" :show="true" name="zoom-in">
<view class="px-2 my-1">
<div class="relative flex flex-col rounded-xl bg-white p-4 shadow-sm">
<div class="mb-2 pointer-events-auto relative inline-flex bg-white font-medium ">
<div class="flex items-baseline text-xs px-2">
<span class="mr-2 warn-state warn-status-processing bg-yellow-600"></span>
订单管理
</div>
</div>
<div @click="utils.toUrl('/mall/inpersonPay/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
当面付订单
</div>
</view>
<view class="grid grid-cols-3 gap-3">
<div @click="utils.toUrl('/mall/order/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
普通订单
</div>
<div @click="utils.toUrl('/mall/pickUp/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
自提订单
</div>
</div>
</view>
<div @click="utils.toUrl('/mall/inpersonPay/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
当面付订单
</div>
</view>
<view class="px-2 my-1">
<div class="relative flex flex-col rounded-xl bg-white p-4 shadow-sm">
<div class="mb-2 pointer-events-auto relative inline-flex bg-white font-medium ">
<div class="flex items-baseline text-xs px-2">
<span class="mr-2 warn-state warn-status-processing bg-stone-800"></span>
折扣管理
</div>
</div>
<view class="grid grid-cols-3 gap-3">
<div @click="utils.toUrl('/mall/discount/discount/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
限时折扣
</view>
</wd-transition>
<wd-transition :duration="360" :show="true" name="zoom-in">
<view class="px-2 my-1">
<div class="relative flex flex-col rounded-xl bg-white p-4 shadow-sm">
<div class="mb-2 pointer-events-auto relative inline-flex bg-white font-medium ">
<div class="flex items-baseline text-xs px-2">
<span class="mr-2 warn-state warn-status-processing bg-stone-800"></span>
折扣管理
</div>
</div>
<div @click="utils.toUrl('/mall/discount/full_discount/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
梯度折扣
</div>
<div @click="utils.toUrl('/mall/discount/full_set_redution/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
满额立减
</div>
<!-- <div class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
<view class="grid grid-cols-3 gap-3">
<div @click="utils.toUrl('/mall/discount/discount/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
限时折扣
</div>
<div @click="utils.toUrl('/mall/discount/full_discount/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
梯度折扣
</div>
<div @click="utils.toUrl('/mall/discount/full_set_redution/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
满额立减
</div>
<!-- <div class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
套餐优惠
</div> -->
</view>
</view>
</div>
</view>
</div>
</view>
</wd-transition>
<view class="bg-transparent h-[80px]"></view>

@ -9,10 +9,7 @@
</template>
</wd-navbar>
</view>
<view bg-color="#f7f8fa" class="w-full grid grid-cols-3 gap-3 px-3 my-4">
<view @click="utils.toUrl('/mall/cat/index')" class="text-white rounded-3xl p-4 pb-0 shadow-lg overflow-hidden"
style="background-image: linear-gradient(to top, #7ea0ff 0%, #a9bdf5 100%);">
<view class="font-bold">分类管理</view>

@ -14,7 +14,7 @@ if (token) {
} else if (user_info.type == 3) {
utils.toUrl("/mall/index/index", "redirectTo")
} else {
uni.clearStorage(); //
}
} else {
utils.toUrl("/pages/login/index", "redirectTo")

@ -3,13 +3,13 @@
<div class="flex items-center justify-center mb-2 fixed top-4 left-4">
<wd-transition duration="300" :show="true" name="fade-left">
<wd-transition :duration="300" :show="true" name="fade-left">
<view class="flex-1 overflow-hidden ">
<wd-img :width="34" :height="34" :src="webInfo.logo" mode="aspectFill" />
</view>
</wd-transition>
<wd-transition duration="400" :show="true" name="fade-left">
<wd-transition :duration="400" :show="true" name="fade-left">
<text class="flex px-2 text-center justify-center">
{{ webInfo.name }}
</text>
@ -22,12 +22,12 @@
<view class="rounded-md overflow-hidden">
<wd-cell-group border>
<wd-transition duration="400" :show="true" name="fade-left">
<wd-transition :duration="400" :show="true" name="fade-left">
<wd-input label="用户名" label-width="100px" prop="username" clearable v-model="model.username"
placeholder="请输入用户名" :rules="[{ required: true, message: '请填写用户名' }]" />
</wd-transition>
<wd-transition duration="450" :show="true" name="fade-left">
<wd-transition :duration="450" :show="true" name="fade-left">
<wd-input label="密码" label-width="100px" prop="password" show-password clearable v-model="model.password"
placeholder="请输入密码" :rules="[{ required: true, message: '请填写密码' }]" />
</wd-transition>
@ -36,7 +36,7 @@
</view>
<view class="footer mt-4 px-6">
<wd-transition duration="500" :show="true" name="fade-left">
<wd-transition :duration="500" :show="true" name="fade-left">
<wd-button :loading="loading" type="primary" size="medium" @click="handleSubmit" block>登录</wd-button>
</wd-transition>
</view>

@ -1,14 +1,47 @@
## 0.2.132024-01-12
### [0.2.13](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.12...v0.2.13) (2024-01-12)
## 0.2.172024-01-23
### [0.2.17](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.16...v0.2.17) (2024-01-23)
### Bug Fixes | Bug 修复
### ✨ Features | 新功能
* 修复演示文档刷新后指向localhost的问题 ([4cd8b16](https://github.com/Moonofweisheng/wot-design-uni/commit/4cd8b16bdf5ea8e93cff85396025844e9ebd031c))
* ✨ Form 表单组件提供开关控制是否model变化时重置提示信息 ([b9f46ba](https://github.com/Moonofweisheng/wot-design-uni/commit/b9f46ba0da85acd7312753a34dd0ad3f2f7379a2)), closes [#166](https://github.com/Moonofweisheng/wot-design-uni/issues/166)
# 更新日志
### [0.2.17](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.16...v0.2.17) (2024-01-23)
### ✨ Features | 新功能
* ✨ Form 表单组件提供开关控制是否model变化时重置提示信息 ([b9f46ba](https://github.com/Moonofweisheng/wot-design-uni/commit/b9f46ba0da85acd7312753a34dd0ad3f2f7379a2)), closes [#166](https://github.com/Moonofweisheng/wot-design-uni/issues/166)
### [0.2.16](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.15...v0.2.16) (2024-01-21)
### ✏️ Documentation | 文档
* ✏️ 修复文档中关于日期选择器最大日期描述错误的问题 ([bb76ce3](https://github.com/Moonofweisheng/wot-design-uni/commit/bb76ce332c6977cbae981790aa356bc27c0d9efa))
### [0.2.15](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.14...v0.2.15) (2024-01-15)
### 🐛 Bug Fixes | Bug 修复
* 🐛 修复 Tab class类名属性错误的问题 ([dc87df7](https://github.com/Moonofweisheng/wot-design-uni/commit/dc87df70c7920d7cfabc571ace8beb2ce0dc2a7c))
### ✏️ Documentation | 文档
* ✏️ 修复 Upload 文档中before-upload钩子参数描述错误的问题 ([3ec7299](https://github.com/Moonofweisheng/wot-design-uni/commit/3ec7299ce724fce771b782f6110ba6ec29376291))
### [0.2.14](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.13...v0.2.14) (2024-01-14)
### ✨ Features | 新功能
* ✨ InputNumber步进器支持禁用输入框 ([933bce3](https://github.com/Moonofweisheng/wot-design-uni/commit/933bce314618956ff922daacef5b3594f36baf9b))
### [0.2.13](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.12...v0.2.13) (2024-01-12)

@ -26,12 +26,15 @@ interface Props {
model: Record<string, any>
//
rules?: FormRules
//
resetOnChange?: boolean
customClass?: string
customStyle?: string
}
const props = withDefaults(defineProps<Props>(), {
rules: () => ({}),
resetOnChange: true,
customClass: '',
customStyle: ''
})
@ -44,7 +47,9 @@ linkChildren({ props, errorMessages: errorMessages })
watch(
() => props.model,
() => {
clearMessage()
if (props.resetOnChange) {
clearMessage()
}
},
{ immediate: true, deep: true }
)
@ -129,6 +134,14 @@ async function validate(prop?: string): Promise<{ valid: boolean; errors: ErrorM
showMessage(error)
})
if (valid) {
if (prop) {
clearMessage(prop)
} else {
clearMessage()
}
}
return {
valid,
errors
@ -156,10 +169,14 @@ function showMessage(errorMsg: ErrorMessage) {
}
}
function clearMessage() {
Object.keys(errorMessages).forEach((key) => {
errorMessages[key] = ''
})
function clearMessage(prop?: string) {
if (prop) {
errorMessages[prop] = ''
} else {
Object.keys(errorMessages).forEach((key) => {
errorMessages[key] = ''
})
}
}
function reset() {

@ -1,14 +1,14 @@
<template>
<view :class="`wd-input-number ${customClass} ${disabled ? 'is-disabled' : ''} ${withoutInput ? 'is-without-input' : ''}`">
<view :class="`wd-input-number__action ${minDisabled ? 'is-disabled' : ''}`" @click="sub">
<view :class="`wd-input-number__action ${minDisabled || disableMinus ? 'is-disabled' : ''}`" @click="sub">
<wd-icon name="decrease" custom-class="wd-input-number__action-icon"></wd-icon>
</view>
<view v-if="!withoutInput" class="wd-input-number__inner">
<view v-if="!withoutInput" class="wd-input-number__inner" @click.stop="">
<input
class="wd-input-number__input"
:style="`${inputWidth ? 'width: ' + inputWidth : ''}`"
type="digit"
:disabled="disabled"
:disabled="disabled || disableInput"
v-model="inputValue"
:placeholder="placeholder"
@input="handleInput"
@ -17,7 +17,7 @@
/>
<view class="wd-input-number__input-border"></view>
</view>
<view :class="`wd-input-number__action ${maxDisabled ? 'is-disabled' : ''}`" @click="add">
<view :class="`wd-input-number__action ${maxDisabled || disablePlus ? 'is-disabled' : ''}`" @click="add">
<wd-icon name="add" custom-class="wd-input-number__action-icon"></wd-icon>
</view>
</view>
@ -47,11 +47,13 @@ interface Props {
stepStrictly?: boolean
precision?: number
disabled?: boolean
disableInput?: boolean
disableMinus?: boolean
disablePlus?: boolean
withoutInput?: boolean
inputWidth?: string | number
allowNull?: boolean
placeholder?: string
name?: string
}
const props = withDefaults(defineProps<Props>(), {
@ -62,11 +64,13 @@ const props = withDefaults(defineProps<Props>(), {
stepStrictly: false,
precision: 0,
disabled: false,
disableInput: false,
disableMinus: false,
disablePlus: false,
withoutInput: false,
inputWidth: 36,
allowNull: false,
placeholder: '',
name: ''
placeholder: ''
})
const minDisabled = ref<boolean>(false)
@ -168,14 +172,14 @@ function changeStep(val: string | number, step: number) {
}
function sub() {
if (minDisabled.value) return
if (minDisabled.value || props.disableMinus) return
const newValue = changeStep(inputValue.value, -props.step)
dispatchChangeEvent(newValue)
}
function add() {
if (maxDisabled.value) return
if (maxDisabled.value || props.disablePlus) return
const newValue = changeStep(inputValue.value, props.step)
dispatchChangeEvent(newValue)

@ -1,6 +1,6 @@
<template>
<view :class="`wd-tab ${customClass}`">
<view v-if="painted" cclass="wd-tab__body" :style="isShow ? '' : 'display: none;'">
<view v-if="painted" class="wd-tab__body" :style="isShow ? '' : 'display: none;'">
<slot />
</view>
</view>
@ -16,7 +16,7 @@ export default {
}
</script>
<script lang="ts" setup>
import { getCurrentInstance, onBeforeMount, ref, watch } from 'vue'
import { getCurrentInstance, ref, watch } from 'vue'
import { getType, isDef } from '../common/util'
import { useParent } from '../composables/useParent'
import { TABS_KEY } from '../wd-tabs/types'

@ -2,7 +2,7 @@
"id": "wot-design-uni",
"name": "wot-design-uni",
"displayName": "wot-design-uni 基于vue3+Typescript的高颜值组件库",
"version": "0.2.13",
"version": "0.2.17",
"description": "一个基于Vue3+TS开发的uni-app组件库提供60+高质量组件,支持暗黑模式和自定义主题。",
"keywords": [
"wot-design-uni",

Loading…
Cancel
Save