suncy-my-npm-test 1.0.42 → 1.0.43

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.esm.js CHANGED
@@ -1,4 +1,3 @@
1
- import { defineComponent, ref } from "vue-demi";
2
1
  import { openBlock, createElementBlock, toDisplayString } from "vue";
3
2
  const _export_sfc = (sfc, props) => {
4
3
  const target = sfc.__vccOpts || sfc;
@@ -7,39 +6,24 @@ const _export_sfc = (sfc, props) => {
7
6
  }
8
7
  return target;
9
8
  };
10
- const _sfc_main = defineComponent({
9
+ const _sfc_main = {
11
10
  name: "MyComponent",
12
- props: {
13
- label: {
14
- type: String,
15
- default: "Click me"
16
- }
17
- },
18
- emits: ["click"],
19
- // Vue3 的 emits,Vue2 会自动忽略
20
- setup(props, { emit }) {
21
- const count = ref(0);
22
- const handleClick = () => {
23
- count.value++;
24
- emit("click", count.value);
25
- };
11
+ data() {
26
12
  return {
27
- count,
28
- handleClick
13
+ count: 0
29
14
  };
30
15
  },
31
- // Vue2 选项式 API 兼容
32
16
  methods: {
33
- // 如果需要支持 Vue2 的 $emit 调用
34
- onClick() {
17
+ handleClick() {
18
+ this.count++;
35
19
  this.$emit("click", this.count);
36
20
  }
37
21
  }
38
- });
22
+ };
39
23
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
40
24
  return openBlock(), createElementBlock("div", {
41
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
42
- }, " aaaaa=" + toDisplayString(_ctx.count), 1);
25
+ onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClick && $options.handleClick(...args))
26
+ }, " aaaaa=" + toDisplayString($data.count), 1);
43
27
  }
44
28
  const test = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
45
29
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/test.vue"],"sourcesContent":["<template>\r\n <div @click=\"handleClick\">\r\n aaaaa={{count}}\r\n </div>\r\n </template>\r\n <script>\r\n import { defineComponent, ref } from 'vue-demi'\r\n\r\n export default defineComponent({\r\n name: 'MyComponent',\r\n \r\n props: {\r\n label: {\r\n type: String,\r\n default: 'Click me'\r\n }\r\n },\r\n \r\n emits: ['click'], // Vue3 的 emits,Vue2 会自动忽略\r\n \r\n setup(props, { emit }) {\r\n const count = ref(0)\r\n \r\n const handleClick = () => {\r\n count.value++\r\n emit('click', count.value)\r\n }\r\n \r\n return {\r\n count,\r\n handleClick\r\n }\r\n },\r\n \r\n // Vue2 选项式 API 兼容\r\n methods: {\r\n // 如果需要支持 Vue2 的 $emit 调用\r\n onClick() {\r\n this.$emit('click', this.count)\r\n }\r\n }\r\n})\r\n </script>\r\n "],"names":["_createElementBlock"],"mappings":";;;;;;;;;AAQE,MAAK,YAAa,gBAAa;AAAA,EAC/B,MAAM;AAAA,EAEN,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA;EAGF,OAAO,CAAC,OAAO;AAAA;AAAA,EAEf,MAAM,OAAO,EAAE,QAAQ;AACrB,UAAM,QAAQ,IAAI,CAAC;AAEnB,UAAM,cAAc,MAAM;AACxB,YAAM;AACN,WAAK,SAAS,MAAM,KAAK;AAAA,IAC3B;AAEA,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAGA,SAAS;AAAA;AAAA,IAEP,UAAU;AACR,WAAK,MAAM,SAAS,KAAK,KAAK;AAAA,IAChC;AAAA,EACF;AACF,CAAC;;sBAxCGA,mBAEM,OAAA;AAAA,IAFA,gDAAO,KAAA,eAAA,KAAA,YAAA,GAAA,IAAA;AAAA,EAAa,GAAA,4BACd,KAAA,KAAK,GAAA,CAAA;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/test.vue"],"sourcesContent":["<template>\r\n <div @click=\"handleClick\">\r\n aaaaa={{count}}\r\n </div>\r\n </template>\r\n <script>\r\n export default {\r\n name: 'MyComponent',\r\n data() {\r\n return {\r\n count: 0\r\n }\r\n },\r\n methods: {\r\n handleClick() {\r\n this.count++\r\n this.$emit('click', this.count)\r\n }\r\n }\r\n }\r\n </script>\r\n "],"names":["_createElementBlock"],"mappings":";;;;;;;;AAME,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AACL,WAAO;AAAA,MACL,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,SAAS;AAAA,IACP,cAAc;AACZ,WAAK;AACL,WAAK,MAAM,SAAS,KAAK,KAAK;AAAA,IAChC;AAAA,EACF;AACF;;sBAlBEA,mBAEM,OAAA;AAAA,IAFA,gDAAO,SAAA,eAAA,SAAA,YAAA,GAAA,IAAA;AAAA,EAAa,GAAA,4BACd,MAAA,KAAK,GAAA,CAAA;;;"}
package/dist/index.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(require("vue-demi"), require("vue")) : typeof define === "function" && define.amd ? define(["vue-demi", "vue"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global.MyTest = factory(global.VueDemi, global.Vue));
3
- })(this, (function(vueDemi, vue) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(require("vue")) : typeof define === "function" && define.amd ? define(["vue"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global.MyTest = factory(global.Vue));
3
+ })(this, (function(vue) {
4
4
  "use strict";
5
5
  const _export_sfc = (sfc, props) => {
6
6
  const target = sfc.__vccOpts || sfc;
@@ -9,39 +9,24 @@
9
9
  }
10
10
  return target;
11
11
  };
12
- const _sfc_main = vueDemi.defineComponent({
12
+ const _sfc_main = {
13
13
  name: "MyComponent",
14
- props: {
15
- label: {
16
- type: String,
17
- default: "Click me"
18
- }
19
- },
20
- emits: ["click"],
21
- // Vue3 的 emits,Vue2 会自动忽略
22
- setup(props, { emit }) {
23
- const count = vueDemi.ref(0);
24
- const handleClick = () => {
25
- count.value++;
26
- emit("click", count.value);
27
- };
14
+ data() {
28
15
  return {
29
- count,
30
- handleClick
16
+ count: 0
31
17
  };
32
18
  },
33
- // Vue2 选项式 API 兼容
34
19
  methods: {
35
- // 如果需要支持 Vue2 的 $emit 调用
36
- onClick() {
20
+ handleClick() {
21
+ this.count++;
37
22
  this.$emit("click", this.count);
38
23
  }
39
24
  }
40
- });
25
+ };
41
26
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
42
27
  return vue.openBlock(), vue.createElementBlock("div", {
43
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
44
- }, " aaaaa=" + vue.toDisplayString(_ctx.count), 1);
28
+ onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClick && $options.handleClick(...args))
29
+ }, " aaaaa=" + vue.toDisplayString($data.count), 1);
45
30
  }
46
31
  const test = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
47
32
  return test;
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/test.vue"],"sourcesContent":["<template>\r\n <div @click=\"handleClick\">\r\n aaaaa={{count}}\r\n </div>\r\n </template>\r\n <script>\r\n import { defineComponent, ref } from 'vue-demi'\r\n\r\n export default defineComponent({\r\n name: 'MyComponent',\r\n \r\n props: {\r\n label: {\r\n type: String,\r\n default: 'Click me'\r\n }\r\n },\r\n \r\n emits: ['click'], // Vue3 的 emits,Vue2 会自动忽略\r\n \r\n setup(props, { emit }) {\r\n const count = ref(0)\r\n \r\n const handleClick = () => {\r\n count.value++\r\n emit('click', count.value)\r\n }\r\n \r\n return {\r\n count,\r\n handleClick\r\n }\r\n },\r\n \r\n // Vue2 选项式 API 兼容\r\n methods: {\r\n // 如果需要支持 Vue2 的 $emit 调用\r\n onClick() {\r\n this.$emit('click', this.count)\r\n }\r\n }\r\n})\r\n </script>\r\n "],"names":["defineComponent","ref","_createElementBlock"],"mappings":";;;;;;;;;;;AAQE,QAAK,YAAaA,QAAAA,gBAAa;AAAA,IAC/B,MAAM;AAAA,IAEN,OAAO;AAAA,MACL,OAAO;AAAA,QACL,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA;IAGF,OAAO,CAAC,OAAO;AAAA;AAAA,IAEf,MAAM,OAAO,EAAE,QAAQ;AACrB,YAAM,QAAQC,QAAAA,IAAI,CAAC;AAEnB,YAAM,cAAc,MAAM;AACxB,cAAM;AACN,aAAK,SAAS,MAAM,KAAK;AAAA,MAC3B;AAEA,aAAO;AAAA,QACL;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA;AAAA,IAGA,SAAS;AAAA;AAAA,MAEP,UAAU;AACR,aAAK,MAAM,SAAS,KAAK,KAAK;AAAA,MAChC;AAAA,IACF;AAAA,EACF,CAAC;;4BAxCGC,IAAAA,mBAEM,OAAA;AAAA,MAFA,gDAAO,KAAA,eAAA,KAAA,YAAA,GAAA,IAAA;AAAA,IAAa,GAAA,gCACd,KAAA,KAAK,GAAA,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"index.umd.js","sources":["../src/test.vue"],"sourcesContent":["<template>\r\n <div @click=\"handleClick\">\r\n aaaaa={{count}}\r\n </div>\r\n </template>\r\n <script>\r\n export default {\r\n name: 'MyComponent',\r\n data() {\r\n return {\r\n count: 0\r\n }\r\n },\r\n methods: {\r\n handleClick() {\r\n this.count++\r\n this.$emit('click', this.count)\r\n }\r\n }\r\n }\r\n </script>\r\n "],"names":["_createElementBlock"],"mappings":";;;;;;;;;;;AAME,QAAK,YAAU;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AACL,aAAO;AAAA,QACL,OAAO;AAAA,MACT;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP,cAAc;AACZ,aAAK;AACL,aAAK,MAAM,SAAS,KAAK,KAAK;AAAA,MAChC;AAAA,IACF;AAAA,EACF;;4BAlBEA,IAAAA,mBAEM,OAAA;AAAA,MAFA,gDAAO,SAAA,eAAA,SAAA,YAAA,GAAA,IAAA;AAAA,IAAa,GAAA,gCACd,MAAA,KAAK,GAAA,CAAA;AAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suncy-my-npm-test",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "type": "module",
5
5
  "description": "A Vue component compatible with Vue 2 & 3",
6
6
  "main": "dist/index.umd.js",