@valaxyjs/devtools 0.22.10 → 0.22.12

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.
@@ -1,42 +1,37 @@
1
- import { S as defineComponent, U as ref, ap as onMounted, av as getGlobalValaxyProperty, O as createBlock, R as withCtx, X as unref, W as createVNode, E as createBaseVNode, C as createElementBlock, N as renderList, A as withDirectives, aw as vModelCheckbox, I as toDisplayString, M as Fragment, ax as vModelText, D as openBlock } from './index-DQQdpzcV.js';
2
- import { M, g, a as axios } from './splitpanes.es-D7KkGVRd.js';
1
+ import { q as defineComponent, s as ref, k as createBlock, p as withCtx, y as unref, x as createVNode, a as createBaseVNode, z as createTextVNode, c as createElementBlock, j as renderList, w as withDirectives, ac as vModelCheckbox, t as toDisplayString, aa as postList, F as Fragment, ad as vModelText, o as openBlock } from './index-ChxUjQc_.js';
2
+ import { M, b as script, g, c as axios } from './splitpanes.es-oE07QrQG.js';
3
3
 
4
4
  const _hoisted_1 = {
5
+ flex: "~ gap-2",
6
+ class: "items-center justify-center"
7
+ };
8
+ const _hoisted_2 = {
5
9
  class: "h-full",
6
10
  overflow: "auto",
7
11
  pl: "12",
8
12
  pr: "4",
9
13
  py: "4"
10
14
  };
11
- const _hoisted_2 = ["name", "value"];
12
- const _hoisted_3 = ["for"];
13
- const _hoisted_4 = {
15
+ const _hoisted_3 = ["name", "value"];
16
+ const _hoisted_4 = ["for"];
17
+ const _hoisted_5 = {
14
18
  class: "h-full",
15
19
  overflow: "auto",
16
20
  pl: "12",
17
21
  pr: "4",
18
22
  py: "4"
19
23
  };
20
- const _hoisted_5 = ["for"];
21
- const _hoisted_6 = ["onUpdate:modelValue", "name"];
24
+ const _hoisted_6 = ["for"];
25
+ const _hoisted_7 = ["onUpdate:modelValue", "name"];
22
26
  const _sfc_main = /* @__PURE__ */ defineComponent({
23
27
  __name: "migration",
24
28
  setup(__props) {
25
- const postList = ref([]);
26
29
  const mapper = ref({});
27
- onMounted(() => {
28
- postList.value = getGlobalValaxyProperty("postList").value;
29
- postList.value.forEach((element) => {
30
- const keys = Object.keys(element);
31
- for (const key of keys)
32
- mapper.value[key] = "";
33
- });
34
- });
35
30
  const checkedPosts = ref([]);
36
31
  function clearPosts(select) {
37
32
  checkedPosts.value.length = 0;
38
33
  if (select)
39
- checkedPosts.value = checkedPosts.value.concat(postList.value.map((i) => i.path));
34
+ checkedPosts.value = checkedPosts.value.concat(postList.value.posts.map((i) => i.filePath));
40
35
  }
41
36
  async function migration() {
42
37
  const update = {};
@@ -55,29 +50,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
50
  default: withCtx(() => [
56
51
  createVNode(unref(g), null, {
57
52
  default: withCtx(() => [
58
- createBaseVNode("button", {
59
- onClick: _cache[0] || (_cache[0] = ($event) => clearPosts(true))
60
- }, " 全选 "),
61
- createBaseVNode("button", {
62
- onClick: _cache[1] || (_cache[1] = ($event) => clearPosts(false))
63
- }, " 清空 "),
64
- createBaseVNode("ul", _hoisted_1, [
65
- (openBlock(true), createElementBlock(Fragment, null, renderList(postList.value, (post) => {
53
+ createBaseVNode("div", _hoisted_1, [
54
+ createVNode(unref(script), {
55
+ onClick: _cache[0] || (_cache[0] = ($event) => clearPosts(true))
56
+ }, {
57
+ default: withCtx(() => _cache[3] || (_cache[3] = [
58
+ createTextVNode(" 全选 ")
59
+ ])),
60
+ _: 1
61
+ }),
62
+ createVNode(unref(script), {
63
+ onClick: _cache[1] || (_cache[1] = ($event) => clearPosts(false))
64
+ }, {
65
+ default: withCtx(() => _cache[4] || (_cache[4] = [
66
+ createTextVNode(" 清空 ")
67
+ ])),
68
+ _: 1
69
+ })
70
+ ]),
71
+ createBaseVNode("ul", _hoisted_2, [
72
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(postList).posts, (post) => {
66
73
  return openBlock(), createElementBlock("li", {
67
- key: post.path,
74
+ key: post.filePath,
68
75
  class: "list-decimal"
69
76
  }, [
70
77
  withDirectives(createBaseVNode("input", {
71
78
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => checkedPosts.value = $event),
72
79
  type: "checkbox",
73
- name: post.path,
74
- value: post.path
75
- }, null, 8, _hoisted_2), [
80
+ name: post.filePath,
81
+ value: post.filePath
82
+ }, null, 8, _hoisted_3), [
76
83
  [vModelCheckbox, checkedPosts.value]
77
84
  ]),
78
85
  createBaseVNode("label", {
79
- for: post.path
80
- }, toDisplayString(post.title), 9, _hoisted_3)
86
+ for: post.filePath
87
+ }, toDisplayString(post.frontmatter.title), 9, _hoisted_4)
81
88
  ]);
82
89
  }), 128))
83
90
  ])
@@ -86,19 +93,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
86
93
  }),
87
94
  createVNode(unref(g), null, {
88
95
  default: withCtx(() => [
89
- _cache[3] || (_cache[3] = createBaseVNode("h2", null, "原frontmatter字段->新字段", -1)),
96
+ _cache[5] || (_cache[5] = createBaseVNode("h2", null, "原frontmatter字段->新字段", -1)),
90
97
  createBaseVNode("button", { onClick: migration }, " 提交 "),
91
- createBaseVNode("ul", _hoisted_4, [
98
+ createBaseVNode("ul", _hoisted_5, [
92
99
  (openBlock(true), createElementBlock(Fragment, null, renderList(mapper.value, (_, key) => {
93
100
  return openBlock(), createElementBlock("li", { key }, [
94
101
  createBaseVNode("label", {
95
102
  for: key,
96
103
  style: { "margin-right": "20px" }
97
- }, toDisplayString(key) + " ->", 9, _hoisted_5),
104
+ }, toDisplayString(key) + " ->", 9, _hoisted_6),
98
105
  withDirectives(createBaseVNode("input", {
99
106
  "onUpdate:modelValue": ($event) => mapper.value[key] = $event,
100
107
  name: key
101
- }, null, 8, _hoisted_6), [
108
+ }, null, 8, _hoisted_7), [
102
109
  [vModelText, mapper.value[key]]
103
110
  ])
104
111
  ]);