zforg 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BLCD8R_e.js → index-B9V8-1r2.js} +1 -1
- package/dist/{index-BV8ZIDLP.js → index-BSidvyZ0.js} +27690 -27657
- package/dist/{index-DnmLceC9.js → index-BbsNZegv.js} +1 -1
- package/dist/{index-CjKir6nk.js → index-Cn4W_Jok.js} +1 -1
- package/dist/{index-BGxc5ryR.js → index-D87UzeMu.js} +1 -1
- package/dist/{index-BFMI5eOW.js → index-Dk5aWqHZ.js} +1 -1
- package/dist/{index-Dz10Ntti.js → index-DwHf7cVg.js} +1 -1
- package/dist/{index-BMvtKcYA.js → index-I3LV29JH.js} +1 -1
- package/dist/json/zujian.json +27 -0
- package/dist/style.css +1 -1
- package/dist/sun-form-v3.es.js +1 -1
- package/dist/sun-form-v3.umd.js +184 -190
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as z, ref as x, resolveComponent as p, openBlock as k, createElementBlock as U, Fragment as O, createVNode as e, withCtx as l, createTextVNode as V, unref as u, isRef as J, createElementVNode as m } from "vue";
|
|
2
|
-
import { ae as h, ah as E } from "./index-
|
|
2
|
+
import { ae as h, ah as E } from "./index-BSidvyZ0.js";
|
|
3
3
|
const H = { class: "h-full flex flex-col" }, B = { class: "flex-1 overflow-hidden" }, T = /* @__PURE__ */ Object.assign({ name: "commonStyleConfig" }, {
|
|
4
4
|
__name: "dataConfig",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as S, ref as C, resolveComponent as p, openBlock as U, createElementBlock as k, Fragment as O, createVNode as e, withCtx as l, createTextVNode as g, unref as i, isRef as J, createElementVNode as f } from "vue";
|
|
2
|
-
import { ae as T } from "./index-
|
|
2
|
+
import { ae as T } from "./index-BSidvyZ0.js";
|
|
3
3
|
const E = { class: "h-full flex flex-col" }, H = { class: "flex-1 overflow-hidden" }, B = {
|
|
4
4
|
__name: "dataConfig",
|
|
5
5
|
props: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as He, i as Hs, a as Vs, b as ks, c as yt, m as da, A as Ws, L as Xs, p as Mo, R as No, g as Zs, r as Pn, e as xt, d as js, f as qs, h as Ys, j as Ks, Z as Qs, C as Dr, k as se, l as Ut, n as $s, o as Po, M as Xi, q as Ni, s as Pi, t as oi, v as Ro, w as Io, x as Oo, y as Zi, z as ji, B as jn, D as Js, O as el, E as tl, F as rl, G as Rn, H as si, S as Tt, I as qn, J as il, K as nl, N as va, P as al, Q as ol, T as Yn, U as sl, V as pr, W as pa, X as ll, Y as hl, _ as ul, $ as Bo, a0 as ft, a1 as ct, a2 as fl, a3 as cl, a4 as di, a5 as dl, a6 as vl, a7 as pl, a8 as Fo, a9 as ml, aa as _l, ab as ma, ac as _a, ad as ga } from "./index-
|
|
1
|
+
import { u as He, i as Hs, a as Vs, b as ks, c as yt, m as da, A as Ws, L as Xs, p as Mo, R as No, g as Zs, r as Pn, e as xt, d as js, f as qs, h as Ys, j as Ks, Z as Qs, C as Dr, k as se, l as Ut, n as $s, o as Po, M as Xi, q as Ni, s as Pi, t as oi, v as Ro, w as Io, x as Oo, y as Zi, z as ji, B as jn, D as Js, O as el, E as tl, F as rl, G as Rn, H as si, S as Tt, I as qn, J as il, K as nl, N as va, P as al, Q as ol, T as Yn, U as sl, V as pr, W as pa, X as ll, Y as hl, _ as ul, $ as Bo, a0 as ft, a1 as ct, a2 as fl, a3 as cl, a4 as di, a5 as dl, a6 as vl, a7 as pl, a8 as Fo, a9 as ml, aa as _l, ab as ma, ac as _a, ad as ga } from "./index-BSidvyZ0.js";
|
|
2
2
|
He([Hs, Vs]);
|
|
3
3
|
He(ks);
|
|
4
4
|
function ya(e, t, r) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as S, ref as C, resolveComponent as u, openBlock as k, createElementBlock as O, Fragment as U, createVNode as e, withCtx as l, createTextVNode as f, unref as i, isRef as J, createElementVNode as c } from "vue";
|
|
2
|
-
import { ae as E } from "./index-
|
|
2
|
+
import { ae as E } from "./index-BSidvyZ0.js";
|
|
3
3
|
const H = { class: "h-full flex flex-col" }, B = { class: "flex-1 overflow-hidden" }, T = {
|
|
4
4
|
__name: "dataConfig",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as j, ref as g, onMounted as $, resolveComponent as f, openBlock as v, createElementBlock as h, Fragment as x, createVNode as u, withCtx as o, createTextVNode as C, createElementVNode as a, renderList as B, unref as V, toDisplayString as N, nextTick as U, createBlock as D } from "vue";
|
|
2
|
-
import { af as E, ag as M } from "./index-
|
|
2
|
+
import { af as E, ag as M } from "./index-BSidvyZ0.js";
|
|
3
3
|
const R = { class: "flex-wrap flex" }, S = ["onClick"], T = { class: "inner cursor-pointer hover:shadow-md hover:shadow-blue-200 border w-full h-full p-1 flex flex-col overflow-hidden items-center rounded-md shadow-sm" }, z = { class: "lab border-t w-full text-center mt-1 font-bold" }, F = /* @__PURE__ */ Object.assign({ name: "chatChoose" }, {
|
|
4
4
|
__name: "chartChoose",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as g, resolveComponent as u, openBlock as b, createElementBlock as V, Fragment as w, createVNode as e, withCtx as n, unref as a } from "vue";
|
|
2
|
-
import { ah as c } from "./index-
|
|
2
|
+
import { ah as c } from "./index-BSidvyZ0.js";
|
|
3
3
|
const k = /* @__PURE__ */ Object.assign({ name: "config-text" }, {
|
|
4
4
|
__name: "index",
|
|
5
5
|
props: {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
{
|
|
5
|
+
"isContainer": false,
|
|
6
|
+
"displayName": "日历组件",
|
|
7
|
+
"isForm": false,
|
|
8
|
+
"canAddDataTableQuery": false,
|
|
9
|
+
"canAddDataTableList": true,
|
|
10
|
+
"props": {
|
|
11
|
+
"remark": "",
|
|
12
|
+
"isDetail": false,
|
|
13
|
+
"hide": true,
|
|
14
|
+
"width": 24,
|
|
15
|
+
"sfcString": "<template>\n <div class=\"zhu-date-wrapper\">\n <table class=\"zhu-date-table\">\n <thead>\n <!-- 年份表头 -->\n <!-- <tr class=\"year-row\">\n <td colspan=\"32\">{{ year }}</td>\n </tr> -->\n <!-- 日期表头 -->\n <tr class=\"day-header-row\">\n <td>{{ year }}</td>\n <td v-for=\"d in 31\" :key=\"d\">{{ d }}</td>\n </tr>\n </thead>\n <tbody>\n <!-- 月份数据行 -->\n <tr v-for=\"month in 12\" :key=\"month\" class=\"month-row\">\n <td class=\"month-label\">{{ month }}月</td>\n <td v-for=\"day in getDaysInMonth(year, month)\" :key=\"day\" class=\"date-cell\" :class=\"getCellClass(month, day)\"\n @click=\"handleCellClick(month, day)\" @mouseenter=\"hoverCell = `${month}-${day}`\"\n @mouseleave=\"hoverCell = ''\">\n {{ getCellText(month, day) }}\n </td>\n </tr>\n </tbody>\n </table>\n\n <!-- 星期批量操作 -->\n <!-- <div class=\"weekday-toolbar\">\n <button v-for=\"(name, index) in weekNames\" :key=\"index\"\n :class=\"{ active: choseDayItems.includes(index) }\"\n @click=\"choseDay(index)\">\n {{ name }}\n </button>\n </div> -->\n </div>\n</template>\n\n<script setup>\n import { ref, reactive, computed, watch} from 'vue';\n import { getCurrentInstance } from 'vue'\n\n\n\n\n \nconst props = defineProps({\n year: { type: Number, required: true, \n default: new Date().getFullYear() },\n initialOrgLocks: { type: Array, default: () => [] }, // {month, day}\n initialLocks: { type: Array, default: () => [] }, // {month, day}\n initialChoices: { type: Array, default: () => [] }, // {month, day}\n designer: {\n type: Object,\n default: {},\n },\n widget: {\n type: Object,\n default: {},\n },\n})\n\n let app = props.designer;\n let widget = props.widget;\n\nconst emit = defineEmits(['update:choseItems', 'update:lockItems'])\n\n// 状态管理\nconst choseItems = ref([...props.initialChoices])\nconst lockItems = ref([...props.initialLocks])\nconst orgLockItems = ref([...props.initialOrgLocks])\nconst choseDayItems = ref([])\nconst hoverCell = ref('')\n\nconst weekNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']\n\n// 辅助函数\nconst getDaysInMonth = (y, m) => new Date(y, m, 0).getDate()\n\nconst existsIn = (arr, m, d) => arr.some(item => item.month === m && item.day === d)\nconst isSelected = (m, d) => existsIn(choseItems.value, m, d)\nconst isLocked = (m, d) => existsIn(lockItems.value, m, d)\nconst isOrgLocked = (m, d) => existsIn(orgLockItems.value, m, d)\n\n// 样式 & 文本计算\nconst getCellClass = (m, d) => {\n const classes = ['date-cell']\n if (isSelected(m, d)) classes.push('is-selected')\n else if (isLocked(m, d)) classes.push('is-locked')\n else if (isOrgLocked(m, d)) classes.push('is-org-locked')\n \n if (`${m}-${d}` === hoverCell.value) classes.push('is-hovered')\n return classes.join(' ')\n}\n\nconst getCellText = (m, d) => {\n if (isSelected(m, d)) return '选中'\n if (isLocked(m, d)) return '排除'\n if (isOrgLocked(m, d)) return '已排'\n return ''\n}\n\n// 核心交互\nconst handleCellClick = (m, d) => {\n if (isOrgLocked(m, d)) return // 外部锁定不可操作\n\n const idx = choseItems.value.findIndex(item => item.month === m && item.day === d)\n if (idx !== -1) {\n choseItems.value.splice(idx, 1) // 取消选择\n } else {\n choseItems.value.push({ month: m, day: d }) // 添加选择\n // 选择时自动移除临时锁定(保持与原逻辑一致)\n const lockIdx = lockItems.value.findIndex(item => item.month === m && item.day === d)\n if (lockIdx !== -1) lockItems.value.splice(lockIdx, 1)\n }\n emit('update:choseItems', choseItems.value)\n}\n\nconst choseDay = (dayIndex) => {\n const idx = choseDayItems.value.indexOf(dayIndex)\n if (idx !== -1) {\n // 取消星期选择:移除对应的临时锁定\n lockItems.value = lockItems.value.filter(item => {\n const dtDay = new Date(props.year, item.month - 1, item.day).getDay()\n return dtDay !== dayIndex\n })\n choseDayItems.value.splice(idx, 1)\n } else {\n // 添加星期选择:批量添加临时锁定\n for (let m = 1; m <= 12; m++) {\n for (let d = 1; d <= getDaysInMonth(props.year, m); d++) {\n const dtDay = new Date(props.year, m - 1, d).getDay()\n if (dtDay === dayIndex && !isOrgLocked(m, d) && !isSelected(m, d) && !isLocked(m, d)) {\n lockItems.value.push({ month: m, day: d })\n }\n }\n }\n choseDayItems.value.push(dayIndex)\n }\n emit('update:lockItems', lockItems.value)\n}\n\nconst orgLock = (m, d) => {\n if (!isOrgLocked(m, d)) orgLockItems.value.push({ month: m, day: d })\n}\n\nconst lock = (m, d) => {\n if (!isOrgLocked(m, d) && !isSelected(m, d) && !isLocked(m, d)) {\n lockItems.value.push({ month: m, day: d })\n }\n}\n\nconst removeChose = () => {\n choseItems.value = []\n emit('update:choseItems', choseItems.value)\n}\n\n// 暴露 API 供父组件调用\ndefineExpose({\n choseItems,\n lockItems,\n orgLockItems,\n choseDay,\n orgLock,\n lock,\n removeChose\n})\n\n // 1. 获取当前组件实例\n const instance = getCurrentInstance()\n // 2. 拿到全局 app 根实例\n const vue_app = instance?.appContext.app\n\n if (vue_app) {\n // 3. 把【当前组件】全局注册\n // 第一个参数:全局标签名(自定义)\n // 第二个参数:当前组件本身 instance.type\n vue_app.component('zhu-date', instance.type)\n }\n \n</script>\n<style scoped>\n .zhu-date-wrapper {\n font-family: system-ui, -apple-system, sans-serif;\n user-select: none;\n }\n\n .zhu-date-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 12px;\n table-layout: fixed;\n }\n\n .zhu-date-table td {\n text-align: center;\n padding: 4px 0;\n height: 24px;\n border: 1px solid #e0e0e0;\n cursor: pointer;\n transition: all 0.2s;\n }\n\n .year-row td,\n .day-header-row td,\n .month-label {\n background: #eecfd2;\n font-weight: bold;\n color: #333;\n }\n\n .date-cell {\n background: #f5f5f5;\n }\n\n .date-cell.is-selected {\n background: #00FF7F !important;\n color: #004d00;\n }\n\n .date-cell.is-locked {\n background: #cedced;\n color: #444;\n }\n\n .date-cell.is-org-locked {\n background: #ffa500;\n color: #fff;\n cursor: not-allowed;\n }\n\n .date-cell.is-hovered {\n filter: brightness(0.92);\n }\n\n .weekday-toolbar {\n margin-top: 12px;\n display: flex;\n gap: 8px;\n }\n\n .weekday-toolbar button {\n padding: 6px 12px;\n border: 1px solid #ccc;\n background: #fff;\n cursor: pointer;\n border-radius: 4px;\n }\n\n .weekday-toolbar button.active {\n background: #0056b3;\n color: #fff;\n border-color: #0056b3;\n }\n</style>",
|
|
16
|
+
"onCreated": null,
|
|
17
|
+
"onMounted": null,
|
|
18
|
+
"style": {
|
|
19
|
+
"height": "100%"
|
|
20
|
+
},
|
|
21
|
+
"flowConfig": null
|
|
22
|
+
},
|
|
23
|
+
"type": "sfc",
|
|
24
|
+
"id": "sfc_440661"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
]
|