Skip to content

Commit

Permalink
feat: - 组件导出修改
Browse files Browse the repository at this point in the history
  • Loading branch information
唐道勇 authored and 唐道勇 committed Jan 4, 2022
1 parent 924f07f commit 50e3e00
Show file tree
Hide file tree
Showing 18 changed files with 3,414 additions and 340 deletions.
5 changes: 3 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ vue.config.js
*.sh
Dockerfile
env.d.ts
global.d.ts
index.html
loadenv.ts
vite.config.ts
vite.build.config.ts
vite.build.config.ts

# 忽略dist中的部分文件
7 changes: 0 additions & 7 deletions Dockerfile

This file was deleted.

6 changes: 3 additions & 3 deletions packages/index.ts → components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* @Author: matiastang
* @Date: 2021-12-30 15:31:25
* @LastEditors: matiastang
* @LastEditTime: 2021-12-30 18:55:37
* @FilePath: /dw-vue-components/packages/index.ts
* @LastEditTime: 2022-01-04 14:59:26
* @FilePath: /dw-vue-components/components/index.ts
* @Description: 导出组件
*/
import { App } from 'vue'
import WechatLogin from './wechatLogin/WechatLogin.vue'
import WechatLogin from 'root/components/wechatLogin/WechatLogin.vue'

// 所有组件列表
const components = [WechatLogin]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @Author: matiastang
* @Date: 2021-12-21 17:46:03
* @LastEditors: matiastang
* @LastEditTime: 2021-12-31 11:38:05
* @FilePath: /dw-vue-components/packages/wechatLogin/WechatLogin.vue
* @LastEditTime: 2022-01-04 13:59:55
* @FilePath: /dw-vue-components/components/wechatLogin/WechatLogin.vue
* @Description: 微信登录
* https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html
* http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js
Expand All @@ -17,13 +17,13 @@
:src="loginSrc"
:width="iframeWidth"
:height="iframeHeight"
style="border: none"
></iframe>
</div>
</template>

<script lang="ts">
import { defineComponent, computed } from 'vue'
import { PhoneType } from 'root/typings/vue'

export default defineComponent({
name: 'WechatLogin',
Expand Down Expand Up @@ -186,14 +186,9 @@ export default defineComponent({
console.log(loginSrc)
return loginSrc
})
const phone = {
value: '18380449615',
} as PhoneType
console.log(phone)
return {
hidden,
loginSrc,
phone,
}
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* @Author: matiastang
* @Date: 2021-12-30 18:49:53
* @LastEditors: matiastang
* @LastEditTime: 2021-12-30 18:55:42
* @FilePath: /dw-vue-components/packages/wechatLogin/index.ts
* @LastEditTime: 2022-01-04 14:59:35
* @FilePath: /dw-vue-components/components/wechatLogin/index.ts
* @Description:
*/
import { App } from 'vue'
import WechatLogin from '../src/components/wechatLogin/WechatLogin.vue'
import WechatLogin from 'root/components/wechatLogin/WechatLogin.vue'

// 定义 install 方法, App 作为参数
WechatLogin.install = (app: App): void => {
Expand Down
12 changes: 2 additions & 10 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
/*
* @Author: your name
* @Date: 2021-10-15 17:23:18
* @LastEditTime: 2021-11-12 10:55:43
* @LastEditTime: 2022-01-04 15:10:36
* @LastEditors: matiastang
* @Description: In User Settings Edit
* @FilePath: /datumwealth-openalpha-front/global.d.ts
* @FilePath: /dw-vue-components/global.d.ts
*/
/* eslint-disable */
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}

declare global {
interface Window {
webkitRequestAnimationFrame: any
mozRequestAnimationFrame: any
Math: any
}
}
72 changes: 0 additions & 72 deletions index.ts

This file was deleted.

32 changes: 0 additions & 32 deletions nginx/default.conf

This file was deleted.

22 changes: 10 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
{
"name": "datumwealth-vue-components",
"version": "0.1.0",
"description": "西筹金融科技开放平台项目",
"main": "./dist/datumwealth-vue-components.umd.js",
"version": "0.1.2",
"description": "西筹金融科技Vue组件库",
"main": "./dist/dw-vue-components.es.js",
"source": "./dist/components/index.d.ts",
"private": false,
"directories": {
"test": "tests"
},
"files": [
"dist"
],
"module": "./dist/datumwealth-vue-components.es.js",
"typings": "./dist/packages/index.d.ts",
"module": "./dist/dw-vue-components.es.js",
"types": "./dist/components/index.d.ts",
"exports": {
".": {
"import": "./dist/datumwealth-vue-components.es.js",
"require": "./dist/datumwealth-vue-components.umd.js"
"import": "./dist/dw-vue-components.es.js",
"require": "./dist/dw-vue-components.umd.js"
}
},
"scripts": {
"dev": "vite",
"build": "vite --config vite.build.config.ts build --mode production",
"serve": "vite --config vite.config.ts preview",
"build:docker:run": "./dockerRun.sh openalpha-front-dev-container openalpha-front",
"build:prod": "vue-cli-service build --mode prod --report",
"build:dev:update": "./buildUpdate.sh dev",
"build:pro:update": "./buildUpdate.sh pro",
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint './src/**/*.{ts,tsx,js,jsx}' './tsconfig.json'",
"lint:fix": "eslint --fix './src/**/*.{ts,tsx,js,jsx}' './tsconfig.json'",
"lint:setting:fix": "cd .vscode && eslint --fix './settings.json' && cd -",
"prettier": "prettier --write --config .prettierrc './src/**/*.{ts,tsx,js,jsx,vue}'",
"push:npm:package": "gulp versionPatch | gulp npmPackagePush"
"push:npm:package": "gulp versionPatch && gulp npmPackagePush"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -77,6 +74,7 @@
"gulp-json-editor": "^2.5.6",
"inquirer": "8.2.0",
"less": "^4.1.2",
"microbundle": "^0.14.2",
"minimist": "^1.2.5",
"object-hash": "^2.2.0",
"ora": "5.4.0",
Expand Down
Loading

0 comments on commit 50e3e00

Please sign in to comment.