build: refactor the build progress

This commit is contained in:
07akioni 2020-02-12 13:44:53 +08:00
parent d05fcf1210
commit 60c24008e1
2219 changed files with 771 additions and 644 deletions

View File

@ -1,4 +1,4 @@
node_modules
lib
test/unit/coverage
packages/icons
src/_icons

1
.gitignore vendored
View File

@ -8,5 +8,6 @@ test/unit/coverage
package-lock.json
yarn.lock
lib
es
.vscode
*.swp

View File

@ -1,2 +0,0 @@
// const fs = require('fs')
// const path = require('path')

View File

@ -48,6 +48,6 @@ ncp(
)
ncp(
path.resolve(__dirname, '../packages/icons'),
path.resolve(__dirname, '../src/_icons'),
path.resolve(__dirname, '../lib/icons')
)

View File

@ -1,10 +1,7 @@
const path = require('path')
exports.alias = {
main: path.resolve(__dirname, '../src'),
packages: path.resolve(__dirname, '../packages'),
examples: path.resolve(__dirname, '../examples'),
'naive-ui/lib/icons': path.resolve(__dirname, '../packages/icons')
'naive-ui/lib/icons': path.resolve(__dirname, '../src/_icons')
}
exports.docLoaders = [

View File

@ -8,8 +8,8 @@ const VueLoaderPlugin = require('vue-loader/lib/plugin')
const glob = require('glob')
const entry = {}
glob.sync('./packages/icons/*.vue').concat('./index.js').forEach(filePath => {
const entryName = filePath.replace(/^\.\/packages\//, '').replace(/\.(vue|js)$/, '')
glob.sync('./src/icons/*.vue').concat('./index.js').forEach(filePath => {
const entryName = filePath.replace(/^\.\/src\//, '').replace(/\.(vue|js)$/, '')
entry[entryName] = filePath
})

View File

@ -49,7 +49,7 @@
<script>
import { version } from '../package.json'
import withapp from '../packages/mixins/withapp'
import withapp from '../src/_mixins/withapp'
export default {
mixins: [withapp],

View File

@ -1,9 +1,13 @@
import { Vue, router, i18n } from './init'
import { Vue, router, i18n, hljs } from './init'
import demoRouterView from './demoRouterView'
import NaiveUI from '../src/index'
import '../styles/index.scss'
import './styles/markdown.scss'
Vue.use(NaiveUI)
NaiveUI.setHljs(hljs)
new Vue({
...demoRouterView,
i18n,

View File

@ -1,9 +1,12 @@
import { Vue, router, i18n } from './init'
import { Vue, router, i18n, hljs } from './init'
import demoRouterView from './demoRouterView'
import NaiveUI from '../lib/index'
import '../lib/styles/index.css'
import './styles/markdown.scss'
Vue.use(NaiveUI)
NaiveUI.setHljs(hljs)
new Vue({
...demoRouterView,
i18n,

View File

@ -1,6 +1,5 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import NaiveUI from '../index'
import VueI18n from 'vue-i18n'
import intro from './documentation/intro/intro'
@ -111,8 +110,6 @@ hljs.registerLanguage('naive-log', () => ({
Vue.use(VueI18n)
Vue.use(VueRouter)
Vue.use(NaiveUI)
NaiveUI.setHljs(hljs)
const i18n = new VueI18n({
locale: 'en-US'
@ -259,4 +256,4 @@ router.afterEach(function (to, from) {
}
})
export { Vue, router, i18n }
export { Vue, router, i18n, hljs }

View File

@ -55,7 +55,7 @@
</template>
<script>
import mdCode from '../../packages/icons/md-code'
import mdCode from '../../src/_icons/md-code'
export default {
components: {

187
index.js
View File

@ -1,187 +0,0 @@
import Card from './packages/common/Card'
import Icon from './packages/common/Icon'
import GradientText from './packages/common/GradientText'
import Table from './packages/common/Table'
import DataTable from './packages/common/DataTable'
import CheckBox from './packages/common/Checkbox'
import RoundButton from './packages/common/Button'
import Switch from './packages/common/Switch'
import Select from './packages/common/Select'
import Cascader from './packages/common/Cascader'
import CustomInput from './packages/common/CustomInput'
import Modal from './packages/common/Modal'
import Input from './packages/common/Input'
import Message from './packages/common/Message'
import Notification from './packages/common/Notification'
import Pagination from './packages/common/Pagination'
import Progress from './packages/common/Progress'
import Tooltip from './packages/common/Tooltip'
import Popup from './packages/common/Popover'
import Alert from './packages/common/Alert'
import DatePicker from './packages/common/DatePicker'
import InputNumber from './packages/common/InputNumber'
import Radio from './packages/common/Radio'
import Form from './packages/common/Form'
import Tabs from './packages/common/Tabs'
import TimePicker from './packages/common/TimePicker'
import Layout from './packages/common/Layout'
import Scrollbar from './packages/common/Scrollbar'
import Steps from './packages/common/Steps'
import ConfirmPlugin from './packages/common/Confirm'
import Badge from './packages/common/Badge'
import Tag from './packages/common/Tag'
import BackTop from './packages/common/BackTop'
import Divider from './packages/common/Divider'
import Collapse from './packages/common/Collapse'
import Timeline from './packages/common/Timeline'
import Popconfirm from './packages/common/Popconfirm'
import Anchor from './packages/common/Anchor'
import Dropdown from './packages/common/Dropdown'
import Popselect from './packages/common/Popselect'
import ConfigProvider from './packages/common/ConfigProvider'
import Transfer from './packages/common/Transfer'
import Spin from './packages/common/Spin'
import Drawer from './packages/common/Drawer'
import Time from './packages/common/Time'
import LoadingBar from './packages/common/LoadingBar'
import Slider from './packages/common/Slider'
import Tree from './packages/common/Tree'
import Grid from './packages/common/Grid'
import Affix from './packages/common/Affix'
import Statistic from './packages/common/Statistic'
import Breadcrumb from './packages/common/Breadcrumb'
import ConfigConsumer from './packages/common/ConfigConsumer'
import Descriptions from './packages/common/Descriptions'
import List from './packages/common/List'
import Menu from './packages/common/Menu'
import Avatar from './packages/common/Avatar'
import Result from './packages/common/Result'
import Thing from './packages/common/Thing'
import AutoComplete from './packages/common/AutoComplete'
import Empty from './packages/common/Empty'
import Element from './packages/common/Element'
import Log from './packages/common/Log'
import Code from './packages/common/Code'
import Typography from './packages/common/Typography'
import zhCN from './packages/locale/zhCN'
import enUS from './packages/locale/enUS'
/**
* Deprecated Components
*/
import NimbusFormCard from './packages/deprecated/NimbusFormCard'
import NimbusConfirmCard from './packages/deprecated/NimbusConfirmCard'
import NimbusServiceLayout from './packages/deprecated/NimbusServiceLayout'
import NimbusIcon from './packages/deprecated/NimbusIcon'
/**
* debug usage
* to be removed
*/
import Loader from './packages/base/Loading'
import CancelMark from './packages/base/CancelMark'
import IconTransition from './packages/transition/IconSwitchTransition'
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
const NaiveUI = {
install,
setHljs,
setHighlightjs: setHljs,
locales: {
'zh-CN': zhCN,
'en-US': enUS
},
fallbackLocale: enUS,
addLocale
}
function addLocale () {
}
function setHljs (hljs) {
NaiveUI.hljs = hljs
}
function install (Vue) {
Vue.prototype.$naive = NaiveUI
Card.install(Vue)
Icon.install(Vue)
Loader.install(Vue)
Layout.install(Vue)
GradientText.install(Vue)
Table.install(Vue)
DataTable.install(Vue)
CheckBox.install(Vue)
RoundButton.install(Vue)
Switch.install(Vue)
Select.install(Vue)
Modal.install(Vue)
Input.install(Vue)
Message.install(Vue)
Notification.install(Vue)
Pagination.install(Vue)
Tooltip.install(Vue)
Popup.install(Vue)
Alert.install(Vue)
DatePicker.install(Vue)
InputNumber.install(Vue)
Radio.install(Vue)
Cascader.install(Vue)
CustomInput.install(Vue)
Form.install(Vue)
Tabs.install(Vue)
TimePicker.install(Vue)
Scrollbar.install(Vue)
Steps.install(Vue)
ConfirmPlugin.install(Vue)
Progress.install(Vue)
Badge.install(Vue)
Tag.install(Vue)
BackTop.install(Vue)
Divider.install(Vue)
Collapse.install(Vue)
Timeline.install(Vue)
Popconfirm.install(Vue)
Anchor.install(Vue)
Dropdown.install(Vue)
Popselect.install(Vue)
ConfigProvider.install(Vue)
CancelMark.install(Vue)
Transfer.install(Vue)
Spin.install(Vue)
Drawer.install(Vue)
LoadingBar.install(Vue)
Time.install(Vue)
Slider.install(Vue)
Tree.install(Vue)
Grid.install(Vue)
Affix.install(Vue)
Statistic.install(Vue)
Breadcrumb.install(Vue)
ConfigConsumer.install(Vue)
Descriptions.install(Vue)
List.install(Vue)
Menu.install(Vue)
Avatar.install(Vue)
Result.install(Vue)
Thing.install(Vue)
AutoComplete.install(Vue)
Empty.install(Vue)
Element.install(Vue)
IconTransition.install(Vue)
Log.install(Vue)
Code.install(Vue)
Typography.install(Vue)
/**
* Deprecated
*/
NimbusServiceLayout.install(Vue)
NimbusConfirmCard.install(Vue)
NimbusFormCard.install(Vue)
NimbusIcon.install(Vue)
}
export default NaiveUI

View File

@ -2,11 +2,12 @@
"name": "naive-ui",
"version": "0.7.8",
"description": "",
"main": "index.js",
"main": "lib/index.js",
"module": "es/index.js",
"scripts": {
"release": "npm run build && npm publish",
"build": "rm -rf lib && cross-env NODE_ENV=development && node build/buildstyle.js",
"demo": "cross-env NODE_ENV=development && node build/buildstyle.js && webpack-dev-server --config build/webpack.demo.js",
"build": "rm -rf lib && node build/buildstyle.js && rollup -c",
"demo": "npm run build && cross-env NODE_ENV=development && webpack-dev-server --config build/webpack.demo.js",
"dev": "cross-env NODE_ENV=development && webpack-dev-server --config build/webpack.dev.js",
"serve": "npm run dev",
"lint": "eslint --quiet --no-error-on-unmatched-pattern \"packages/**/*.{js,vue}\" \"test/**/*.{js,vue}\" \"build/**/*.{js,vue}\" \"demo/**/*.{js,vue}\"",
@ -80,6 +81,8 @@
"memory-fs": "^0.4.1",
"mocha": "^6.2.2",
"ncp": "^2.0.0",
"node-sass": "^4.13.1",
"sass-loader": "^7.3.1",
"postcss": "^7.0.26",
"postcss-cli": "^6.1.3",
"postcss-loader": "^3.0.0",
@ -111,11 +114,10 @@
"dependencies": {
"async-validator": "^1.11.5",
"date-fns": "^2.9.0",
"highlight.js": "^9.18.1",
"lodash-es": "^4.17.15",
"node-sass": "^4.13.1",
"resize-observer-polyfill": "^1.5.1",
"sass-loader": "^7.3.1",
"vue-virtual-scroller": "^1.0.0-rc.2",
"highlight.js": "^9.18.1"
"vue-runtime-helpers": "^1.1.2",
"vue-virtual-scroller": "^1.0.0-rc.2"
}
}

View File

@ -1,10 +0,0 @@
export default {
install: function install (Vue) {
if (!Vue.prototype.$naive) {
Vue.prototype.$naive = {}
}
const naive = Vue.prototype.$naive
console.info('naive theme', naive)
// naive.theme
}
}

View File

@ -1,8 +0,0 @@
/* istanbul ignore file */
import Dropdown from './src/Dropdown.vue'
Dropdown.install = function (Vue) {
Vue.component(Dropdown.name, Dropdown)
}
export default Dropdown

View File

@ -1,11 +0,0 @@
function getRootDropdownMenu (instance) {
let rootDropdownMenu = instance.NDropdownMenu
while (rootDropdownMenu && rootDropdownMenu.NDropdownMenu) {
rootDropdownMenu = rootDropdownMenu.NDropdownMenu
}
return rootDropdownMenu || []
}
export {
getRootDropdownMenu
}

View File

@ -1,9 +0,0 @@
import darkstyleScheme from '../../styles/themes/dark/jsIndex.scss'
import lightstyleScheme from '../../styles/themes/light/jsIndex.scss'
const styleScheme = {
dark: darkstyleScheme,
light: lightstyleScheme
}
export default styleScheme

34
playground/jsIndex.css Normal file
View File

@ -0,0 +1,34 @@
/* stylelint-disable */
:export {
primaryColor: #7fe7c4;
primaryHoverColor: #63e2b7;
primaryActiveColor: #5acea7;
infoColor: #8acbec;
infoHoverColor: #70C0E8;
infoActiveColor: #66afd3;
successColor: #7ee7c4;
successHoverColor: #64e3b8;
successActiveColor: #5acea7;
errorColor: #e98b8b;
errorHoverColor: #e88080;
errorActiveColor: #e57272;
warningColor: #f5d599;
warningHoverColor: #f2c97d;
warningActiveColor: #e6c260;
primaryTextColor: rgba(255, 255, 255, 0.9);
secondaryTextColor: rgba(255, 255, 255, 0.75);
tertiaryTextColor: rgba(255, 255, 255, 0.45);
disabledTextColor: rgba(255, 255, 255, 0.3);
popoverBackgroundColor: #595d77;
dialogBackgroundColor: #464b63;
cardBackgroundColor: #1e2437;
bodyBackgroundColor: #12182a;
closeColor: rgba(255, 255, 255, 0.45);
dividerColor: #33384e;
dividerOverlayColor: rgba(255, 255, 255, 0.14);
borderColor: #2e3449;
borderOverlayColor: rgba(255, 255, 255, 0.12);
easeInOutCubicBezier: cubic-bezier(0.4, 0, 0.2, 1);
}
/*# sourceMappingURL=jsIndex.css.map */

View File

@ -0,0 +1 @@
{"version":3,"sourceRoot":"","sources":["../styles/themes/dark/jsIndex.scss","../styles/themes/dark/darkColors.scss"],"names":[],"mappings":"AAIA;AACA;EACE,cC2Bc;ED1Bd,mBC2Bc;ED1Bd,oBC2Bc;ED1Bd,WC4CW;ED3CX,gBC4CW;ED3CX,iBC4CW;ED3CX,cC+Bc;ED9Bd,mBC+Bc;ED9Bd,oBC+Bc;ED9Bd,YC0DY;EDzDZ,iBC0DY;EDzDZ,kBC0DY;EDzDZ,cC6Cc;ED5Cd,mBC6Cc;ED5Cd,oBC6Cc;ED5Cd,kBCpBW;EDqBX,oBCpBW;EDqBX,mBCpBW;EDqBX;EACA,wBCXc;EDYd,uBCVc;EDWd,qBCLc;EDMd,qBCLe;EDMf,YC1BW;ED2BX,cCXc;EDYd,qBCtBc;EDuBd,aCZc;EDad,oBCvBc;EDwBd","file":"jsIndex.css"}

View File

@ -1,17 +1,32 @@
const sass = require('node-sass')
const path = require('path')
const fs = require('fs')
function createStyleScheme (css) {
return css
.replace(':export', 'export default')
.replace(/:\s/g, `: '`)
.replace(/;/g, `',`)
}
module.exports = function naiveSCSSExportVariable () {
return {
name: 'naive-scss-export-variable',
resolveId (source) {
if (source.endsWith('jsIndex.scss')) {
return 'naive-scss-js-index'
resolveId (source, importer) {
if (source.endsWith('.scss')) {
return path.resolve(path.dirname(importer), source)
}
return null
},
load (id) {
if (id === 'naive-scss-js-index') {
return `export default 'naive-scss-js-index'`
if (id.endsWith('.scss')) {
const css = sass.renderSync({
file: id,
outputStyle: 'expanded'
}).css.toString()
const styleScheme = createStyleScheme(css)
return styleScheme
}
return null
}
}
}

4
playground/test.js Normal file
View File

@ -0,0 +1,4 @@
import o from '../styles/themes/light/jsIndex.scss'
const y = o
document.bbb(y)

View File

@ -1,25 +1,33 @@
const vue = require('rollup-plugin-vue')
const resolve = require('@rollup/plugin-node-resolve')
const strip = require('@rollup/plugin-strip')
const path = require('path')
const { terser } = require('rollup-plugin-terser')
const naiveSCSSVariable = require('./playground/naiveScssVarPlugin')
function externalValidator (ids) {
return id => ids.some(identifier => id.startsWith(identifier))
}
module.exports = {
preserveModules: true,
input: 'index.js',
output: {
format: 'esm',
dir: 'test-bundle'
input: 'packages/index.js',
output: [
{
format: 'cjs',
dir: 'lib'
},
{
format: 'esm',
dir: 'es'
}
],
plugins: [
resolve({
extensions: ['.js', '.json', '.vue']
}),
vue(),
naiveSCSSVariable(),
strip(),
resolve({
extensions: ['.js', '.json', '.vue'],
jail: path.resolve(__dirname, 'packages')
}),
terser({
mangle: false,
output: {
@ -28,9 +36,12 @@ module.exports = {
}
})
],
external: [
external: externalValidator([
'vue-runtime-helpers',
'lodash-es/cloneDeep',
'date-fns',
'async-validator',
'vue-virtual-scroller',
'lodash-es',
'resize-observer-polyfill'
]
])
}

View File

@ -12,7 +12,7 @@
</template>
<script>
import getScrollParent from '../../../utils/dom/getScrollParent'
import getScrollParent from '../../_utils/dom/getScrollParent'
export default {
name: 'NAffix',

View File

@ -67,14 +67,14 @@
<script>
import NIcon from '../../Icon'
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import mdCheckmarkCircle from '../../../icons/md-checkmark-circle'
import mdAlert from '../../../icons/md-alert'
import mdInformationCircle from '../../../icons/md-information-circle'
import mdCloseCircle from '../../../icons/md-close-circle'
import mdClose from '../../../icons/md-close'
import FadeInHeightExpandTransition from '../../../transition/FadeInHeightExpandTransition'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import mdCheckmarkCircle from '../../_icons/md-checkmark-circle'
import mdAlert from '../../_icons/md-alert'
import mdInformationCircle from '../../_icons/md-information-circle'
import mdCloseCircle from '../../_icons/md-close-circle'
import mdClose from '../../_icons/md-close'
import FadeInHeightExpandTransition from '../../_transition/FadeInHeightExpandTransition'
export default {
name: 'NAlert',

View File

@ -24,10 +24,10 @@
</template>
<script>
import getScrollParent from '../../../utils/dom/getScrollParent'
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import fontawarable from '../../../mixins/fontawarable'
import getScrollParent from '../../_utils/dom/getScrollParent'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import fontawarable from '../../_mixins/fontawarable'
function getOffset (el, container) {
const {

View File

@ -18,7 +18,7 @@
</template>
<script>
import collectable from '../../../mixins/collectable'
import collectable from '../../_mixins/collectable'
export default {
name: 'NAnchorLink',

View File

@ -47,18 +47,16 @@
<script>
import NInput from '../../Input'
import detachable from '../../../mixins/detachable'
import placeable from '../../../mixins/placeable'
import zindexable from '../../../mixins/zindexable'
import asthemecontext from '../../../mixins/asthemecontext'
import clickoutside from '../../../directives/clickoutside'
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import asformitem from '../../../mixins/asformitem'
import detachable from '../../_mixins/detachable'
import placeable from '../../_mixins/placeable'
import zindexable from '../../_mixins/zindexable'
import asthemecontext from '../../_mixins/asthemecontext'
import clickoutside from '../../_directives/clickoutside'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import asformitem from '../../_mixins/asformitem'
import {
NBaseSelectMenu
} from '../../../base/SelectMenu'
import NBaseSelectMenu from '../../_base/SelectMenu'
export default {
name: 'NAutoComplete',

View File

@ -30,9 +30,9 @@
</template>
<script>
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import asthemecontext from '../../../mixins/asthemecontext'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import asthemecontext from '../../_mixins/asthemecontext'
export default {
name: 'NAvatar',

View File

@ -35,11 +35,11 @@
</template>
<script>
import getScrollParent from '../../../utils/dom/getScrollParent'
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import asthemecontext from '../../../mixins/asthemecontext'
import NBasePortal from '../../../base/Portal'
import getScrollParent from '../../_utils/dom/getScrollParent'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import asthemecontext from '../../_mixins/asthemecontext'
import NBasePortal from '../../_base/Portal'
export default {
name: 'NBackTop',

View File

@ -35,9 +35,9 @@
</template>
<script>
import themeable from '../../../mixins/themeable'
import withapp from '../../../mixins/withapp'
import NBaseSlotMachine from '../../../base/SlotMachine'
import themeable from '../../_mixins/themeable'
import withapp from '../../_mixins/withapp'
import NBaseSlotMachine from '../../_base/SlotMachine'
export default {
name: 'NBadge',

View File

@ -10,8 +10,8 @@
</template>
<script>
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
export default {
name: 'NBreadcrumb',

View File

@ -105,13 +105,13 @@
</template>
<script>
import NBaseLoading from '../../../base/Loading'
import NFadeInHeightExpandTransition from '../../../transition/FadeInHeightExpandTransition'
import hollowoutable from '../../../mixins/hollowoutable'
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import NBaseLoading from '../../_base/Loading'
import NFadeInHeightExpandTransition from '../../_transition/FadeInHeightExpandTransition'
import hollowoutable from '../../_mixins/hollowoutable'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import NIcon from '../../Icon'
import NIconSwitchTransition from '../../../transition/IconSwitchTransition'
import NIconSwitchTransition from '../../_transition/IconSwitchTransition'
export default {
name: 'NButton',

View File

@ -46,11 +46,11 @@
</template>
<script>
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import asthemecontext from '../../../mixins/asthemecontext'
import NIcon from '../../../common/Icon'
import mdClose from '../../../icons/md-close'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import asthemecontext from '../../_mixins/asthemecontext'
import NIcon from '../..//Icon'
import mdClose from '../../_icons/md-close'
window.cardSlots = []

View File

@ -84,23 +84,23 @@
</template>
<script>
import NBasePicker from '../../../base/Picker'
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import clickoutside from '../../../directives/clickoutside'
import NBasePicker from '../../_base/Picker'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import clickoutside from '../../_directives/clickoutside'
import CascaderMenu from './CascaderMenu'
import { getType, traverseWithCallback } from './utils'
import asformitem from '../../../mixins/asformitem'
import NBasePortal from '../../../base/Portal'
import asformitem from '../../_mixins/asformitem'
import NBasePortal from '../../_base/Portal'
import CascaderSelectMenu from './CascaderSelectMenu'
import locale from '../../../mixins/locale'
import locale from '../../_mixins/locale'
import {
rootedOptions,
patchedOptions,
linkedCascaderOptions,
menuOptions
} from '../../../utils/data/menuModel'
} from '../../_utils/data/menuModel'
export default {
name: 'NCascader',

View File

@ -35,16 +35,16 @@
</div>
</template>
<script>
import NBaseMenuMask from '../../../base/MenuMask'
import NBaseMenuMask from '../../_base/MenuMask'
import NCascaderSubmenu from './CascaderSubmenu'
import placeable from '../../../mixins/placeable'
import placeable from '../../_mixins/placeable'
import { minus, merge, getPickerElement } from './utils'
import zindexable from '../../../mixins/zindexable'
import zindexable from '../../_mixins/zindexable'
import {
firstOptionId,
menuModel
} from '../../../utils/data/menuModel'
} from '../../_utils/data/menuModel'
export default {
name: 'NCascaderMenu',

View File

@ -65,7 +65,7 @@
<script>
import NCheckbox from '../../Checkbox'
import NRadio from '../../Radio'
import NBaseLoading from '../../../base/Loading'
import NBaseLoading from '../../_base/Loading'
export default {
name: 'NCascaderOption',

View File

@ -22,10 +22,10 @@
</template>
<script>
import NBaseSelectMenu from '../../../base/SelectMenu'
import NBaseSelectMenu from '../../_base/SelectMenu'
import { traverseWithCallback, getPickerElement } from './utils'
import placeable from '../../../mixins/placeable'
import zindexable from '../../../mixins/zindexable'
import placeable from '../../_mixins/placeable'
import zindexable from '../../_mixins/zindexable'
export default {
name: 'NCascaderSelectMenu',

View File

@ -54,7 +54,7 @@
<script>
import NCascaderOption from './CascaderOption.vue'
import NScrollbar from '../../Scrollbar'
import withlightbar from '../../../mixins/withlightbar'
import withlightbar from '../../_mixins/withlightbar'
export default {
name: 'NCascaderSubmenu',

View File

@ -30,13 +30,13 @@
</template>
<script>
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import asthemecontext from '../../../mixins/asthemecontext'
import asformitem from '../../../mixins/asformitem'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import asthemecontext from '../../_mixins/asthemecontext'
import asformitem from '../../_mixins/asformitem'
import CheckMark from './CheckMark'
import LineMark from './LineMark'
import collectable from '../../../mixins/collectable'
import collectable from '../../_mixins/collectable'
export default {
name: 'NCheckbox',

View File

@ -1,8 +1,8 @@
<script>
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import asthemecontext from '../../../mixins/asthemecontext'
import asformitem from '../../../mixins/asformitem'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import asthemecontext from '../../_mixins/asthemecontext'
import asformitem from '../../_mixins/asformitem'
export default {
name: 'NCheckboxGroup',

View File

@ -25,7 +25,7 @@
<script>
import CheckMark from './CheckMark'
import LineMark from './LineMark'
import createValidator from '../../../utils/validateProp'
import createValidator from '../../_utils/validateProp'
export default {
name: 'NSimpleCheckbox',

View File

@ -1,6 +1,6 @@
<script>
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
export default {
name: 'NCode',

View File

@ -1,8 +1,8 @@
<script>
import intersection from 'lodash-es/intersection'
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import asthemecontext from '../../../mixins/asthemecontext'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import asthemecontext from '../../_mixins/asthemecontext'
export default {
name: 'NCollapse',

View File

@ -34,9 +34,9 @@
<script>
import NIcon from '../../Icon'
import iosArrowForward from '../../../icons/ios-arrow-forward'
import collectable from '../../../mixins/collectable'
import FadeInHeightExpandTransition from '../../../transition/FadeInHeightExpandTransition'
import iosArrowForward from '../../_icons/ios-arrow-forward'
import collectable from '../../_mixins/collectable'
import FadeInHeightExpandTransition from '../../_transition/FadeInHeightExpandTransition'
export default {
name: 'NCollapseItem',

View File

@ -1,7 +1,7 @@
<script>
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import styleScheme from '../../../utils/colors'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import styleScheme from '../../_utils/colors'
export default {
name: 'NConfigConsumer',

View File

@ -1,5 +1,5 @@
<script>
import themeable from '../../../mixins/themeable'
import themeable from '../../_mixins/themeable'
export default {
name: 'NConfigProvider',

View File

@ -1,6 +1,6 @@
import ConfirmPlugin from './src/ConfirmPlugin.js'
import Confirm from './src/Confirm'
import { install } from '../../utils/installThemeAwarableProperty'
import { install } from '../_utils/installThemeAwarableProperty'
ConfirmPlugin.install = function (Vue) {
ConfirmPlugin.Vue = Vue

View File

@ -70,15 +70,15 @@
</div>
</template>
<script>
import NIcon from '../../../common/Icon'
import NButton from '../../../common/Button'
import iosCheckmarkCircle from '../../../icons/ios-checkmark-circle'
import mdClose from '../../../icons/md-close'
import iosHelpCircle from '../../../icons/ios-help-circle'
import iosCloseCircle from '../../../icons/ios-close-circle'
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import render from '../../../utils/render'
import NIcon from '../..//Icon'
import NButton from '../..//Button'
import iosCheckmarkCircle from '../../_icons/ios-checkmark-circle'
import mdClose from '../../_icons/md-close'
import iosHelpCircle from '../../_icons/ios-help-circle'
import iosCloseCircle from '../../_icons/ios-close-circle'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import render from '../../_utils/render'
export default {
name: 'NConfirm',

View File

@ -66,8 +66,8 @@
<script>
import NButton from '../../Button'
import NButtonGroup from '../../Button/src/ButtonGroup'
import mdAdd from '../../../icons/md-add'
import mdRemove from '../../../icons/md-remove'
import mdAdd from '../../_icons/md-add'
import mdRemove from '../../_icons/md-remove'
export default {
name: 'NCustomInput',

View File

@ -94,8 +94,8 @@
</template>
<script>
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import { setCheckStatusOfRow } from './utils'
import BaseTable from './BaseTable.vue'
import NEmpty from '../../Empty'

View File

@ -30,7 +30,7 @@
<script>
import NIcon from '../../../Icon'
import iosFunnel from '../../../../icons/ios-funnel'
import iosFunnel from '../../../_icons/ios-funnel'
function createFilterOptionValues (activeFilters, column) {
const activeFilterOptionValues = activeFilters

View File

@ -20,8 +20,8 @@
</template>
<script>
import iosArrowUp from '../../../../icons/ios-arrow-up'
import iosArrowDown from '../../../../icons/ios-arrow-down'
import iosArrowUp from '../../../_icons/ios-arrow-up'
import iosArrowDown from '../../../_icons/ios-arrow-down'
import NIcon from '../../../Icon'
export default {

View File

@ -76,7 +76,7 @@
import cell from './Cell.vue'
import { createCustomWidthStyle, setCheckStatusOfRow, createClassObject } from '../utils'
import NScrollbar from '../../../Scrollbar'
import resizeObserverDelegate from '../../../../utils/delegate/resizeObserverDelegate'
import resizeObserverDelegate from '../../../_utils/delegate/resizeObserverDelegate'
export default {
components: {

View File

@ -8,7 +8,7 @@
</template>
<script>
import render from '../../../../utils/render'
import render from '../../../_utils/render'
export default {
name: 'NDataTableCell',

View File

@ -74,7 +74,7 @@
import SortButton from '../HeaderButton/SortButton'
import FilterButton from '../HeaderButton/FilterButton'
import { createCustomWidthStyle } from '../utils'
import render from '../../../../utils/render'
import render from '../../../_utils/render'
function isColumnSortable (column) {
return !!column.sorter

View File

@ -129,14 +129,14 @@
</template>
<script>
import detachable from '../../../mixins/detachable'
import placeable from '../../../mixins/placeable'
import zindexable from '../../../mixins/zindexable'
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import asformitem from '../../../mixins/asformitem'
import clickoutside from '../../../directives/clickoutside'
import locale from '../../../mixins/locale'
import detachable from '../../_mixins/detachable'
import placeable from '../../_mixins/placeable'
import zindexable from '../../_mixins/zindexable'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import asformitem from '../../_mixins/asformitem'
import clickoutside from '../../_directives/clickoutside'
import locale from '../../_mixins/locale'
import DatetimePanel from './panel/datetime'
import DatetimerangePanel from './panel/datetimerange'
import DatePanel from './panel/date'
@ -144,12 +144,12 @@ import DaterangePanel from './panel/daterange'
import NInput from '../../Input'
import NIcon from '../../Icon'
import iosCalendar from '../../../icons/ios-calendar'
import iosCalendar from '../../_icons/ios-calendar'
import format from 'date-fns/format'
import getTime from 'date-fns/getTime'
import isValid from 'date-fns/isValid'
import { strictParse } from '../../../utils/dateUtils'
import { strictParse } from '../../_utils/dateUtils'
import isEqual from 'lodash-es/isEqual'
const DATE_FORMAT = {

View File

@ -1,6 +1,6 @@
import clickoutside from '../../../../directives/clickoutside'
import clickoutside from '../../../_directives/clickoutside'
import focusDetector from './focusDetector'
import locale from '../../../../mixins/locale'
import locale from '../../../_mixins/locale'
const TIME_CONST = {
hours: ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23'],

View File

@ -108,7 +108,7 @@
</template>
<script>
import NBaseIcon from '../../../../base/Icon'
import NBaseIcon from '../../../_base/Icon'
import uniCalendarMixin from './uniCalendarMixin'
import startOfDay from 'date-fns/startOfDay'

View File

@ -175,7 +175,7 @@
<script>
import NButton from '../../../Button'
import NBaseIcon from '../../../../base/Icon'
import NBaseIcon from '../../../_base/Icon'
import dualCalendarMixin from './dualCalendarMixin'
import startOfDay from 'date-fns/startOfDay'

View File

@ -131,7 +131,7 @@
</template>
<script>
import NBaseIcon from '../../../../base/Icon'
import NBaseIcon from '../../../_base/Icon'
import uniCalendarMixin from './uniCalendarMixin'
import startOfSecond from 'date-fns/startOfSecond'

View File

@ -249,7 +249,7 @@ import NButton from '../../../Button'
import NTimePicker from '../../../TimePicker'
import NInput from '../../../Input'
import dualCalendarMixin from './dualCalendarMixin'
import NBaseIcon from '../../../../base/Icon'
import NBaseIcon from '../../../_base/Icon'
import startOfSecond from 'date-fns/startOfSecond'
import format from 'date-fns/format'
import set from 'date-fns/set'
@ -257,7 +257,7 @@ import getYear from 'date-fns/getYear'
import getMonth from 'date-fns/getMonth'
import getDate from 'date-fns/getDate'
import isValid from 'date-fns/isValid'
import { strictParse } from '../../../../utils/dateUtils'
import { strictParse } from '../../../_utils/dateUtils'
const DATETIME_FORMAT = 'yyyy-MM-dd HH:mm:ss'
const DATE_FORMAT = 'yyyy-MM-dd'

View File

@ -9,7 +9,7 @@ import isValid from 'date-fns/isValid'
import getHours from 'date-fns/getHours'
import getMinutes from 'date-fns/getMinutes'
import getSeconds from 'date-fns/getSeconds'
import { dateArray } from '../../../../utils/dateUtils'
import { dateArray } from '../../../_utils/dateUtils'
import commonCalendarMixin from './commonCalendarMixin'
export default {

View File

@ -11,7 +11,7 @@ import getDate from 'date-fns/getDate'
import isValid from 'date-fns/isValid'
import startOfHour from 'date-fns/startOfHour'
import setHours from 'date-fns/setHours'
import { dateArray, strictParse } from '../../../../utils/dateUtils'
import { dateArray, strictParse } from '../../../_utils/dateUtils'
export default {
mixins: [commonCalendarMixin],

View File

@ -1,7 +1,7 @@
<script>
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import asthemecontext from '../../../mixins/asthemecontext'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import asthemecontext from '../../_mixins/asthemecontext'
function isDescriptionsItem (vNode) {
return (

View File

@ -28,9 +28,9 @@
</template>
<script>
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import asthemecontext from '../../../mixins/asthemecontext'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import asthemecontext from '../../_mixins/asthemecontext'
export default {
name: 'NDivider',

View File

@ -37,10 +37,10 @@
</template>
<script>
import NBasePortal from '../../../base/Portal'
import withapp from '../../../mixins/withapp'
import themeable from '../../../mixins/themeable'
import zindexable from '../../../mixins/zindexable'
import NBasePortal from '../../_base/Portal'
import withapp from '../../_mixins/withapp'
import themeable from '../../_mixins/themeable'
import zindexable from '../../_mixins/zindexable'
export default {
name: 'NDrawer',

Some files were not shown because too many files have changed in this diff Show More