增加创建计划组件

This commit is contained in:
2025-09-21 13:32:51 +08:00
parent 02e9f9b9a3
commit c97178b68b
11 changed files with 2329 additions and 44 deletions

125
node_modules/vue3-cron-plus-picker/README.md generated vendored Normal file
View File

@@ -0,0 +1,125 @@
# vue3+elementplus 的cron表达式生成插件
## 目的
- vue3环境中使用cron表达式插件
## 依赖版本
- Vue3.0.0+
- element-plus
## 使用
### 1 安装
`npm i vue3-cron-plus-picker`
或者
`pnpm add vue3-cron-plus-picker`
### 2 引入
1. 全局引入
在src\main.js中引入下载的包并引入其样式
```js
import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import Vue3CronPlusPicker from 'vue3-cron-plus-picker' // 引入组件
import 'vue3-cron-plus-picker/style.css' //引入组件相关样式
createApp(App).use(ElementPlus).use(Vue3CronPlusPicker).mount('#app')
```
2. 局部引入
在使用的组件的vue文件中直接引入
```js
import 'vue3-cron-plus-picker/style.css'
import {Vue3CronPlusPicker} from 'vue3-cron-plus-picker'
```
### 3 使用
```js
<template>
<div>
<el-input class="elInput" v-model="cronValue" placeholder="请输入正确的cron表达式">
<template #append>
<el-button class="inputButton" @click="openDialog">配置cron</el-button>
</template>
</el-input>
<el-dialog v-model="showCron" >
<vue3-cron-plus-picker @hide="showCron=false" @fill="cronFill" :expression="expression"/>
</el-dialog>
</div>
</template>
<script setup>
import {ref} from 'vue'
const cronValue = ref('')
const showCron = ref()
const expression = ref('')
const openDialog = ()=>{
showCron.value = true
expression.value = cronValue.value
}
const cronFill = (contabValue)=>{
cronValue.value = contabValue
}
</script>
<style>
</style>
```
### 4 参数
<table>
<thead>
<tr>
<th>属性名</th>
<th>说明</th>
<th>类型</th>
<th>Default</th>
<th>可选值</th>
</tr>
</thead>
<tbody>
<tr>
<td>expression</td>
<td>cron表达式绑定的值</td>
<td><span class="inline-flex items-center"><code class="api-typing mr-1">string</code></span></td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>hideComponent</td>
<td>可以隐藏的组件内容</td>
<td><span class="inline-flex items-center"><code class="api-typing mr-1">Array</code></span></td>
<td>-</td>
<td>second/min/hour/day/mouth/week/year/result</td>
</tr>
</tbody>
</table>
### 5 事件
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>类型</th>
<th>方法对应的参数类型</th>
</tr>
</thead>
<tbody>
<tr>
<td>fill</td>
<td>填充选择的cron表达式</td>
<td><span class="inline-flex items-center"><code class="api-typing mr-1">Function</code></span></td>
<td>(contabValue: string) => void</td>
</tr>
<tr>
<td>hide</td>
<td>关闭组件</td>
<td><span class="inline-flex items-center"><code class="api-typing mr-1">Function</code></span></td>
<td>() => void</td>
</tr>
</tbody>
</table>

18
node_modules/vue3-cron-plus-picker/package.json generated vendored Normal file
View File

@@ -0,0 +1,18 @@
{
"name": "vue3-cron-plus-picker",
"version": "1.0.2",
"description": "Corn expression plugin based on vue3+elementPlus基于vue3+elementplus+vue3的corn表达式插件",
"main": "vue3-cron-plus-picker.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"vue3-cron-plus-picker",
"vue3-cron-plus",
"vue3-cron",
"vue3",
"cron"
],
"author": "",
"license": "ISC"
}

1
node_modules/vue3-cron-plus-picker/style.css generated vendored Normal file
View File

@@ -0,0 +1 @@
.pop_btn[data-v-8ae49d29]{text-align:center;margin-top:20px}.popup-main[data-v-8ae49d29]{position:relative;margin:10px auto;background:#fff;border-radius:5px;font-size:12px;overflow:hidden}.popup-title[data-v-8ae49d29]{overflow:hidden;line-height:34px;padding-top:6px;background:#f2f2f2}.popup-result[data-v-8ae49d29]{box-sizing:border-box;line-height:24px;margin:25px auto;padding:15px 10px 10px;border:1px solid #ccc;position:relative}.popup-result .title[data-v-8ae49d29]{position:absolute;top:-28px;left:50%;width:140px;font-size:14px;margin-left:-70px;text-align:center;line-height:30px;background:#fff}.popup-result table[data-v-8ae49d29]{text-align:center;width:100%;margin:0 auto}.popup-result table span[data-v-8ae49d29]{display:block;width:100%;font-family:arial;line-height:30px;height:30px;white-space:nowrap;overflow:hidden;border:1px solid #e8e8e8}.popup-result-scroll[data-v-8ae49d29]{font-size:12px;line-height:24px;height:10em;overflow-y:auto}

1
node_modules/vue3-cron-plus-picker/vite.svg generated vendored Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long