mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-11-21 01:13:16 +08:00
build: refactor the build progress
This commit is contained in:
parent
d05fcf1210
commit
60c24008e1
@ -1,4 +1,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
lib
|
lib
|
||||||
test/unit/coverage
|
test/unit/coverage
|
||||||
packages/icons
|
src/_icons
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,5 +8,6 @@ test/unit/coverage
|
|||||||
package-lock.json
|
package-lock.json
|
||||||
yarn.lock
|
yarn.lock
|
||||||
lib
|
lib
|
||||||
|
es
|
||||||
.vscode
|
.vscode
|
||||||
*.swp
|
*.swp
|
@ -1,2 +0,0 @@
|
|||||||
// const fs = require('fs')
|
|
||||||
// const path = require('path')
|
|
@ -48,6 +48,6 @@ ncp(
|
|||||||
)
|
)
|
||||||
|
|
||||||
ncp(
|
ncp(
|
||||||
path.resolve(__dirname, '../packages/icons'),
|
path.resolve(__dirname, '../src/_icons'),
|
||||||
path.resolve(__dirname, '../lib/icons')
|
path.resolve(__dirname, '../lib/icons')
|
||||||
)
|
)
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
exports.alias = {
|
exports.alias = {
|
||||||
main: path.resolve(__dirname, '../src'),
|
'naive-ui/lib/icons': path.resolve(__dirname, '../src/_icons')
|
||||||
packages: path.resolve(__dirname, '../packages'),
|
|
||||||
examples: path.resolve(__dirname, '../examples'),
|
|
||||||
'naive-ui/lib/icons': path.resolve(__dirname, '../packages/icons')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.docLoaders = [
|
exports.docLoaders = [
|
||||||
|
@ -8,8 +8,8 @@ const VueLoaderPlugin = require('vue-loader/lib/plugin')
|
|||||||
const glob = require('glob')
|
const glob = require('glob')
|
||||||
|
|
||||||
const entry = {}
|
const entry = {}
|
||||||
glob.sync('./packages/icons/*.vue').concat('./index.js').forEach(filePath => {
|
glob.sync('./src/icons/*.vue').concat('./index.js').forEach(filePath => {
|
||||||
const entryName = filePath.replace(/^\.\/packages\//, '').replace(/\.(vue|js)$/, '')
|
const entryName = filePath.replace(/^\.\/src\//, '').replace(/\.(vue|js)$/, '')
|
||||||
entry[entryName] = filePath
|
entry[entryName] = filePath
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { version } from '../package.json'
|
import { version } from '../package.json'
|
||||||
import withapp from '../packages/mixins/withapp'
|
import withapp from '../src/_mixins/withapp'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [withapp],
|
mixins: [withapp],
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
|
|
||||||
import { Vue, router, i18n } from './init'
|
import { Vue, router, i18n, hljs } from './init'
|
||||||
import demoRouterView from './demoRouterView'
|
import demoRouterView from './demoRouterView'
|
||||||
|
import NaiveUI from '../src/index'
|
||||||
import '../styles/index.scss'
|
import '../styles/index.scss'
|
||||||
import './styles/markdown.scss'
|
import './styles/markdown.scss'
|
||||||
|
|
||||||
|
Vue.use(NaiveUI)
|
||||||
|
NaiveUI.setHljs(hljs)
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
...demoRouterView,
|
...demoRouterView,
|
||||||
i18n,
|
i18n,
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
|
import { Vue, router, i18n, hljs } from './init'
|
||||||
import { Vue, router, i18n } from './init'
|
|
||||||
import demoRouterView from './demoRouterView'
|
import demoRouterView from './demoRouterView'
|
||||||
|
import NaiveUI from '../lib/index'
|
||||||
import '../lib/styles/index.css'
|
import '../lib/styles/index.css'
|
||||||
import './styles/markdown.scss'
|
import './styles/markdown.scss'
|
||||||
|
|
||||||
|
Vue.use(NaiveUI)
|
||||||
|
NaiveUI.setHljs(hljs)
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
...demoRouterView,
|
...demoRouterView,
|
||||||
i18n,
|
i18n,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import VueRouter from 'vue-router'
|
import VueRouter from 'vue-router'
|
||||||
import NaiveUI from '../index'
|
|
||||||
import VueI18n from 'vue-i18n'
|
import VueI18n from 'vue-i18n'
|
||||||
|
|
||||||
import intro from './documentation/intro/intro'
|
import intro from './documentation/intro/intro'
|
||||||
@ -111,8 +110,6 @@ hljs.registerLanguage('naive-log', () => ({
|
|||||||
|
|
||||||
Vue.use(VueI18n)
|
Vue.use(VueI18n)
|
||||||
Vue.use(VueRouter)
|
Vue.use(VueRouter)
|
||||||
Vue.use(NaiveUI)
|
|
||||||
NaiveUI.setHljs(hljs)
|
|
||||||
|
|
||||||
const i18n = new VueI18n({
|
const i18n = new VueI18n({
|
||||||
locale: 'en-US'
|
locale: 'en-US'
|
||||||
@ -259,4 +256,4 @@ router.afterEach(function (to, from) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
export { Vue, router, i18n }
|
export { Vue, router, i18n, hljs }
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import mdCode from '../../packages/icons/md-code'
|
import mdCode from '../../src/_icons/md-code'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
187
index.js
187
index.js
@ -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
|
|
16
package.json
16
package.json
@ -2,11 +2,12 @@
|
|||||||
"name": "naive-ui",
|
"name": "naive-ui",
|
||||||
"version": "0.7.8",
|
"version": "0.7.8",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "lib/index.js",
|
||||||
|
"module": "es/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"release": "npm run build && npm publish",
|
"release": "npm run build && npm publish",
|
||||||
"build": "rm -rf lib && cross-env NODE_ENV=development && node build/buildstyle.js",
|
"build": "rm -rf lib && node build/buildstyle.js && rollup -c",
|
||||||
"demo": "cross-env NODE_ENV=development && node build/buildstyle.js && webpack-dev-server --config build/webpack.demo.js",
|
"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",
|
"dev": "cross-env NODE_ENV=development && webpack-dev-server --config build/webpack.dev.js",
|
||||||
"serve": "npm run dev",
|
"serve": "npm run dev",
|
||||||
"lint": "eslint --quiet --no-error-on-unmatched-pattern \"packages/**/*.{js,vue}\" \"test/**/*.{js,vue}\" \"build/**/*.{js,vue}\" \"demo/**/*.{js,vue}\"",
|
"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",
|
"memory-fs": "^0.4.1",
|
||||||
"mocha": "^6.2.2",
|
"mocha": "^6.2.2",
|
||||||
"ncp": "^2.0.0",
|
"ncp": "^2.0.0",
|
||||||
|
"node-sass": "^4.13.1",
|
||||||
|
"sass-loader": "^7.3.1",
|
||||||
"postcss": "^7.0.26",
|
"postcss": "^7.0.26",
|
||||||
"postcss-cli": "^6.1.3",
|
"postcss-cli": "^6.1.3",
|
||||||
"postcss-loader": "^3.0.0",
|
"postcss-loader": "^3.0.0",
|
||||||
@ -111,11 +114,10 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async-validator": "^1.11.5",
|
"async-validator": "^1.11.5",
|
||||||
"date-fns": "^2.9.0",
|
"date-fns": "^2.9.0",
|
||||||
|
"highlight.js": "^9.18.1",
|
||||||
"lodash-es": "^4.17.15",
|
"lodash-es": "^4.17.15",
|
||||||
"node-sass": "^4.13.1",
|
|
||||||
"resize-observer-polyfill": "^1.5.1",
|
"resize-observer-polyfill": "^1.5.1",
|
||||||
"sass-loader": "^7.3.1",
|
"vue-runtime-helpers": "^1.1.2",
|
||||||
"vue-virtual-scroller": "^1.0.0-rc.2",
|
"vue-virtual-scroller": "^1.0.0-rc.2"
|
||||||
"highlight.js": "^9.18.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
@ -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
|
|
@ -1,11 +0,0 @@
|
|||||||
function getRootDropdownMenu (instance) {
|
|
||||||
let rootDropdownMenu = instance.NDropdownMenu
|
|
||||||
while (rootDropdownMenu && rootDropdownMenu.NDropdownMenu) {
|
|
||||||
rootDropdownMenu = rootDropdownMenu.NDropdownMenu
|
|
||||||
}
|
|
||||||
return rootDropdownMenu || []
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
|
||||||
getRootDropdownMenu
|
|
||||||
}
|
|
@ -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
34
playground/jsIndex.css
Normal 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 */
|
1
playground/jsIndex.css.map
Normal file
1
playground/jsIndex.css.map
Normal 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"}
|
@ -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 () {
|
module.exports = function naiveSCSSExportVariable () {
|
||||||
return {
|
return {
|
||||||
name: 'naive-scss-export-variable',
|
name: 'naive-scss-export-variable',
|
||||||
resolveId (source) {
|
resolveId (source, importer) {
|
||||||
if (source.endsWith('jsIndex.scss')) {
|
if (source.endsWith('.scss')) {
|
||||||
return 'naive-scss-js-index'
|
return path.resolve(path.dirname(importer), source)
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
},
|
},
|
||||||
load (id) {
|
load (id) {
|
||||||
if (id === 'naive-scss-js-index') {
|
if (id.endsWith('.scss')) {
|
||||||
return `export default 'naive-scss-js-index'`
|
const css = sass.renderSync({
|
||||||
|
file: id,
|
||||||
|
outputStyle: 'expanded'
|
||||||
|
}).css.toString()
|
||||||
|
const styleScheme = createStyleScheme(css)
|
||||||
|
return styleScheme
|
||||||
}
|
}
|
||||||
return null
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
playground/test.js
Normal file
4
playground/test.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
import o from '../styles/themes/light/jsIndex.scss'
|
||||||
|
|
||||||
|
const y = o
|
||||||
|
document.bbb(y)
|
@ -1,25 +1,33 @@
|
|||||||
const vue = require('rollup-plugin-vue')
|
const vue = require('rollup-plugin-vue')
|
||||||
const resolve = require('@rollup/plugin-node-resolve')
|
const resolve = require('@rollup/plugin-node-resolve')
|
||||||
const strip = require('@rollup/plugin-strip')
|
const strip = require('@rollup/plugin-strip')
|
||||||
const path = require('path')
|
|
||||||
const { terser } = require('rollup-plugin-terser')
|
const { terser } = require('rollup-plugin-terser')
|
||||||
const naiveSCSSVariable = require('./playground/naiveScssVarPlugin')
|
const naiveSCSSVariable = require('./playground/naiveScssVarPlugin')
|
||||||
|
|
||||||
|
function externalValidator (ids) {
|
||||||
|
return id => ids.some(identifier => id.startsWith(identifier))
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
preserveModules: true,
|
preserveModules: true,
|
||||||
input: 'index.js',
|
input: 'packages/index.js',
|
||||||
output: {
|
output: [
|
||||||
format: 'esm',
|
{
|
||||||
dir: 'test-bundle'
|
format: 'cjs',
|
||||||
},
|
dir: 'lib'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
format: 'esm',
|
||||||
|
dir: 'es'
|
||||||
|
}
|
||||||
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
|
resolve({
|
||||||
|
extensions: ['.js', '.json', '.vue']
|
||||||
|
}),
|
||||||
vue(),
|
vue(),
|
||||||
naiveSCSSVariable(),
|
naiveSCSSVariable(),
|
||||||
strip(),
|
strip(),
|
||||||
resolve({
|
|
||||||
extensions: ['.js', '.json', '.vue'],
|
|
||||||
jail: path.resolve(__dirname, 'packages')
|
|
||||||
}),
|
|
||||||
terser({
|
terser({
|
||||||
mangle: false,
|
mangle: false,
|
||||||
output: {
|
output: {
|
||||||
@ -28,9 +36,12 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
external: [
|
external: externalValidator([
|
||||||
'vue-runtime-helpers',
|
'vue-runtime-helpers',
|
||||||
'lodash-es/cloneDeep',
|
'date-fns',
|
||||||
|
'async-validator',
|
||||||
|
'vue-virtual-scroller',
|
||||||
|
'lodash-es',
|
||||||
'resize-observer-polyfill'
|
'resize-observer-polyfill'
|
||||||
]
|
])
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import getScrollParent from '../../../utils/dom/getScrollParent'
|
import getScrollParent from '../../_utils/dom/getScrollParent'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NAffix',
|
name: 'NAffix',
|
@ -67,14 +67,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NIcon from '../../Icon'
|
import NIcon from '../../Icon'
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import mdCheckmarkCircle from '../../../icons/md-checkmark-circle'
|
import mdCheckmarkCircle from '../../_icons/md-checkmark-circle'
|
||||||
import mdAlert from '../../../icons/md-alert'
|
import mdAlert from '../../_icons/md-alert'
|
||||||
import mdInformationCircle from '../../../icons/md-information-circle'
|
import mdInformationCircle from '../../_icons/md-information-circle'
|
||||||
import mdCloseCircle from '../../../icons/md-close-circle'
|
import mdCloseCircle from '../../_icons/md-close-circle'
|
||||||
import mdClose from '../../../icons/md-close'
|
import mdClose from '../../_icons/md-close'
|
||||||
import FadeInHeightExpandTransition from '../../../transition/FadeInHeightExpandTransition'
|
import FadeInHeightExpandTransition from '../../_transition/FadeInHeightExpandTransition'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NAlert',
|
name: 'NAlert',
|
@ -24,10 +24,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import getScrollParent from '../../../utils/dom/getScrollParent'
|
import getScrollParent from '../../_utils/dom/getScrollParent'
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import fontawarable from '../../../mixins/fontawarable'
|
import fontawarable from '../../_mixins/fontawarable'
|
||||||
|
|
||||||
function getOffset (el, container) {
|
function getOffset (el, container) {
|
||||||
const {
|
const {
|
@ -18,7 +18,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import collectable from '../../../mixins/collectable'
|
import collectable from '../../_mixins/collectable'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NAnchorLink',
|
name: 'NAnchorLink',
|
@ -47,18 +47,16 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NInput from '../../Input'
|
import NInput from '../../Input'
|
||||||
import detachable from '../../../mixins/detachable'
|
import detachable from '../../_mixins/detachable'
|
||||||
import placeable from '../../../mixins/placeable'
|
import placeable from '../../_mixins/placeable'
|
||||||
import zindexable from '../../../mixins/zindexable'
|
import zindexable from '../../_mixins/zindexable'
|
||||||
import asthemecontext from '../../../mixins/asthemecontext'
|
import asthemecontext from '../../_mixins/asthemecontext'
|
||||||
import clickoutside from '../../../directives/clickoutside'
|
import clickoutside from '../../_directives/clickoutside'
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import asformitem from '../../../mixins/asformitem'
|
import asformitem from '../../_mixins/asformitem'
|
||||||
|
|
||||||
import {
|
import NBaseSelectMenu from '../../_base/SelectMenu'
|
||||||
NBaseSelectMenu
|
|
||||||
} from '../../../base/SelectMenu'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NAutoComplete',
|
name: 'NAutoComplete',
|
@ -30,9 +30,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import asthemecontext from '../../../mixins/asthemecontext'
|
import asthemecontext from '../../_mixins/asthemecontext'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NAvatar',
|
name: 'NAvatar',
|
@ -35,11 +35,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import getScrollParent from '../../../utils/dom/getScrollParent'
|
import getScrollParent from '../../_utils/dom/getScrollParent'
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import asthemecontext from '../../../mixins/asthemecontext'
|
import asthemecontext from '../../_mixins/asthemecontext'
|
||||||
import NBasePortal from '../../../base/Portal'
|
import NBasePortal from '../../_base/Portal'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NBackTop',
|
name: 'NBackTop',
|
@ -35,9 +35,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import NBaseSlotMachine from '../../../base/SlotMachine'
|
import NBaseSlotMachine from '../../_base/SlotMachine'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NBadge',
|
name: 'NBadge',
|
@ -10,8 +10,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NBreadcrumb',
|
name: 'NBreadcrumb',
|
@ -105,13 +105,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NBaseLoading from '../../../base/Loading'
|
import NBaseLoading from '../../_base/Loading'
|
||||||
import NFadeInHeightExpandTransition from '../../../transition/FadeInHeightExpandTransition'
|
import NFadeInHeightExpandTransition from '../../_transition/FadeInHeightExpandTransition'
|
||||||
import hollowoutable from '../../../mixins/hollowoutable'
|
import hollowoutable from '../../_mixins/hollowoutable'
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import NIcon from '../../Icon'
|
import NIcon from '../../Icon'
|
||||||
import NIconSwitchTransition from '../../../transition/IconSwitchTransition'
|
import NIconSwitchTransition from '../../_transition/IconSwitchTransition'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NButton',
|
name: 'NButton',
|
@ -46,11 +46,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import asthemecontext from '../../../mixins/asthemecontext'
|
import asthemecontext from '../../_mixins/asthemecontext'
|
||||||
import NIcon from '../../../common/Icon'
|
import NIcon from '../..//Icon'
|
||||||
import mdClose from '../../../icons/md-close'
|
import mdClose from '../../_icons/md-close'
|
||||||
|
|
||||||
window.cardSlots = []
|
window.cardSlots = []
|
||||||
|
|
@ -84,23 +84,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NBasePicker from '../../../base/Picker'
|
import NBasePicker from '../../_base/Picker'
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import clickoutside from '../../../directives/clickoutside'
|
import clickoutside from '../../_directives/clickoutside'
|
||||||
import CascaderMenu from './CascaderMenu'
|
import CascaderMenu from './CascaderMenu'
|
||||||
import { getType, traverseWithCallback } from './utils'
|
import { getType, traverseWithCallback } from './utils'
|
||||||
import asformitem from '../../../mixins/asformitem'
|
import asformitem from '../../_mixins/asformitem'
|
||||||
import NBasePortal from '../../../base/Portal'
|
import NBasePortal from '../../_base/Portal'
|
||||||
import CascaderSelectMenu from './CascaderSelectMenu'
|
import CascaderSelectMenu from './CascaderSelectMenu'
|
||||||
import locale from '../../../mixins/locale'
|
import locale from '../../_mixins/locale'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
rootedOptions,
|
rootedOptions,
|
||||||
patchedOptions,
|
patchedOptions,
|
||||||
linkedCascaderOptions,
|
linkedCascaderOptions,
|
||||||
menuOptions
|
menuOptions
|
||||||
} from '../../../utils/data/menuModel'
|
} from '../../_utils/data/menuModel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NCascader',
|
name: 'NCascader',
|
@ -35,16 +35,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import NBaseMenuMask from '../../../base/MenuMask'
|
import NBaseMenuMask from '../../_base/MenuMask'
|
||||||
import NCascaderSubmenu from './CascaderSubmenu'
|
import NCascaderSubmenu from './CascaderSubmenu'
|
||||||
import placeable from '../../../mixins/placeable'
|
import placeable from '../../_mixins/placeable'
|
||||||
import { minus, merge, getPickerElement } from './utils'
|
import { minus, merge, getPickerElement } from './utils'
|
||||||
import zindexable from '../../../mixins/zindexable'
|
import zindexable from '../../_mixins/zindexable'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
firstOptionId,
|
firstOptionId,
|
||||||
menuModel
|
menuModel
|
||||||
} from '../../../utils/data/menuModel'
|
} from '../../_utils/data/menuModel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NCascaderMenu',
|
name: 'NCascaderMenu',
|
@ -65,7 +65,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NCheckbox from '../../Checkbox'
|
import NCheckbox from '../../Checkbox'
|
||||||
import NRadio from '../../Radio'
|
import NRadio from '../../Radio'
|
||||||
import NBaseLoading from '../../../base/Loading'
|
import NBaseLoading from '../../_base/Loading'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NCascaderOption',
|
name: 'NCascaderOption',
|
@ -22,10 +22,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NBaseSelectMenu from '../../../base/SelectMenu'
|
import NBaseSelectMenu from '../../_base/SelectMenu'
|
||||||
import { traverseWithCallback, getPickerElement } from './utils'
|
import { traverseWithCallback, getPickerElement } from './utils'
|
||||||
import placeable from '../../../mixins/placeable'
|
import placeable from '../../_mixins/placeable'
|
||||||
import zindexable from '../../../mixins/zindexable'
|
import zindexable from '../../_mixins/zindexable'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NCascaderSelectMenu',
|
name: 'NCascaderSelectMenu',
|
@ -54,7 +54,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NCascaderOption from './CascaderOption.vue'
|
import NCascaderOption from './CascaderOption.vue'
|
||||||
import NScrollbar from '../../Scrollbar'
|
import NScrollbar from '../../Scrollbar'
|
||||||
import withlightbar from '../../../mixins/withlightbar'
|
import withlightbar from '../../_mixins/withlightbar'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NCascaderSubmenu',
|
name: 'NCascaderSubmenu',
|
@ -30,13 +30,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import asthemecontext from '../../../mixins/asthemecontext'
|
import asthemecontext from '../../_mixins/asthemecontext'
|
||||||
import asformitem from '../../../mixins/asformitem'
|
import asformitem from '../../_mixins/asformitem'
|
||||||
import CheckMark from './CheckMark'
|
import CheckMark from './CheckMark'
|
||||||
import LineMark from './LineMark'
|
import LineMark from './LineMark'
|
||||||
import collectable from '../../../mixins/collectable'
|
import collectable from '../../_mixins/collectable'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NCheckbox',
|
name: 'NCheckbox',
|
@ -1,8 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import asthemecontext from '../../../mixins/asthemecontext'
|
import asthemecontext from '../../_mixins/asthemecontext'
|
||||||
import asformitem from '../../../mixins/asformitem'
|
import asformitem from '../../_mixins/asformitem'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NCheckboxGroup',
|
name: 'NCheckboxGroup',
|
@ -25,7 +25,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import CheckMark from './CheckMark'
|
import CheckMark from './CheckMark'
|
||||||
import LineMark from './LineMark'
|
import LineMark from './LineMark'
|
||||||
import createValidator from '../../../utils/validateProp'
|
import createValidator from '../../_utils/validateProp'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NSimpleCheckbox',
|
name: 'NSimpleCheckbox',
|
@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NCode',
|
name: 'NCode',
|
@ -1,8 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import intersection from 'lodash-es/intersection'
|
import intersection from 'lodash-es/intersection'
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import asthemecontext from '../../../mixins/asthemecontext'
|
import asthemecontext from '../../_mixins/asthemecontext'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NCollapse',
|
name: 'NCollapse',
|
@ -34,9 +34,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NIcon from '../../Icon'
|
import NIcon from '../../Icon'
|
||||||
import iosArrowForward from '../../../icons/ios-arrow-forward'
|
import iosArrowForward from '../../_icons/ios-arrow-forward'
|
||||||
import collectable from '../../../mixins/collectable'
|
import collectable from '../../_mixins/collectable'
|
||||||
import FadeInHeightExpandTransition from '../../../transition/FadeInHeightExpandTransition'
|
import FadeInHeightExpandTransition from '../../_transition/FadeInHeightExpandTransition'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NCollapseItem',
|
name: 'NCollapseItem',
|
@ -1,7 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import styleScheme from '../../../utils/colors'
|
import styleScheme from '../../_utils/colors'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NConfigConsumer',
|
name: 'NConfigConsumer',
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NConfigProvider',
|
name: 'NConfigProvider',
|
@ -1,6 +1,6 @@
|
|||||||
import ConfirmPlugin from './src/ConfirmPlugin.js'
|
import ConfirmPlugin from './src/ConfirmPlugin.js'
|
||||||
import Confirm from './src/Confirm'
|
import Confirm from './src/Confirm'
|
||||||
import { install } from '../../utils/installThemeAwarableProperty'
|
import { install } from '../_utils/installThemeAwarableProperty'
|
||||||
|
|
||||||
ConfirmPlugin.install = function (Vue) {
|
ConfirmPlugin.install = function (Vue) {
|
||||||
ConfirmPlugin.Vue = Vue
|
ConfirmPlugin.Vue = Vue
|
@ -70,15 +70,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import NIcon from '../../../common/Icon'
|
import NIcon from '../..//Icon'
|
||||||
import NButton from '../../../common/Button'
|
import NButton from '../..//Button'
|
||||||
import iosCheckmarkCircle from '../../../icons/ios-checkmark-circle'
|
import iosCheckmarkCircle from '../../_icons/ios-checkmark-circle'
|
||||||
import mdClose from '../../../icons/md-close'
|
import mdClose from '../../_icons/md-close'
|
||||||
import iosHelpCircle from '../../../icons/ios-help-circle'
|
import iosHelpCircle from '../../_icons/ios-help-circle'
|
||||||
import iosCloseCircle from '../../../icons/ios-close-circle'
|
import iosCloseCircle from '../../_icons/ios-close-circle'
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import render from '../../../utils/render'
|
import render from '../../_utils/render'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NConfirm',
|
name: 'NConfirm',
|
@ -66,8 +66,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import NButton from '../../Button'
|
import NButton from '../../Button'
|
||||||
import NButtonGroup from '../../Button/src/ButtonGroup'
|
import NButtonGroup from '../../Button/src/ButtonGroup'
|
||||||
import mdAdd from '../../../icons/md-add'
|
import mdAdd from '../../_icons/md-add'
|
||||||
import mdRemove from '../../../icons/md-remove'
|
import mdRemove from '../../_icons/md-remove'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NCustomInput',
|
name: 'NCustomInput',
|
@ -94,8 +94,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import { setCheckStatusOfRow } from './utils'
|
import { setCheckStatusOfRow } from './utils'
|
||||||
import BaseTable from './BaseTable.vue'
|
import BaseTable from './BaseTable.vue'
|
||||||
import NEmpty from '../../Empty'
|
import NEmpty from '../../Empty'
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NIcon from '../../../Icon'
|
import NIcon from '../../../Icon'
|
||||||
import iosFunnel from '../../../../icons/ios-funnel'
|
import iosFunnel from '../../../_icons/ios-funnel'
|
||||||
|
|
||||||
function createFilterOptionValues (activeFilters, column) {
|
function createFilterOptionValues (activeFilters, column) {
|
||||||
const activeFilterOptionValues = activeFilters
|
const activeFilterOptionValues = activeFilters
|
@ -20,8 +20,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import iosArrowUp from '../../../../icons/ios-arrow-up'
|
import iosArrowUp from '../../../_icons/ios-arrow-up'
|
||||||
import iosArrowDown from '../../../../icons/ios-arrow-down'
|
import iosArrowDown from '../../../_icons/ios-arrow-down'
|
||||||
import NIcon from '../../../Icon'
|
import NIcon from '../../../Icon'
|
||||||
|
|
||||||
export default {
|
export default {
|
@ -76,7 +76,7 @@
|
|||||||
import cell from './Cell.vue'
|
import cell from './Cell.vue'
|
||||||
import { createCustomWidthStyle, setCheckStatusOfRow, createClassObject } from '../utils'
|
import { createCustomWidthStyle, setCheckStatusOfRow, createClassObject } from '../utils'
|
||||||
import NScrollbar from '../../../Scrollbar'
|
import NScrollbar from '../../../Scrollbar'
|
||||||
import resizeObserverDelegate from '../../../../utils/delegate/resizeObserverDelegate'
|
import resizeObserverDelegate from '../../../_utils/delegate/resizeObserverDelegate'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
@ -8,7 +8,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import render from '../../../../utils/render'
|
import render from '../../../_utils/render'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NDataTableCell',
|
name: 'NDataTableCell',
|
@ -74,7 +74,7 @@
|
|||||||
import SortButton from '../HeaderButton/SortButton'
|
import SortButton from '../HeaderButton/SortButton'
|
||||||
import FilterButton from '../HeaderButton/FilterButton'
|
import FilterButton from '../HeaderButton/FilterButton'
|
||||||
import { createCustomWidthStyle } from '../utils'
|
import { createCustomWidthStyle } from '../utils'
|
||||||
import render from '../../../../utils/render'
|
import render from '../../../_utils/render'
|
||||||
|
|
||||||
function isColumnSortable (column) {
|
function isColumnSortable (column) {
|
||||||
return !!column.sorter
|
return !!column.sorter
|
@ -129,14 +129,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import detachable from '../../../mixins/detachable'
|
import detachable from '../../_mixins/detachable'
|
||||||
import placeable from '../../../mixins/placeable'
|
import placeable from '../../_mixins/placeable'
|
||||||
import zindexable from '../../../mixins/zindexable'
|
import zindexable from '../../_mixins/zindexable'
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import asformitem from '../../../mixins/asformitem'
|
import asformitem from '../../_mixins/asformitem'
|
||||||
import clickoutside from '../../../directives/clickoutside'
|
import clickoutside from '../../_directives/clickoutside'
|
||||||
import locale from '../../../mixins/locale'
|
import locale from '../../_mixins/locale'
|
||||||
import DatetimePanel from './panel/datetime'
|
import DatetimePanel from './panel/datetime'
|
||||||
import DatetimerangePanel from './panel/datetimerange'
|
import DatetimerangePanel from './panel/datetimerange'
|
||||||
import DatePanel from './panel/date'
|
import DatePanel from './panel/date'
|
||||||
@ -144,12 +144,12 @@ import DaterangePanel from './panel/daterange'
|
|||||||
|
|
||||||
import NInput from '../../Input'
|
import NInput from '../../Input'
|
||||||
import NIcon from '../../Icon'
|
import NIcon from '../../Icon'
|
||||||
import iosCalendar from '../../../icons/ios-calendar'
|
import iosCalendar from '../../_icons/ios-calendar'
|
||||||
|
|
||||||
import format from 'date-fns/format'
|
import format from 'date-fns/format'
|
||||||
import getTime from 'date-fns/getTime'
|
import getTime from 'date-fns/getTime'
|
||||||
import isValid from 'date-fns/isValid'
|
import isValid from 'date-fns/isValid'
|
||||||
import { strictParse } from '../../../utils/dateUtils'
|
import { strictParse } from '../../_utils/dateUtils'
|
||||||
import isEqual from 'lodash-es/isEqual'
|
import isEqual from 'lodash-es/isEqual'
|
||||||
|
|
||||||
const DATE_FORMAT = {
|
const DATE_FORMAT = {
|
@ -1,6 +1,6 @@
|
|||||||
import clickoutside from '../../../../directives/clickoutside'
|
import clickoutside from '../../../_directives/clickoutside'
|
||||||
import focusDetector from './focusDetector'
|
import focusDetector from './focusDetector'
|
||||||
import locale from '../../../../mixins/locale'
|
import locale from '../../../_mixins/locale'
|
||||||
|
|
||||||
const TIME_CONST = {
|
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'],
|
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'],
|
@ -108,7 +108,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NBaseIcon from '../../../../base/Icon'
|
import NBaseIcon from '../../../_base/Icon'
|
||||||
import uniCalendarMixin from './uniCalendarMixin'
|
import uniCalendarMixin from './uniCalendarMixin'
|
||||||
import startOfDay from 'date-fns/startOfDay'
|
import startOfDay from 'date-fns/startOfDay'
|
||||||
|
|
@ -175,7 +175,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NButton from '../../../Button'
|
import NButton from '../../../Button'
|
||||||
import NBaseIcon from '../../../../base/Icon'
|
import NBaseIcon from '../../../_base/Icon'
|
||||||
import dualCalendarMixin from './dualCalendarMixin'
|
import dualCalendarMixin from './dualCalendarMixin'
|
||||||
import startOfDay from 'date-fns/startOfDay'
|
import startOfDay from 'date-fns/startOfDay'
|
||||||
|
|
@ -131,7 +131,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NBaseIcon from '../../../../base/Icon'
|
import NBaseIcon from '../../../_base/Icon'
|
||||||
import uniCalendarMixin from './uniCalendarMixin'
|
import uniCalendarMixin from './uniCalendarMixin'
|
||||||
import startOfSecond from 'date-fns/startOfSecond'
|
import startOfSecond from 'date-fns/startOfSecond'
|
||||||
|
|
@ -249,7 +249,7 @@ import NButton from '../../../Button'
|
|||||||
import NTimePicker from '../../../TimePicker'
|
import NTimePicker from '../../../TimePicker'
|
||||||
import NInput from '../../../Input'
|
import NInput from '../../../Input'
|
||||||
import dualCalendarMixin from './dualCalendarMixin'
|
import dualCalendarMixin from './dualCalendarMixin'
|
||||||
import NBaseIcon from '../../../../base/Icon'
|
import NBaseIcon from '../../../_base/Icon'
|
||||||
import startOfSecond from 'date-fns/startOfSecond'
|
import startOfSecond from 'date-fns/startOfSecond'
|
||||||
import format from 'date-fns/format'
|
import format from 'date-fns/format'
|
||||||
import set from 'date-fns/set'
|
import set from 'date-fns/set'
|
||||||
@ -257,7 +257,7 @@ import getYear from 'date-fns/getYear'
|
|||||||
import getMonth from 'date-fns/getMonth'
|
import getMonth from 'date-fns/getMonth'
|
||||||
import getDate from 'date-fns/getDate'
|
import getDate from 'date-fns/getDate'
|
||||||
import isValid from 'date-fns/isValid'
|
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 DATETIME_FORMAT = 'yyyy-MM-dd HH:mm:ss'
|
||||||
const DATE_FORMAT = 'yyyy-MM-dd'
|
const DATE_FORMAT = 'yyyy-MM-dd'
|
@ -9,7 +9,7 @@ import isValid from 'date-fns/isValid'
|
|||||||
import getHours from 'date-fns/getHours'
|
import getHours from 'date-fns/getHours'
|
||||||
import getMinutes from 'date-fns/getMinutes'
|
import getMinutes from 'date-fns/getMinutes'
|
||||||
import getSeconds from 'date-fns/getSeconds'
|
import getSeconds from 'date-fns/getSeconds'
|
||||||
import { dateArray } from '../../../../utils/dateUtils'
|
import { dateArray } from '../../../_utils/dateUtils'
|
||||||
import commonCalendarMixin from './commonCalendarMixin'
|
import commonCalendarMixin from './commonCalendarMixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
@ -11,7 +11,7 @@ import getDate from 'date-fns/getDate'
|
|||||||
import isValid from 'date-fns/isValid'
|
import isValid from 'date-fns/isValid'
|
||||||
import startOfHour from 'date-fns/startOfHour'
|
import startOfHour from 'date-fns/startOfHour'
|
||||||
import setHours from 'date-fns/setHours'
|
import setHours from 'date-fns/setHours'
|
||||||
import { dateArray, strictParse } from '../../../../utils/dateUtils'
|
import { dateArray, strictParse } from '../../../_utils/dateUtils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [commonCalendarMixin],
|
mixins: [commonCalendarMixin],
|
@ -1,7 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import asthemecontext from '../../../mixins/asthemecontext'
|
import asthemecontext from '../../_mixins/asthemecontext'
|
||||||
|
|
||||||
function isDescriptionsItem (vNode) {
|
function isDescriptionsItem (vNode) {
|
||||||
return (
|
return (
|
@ -28,9 +28,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import asthemecontext from '../../../mixins/asthemecontext'
|
import asthemecontext from '../../_mixins/asthemecontext'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NDivider',
|
name: 'NDivider',
|
@ -37,10 +37,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NBasePortal from '../../../base/Portal'
|
import NBasePortal from '../../_base/Portal'
|
||||||
import withapp from '../../../mixins/withapp'
|
import withapp from '../../_mixins/withapp'
|
||||||
import themeable from '../../../mixins/themeable'
|
import themeable from '../../_mixins/themeable'
|
||||||
import zindexable from '../../../mixins/zindexable'
|
import zindexable from '../../_mixins/zindexable'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NDrawer',
|
name: 'NDrawer',
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user