-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
239 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,45 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true | ||
node: true, | ||
}, | ||
extends: [ | ||
"plugin:vue/vue3-essential", | ||
"eslint:recommended", | ||
"@vue/typescript/recommended", | ||
"@vue/prettier", | ||
"@vue/prettier/@typescript-eslint" | ||
'plugin:vue/vue3-essential', | ||
'eslint:recommended', | ||
'@vue/typescript/recommended', | ||
'@vue/prettier', | ||
'@vue/prettier/@typescript-eslint', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2020 | ||
ecmaVersion: 2020, | ||
}, | ||
rules: { | ||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off", | ||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off" | ||
} | ||
}; | ||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'prettier/prettier': 'error', | ||
'import/extensions': 0, | ||
'vue/singleline-html-element-content-newline': 'off', | ||
'vue/multiline-html-element-content-newline': 'off', | ||
'vue/name-property-casing': ['error', 'PascalCase'], | ||
'vue/no-v-html': 'off', | ||
semi: 0, | ||
'import/no-cycle': 0, | ||
'max-len': 0, | ||
'no-underscore-dangle': 0, | ||
'prefer-destructuring': [ | ||
'error', | ||
{ | ||
object: true, | ||
array: false, | ||
}, | ||
], | ||
'no-script-url': 0, | ||
'no-param-reassign': [ | ||
'error', | ||
{ | ||
props: false, | ||
}, | ||
], | ||
camelcase: 'off', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
/lib | ||
|
||
|
||
# local env files | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# 忽略目录 | ||
example/ | ||
packages/ | ||
public/ | ||
|
||
# 忽略指定文件 | ||
vue.config.js | ||
babel.config.js | ||
*.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Ignore artifacts: | ||
public | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": false, | ||
"trailingComma": "all", | ||
"printWidth": 120, | ||
"bracketSpacing": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
module.exports = { | ||
presets: ["@vue/cli-plugin-babel/preset"] | ||
}; | ||
presets: ['@vue/cli-plugin-babel/preset'], | ||
plugins: [ | ||
[ | ||
'import', | ||
{ | ||
libraryName: 'element-plus', | ||
customStyleName: name => { | ||
return `element-plus/lib/theme-chalk/${name}.css` | ||
}, | ||
}, | ||
], | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<template> | ||
<emqx-button>123</emqx-button> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
export default defineComponent({ | ||
name: 'App', | ||
}) | ||
</script> | ||
|
||
<style lang="scss"></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import UI from '../packages/index' | ||
|
||
console.log(UI) | ||
|
||
createApp(App) | ||
.use(UI) | ||
.mount('#app') |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { App } from 'vue' | ||
import Button from './src/button.vue' | ||
|
||
Button.install = (Vue: App): void => { | ||
Vue.component(Button.name, Button) | ||
} | ||
|
||
export default Button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<template> | ||
<el-button class="emqx-button" type="primary"> | ||
<slot></slot> | ||
</el-button> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import { ElButton } from 'element-plus' | ||
export default defineComponent({ | ||
name: 'EmqxButton', | ||
components: { | ||
ElButton, | ||
}, | ||
}) | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.emqx-button { | ||
border-radius: 0px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Button from './Button' | ||
import { App } from 'vue' | ||
|
||
interface VueWindow extends Window { | ||
Vue?: App | ||
} | ||
|
||
const components = [Button] | ||
|
||
const install = (Vue: App) => { | ||
components.map(component => Vue.component(component.name, component)) | ||
} | ||
|
||
const _window: VueWindow = window | ||
|
||
if (typeof _window !== 'undefined' && _window.Vue) { | ||
install(_window.Vue) | ||
} | ||
|
||
export default { | ||
install, | ||
Button, | ||
} |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.