Skip to content

Commit

Permalink
fix(style): fix anticon style
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Feb 19, 2021
1 parent 422ea3a commit e250ad5
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 329 deletions.
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dependencies": {
"@iconify/iconify": "^2.0.0-rc.6",
"@vueuse/core": "^4.1.1",
"@zxcvbn-ts/core": "^0.2.0",
"ant-design-vue": "2.0.0",
"apexcharts": "^3.25.0",
"axios": "^0.21.1",
Expand All @@ -46,26 +47,23 @@
"vue-types": "^3.0.2",
"vuex": "^4.0.0",
"vuex-module-decorators": "^1.0.1",
"xlsx": "^0.16.9",
"zxcvbn": "^4.4.2"
"xlsx": "^0.16.9"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@iconify/json": "^1.1.304",
"@iconify/json": "^1.1.305",
"@ls-lint/ls-lint": "^1.9.2",
"@purge-icons/generated": "^0.7.0",
"@types/fs-extra": "^9.0.7",
"@types/http-proxy": "^1.17.5",
"@types/koa-static": "^4.0.1",
"@types/lodash-es": "^4.17.4",
"@types/mockjs": "^1.0.3",
"@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.4.0",
"@types/rollup-plugin-visualizer": "^2.6.0",
"@types/sortablejs": "^1.10.6",
"@types/yargs": "^16.0.0",
"@types/zxcvbn": "^4.4.0",
"@typescript-eslint/eslint-plugin": "^4.15.1",
"@typescript-eslint/parser": "^4.15.1",
"@vitejs/plugin-legacy": "^1.3.1",
Expand Down Expand Up @@ -106,10 +104,10 @@
"vite-plugin-imagemin": "^0.2.6",
"vite-plugin-mock": "^2.1.4",
"vite-plugin-purge-icons": "^0.7.0",
"vite-plugin-pwa": "^0.4.8",
"vite-plugin-pwa": "^0.5.1",
"vite-plugin-style-import": "^0.7.2",
"vite-plugin-theme": "^0.4.3",
"vite-plugin-windicss": "0.3.4",
"vite-plugin-windicss": "0.3.12",
"vue-eslint-parser": "^7.5.0",
"yargs": "^16.2.0"
},
Expand Down
15 changes: 3 additions & 12 deletions src/components/StrengthMeter/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
</template>

<script lang="ts">
import { PropType } from 'vue';
import { defineComponent, computed, ref, watch, unref, watchEffect } from 'vue';
import { Input } from 'ant-design-vue';
import zxcvbn from 'zxcvbn';
import zxcvbn from '@zxcvbn-ts/core';
import { propTypes } from '/@/utils/propTypes';
import { useDesign } from '/@/hooks/web/useDesign';
Expand All @@ -35,11 +33,6 @@
props: {
value: propTypes.string,
userInputs: {
type: Array as PropType<string[]>,
default: () => [],
},
showInput: propTypes.bool.def(true),
disabled: propTypes.bool,
},
Expand All @@ -49,12 +42,10 @@
const { prefixCls } = useDesign('strength-meter');
const getPasswordStrength = computed(() => {
const { userInputs, disabled } = props;
const { disabled } = props;
if (disabled) return null;
const innerValue = unref(innerValueRef);
const score = innerValue
? zxcvbn(unref(innerValueRef), (userInputs as string[]) || null).score
: null;
const score = innerValue ? zxcvbn(unref(innerValueRef)).score : null;
emit('score-change', score);
return score;
});
Expand Down
6 changes: 6 additions & 0 deletions src/design/ant/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
}
}

body {
.anticon {
display: inline-flex;
}
}

.ant-back-top {
right: 20px;
bottom: 20px;
Expand Down
2 changes: 1 addition & 1 deletion src/design/ant/input.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../color.less';
@import (reference) '../color.less';

// input
.ant-input {
Expand Down
4 changes: 2 additions & 2 deletions src/design/config.less
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import 'color.less';
@import 'var/index.less';
@import (reference) 'color.less';
@import (reference) 'var/index.less';
143 changes: 0 additions & 143 deletions src/design/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@
@import 'public.less';
@import 'ant/index.less';

*,
*::before,
*::after {
padding: 0;
margin: 0;
box-sizing: border-box;
}

:root {
-moz-tab-size: 4;
tab-size: 4;
}

input:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px white inset !important;
}
Expand All @@ -36,7 +23,6 @@ html,

html {
overflow: hidden;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
}

Expand All @@ -57,136 +43,7 @@ body {
}
}

body {
font-family: system-ui, -apple-system, 'Segoe UI', Microsoft YaHei, Arial, sans-serif,
Helvetica Neue, Helvetica, Pingfang SC, Hiragino Sans GB, Roboto, helvetica neue, noto sans,
apple color emoji, segoe ui emoji, segoe ui symbol, noto color emoji;
}

ul,
ol {
list-style: none;
}

li {
list-style-type: none;
}

a:focus,
a:active {
outline: none;
}

hr {
height: 0;
color: inherit;
}

abbr[title] {
text-decoration: underline dotted;
}

b,
strong {
font-weight: bolder;
}

code,
kbd,
samp,
pre {
font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
font-size: 1em;
}

small {
font-size: 80%;
}

sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}

sub {
bottom: -0.25em;
}

sup {
top: -0.5em;
}

table {
text-indent: 0;
border-color: inherit;
}

button,
input,
optgroup,
select,
textarea {
margin: 0;
font-family: inherit;
font-size: 100%;
line-height: 1.15;
}

button,
select {
text-transform: none;
}

button,
[type='button'],
[type='reset'],
[type='submit'] {
-webkit-appearance: button;
}

::-moz-focus-inner {
padding: 0;
border-style: none;
}

:-moz-focusring {
outline: 1px dotted ButtonText;
}

:-moz-ui-invalid {
box-shadow: none;
}

legend {
padding: 0;
}

progress {
vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}

[type='search'] {
outline-offset: -2px;
-webkit-appearance: textfield;
}

::-webkit-search-decoration {
-webkit-appearance: none;
}

::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}

summary {
display: list-item;
}
2 changes: 1 addition & 1 deletion src/design/var/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../color.less';
@import (reference) '../color.less';
@import 'easing';
@import 'breakpoint';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</MenuItem>
</template>
<script lang="ts">
import { Menu, Badge } from 'ant-design-vue';
import { Menu } from 'ant-design-vue';
import { defineComponent } from 'vue';
Expand All @@ -16,7 +16,7 @@
export default defineComponent({
name: 'DropdownMenuItem',
components: { MenuItem: Menu.Item, Badge, Icon },
components: { MenuItem: Menu.Item, Icon },
props: {
key: propTypes.string,
text: propTypes.string,
Expand Down
6 changes: 2 additions & 4 deletions src/layouts/default/tabs/components/TabContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>

<span :class="`${prefixCls}__extra-quick`" v-else @click="handleContext">
<Icon icon="ion:chevron-down"></Icon>
<Icon icon="ion:chevron-down" />
</span>
</Dropdown>
</template>
Expand All @@ -18,16 +18,14 @@
import { TabContentProps, TabContentEnum } from '../types';
import { RightOutlined } from '@ant-design/icons-vue';
import { useDesign } from '/@/hooks/web/useDesign';
import { useTabDropdown } from '../useTabDropdown';
import { useI18n } from '/@/hooks/web/useI18n';
import { RouteLocationNormalized } from 'vue-router';
export default defineComponent({
name: 'TabContent',
components: { Dropdown, RightOutlined, Icon },
components: { Dropdown, Icon },
props: {
tabItem: {
type: Object as PropType<RouteLocationNormalized>,
Expand Down
Loading

0 comments on commit e250ad5

Please sign in to comment.