@fangzhongya/vue-archive 0.1.21 → 0.1.23
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/_virtual/_commonjsHelpers.cjs +1 -0
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/_plugin-vue_export-helper.cjs +1 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/_virtual/common.cjs +1 -0
- package/dist/_virtual/common.js +7 -0
- package/dist/_virtual/core.cjs +1 -0
- package/dist/_virtual/core.js +7 -0
- package/dist/index.css +1 -2
- package/dist/node_modules/.pnpm/@highlightjs_vue-plugin@2.1_dace39d2ab17d71b087de9a32848566a/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.cjs +1 -0
- package/dist/node_modules/.pnpm/@highlightjs_vue-plugin@2.1_dace39d2ab17d71b087de9a32848566a/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.js +31 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/common.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/common.js +5 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/core.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/core.js +5 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/common.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/common.js +47 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.cjs +3 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js +1063 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/bash.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/bash.js +383 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/c.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/c.js +283 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/cpp.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/cpp.js +527 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/csharp.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/csharp.js +388 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/css.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/css.js +929 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/diff.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/diff.js +60 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/go.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/go.js +157 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/graphql.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/graphql.js +76 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/ini.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/ini.js +113 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/java.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/java.js +246 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/javascript.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/javascript.js +664 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/json.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/json.js +44 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/kotlin.cjs +2 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/kotlin.js +248 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/less.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/less.js +998 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/lua.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/lua.js +65 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/makefile.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/makefile.js +73 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/markdown.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/markdown.js +222 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/objectivec.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/objectivec.js +243 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/perl.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/perl.js +475 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/php-template.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/php-template.js +53 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/php.cjs +2 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/php.js +572 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/plaintext.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/plaintext.js +19 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/python-repl.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/python-repl.js +32 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/python.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/python.js +405 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/r.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/r.js +213 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/ruby.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/ruby.js +394 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/rust.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/rust.js +311 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/scss.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/scss.js +914 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/shell.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/shell.js +31 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/sql.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/sql.js +621 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/swift.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/swift.js +805 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/typescript.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/typescript.js +759 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/vbnet.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/vbnet.js +128 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/wasm.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/wasm.js +120 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/xml.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/xml.js +225 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/yaml.cjs +1 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/yaml.js +189 -0
- package/dist/packages/components/aside/index.vue.cjs +1 -0
- package/dist/packages/components/aside/index.vue.js +98 -0
- package/dist/packages/components/aside/index.vue2.cjs +1 -0
- package/dist/packages/components/aside/index.vue2.js +4 -0
- package/dist/packages/components/boxurl/index.vue.cjs +1 -0
- package/dist/packages/components/boxurl/index.vue.js +62 -0
- package/dist/packages/components/boxurl/index.vue2.cjs +1 -0
- package/dist/packages/components/boxurl/index.vue2.js +4 -0
- package/dist/packages/components/choice/choice.vue.cjs +1 -0
- package/dist/packages/components/choice/choice.vue.js +46 -0
- package/dist/packages/components/choice/choice.vue2.cjs +1 -0
- package/dist/packages/components/choice/choice.vue2.js +4 -0
- package/dist/packages/components/choice/index.vue.cjs +1 -0
- package/dist/packages/components/choice/index.vue.js +87 -0
- package/dist/packages/components/choice/index.vue2.cjs +1 -0
- package/dist/packages/components/choice/index.vue2.js +4 -0
- package/dist/packages/components/code/highlight.vue.cjs +1 -0
- package/dist/packages/components/code/highlight.vue.js +16 -0
- package/dist/packages/components/code/highlight.vue2.cjs +1 -0
- package/dist/packages/components/code/highlight.vue2.js +20 -0
- package/dist/packages/components/code/index.vue.cjs +1 -0
- package/dist/packages/components/code/index.vue.js +115 -0
- package/dist/packages/components/code/index.vue2.cjs +1 -0
- package/dist/packages/components/code/index.vue2.js +4 -0
- package/dist/packages/components/compo/code.vue.cjs +1 -0
- package/dist/packages/components/compo/code.vue.js +21 -0
- package/dist/packages/components/compo/code.vue3.cjs +1 -0
- package/dist/packages/components/compo/code.vue3.js +5 -0
- package/dist/packages/components/compo/ftable.vue.cjs +1 -0
- package/dist/packages/components/compo/ftable.vue.js +57 -0
- package/dist/packages/components/compo/ftable.vue2.cjs +1 -0
- package/dist/packages/components/compo/ftable.vue2.js +4 -0
- package/dist/packages/components/compo/index.cjs +1 -0
- package/dist/packages/components/compo/index.js +127 -0
- package/dist/packages/components/compo/index.vue.cjs +1 -0
- package/dist/packages/components/compo/index.vue.js +79 -0
- package/dist/packages/components/compo/index.vue2.cjs +1 -0
- package/dist/packages/components/compo/index.vue2.js +4 -0
- package/dist/packages/components/compo/info-top.vue.cjs +1 -0
- package/dist/packages/components/compo/info-top.vue.js +32 -0
- package/dist/packages/components/compo/info-top.vue2.cjs +1 -0
- package/dist/packages/components/compo/info-top.vue2.js +4 -0
- package/dist/packages/components/compo/info.vue.cjs +1 -0
- package/dist/packages/components/compo/info.vue.js +41 -0
- package/dist/packages/components/compo/info.vue2.cjs +1 -0
- package/dist/packages/components/compo/info.vue2.js +4 -0
- package/dist/packages/components/compo/props.vue.cjs +1 -0
- package/dist/packages/components/compo/props.vue.js +87 -0
- package/dist/packages/components/compo/props.vue2.cjs +1 -0
- package/dist/packages/components/compo/props.vue2.js +4 -0
- package/dist/packages/components/compo/top.cjs +1 -0
- package/dist/packages/components/compo/top.js +148 -0
- package/dist/packages/components/header/index.vue.cjs +1 -0
- package/dist/packages/components/header/index.vue.js +10 -0
- package/dist/packages/components/main/index.vue.cjs +1 -0
- package/dist/packages/components/main/index.vue.js +68 -0
- package/dist/packages/components/main/index.vue2.cjs +1 -0
- package/dist/packages/components/main/index.vue2.js +4 -0
- package/dist/packages/components/md/index.vue.cjs +1 -0
- package/dist/packages/components/md/index.vue.js +56 -0
- package/dist/packages/components/md/index.vue2.cjs +1 -0
- package/dist/packages/components/md/index.vue2.js +4 -0
- package/dist/packages/components/test/index.cjs +1 -0
- package/dist/packages/components/test/index.js +105 -0
- package/dist/packages/components/test/index.vue.cjs +1 -0
- package/dist/packages/components/test/index.vue.js +75 -0
- package/dist/packages/components/test/index.vue2.cjs +1 -0
- package/dist/packages/components/test/index.vue2.js +4 -0
- package/dist/packages/components/test/top.cjs +1 -0
- package/dist/packages/components/test/top.js +148 -0
- package/dist/packages/components/use/code.cjs +20 -0
- package/dist/packages/components/use/code.js +212 -0
- package/dist/packages/components/use/code.vue.cjs +1 -0
- package/dist/packages/components/use/code.vue.js +66 -0
- package/dist/packages/components/use/code.vue2.cjs +1 -0
- package/dist/packages/components/use/code.vue2.js +4 -0
- package/dist/packages/components/use/edit.cjs +18 -0
- package/dist/packages/components/use/edit.js +214 -0
- package/dist/packages/components/use/effect.vue.cjs +1 -0
- package/dist/packages/components/use/effect.vue.js +12 -0
- package/dist/packages/components/use/index.cjs +1 -0
- package/dist/packages/components/use/index.js +196 -0
- package/dist/packages/components/use/prettier.cjs +1 -0
- package/dist/packages/components/use/prettier.js +40 -0
- package/dist/packages/components/use/retrie/any/index.vue.cjs +1 -0
- package/dist/packages/components/use/retrie/any/index.vue.js +115 -0
- package/dist/packages/components/use/retrie/any/index.vue2.cjs +1 -0
- package/dist/packages/components/use/retrie/any/index.vue2.js +4 -0
- package/dist/packages/components/use/retrie/array/index.vue.cjs +3 -0
- package/dist/packages/components/use/retrie/array/index.vue.js +55 -0
- package/dist/packages/components/use/retrie/array/index.vue2.cjs +1 -0
- package/dist/packages/components/use/retrie/array/index.vue2.js +4 -0
- package/dist/packages/components/use/retrie/boolean/index.vue.cjs +1 -0
- package/dist/packages/components/use/retrie/boolean/index.vue.js +68 -0
- package/dist/packages/components/use/retrie/boolean/index.vue3.cjs +1 -0
- package/dist/packages/components/use/retrie/boolean/index.vue3.js +5 -0
- package/dist/packages/components/use/retrie/choice/index.vue.cjs +1 -0
- package/dist/packages/components/use/retrie/choice/index.vue.js +142 -0
- package/dist/packages/components/use/retrie/choice/index.vue3.cjs +1 -0
- package/dist/packages/components/use/retrie/choice/index.vue3.js +5 -0
- package/dist/packages/components/use/retrie/expose/index.vue.cjs +1 -0
- package/dist/packages/components/use/retrie/expose/index.vue.js +63 -0
- package/dist/packages/components/use/retrie/expose/index.vue3.cjs +1 -0
- package/dist/packages/components/use/retrie/expose/index.vue3.js +5 -0
- package/dist/packages/components/use/retrie/form/index.vue.cjs +1 -0
- package/dist/packages/components/use/retrie/form/index.vue.js +148 -0
- package/dist/packages/components/use/retrie/form/index.vue2.cjs +1 -0
- package/dist/packages/components/use/retrie/form/index.vue2.js +4 -0
- package/dist/packages/components/use/retrie/function/index.vue.cjs +3 -0
- package/dist/packages/components/use/retrie/function/index.vue.js +68 -0
- package/dist/packages/components/use/retrie/function/index.vue2.cjs +1 -0
- package/dist/packages/components/use/retrie/function/index.vue2.js +4 -0
- package/dist/packages/components/use/retrie/index.vue.cjs +1 -0
- package/dist/packages/components/use/retrie/index.vue.js +103 -0
- package/dist/packages/components/use/retrie/index.vue3.cjs +1 -0
- package/dist/packages/components/use/retrie/index.vue3.js +5 -0
- package/dist/packages/components/use/retrie/input/editor/editor.cjs +1 -0
- package/dist/packages/components/use/retrie/input/editor/editor.js +104 -0
- package/dist/packages/components/use/retrie/input/editor/editor.vue.cjs +5 -0
- package/dist/packages/components/use/retrie/input/editor/editor.vue.js +59 -0
- package/dist/packages/components/use/retrie/input/editor/editor.vue3.cjs +1 -0
- package/dist/packages/components/use/retrie/input/editor/editor.vue3.js +5 -0
- package/dist/packages/components/use/retrie/input/editor/getExtraLib.cjs +416 -0
- package/dist/packages/components/use/retrie/input/editor/getExtraLib.js +427 -0
- package/dist/packages/components/use/retrie/input/index.vue.cjs +1 -0
- package/dist/packages/components/use/retrie/input/index.vue.js +54 -0
- package/dist/packages/components/use/retrie/input/index.vue3.cjs +1 -0
- package/dist/packages/components/use/retrie/input/index.vue3.js +5 -0
- package/dist/packages/components/use/retrie/input/text.vue.cjs +5 -0
- package/dist/packages/components/use/retrie/input/text.vue.js +39 -0
- package/dist/packages/components/use/retrie/input/text.vue3.cjs +1 -0
- package/dist/packages/components/use/retrie/input/text.vue3.js +5 -0
- package/dist/packages/components/use/retrie/number/index.vue.cjs +1 -0
- package/dist/packages/components/use/retrie/number/index.vue.js +50 -0
- package/dist/packages/components/use/retrie/number/index.vue3.cjs +1 -0
- package/dist/packages/components/use/retrie/number/index.vue3.js +5 -0
- package/dist/packages/components/use/retrie/object/index.vue.cjs +3 -0
- package/dist/packages/components/use/retrie/object/index.vue.js +55 -0
- package/dist/packages/components/use/retrie/object/index.vue2.cjs +1 -0
- package/dist/packages/components/use/retrie/object/index.vue2.js +4 -0
- package/dist/packages/components/use/retrie/other/index.vue.cjs +1 -0
- package/dist/packages/components/use/retrie/other/index.vue.js +67 -0
- package/dist/packages/components/use/retrie/other/index.vue2.cjs +1 -0
- package/dist/packages/components/use/retrie/other/index.vue2.js +4 -0
- package/dist/packages/components/use/retrie/select/index.vue.cjs +1 -0
- package/dist/packages/components/use/retrie/select/index.vue.js +123 -0
- package/dist/packages/components/use/retrie/select/index.vue3.cjs +1 -0
- package/dist/packages/components/use/retrie/select/index.vue3.js +5 -0
- package/dist/packages/components/use/retrie/slot/index.vue.cjs +1 -0
- package/dist/packages/components/use/retrie/slot/index.vue.js +43 -0
- package/dist/packages/components/use/retrie/slot/index.vue2.cjs +1 -0
- package/dist/packages/components/use/retrie/slot/index.vue2.js +4 -0
- package/dist/packages/components/use/retrie/string/index.vue.cjs +1 -0
- package/dist/packages/components/use/retrie/string/index.vue.js +53 -0
- package/dist/packages/components/use/retrie/string/index.vue3.cjs +1 -0
- package/dist/packages/components/use/retrie/string/index.vue3.js +5 -0
- package/dist/packages/components/use/set-code.vue.cjs +1 -0
- package/dist/packages/components/use/set-code.vue.js +63 -0
- package/dist/packages/components/use/set-code.vue2.cjs +1 -0
- package/dist/packages/components/use/set-code.vue2.js +4 -0
- package/dist/packages/components/use/set-emit.vue.cjs +1 -0
- package/dist/packages/components/use/set-emit.vue.js +50 -0
- package/dist/packages/components/use/set-emit.vue3.cjs +1 -0
- package/dist/packages/components/use/set-emit.vue3.js +5 -0
- package/dist/packages/components/use/set-expose.vue.cjs +1 -0
- package/dist/packages/components/use/set-expose.vue.js +66 -0
- package/dist/packages/components/use/set-expose.vue3.cjs +1 -0
- package/dist/packages/components/use/set-expose.vue3.js +5 -0
- package/dist/packages/components/use/set-props.vue.cjs +1 -0
- package/dist/packages/components/use/set-props.vue.js +71 -0
- package/dist/packages/components/use/set-props.vue2.cjs +1 -0
- package/dist/packages/components/use/set-props.vue2.js +4 -0
- package/dist/packages/components/use/set-slot.vue.cjs +1 -0
- package/dist/packages/components/use/set-slot.vue.js +45 -0
- package/dist/packages/components/use/set-slot.vue2.cjs +1 -0
- package/dist/packages/components/use/set-slot.vue2.js +4 -0
- package/dist/packages/components/use/util.cjs +3 -0
- package/dist/packages/components/use/util.js +294 -0
- package/dist/packages/config.cjs +1 -0
- package/dist/packages/config.js +14 -0
- package/dist/packages/directives/adjust/index.cjs +1 -0
- package/dist/packages/directives/adjust/index.js +246 -0
- package/dist/packages/index/index.vue.cjs +1 -0
- package/dist/packages/index/index.vue.js +4 -0
- package/dist/packages/index/index.vue2.cjs +1 -0
- package/dist/packages/index/index.vue2.js +14 -0
- package/dist/packages/index.cjs +1 -0
- package/dist/packages/index.d.ts +1 -0
- package/dist/packages/index.js +20 -0
- package/dist/packages/page/compon/index.vue.cjs +1 -0
- package/dist/packages/page/compon/index.vue.js +4 -0
- package/dist/packages/page/compon/index.vue2.cjs +1 -0
- package/dist/packages/page/compon/index.vue2.js +21 -0
- package/dist/packages/page/comprops/index.vue.cjs +1 -0
- package/dist/packages/page/comprops/index.vue.js +4 -0
- package/dist/packages/page/comprops/index.vue2.cjs +1 -0
- package/dist/packages/page/comprops/index.vue2.js +91 -0
- package/dist/packages/page/develop/index.vue.cjs +1 -0
- package/dist/packages/page/develop/index.vue.js +4 -0
- package/dist/packages/page/develop/index.vue2.cjs +1 -0
- package/dist/packages/page/develop/index.vue2.js +26 -0
- package/dist/packages/page/edit/index.vue.cjs +1 -0
- package/dist/packages/page/edit/index.vue.js +4 -0
- package/dist/packages/page/edit/index.vue2.cjs +1 -0
- package/dist/packages/page/edit/index.vue2.js +27 -0
- package/dist/packages/page/index/index.vue.cjs +1 -0
- package/dist/packages/page/index/index.vue.js +4 -0
- package/dist/packages/page/index/index.vue2.cjs +1 -0
- package/dist/packages/page/index/index.vue2.js +61 -0
- package/dist/packages/page/single/index.vue.cjs +1 -0
- package/dist/packages/page/single/index.vue.js +4 -0
- package/dist/packages/page/single/index.vue2.cjs +1 -0
- package/dist/packages/page/single/index.vue2.js +60 -0
- package/dist/packages/page/tests/index.vue.cjs +1 -0
- package/dist/packages/page/tests/index.vue.js +4 -0
- package/dist/packages/page/tests/index.vue2.cjs +1 -0
- package/dist/packages/page/tests/index.vue2.js +67 -0
- package/dist/packages/router/file.cjs +1 -0
- package/dist/packages/router/file.js +44 -0
- package/dist/packages/router/index.cjs +1 -0
- package/dist/packages/router/index.js +122 -0
- package/dist/packages/utils/annotat.cjs +1 -0
- package/dist/packages/utils/annotat.js +322 -0
- package/dist/packages/utils/common.cjs +1 -0
- package/dist/packages/utils/common.js +200 -0
- package/dist/packages/utils/glob.cjs +5 -0
- package/dist/packages/utils/glob.js +502 -0
- package/dist/packages/utils/index.cjs +1 -0
- package/dist/packages/utils/index.js +14 -0
- package/dist/packages/utils/props.cjs +1 -0
- package/dist/packages/utils/props.js +110 -0
- package/dist/packages/utils/storage.cjs +1 -0
- package/dist/packages/utils/storage.js +34 -0
- package/dist/packages/utils/util.cjs +1 -0
- package/dist/packages/utils/util.js +46 -0
- package/package.json +5 -5
- package/dist/config.cjs +0 -1
- package/dist/config.js +0 -11
- package/dist/index/index.cjs +0 -1
- package/dist/index/index.js +0 -5
- package/dist/index/index.vue_vue_type_script_setup_true_lang.cjs +0 -1
- package/dist/index/index.vue_vue_type_script_setup_true_lang.js +0 -12
- package/dist/index.cjs +0 -1
- package/dist/index.js +0 -15
- package/dist/router/file.cjs +0 -1
- package/dist/router/file.js +0 -32
- package/dist/router/index.cjs +0 -1
- package/dist/router/index.js +0 -45
- package/dist/utils/storage.cjs +0 -1
- package/dist/utils/storage.js +0 -23
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { defineComponent as r, ref as g, openBlock as i, createElementBlock as u, normalizeClass as y, createBlock as n } from "vue";
|
|
2
|
+
import b from "../function/index.vue.js";
|
|
3
|
+
import V from "../object/index.vue.js";
|
|
4
|
+
import T from "../array/index.vue.js";
|
|
5
|
+
import _ from "../select/index.vue.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import k from "../choice/index.vue.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import $ from "../boolean/index.vue.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
import h from "../string/index.vue.js";
|
|
12
|
+
/* empty css */
|
|
13
|
+
import j from "../number/index.vue.js";
|
|
14
|
+
/* empty css */
|
|
15
|
+
import x from "../other/index.vue.js";
|
|
16
|
+
const K = /* @__PURE__ */ r({
|
|
17
|
+
__name: "index",
|
|
18
|
+
props: {
|
|
19
|
+
/**
|
|
20
|
+
* @props { Object } selects 选择数据集合
|
|
21
|
+
*/
|
|
22
|
+
selects: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default() {
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* @props { Object } config 默认展示数据
|
|
30
|
+
*/
|
|
31
|
+
config: {
|
|
32
|
+
type: Object,
|
|
33
|
+
default() {
|
|
34
|
+
return {};
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
modelValue: {
|
|
38
|
+
type: null
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
emits: ["change"],
|
|
42
|
+
setup(t, { emit: s }) {
|
|
43
|
+
const e = t, f = g(!1), m = s;
|
|
44
|
+
function c(o, ...d) {
|
|
45
|
+
return o ? typeof o.select == "string" ? e.selects[o.select] : typeof o.select == "function" ? o.select(o, ...d) : o.select : [];
|
|
46
|
+
}
|
|
47
|
+
function a(o, d) {
|
|
48
|
+
const p = e.config?.prop;
|
|
49
|
+
m("change", p, o, d);
|
|
50
|
+
}
|
|
51
|
+
function l(o) {
|
|
52
|
+
f.value = o;
|
|
53
|
+
}
|
|
54
|
+
return (o, d) => (i(), u("div", {
|
|
55
|
+
class: y(["form-item", { error: f.value }])
|
|
56
|
+
}, [
|
|
57
|
+
e.config?.type == "select" ? (i(), n(_, {
|
|
58
|
+
key: 0,
|
|
59
|
+
modelValue: e.modelValue,
|
|
60
|
+
class: "form-inp",
|
|
61
|
+
disabled: e.config?.disabled,
|
|
62
|
+
dataType: e.config.dataType,
|
|
63
|
+
list: c(e.config),
|
|
64
|
+
config: e.config?.config,
|
|
65
|
+
onError: l,
|
|
66
|
+
onValue: a
|
|
67
|
+
}, null, 8, ["modelValue", "disabled", "dataType", "list", "config"])) : e.config?.type == "choice" ? (i(), n(k, {
|
|
68
|
+
key: 1,
|
|
69
|
+
modelValue: e.modelValue,
|
|
70
|
+
class: "form-inp",
|
|
71
|
+
dataType: e.config.dataType,
|
|
72
|
+
disabled: e.config?.disabled,
|
|
73
|
+
list: c(e.config),
|
|
74
|
+
config: e.config?.config,
|
|
75
|
+
onError: l,
|
|
76
|
+
onValue: a
|
|
77
|
+
}, null, 8, ["modelValue", "dataType", "disabled", "list", "config"])) : e.config?.type == "boolean" ? (i(), n($, {
|
|
78
|
+
key: 2,
|
|
79
|
+
modelValue: e.modelValue,
|
|
80
|
+
class: "form-inp",
|
|
81
|
+
dataType: e.config.dataType,
|
|
82
|
+
disabled: e.config?.disabled,
|
|
83
|
+
config: e.config?.config,
|
|
84
|
+
onError: l,
|
|
85
|
+
onValue: a
|
|
86
|
+
}, null, 8, ["modelValue", "dataType", "disabled", "config"])) : e.config?.type == "string" ? (i(), n(h, {
|
|
87
|
+
key: 3,
|
|
88
|
+
modelValue: e.modelValue,
|
|
89
|
+
class: "form-inp",
|
|
90
|
+
dataType: e.config.dataType,
|
|
91
|
+
disabled: e.config?.disabled,
|
|
92
|
+
config: e.config?.config,
|
|
93
|
+
onError: l,
|
|
94
|
+
onValue: a
|
|
95
|
+
}, null, 8, ["modelValue", "dataType", "disabled", "config"])) : e.config?.type == "number" ? (i(), n(j, {
|
|
96
|
+
key: 4,
|
|
97
|
+
modelValue: e.modelValue,
|
|
98
|
+
class: "form-inp",
|
|
99
|
+
dataType: e.config.dataType,
|
|
100
|
+
disabled: e.config?.disabled,
|
|
101
|
+
config: e.config?.config,
|
|
102
|
+
onError: l,
|
|
103
|
+
onValue: a
|
|
104
|
+
}, null, 8, ["modelValue", "dataType", "disabled", "config"])) : e.config?.type == "object" ? (i(), n(V, {
|
|
105
|
+
key: 5,
|
|
106
|
+
modelValue: e.modelValue,
|
|
107
|
+
class: "form-inp",
|
|
108
|
+
dataType: e.config.dataType,
|
|
109
|
+
disabled: e.config?.disabled,
|
|
110
|
+
config: e.config?.config,
|
|
111
|
+
onError: l,
|
|
112
|
+
onValue: a
|
|
113
|
+
}, null, 8, ["modelValue", "dataType", "disabled", "config"])) : e.config?.type == "array" ? (i(), n(T, {
|
|
114
|
+
key: 6,
|
|
115
|
+
modelValue: e.modelValue,
|
|
116
|
+
class: "form-inp",
|
|
117
|
+
dataType: e.config.dataType,
|
|
118
|
+
disabled: e.config?.disabled,
|
|
119
|
+
config: e.config?.config,
|
|
120
|
+
onError: l,
|
|
121
|
+
onValue: a
|
|
122
|
+
}, null, 8, ["modelValue", "dataType", "disabled", "config"])) : e.config?.type == "function" ? (i(), n(b, {
|
|
123
|
+
key: 7,
|
|
124
|
+
modelValue: e.modelValue,
|
|
125
|
+
class: "form-inp",
|
|
126
|
+
dataType: e.config.dataType,
|
|
127
|
+
list: c(e.config),
|
|
128
|
+
disabled: e.config?.disabled,
|
|
129
|
+
config: e.config?.config,
|
|
130
|
+
onError: l,
|
|
131
|
+
onValue: a
|
|
132
|
+
}, null, 8, ["modelValue", "dataType", "list", "disabled", "config"])) : (i(), n(x, {
|
|
133
|
+
key: 8,
|
|
134
|
+
modelValue: e.modelValue,
|
|
135
|
+
class: "form-inp",
|
|
136
|
+
dataType: e.config.dataType,
|
|
137
|
+
list: c(e.config),
|
|
138
|
+
disabled: e.config?.disabled,
|
|
139
|
+
config: e.config?.config,
|
|
140
|
+
onError: l,
|
|
141
|
+
onValue: a
|
|
142
|
+
}, null, 8, ["modelValue", "dataType", "list", "disabled", "config"]))
|
|
143
|
+
], 2));
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
export {
|
|
147
|
+
K as default
|
|
148
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index.vue.cjs");module.exports=e;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";const o=require("vue"),m=require("../input/index.vue.cjs");;/* empty css */const v=require("../../util.cjs"),d=require("@fangzhongya/utils/basic/string/toFunction"),f={class:"form-function"},_=o.defineComponent({__name:"index",props:{modelValue:{type:null},list:{type:Array},config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value","error"],setup(i,{emit:s}){const u=i,a=o.computed(()=>u.list?.map(e=>e[u.config.prop])||[]),n=s,l=o.ref("");o.watch(()=>u.modelValue,async()=>{let e=u.modelValue;l.value=await c(e)||e},{immediate:!0});function p(){return`(${a.value.join(", ")}) `}async function c(e){let r;if(e)try{let t=d.toFunction(e);t&&(t(...a.value),e=await v.prettierFunFormat(e),n("value",t,e),n("error",!1))}catch(t){n("error",!0),console.log("error",t)}else r=`()=> {
|
|
2
|
+
|
|
3
|
+
}`,n("value",void 0,p()+r),n("error",!1);return r}return(e,r)=>(o.openBlock(),o.createElementBlock("div",f,[o.createVNode(m,{format:"js",modelValue:l.value,"onUpdate:modelValue":r[0]||(r[0]=t=>l.value=t),check:c},null,8,["modelValue"])]))}});module.exports=_;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent as p, computed as f, ref as s, watch as d, openBlock as v, createElementBlock as _, createVNode as y } from "vue";
|
|
2
|
+
import V from "../input/index.vue.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { prettierFunFormat as g } from "../../util.js";
|
|
5
|
+
import { toFunction as b } from "@fangzhongya/utils/basic/string/toFunction";
|
|
6
|
+
const h = { class: "form-function" }, B = /* @__PURE__ */ p({
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: null
|
|
11
|
+
},
|
|
12
|
+
list: {
|
|
13
|
+
type: Array
|
|
14
|
+
},
|
|
15
|
+
config: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default() {
|
|
18
|
+
return {
|
|
19
|
+
label: "label",
|
|
20
|
+
prop: "prop"
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
emits: ["value", "error"],
|
|
26
|
+
setup(m, { emit: i }) {
|
|
27
|
+
const a = m, n = f(() => a.list?.map((e) => e[a.config.prop]) || []), t = i, l = s("");
|
|
28
|
+
d(
|
|
29
|
+
() => a.modelValue,
|
|
30
|
+
async () => {
|
|
31
|
+
let e = a.modelValue;
|
|
32
|
+
l.value = await u(e) || e;
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
immediate: !0
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
function c() {
|
|
39
|
+
return `(${n.value.join(", ")}) `;
|
|
40
|
+
}
|
|
41
|
+
async function u(e) {
|
|
42
|
+
let r;
|
|
43
|
+
if (e)
|
|
44
|
+
try {
|
|
45
|
+
let o = b(e);
|
|
46
|
+
o && (o(...n.value), e = await g(e), t("value", o, e), t("error", !1));
|
|
47
|
+
} catch (o) {
|
|
48
|
+
t("error", !0), console.log("error", o);
|
|
49
|
+
}
|
|
50
|
+
else
|
|
51
|
+
r = `()=> {
|
|
52
|
+
|
|
53
|
+
}`, t("value", void 0, c() + r), t("error", !1);
|
|
54
|
+
return r;
|
|
55
|
+
}
|
|
56
|
+
return (e, r) => (v(), _("div", h, [
|
|
57
|
+
y(V, {
|
|
58
|
+
format: "js",
|
|
59
|
+
modelValue: l.value,
|
|
60
|
+
"onUpdate:modelValue": r[0] || (r[0] = (o) => l.value = o),
|
|
61
|
+
check: u
|
|
62
|
+
}, null, 8, ["modelValue"])
|
|
63
|
+
]));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export {
|
|
67
|
+
B as default
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index.vue.cjs");module.exports=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),m=require("./any/index.vue.cjs"),y=require("./form/index.vue.cjs"),_={class:"com-retrie"},k={key:0,class:"com-retrie-label"},f=e.defineComponent({__name:"index",props:{name:String,selects:{type:Object,default(){return{}}},list:{type:Array,default(){return[]}},refresh:{type:Number,default:0},modelValue:{type:null,default(){return{}}},queryName:{type:String,default:"执行"},defaultQuery:{type:Boolean}},emits:["query"],setup(c,{emit:i}){const l=c,d=i,n=e.ref({}),o=e.ref({});function u(r,s,t){n.value[r]=s,o.value[r]=t}function a(){d("query",n.value,o.value)}return e.watch(()=>l.modelValue,()=>{n.value={},o.value={},e.nextTick(()=>{a()})},{immediate:!0}),(r,s)=>(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",{class:"but-div com-retrie-but",onClick:e.withModifiers(a,["stop"])},[e.createElementVNode("span",null,e.toDisplayString(c.queryName),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.list,(t,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"com-retrie-li"},[t.label?(e.openBlock(),e.createElementBlock("div",k,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),!t.type||t.type=="any"?(e.openBlock(),e.createBlock(m,{key:1,config:t,selects:l.selects,modelValue:l.modelValue[t.prop],onChange:u},null,8,["config","selects","modelValue"])):(e.openBlock(),e.createBlock(y,{key:2,config:t,selects:l.selects,modelValue:l.modelValue[t.prop],onChange:u},null,8,["config","selects","modelValue"]))]))),128))]))}});module.exports=f;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { defineComponent as k, ref as m, watch as V, nextTick as g, openBlock as l, createElementBlock as r, createElementVNode as d, withModifiers as b, toDisplayString as f, Fragment as h, renderList as x, createCommentVNode as C, createBlock as p } from "vue";
|
|
2
|
+
import N from "./any/index.vue.js";
|
|
3
|
+
import q from "./form/index.vue.js";
|
|
4
|
+
const B = { class: "com-retrie" }, S = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "com-retrie-label"
|
|
7
|
+
}, $ = /* @__PURE__ */ k({
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
name: String,
|
|
11
|
+
/**
|
|
12
|
+
* @props { Object } selects 选择数据集合
|
|
13
|
+
*/
|
|
14
|
+
selects: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default() {
|
|
17
|
+
return {};
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* @props { Object } config 默认展示数据
|
|
22
|
+
*/
|
|
23
|
+
list: {
|
|
24
|
+
type: Array,
|
|
25
|
+
default() {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* @props { Number } refresh 刷新请求
|
|
31
|
+
*/
|
|
32
|
+
refresh: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 0
|
|
35
|
+
},
|
|
36
|
+
modelValue: {
|
|
37
|
+
type: null,
|
|
38
|
+
default() {
|
|
39
|
+
return {};
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
queryName: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "执行"
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* @props { Boolean } defaultQuery=false ( false, true) 默认查询
|
|
48
|
+
*/
|
|
49
|
+
defaultQuery: {
|
|
50
|
+
type: Boolean
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
emits: ["query"],
|
|
54
|
+
setup(u, { emit: y }) {
|
|
55
|
+
const t = u, v = y, o = m({}), a = m({});
|
|
56
|
+
function c(n, i, e) {
|
|
57
|
+
o.value[n] = i, a.value[n] = e;
|
|
58
|
+
}
|
|
59
|
+
function s() {
|
|
60
|
+
v("query", o.value, a.value);
|
|
61
|
+
}
|
|
62
|
+
return V(
|
|
63
|
+
() => t.modelValue,
|
|
64
|
+
() => {
|
|
65
|
+
o.value = {}, a.value = {}, g(() => {
|
|
66
|
+
s();
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
immediate: !0
|
|
71
|
+
}
|
|
72
|
+
), (n, i) => (l(), r("div", B, [
|
|
73
|
+
d("div", {
|
|
74
|
+
class: "but-div com-retrie-but",
|
|
75
|
+
onClick: b(s, ["stop"])
|
|
76
|
+
}, [
|
|
77
|
+
d("span", null, f(u.queryName), 1)
|
|
78
|
+
]),
|
|
79
|
+
(l(!0), r(h, null, x(t.list, (e, _) => (l(), r("div", {
|
|
80
|
+
key: _,
|
|
81
|
+
class: "com-retrie-li"
|
|
82
|
+
}, [
|
|
83
|
+
e.label ? (l(), r("div", S, f(e.label), 1)) : C("", !0),
|
|
84
|
+
!e.type || e.type == "any" ? (l(), p(N, {
|
|
85
|
+
key: 1,
|
|
86
|
+
config: e,
|
|
87
|
+
selects: t.selects,
|
|
88
|
+
modelValue: t.modelValue[e.prop],
|
|
89
|
+
onChange: c
|
|
90
|
+
}, null, 8, ["config", "selects", "modelValue"])) : (l(), p(q, {
|
|
91
|
+
key: 2,
|
|
92
|
+
config: e,
|
|
93
|
+
selects: t.selects,
|
|
94
|
+
modelValue: t.modelValue[e.prop],
|
|
95
|
+
onChange: c
|
|
96
|
+
}, null, 8, ["config", "selects", "modelValue"]))
|
|
97
|
+
]))), 128))
|
|
98
|
+
]));
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
export {
|
|
102
|
+
$ as default
|
|
103
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index.vue.cjs");;/* empty css */module.exports=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("monaco-editor"),u=require("vue"),a=require("./getExtraLib.cjs");function l(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=l(c),m=l(u),i={theme:"vs",value:""},g=(e=[])=>({provideCompletionItems:(n,t)=>({suggestions:e.map(s=>({label:s,kind:r.languages.CompletionItemKind.Text,insertText:"<"+s+">${1:}</"+s+">",insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:s+"组件",range:new r.Range(t.lineNumber,t.column-1,t.lineNumber,t.column)}))}),triggerCharacters:["<","$"]});function p(e){return["props","ctx"].includes(e)?e+".${1:}":e+"(${1:})"}const d=(e=[])=>(e&&e.length>0&&(e=["props","ctx",...Object.keys(m)]),{provideCompletionItems:(n,t)=>({suggestions:e.map(s=>({label:s,kind:r.languages.CompletionItemKind.Text,insertText:p(s),insertTextRules:r.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:s+"方法",range:new r.Range(t.lineNumber,t.column-1,t.lineNumber,t.column)}))}),triggerCharacters:["$"]});function f(e,n,t="typescript"){const o=r.Uri.parse(`file:///editor-${Date.now()}.ts`),s=r.editor.createModel(n,t,o);return r.editor.create(e,{...i,value:n,model:s,language:t,minimap:{enabled:!1},theme:"vs",fontSize:14,lineNumbers:"on",roundedSelection:!1,scrollBeyondLastLine:!1,automaticLayout:!0})}function b(e,n,t){if(r.typescript.typescriptDefaults.setEagerModelSync(!0),t&&t?.length>0){const o=d(t);r.languages.registerCompletionItemProvider("typescript",o),r.typescript.typescriptDefaults.setExtraLibs([]),r.typescript.typescriptDefaults.addExtraLib(a.getGlobals(),"globals.d.ts"),r.typescript.typescriptDefaults.addExtraLib(a.getVue(),"vue.d.ts")}return f(e,n,"typescript")}function y(e,n,t){const o=g(t);return r.languages.registerCompletionItemProvider("html",o),r.editor.create(e,{...i,value:n,language:"html"})}function v(e,n,t){return r.editor.create(e,{...i,value:n,language:"json"})}function x(e,n,t){return r.editor.create(e,{...i,value:n,language:"css"})}exports.getCss=x;exports.getHtml=y;exports.getJs=b;exports.getJson=v;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as r from "monaco-editor";
|
|
2
|
+
import * as l from "vue";
|
|
3
|
+
import { getGlobals as a, getVue as c } from "./getExtraLib.js";
|
|
4
|
+
const o = {
|
|
5
|
+
theme: "vs",
|
|
6
|
+
value: ""
|
|
7
|
+
}, u = (e = []) => ({
|
|
8
|
+
provideCompletionItems: (n, t) => ({ suggestions: e.map((s) => ({
|
|
9
|
+
label: s,
|
|
10
|
+
// 显示名称
|
|
11
|
+
kind: r.languages.CompletionItemKind.Text,
|
|
12
|
+
// 图标类型
|
|
13
|
+
insertText: "<" + s + ">${1:}</" + s + ">",
|
|
14
|
+
//`<${s}>$</${s}>`, // 插入的文本(支持代码片段)
|
|
15
|
+
insertTextRules: r.languages.CompletionItemInsertTextRule.InsertAsSnippet,
|
|
16
|
+
detail: s + "组件",
|
|
17
|
+
// 描述
|
|
18
|
+
range: new r.Range(
|
|
19
|
+
// 定义替换范围(可选)
|
|
20
|
+
t.lineNumber,
|
|
21
|
+
t.column - 1,
|
|
22
|
+
t.lineNumber,
|
|
23
|
+
t.column
|
|
24
|
+
)
|
|
25
|
+
})) }),
|
|
26
|
+
triggerCharacters: ["<", "$"]
|
|
27
|
+
});
|
|
28
|
+
function m(e) {
|
|
29
|
+
return ["props", "ctx"].includes(e) ? e + ".${1:}" : e + "(${1:})";
|
|
30
|
+
}
|
|
31
|
+
const p = (e = []) => (e && e.length > 0 && (e = ["props", "ctx", ...Object.keys(l)]), {
|
|
32
|
+
provideCompletionItems: (n, t) => ({ suggestions: e.map((s) => ({
|
|
33
|
+
label: s,
|
|
34
|
+
// 显示名称
|
|
35
|
+
kind: r.languages.CompletionItemKind.Text,
|
|
36
|
+
// 图标类型
|
|
37
|
+
insertText: m(s),
|
|
38
|
+
insertTextRules: r.languages.CompletionItemInsertTextRule.InsertAsSnippet,
|
|
39
|
+
detail: s + "方法",
|
|
40
|
+
// 描述
|
|
41
|
+
range: new r.Range(
|
|
42
|
+
// 定义替换范围(可选)
|
|
43
|
+
t.lineNumber,
|
|
44
|
+
t.column - 1,
|
|
45
|
+
t.lineNumber,
|
|
46
|
+
t.column
|
|
47
|
+
)
|
|
48
|
+
})) }),
|
|
49
|
+
triggerCharacters: ["$"]
|
|
50
|
+
});
|
|
51
|
+
function d(e, n, t = "typescript") {
|
|
52
|
+
const i = r.Uri.parse(`file:///editor-${Date.now()}.ts`), s = r.editor.createModel(n, t, i);
|
|
53
|
+
return r.editor.create(e, {
|
|
54
|
+
...o,
|
|
55
|
+
value: n,
|
|
56
|
+
model: s,
|
|
57
|
+
language: t,
|
|
58
|
+
minimap: { enabled: !1 },
|
|
59
|
+
theme: "vs",
|
|
60
|
+
fontSize: 14,
|
|
61
|
+
lineNumbers: "on",
|
|
62
|
+
roundedSelection: !1,
|
|
63
|
+
scrollBeyondLastLine: !1,
|
|
64
|
+
automaticLayout: !0
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function f(e, n, t) {
|
|
68
|
+
if (r.typescript.typescriptDefaults.setEagerModelSync(!0), t && t?.length > 0) {
|
|
69
|
+
const i = p(t);
|
|
70
|
+
r.languages.registerCompletionItemProvider("typescript", i), r.typescript.typescriptDefaults.setExtraLibs([]), r.typescript.typescriptDefaults.addExtraLib(
|
|
71
|
+
a(),
|
|
72
|
+
"globals.d.ts"
|
|
73
|
+
), r.typescript.typescriptDefaults.addExtraLib(c(), "vue.d.ts");
|
|
74
|
+
}
|
|
75
|
+
return d(e, n, "typescript");
|
|
76
|
+
}
|
|
77
|
+
function x(e, n, t) {
|
|
78
|
+
const i = u(t);
|
|
79
|
+
return r.languages.registerCompletionItemProvider("html", i), r.editor.create(e, {
|
|
80
|
+
...o,
|
|
81
|
+
value: n,
|
|
82
|
+
language: "html"
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function y(e, n, t) {
|
|
86
|
+
return r.editor.create(e, {
|
|
87
|
+
...o,
|
|
88
|
+
value: n,
|
|
89
|
+
language: "json"
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function b(e, n, t) {
|
|
93
|
+
return r.editor.create(e, {
|
|
94
|
+
...o,
|
|
95
|
+
value: n,
|
|
96
|
+
language: "css"
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
export {
|
|
100
|
+
b as getCss,
|
|
101
|
+
x as getHtml,
|
|
102
|
+
f as getJs,
|
|
103
|
+
y as getJson
|
|
104
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),m=require("../../../../../directives/adjust/index.cjs"),a=require("./editor.cjs"),d={class:"editor-div"},v=t.defineComponent({__name:"editor",props:{modelValue:{type:String,default:`
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
`},format:{type:String},options:{type:Array}},emits:["update:modelValue"],setup(n,{emit:u}){const e=n,i=u,l=t.ref(),s=t.shallowRef();function c(){const o=e.modelValue,r=e.options;e.format==="js"||e.format==="ts"?s.value=a.getJs(l.value,o,r):e.format==="css"||e.format==="scss"?s.value=a.getCss(l.value,o):e.format==="html"||e.format==="vue"?s.value=a.getHtml(l.value,o,r):e.format==="json"&&(s.value=a.getJson(l.value,o))}function f(o){o&&i("update:modelValue",o)}return t.watch(()=>e.modelValue,()=>{s.value?.setValue(e.modelValue)}),t.onMounted(()=>{c(),s.value?.onDidBlurEditorText(o=>{if(s.value){const r=s.value.getValue();f(r)}})}),(o,r)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",d,[t.createElementVNode("div",{class:"editor-code",ref_key:"refText",ref:l},null,512)])),[[t.unref(m),{bottom:{}}]])}});module.exports=v;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineComponent as m, ref as f, shallowRef as c, watch as d, onMounted as v, withDirectives as p, openBlock as V, createElementBlock as _, createElementVNode as g, unref as h } from "vue";
|
|
2
|
+
import x from "../../../../../directives/adjust/index.js";
|
|
3
|
+
import { getJs as y, getCss as B, getHtml as j, getJson as k } from "./editor.js";
|
|
4
|
+
const w = { class: "editor-div" }, C = /* @__PURE__ */ m({
|
|
5
|
+
__name: "editor",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: `
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
`
|
|
14
|
+
},
|
|
15
|
+
format: {
|
|
16
|
+
type: String
|
|
17
|
+
},
|
|
18
|
+
options: {
|
|
19
|
+
type: Array
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:modelValue"],
|
|
23
|
+
setup(s, { emit: r }) {
|
|
24
|
+
const e = s, n = r, l = f(), o = c();
|
|
25
|
+
function u() {
|
|
26
|
+
const t = e.modelValue, a = e.options;
|
|
27
|
+
e.format === "js" || e.format === "ts" ? o.value = y(l.value, t, a) : e.format === "css" || e.format === "scss" ? o.value = B(l.value, t) : e.format === "html" || e.format === "vue" ? o.value = j(l.value, t, a) : e.format === "json" && (o.value = k(l.value, t));
|
|
28
|
+
}
|
|
29
|
+
function i(t) {
|
|
30
|
+
t && n("update:modelValue", t);
|
|
31
|
+
}
|
|
32
|
+
return d(
|
|
33
|
+
() => e.modelValue,
|
|
34
|
+
() => {
|
|
35
|
+
o.value?.setValue(e.modelValue);
|
|
36
|
+
}
|
|
37
|
+
), v(() => {
|
|
38
|
+
u(), o.value?.onDidBlurEditorText((t) => {
|
|
39
|
+
if (o.value) {
|
|
40
|
+
const a = o.value.getValue();
|
|
41
|
+
i(a);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}), (t, a) => p((V(), _("div", w, [
|
|
45
|
+
g("div", {
|
|
46
|
+
class: "editor-code",
|
|
47
|
+
ref_key: "refText",
|
|
48
|
+
ref: l
|
|
49
|
+
}, null, 512)
|
|
50
|
+
])), [
|
|
51
|
+
[h(x), {
|
|
52
|
+
bottom: {}
|
|
53
|
+
}]
|
|
54
|
+
]);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
export {
|
|
58
|
+
C as default
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./editor.vue.cjs");;/* empty css */module.exports=e;
|