@gct-paas/core-mobile 0.1.5-dev.3 → 0.1.5-dev.5

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 +1 @@
1
- import{computed as e,createBlock as o,createCommentVNode as t,createElementBlock as l,createTextVNode as a,createVNode as n,defineComponent as i,normalizeClass as r,normalizeStyle as s,openBlock as u,ref as d,resolveComponent as c,toDisplayString as p,withCtx as f}from"vue";import m,{showConfirmDialog as v}from"vant";import{ButtonSize as g,ButtonStyle as y,ButtonType as b,ButtonType_vant as C,t as R}from"@gct-paas/core";var h={"zh-CN":()=>import("./zh-CN-C4LceMCt.js"),"en-US":()=>import("./en-US-Dr0jFB4Q.js"),"pt-BR":()=>import("./pt-BR-Dq3VR77V.js"),"tr-TR":()=>import("./tr-TR-BfmYfhvY.js"),"zh-TW":()=>import("./zh-TW-p_4YJMOD.js"),"ja-JP":()=>import("./ja-JP-lnEqez25.js"),"vi-VN":()=>import("./vi-VN-DtONCFwt.js"),"de-GE":()=>import("./de-DE-Chzz6lz7.js"),"fr-FR":()=>import("./fr-FR-DXwElwtS.js"),"es-ES":()=>import("./es-ES-CFDCOgQW.js"),"ru-RU":()=>import("./ru-RU-Rd1ffaWM.js")},k=d({locale:""});function T(){if(k.value.locale!==_gct.i18n.global.locale){const e=h[_gct.i18n.global.locale];e&&e().then(e=>{k.value=e.default})}return{getVantLocale:k}}var A={class:"inline-block align-middle whitespace-nowrap"},j=/* @__PURE__ */(e=>{const o=e.__vccOpts||e;for(const[t,l]of[["__scopeId","data-v-6e846204"]])o[t]=l;return o})(/* @__PURE__ */i({__name:"vant-button",props:{hasIcon:{type:Boolean,default:!1},hasText:{type:Boolean,default:!0},type:{default:b.PRIMARY},size:{default:g.DEFAULT},danger:{type:Boolean,default:!1},icon:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},i18nConfig:{default:""},buttonStyle:{default:y.ORDINARY},confirmText:{default:""},confirm:{type:Boolean,default:!1},enableCustomColor:{type:Boolean,default:!1},backgroundColor:{default:""},fontColor:{default:""},block:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["click"],setup(i,{emit:d}){const m=d,y=i,h=e(()=>y.title),k=e(()=>y.danger?C.DANGER:y.type===b.DASHED||y.type===b.DEFAULT?C.DEFAULT:C.PRIMARY),T=e(()=>!(y.type!==b.DEFAULT||!y.danger)),j=e(()=>y.type===b.DASHED),D=e(()=>y.type===b.LINK),B=e(()=>function(e){switch(e){case g.SMALL:case g.DEFAULT:}return"small"}(y.size)),E=e(()=>y.hasIcon&&!y.hasText),I=e(()=>(null==y?void 0:y.enableCustomColor)&&(null==y?void 0:y.fontColor)),z=e(()=>(null==y?void 0:y.enableCustomColor)&&(null==y?void 0:y.backgroundColor)&&y.type===C.PRIMARY),L=e(()=>(null==y?void 0:y.enableCustomColor)&&(null==y?void 0:y.backgroundColor)&&k.value!==C.PRIMARY);async function U(){!/\/page-designer\//.test(location.pathname)&&y.confirm&&await v({message:y.confirmText||R("sys.pageDesigner.confirmTodo")}),m("click")}return(e,d)=>{const m=c("IconNext"),v=c("van-button");return u(),l("div",A,[n(v,{loading:i.loading,block:i.block,type:k.value,size:B.value,plain:T.value,disabled:i.disabled,style:s({"--fontColor":i.fontColor,"--backgroundColor":i.backgroundColor}),class:r({dashed:j.value,link:D.value,"gct-van-button-icon-only":E.value,"btn-font-color":I.value,"btn-bg-style":z.value,"btn-border-style":L.value}),onClick:U},{icon:f(()=>[i.hasIcon?(u(),o(m,{key:0,size:14,value:i.icon,style:{marginRight:"0px","--color":"inherit",lineHeight:"1"}},null,8,["value"])):t("",!0)]),default:f(()=>[a(" "+p(i.hasText?h.value:""),1)]),_:1},8,["loading","block","type","size","plain","disabled","style","class"])])}}})),D="undefined"==typeof window,B=!D;async function E(e){e.use(m)}export{j as VantButton,E as coreMobileCreateAppVue,B as isClient,D as isServer,T as useLocale};
1
+ import{computed as e,createBlock as o,createCommentVNode as t,createElementBlock as l,createTextVNode as a,createVNode as n,defineComponent as i,normalizeClass as r,normalizeStyle as s,openBlock as u,ref as c,resolveComponent as d,toDisplayString as p,withCtx as f}from"vue";import m,{showConfirmDialog as v}from"vant";import{ButtonSize as g,ButtonStyle as y,ButtonType as b,ButtonType_vant as C,t as R}from"@gct-paas/core";import{coreComponentsCreateAppVue as h}from"@gct-paas/core-components";var k={"zh-CN":()=>import("./zh-CN-C4LceMCt.js"),"en-US":()=>import("./en-US-Dr0jFB4Q.js"),"pt-BR":()=>import("./pt-BR-Dq3VR77V.js"),"tr-TR":()=>import("./tr-TR-BfmYfhvY.js"),"zh-TW":()=>import("./zh-TW-p_4YJMOD.js"),"ja-JP":()=>import("./ja-JP-lnEqez25.js"),"vi-VN":()=>import("./vi-VN-DtONCFwt.js"),"de-GE":()=>import("./de-DE-Chzz6lz7.js"),"fr-FR":()=>import("./fr-FR-DXwElwtS.js"),"es-ES":()=>import("./es-ES-CFDCOgQW.js"),"ru-RU":()=>import("./ru-RU-Rd1ffaWM.js")},A=c({locale:""});function T(){if(A.value.locale!==_gct.i18n.global.locale){const e=k[_gct.i18n.global.locale];e&&e().then(e=>{A.value=e.default})}return{getVantLocale:A}}var j={class:"inline-block align-middle whitespace-nowrap"},D=/* @__PURE__ */(e=>{const o=e.__vccOpts||e;for(const[t,l]of[["__scopeId","data-v-6e846204"]])o[t]=l;return o})(/* @__PURE__ */i({__name:"vant-button",props:{hasIcon:{type:Boolean,default:!1},hasText:{type:Boolean,default:!0},type:{default:b.PRIMARY},size:{default:g.DEFAULT},danger:{type:Boolean,default:!1},icon:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},i18nConfig:{default:""},buttonStyle:{default:y.ORDINARY},confirmText:{default:""},confirm:{type:Boolean,default:!1},enableCustomColor:{type:Boolean,default:!1},backgroundColor:{default:""},fontColor:{default:""},block:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["click"],setup(i,{emit:c}){const m=c,y=i,h=e(()=>y.title),k=e(()=>y.danger?C.DANGER:y.type===b.DASHED||y.type===b.DEFAULT?C.DEFAULT:C.PRIMARY),A=e(()=>!(y.type!==b.DEFAULT||!y.danger)),T=e(()=>y.type===b.DASHED),D=e(()=>y.type===b.LINK),B=e(()=>function(e){switch(e){case g.SMALL:case g.DEFAULT:}return"small"}(y.size)),E=e(()=>y.hasIcon&&!y.hasText),I=e(()=>(null==y?void 0:y.enableCustomColor)&&(null==y?void 0:y.fontColor)),z=e(()=>(null==y?void 0:y.enableCustomColor)&&(null==y?void 0:y.backgroundColor)&&y.type===C.PRIMARY),L=e(()=>(null==y?void 0:y.enableCustomColor)&&(null==y?void 0:y.backgroundColor)&&k.value!==C.PRIMARY);async function S(){!/\/page-designer\//.test(location.pathname)&&y.confirm&&await v({message:y.confirmText||R("sys.pageDesigner.confirmTodo")}),m("click")}return(e,c)=>{const m=d("IconNext"),v=d("van-button");return u(),l("div",j,[n(v,{loading:i.loading,block:i.block,type:k.value,size:B.value,plain:A.value,disabled:i.disabled,style:s({"--fontColor":i.fontColor,"--backgroundColor":i.backgroundColor}),class:r({dashed:T.value,link:D.value,"gct-van-button-icon-only":E.value,"btn-font-color":I.value,"btn-bg-style":z.value,"btn-border-style":L.value}),onClick:S},{icon:f(()=>[i.hasIcon?(u(),o(m,{key:0,size:14,value:i.icon,style:{marginRight:"0px","--color":"inherit",lineHeight:"1"}},null,8,["value"])):t("",!0)]),default:f(()=>[a(" "+p(i.hasText?h.value:""),1)]),_:1},8,["loading","block","type","size","plain","disabled","style","class"])])}}})),B="undefined"==typeof window,E=!B;async function I(e){await h(e),e.use(m)}async function z(e){console.log("coreMobileSetupApp")}export{D as VantButton,I as coreMobileCreateAppVue,z as coreMobileSetupApp,E as isClient,B as isServer,T as useLocale};
@@ -1,4 +1,5 @@
1
1
  import Vant from "vant";
2
+ import { coreComponentsCreateAppVue } from "@gct-paas/core-components";
2
3
  //#region src/create-app-vue.ts
3
4
  /**
4
5
  * 核心 Mobile 库的外部使用注册,在创建 app 时调用
@@ -8,6 +9,7 @@ import Vant from "vant";
8
9
  * @return {*} {Promise<void>}
9
10
  */
10
11
  async function coreMobileCreateAppVue(app) {
12
+ await coreComponentsCreateAppVue(app);
11
13
  app.use(Vant);
12
14
  }
13
15
  //#endregion
package/es/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './hooks';
2
2
  export * from './components';
3
3
  export * from './utils';
4
4
  export { coreMobileCreateAppVue } from './create-app-vue';
5
+ export { coreMobileSetupApp } from './setup-app';
package/es/index.mjs CHANGED
@@ -4,4 +4,5 @@ import vant_button_default from "./components/vant-button/vant-button.vue.mjs";
4
4
  import "./components/index.mjs";
5
5
  import { isClient, isServer } from "./utils/is.mjs";
6
6
  import { coreMobileCreateAppVue } from "./create-app-vue.mjs";
7
- export { vant_button_default as VantButton, coreMobileCreateAppVue, isClient, isServer, useLocale };
7
+ import { coreMobileSetupApp } from "./setup-app.mjs";
8
+ export { vant_button_default as VantButton, coreMobileCreateAppVue, coreMobileSetupApp, isClient, isServer, useLocale };
@@ -0,0 +1,2 @@
1
+ import { App } from 'vue';
2
+ export declare function coreMobileSetupApp(_app: App): Promise<void>;
@@ -0,0 +1,6 @@
1
+ //#region src/setup-app.ts
2
+ async function coreMobileSetupApp(_app) {
3
+ console.log("coreMobileSetupApp");
4
+ }
5
+ //#endregion
6
+ export { coreMobileSetupApp };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/core-mobile",
3
- "version": "0.1.5-dev.3",
3
+ "version": "0.1.5-dev.5",
4
4
  "type": "module",
5
5
  "description": "paas 平台移动端核心包",
6
6
  "loader": "dist/loader.esm.min.js",
@@ -33,19 +33,21 @@
33
33
  "dependencies": {
34
34
  "vant": "4.9.22",
35
35
  "vue": "^3.5.30",
36
- "@gct-paas/core": "0.1.5-dev.3",
37
- "@gct-paas/scss": "0.1.5-dev.3"
36
+ "@gct-paas/core": "0.1.5-dev.5",
37
+ "@gct-paas/core-components": "0.1.5-dev.5",
38
+ "@gct-paas/scss": "0.1.5-dev.5"
38
39
  },
39
40
  "peerDependencies": {
40
41
  "vant": ">=4",
41
42
  "vue": ">=3",
42
- "@gct-paas/core": "0.1.5-dev.3",
43
- "@gct-paas/scss": "0.1.5-dev.3"
43
+ "@gct-paas/core-components": "0.1.5-dev.5",
44
+ "@gct-paas/scss": "0.1.5-dev.5",
45
+ "@gct-paas/core": "0.1.5-dev.5"
44
46
  },
45
47
  "scripts": {
46
48
  "dev": "cross-env NODE_ENV=development vite build --watch --config vite.dev.config.ts",
47
49
  "es:build": "vite build --config vite.dev.config.ts",
48
- "build": "npm run lint && vite build --config vite.dev.config.ts && vite build --config vite.config.ts",
50
+ "build": "npm run lint && vue-tsc --noEmit && vite build --config vite.dev.config.ts && vite build --config vite.config.ts",
49
51
  "lint": "eslint src/",
50
52
  "publish:next": "npm run build && npm publish --access public --tag=next --registry=https://registry.npmjs.org/",
51
53
  "publish:dev": "npm run build && npm publish --access public --tag=dev --registry=https://registry.npmjs.org/",