@gct-paas/core-mobile 0.1.5-dev.2 → 0.1.5-dev.4

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,Platform as R,ProjectName as h,t as E}from"@gct-paas/core";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")},T=c({locale:""});function j(){if(T.value.locale!==_gct.i18n.global.locale){const e=k[_gct.i18n.global.locale];e&&e().then(e=>{T.value=e.default})}return{getVantLocale:T}}var A={class:"inline-block align-middle whitespace-nowrap"},B=/* @__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,R=e(()=>y.title),h=e(()=>y.danger?C.DANGER:y.type===b.DASHED||y.type===b.DEFAULT?C.DEFAULT:C.PRIMARY),k=e(()=>!(y.type!==b.DEFAULT||!y.danger)),T=e(()=>y.type===b.DASHED),j=e(()=>y.type===b.LINK),B=e(()=>function(e){switch(e){case g.SMALL:case g.DEFAULT:}return"small"}(y.size)),D=e(()=>y.hasIcon&&!y.hasText),I=e(()=>(null==y?void 0:y.enableCustomColor)&&(null==y?void 0:y.fontColor)),_=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)&&h.value!==C.PRIMARY);async function N(){!/\/page-designer\//.test(location.pathname)&&y.confirm&&await v({message:y.confirmText||E("sys.pageDesigner.confirmTodo")}),m("click")}return(e,c)=>{const m=d("IconNext"),v=d("van-button");return u(),l("div",A,[n(v,{loading:i.loading,block:i.block,type:h.value,size:B.value,plain:k.value,disabled:i.disabled,style:s({"--fontColor":i.fontColor,"--backgroundColor":i.backgroundColor}),class:r({dashed:T.value,link:j.value,"gct-van-button-icon-only":D.value,"btn-font-color":I.value,"btn-bg-style":_.value,"btn-border-style":L.value}),onClick:N},{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?R.value:""),1)]),_:1},8,["loading","block","type","size","plain","disabled","style","class"])])}}})),D="undefined"==typeof window,I=!D;async function _(e){e.use(m)}function L(){_gct.store.setProjectName(h.MOBILE_RENDER),_gct.store.setContext({platform:R.MOBILE})}export{B as VantButton,_ as coreMobileCreateAppVue,L as coreMobileSetupApp,I as isClient,D as isServer,j as useLocale};
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 @@
1
+ export declare function coreMobileSetupApp(): void;
@@ -0,0 +1,8 @@
1
+ import { Platform, ProjectName } from "@gct-paas/core";
2
+ //#region src/setup-app.ts
3
+ function coreMobileSetupApp() {
4
+ _gct.store.setProjectName(ProjectName.MOBILE_RENDER);
5
+ _gct.store.setContext({ platform: Platform.MOBILE });
6
+ }
7
+ //#endregion
8
+ 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.2",
3
+ "version": "0.1.5-dev.4",
4
4
  "type": "module",
5
5
  "description": "paas 平台移动端核心包",
6
6
  "loader": "dist/loader.esm.min.js",
@@ -30,10 +30,22 @@
30
30
  },
31
31
  "license": "MIT",
32
32
  "author": "gct",
33
+ "dependencies": {
34
+ "vant": "4.9.22",
35
+ "vue": "^3.5.30",
36
+ "@gct-paas/core": "0.1.5-dev.4",
37
+ "@gct-paas/scss": "0.1.5-dev.4"
38
+ },
39
+ "peerDependencies": {
40
+ "vant": ">=4",
41
+ "vue": ">=3",
42
+ "@gct-paas/core": "0.1.5-dev.4",
43
+ "@gct-paas/scss": "0.1.5-dev.4"
44
+ },
33
45
  "scripts": {
34
46
  "dev": "cross-env NODE_ENV=development vite build --watch --config vite.dev.config.ts",
35
47
  "es:build": "vite build --config vite.dev.config.ts",
36
- "build": "npm run lint && vite build --config vite.dev.config.ts && vite build --config vite.config.ts",
48
+ "build": "npm run lint && vue-tsc --noEmit && vite build --config vite.dev.config.ts && vite build --config vite.config.ts",
37
49
  "lint": "eslint src/",
38
50
  "publish:next": "npm run build && npm publish --access public --tag=next --registry=https://registry.npmjs.org/",
39
51
  "publish:dev": "npm run build && npm publish --access public --tag=dev --registry=https://registry.npmjs.org/",
@@ -43,18 +55,5 @@
43
55
  "gen-api": "npm run gen-api:apaas && npm run gen-api:platform",
44
56
  "gen-api:apaas": "gct-paas gen-api --url=http://paas.paasdev.gct-paas.com --tag=apaas -t ../cli/hbs-temp -o ./src/service/gct-apaas && prettier './src/service/gct-apaas' --write",
45
57
  "gen-api:platform": "gct-paas gen-api --url=http://paas.paasdev.gct-paas.com --tag=platform -t ../cli/hbs-temp -o ./src/service/gct-platform && prettier './src/service/gct-platform' --write"
46
- },
47
- "dependencies": {
48
- "@gct-paas/core": "0.1.5-dev.2",
49
- "@gct-paas/scss": "0.1.5-dev.2",
50
- "vant": "4.9.22",
51
- "vue": "^3.5.30"
52
- },
53
- "peerDependencies": {
54
- "@gct-paas/core": "^0.1.5-dev.2",
55
- "@gct-paas/scss": "^0.1.5-dev.2",
56
- "vant": ">=4",
57
- "vue": ">=3"
58
- },
59
- "gitHead": "d31b0686f336fec88dca4ed977ae15fd87f185cc"
60
- }
58
+ }
59
+ }