@@ -2,9 +2,9 @@
import { setContext, onMount } from 'svelte';
import Router, { querystring, location, push } from 'svelte-spa-router';
import { routes, routes_en } from './route';
- import { NavBar, Icon } from '../../components';
- import zh_CN from '../../components/lang/zh_CN';
- import en_US from '../../components/lang/en_US';
+ import { NavBar, Icon } from '../../packages/stdf';
+ import zh_CN from '../../packages/stdf/lang/zh_CN';
+ import en_US from '../../packages/stdf/lang/en_US';
import menuList from './data/menuList';
// 循环 menuList,将所有元素的 childs 组成一个数组
@@ -1,6 +1,6 @@
<!-- ActionSheet Demo -->
<script>
- import { Cell, ActionSheet, Toast } from '../../../../components';
+ import { Cell, ActionSheet, Toast } from '../../../../packages/stdf';
let visible1 = false;
let visible2 = false;
<!-- AsyncPicker Demo -->
- import { AsyncPicker, Cell } from '../../../../components';
+ import { AsyncPicker, Cell } from '../../../../packages/stdf';
// 为避免 Demo 页面杂乱,具体参考数据放在 data.js 文件内,可查看此页面底部注释。
import { linkageData, linkageDiffLabeData } from './data';
// In order to avoid the messy Demo page, the specific reference data is placed in the data.js file, and you can view the bottom of the page.
import { linkageData, linkageDiffLabeData } from './data_en';
<!-- Avatar Demo -->
- import { Avatar } from '../../../../components';
+ import { Avatar } from '../../../../packages/stdf';
const icons = [
{ icon: { name: 'ri-aliens-fill', theme: true, top: -1, size: 16 }, size: 'xs' },
<!-- Badge Demo -->
- import { Badge, Avatar, Button, Icon, Input, Cell } from '../../../../components';
+ import { Badge, Avatar, Button, Icon, Input, Cell } from '../../../../packages/stdf';
let isShow = true;
const changeShowFun = () => {
@@ -1,7 +1,7 @@
<!-- BottomSheet Demo -->
- import { BottomSheet, Cell, Toast, Button } from '../../../../components';
- import Aphorism from '../../components/Aphorism.svelte';
+ import { BottomSheet, Cell, Toast, Button } from '../../../../packages/stdf';
+ import Aphorism from '../../packages/stdf/Aphorism.svelte';
<!-- Button Demo -->
- import { Button, Icon, Toast, Loading } from '../../../../components';
+ import { Button, Icon, Toast, Loading } from '../../../../packages/stdf';
let visible = false;
</script>
<!-- Calendar Demo -->
- import { Cell, Calendar } from '../../../../components';
+ import { Cell, Calendar } from '../../../../packages/stdf';
<!-- Cell Demo -->
- import { Cell, CellGroup, Toast } from '../../../../components';
+ import { Cell, CellGroup, Toast } from '../../../../packages/stdf';
<!-- Checkbox Demo -->
- import { CheckboxGroup, Checkbox, Divider, Button } from '../../../../components';
+ import { CheckboxGroup, Checkbox, Divider, Button } from '../../../../packages/stdf';
import { onMount } from 'svelte';
import { quintOut } from 'svelte/easing';
import { crossfade } from 'svelte/transition';
<!-- Dialog Demo -->
- import { Dialog, Cell, Toast, Loading } from '../../../../components';
+ import { Dialog, Cell, Toast, Loading } from '../../../../packages/stdf';
<!-- Divider Demo -->
- import { Divider } from '../../../../components';
+ import { Divider } from '../../../../packages/stdf';
<div class="flex flex-col space-y-8 py-8">
<div class="flex flex-col space-y-8 py-8 text-left">
<!-- Grids Demo -->
- import { Grids, Grid, Placeholder, Switch, Icon, Button } from '../../../../components';
+ import { Grids, Grid, Placeholder, Switch, Icon, Button } from '../../../../packages/stdf';
let devices = ['iOS', 'Android', 'Windows', 'macOS', 'Ubuntu'];
let curentIndex = 0;
import { push } from 'svelte-spa-router';
- import { Cell, CellGroup } from '../../../../components';
+ import { Cell, CellGroup } from '../../../../packages/stdf';
import menuList from '../../data/menuList';
<!-- Icon Demo,请确保已引入 symbol.svg 文件。 -->
- import { Icon } from '../../../../components';
+ import { Icon } from '../../../../packages/stdf';
const icons = ['ri-spy-fill', 'ri-chrome-fill', 'ri-riding-line', 'ri-switch-fill'];
<!-- Icon Demo, Please make sure you have been introduced symbol.svg file. -->
<!-- IndexBar Demo -->
- import { IndexBar, Button, Toast } from '../../../../components';
+ import { IndexBar, Button, Toast } from '../../../../packages/stdf';
const addressList = [
{ index: 'A', title: 'A', child: [{ text: '澳门' }, { text: '安宁' }, { text: '安庆' }, { text: '鞍山' }] },
{ index: 'A', title: 'A', child: [{ text: 'Macau' }, { text: 'Anning' }, { text: 'Anqing' }, { text: 'Anshan' }] },
<!-- Input Demo -->
import { getContext } from 'svelte';
- import { Input, Button, Icon, Toast } from '../../../../components';
+ import { Input, Button, Icon, Toast } from '../../../../packages/stdf';
let value = '初始文本';
let value = 'Init text';
<!--Loading Demo-->
- import { Loading, Tabs, TabContent, Button } from '../../../../components';
+ import { Loading, Tabs, TabContent, Button } from '../../../../packages/stdf';
//传入个数,返回随机生成的颜色数组
const randomColorArr = num => {
//Input the number and return an array of randomly generated colors
<!-- Mask Demo -->
- import { Mask, Toast, Cell, Button, Popup } from '../../../../components';
+ import { Mask, Toast, Cell, Button, Popup } from '../../../../packages/stdf';
<!-- Modal Demo -->
- import { Modal, Cell, Toast } from '../../../../components';
+ import { Modal, Cell, Toast } from '../../../../packages/stdf';
<!-- NavBar Demo -->
- import { NavBar, Icon, Toast } from '../../../../components';
+ import { NavBar, Icon, Toast } from '../../../../packages/stdf';
const icons1 = [{ name: 'ri-paint-brush-line', theme: true }, { name: 'ri-share-line' }];
const icons2 = [{ name: 'ri-command-line' }, { name: 'ri-drag-move-line' }];
<!-- NoticeBar Demo -->
- import {NoticeBar, Toast} from '../../../../components';
+ import {NoticeBar, Toast} from '../../../../packages/stdf';
let textList = ['1. 这是第一条通告内容!', '2. 这是第二条通告内容!'];
let textLongList = ['1. 这条通告超长长长长长长长长长长长长长长长长长长长长长!', '2. 这是第二条通告内容!'];
let textList = ['1. This is the first announcement!', '2. This is the second notice!'];
let textLongList = ['1. This message long, long, long, long, long, long, long, long, long, long, long, long, long!', '2. This is the second notice!'];
- import { Pagination, Loading } from '../../../../components';
+ import { Pagination, Loading } from '../../../../packages/stdf';
import aphorisms from '../../data/aphorisms';
// 总数,一般是后端接口返回
// total data number, generally, the back-end interface returns
<!-- Picker Demo -->
- import { Picker, Cell } from '../../../../components';
+ import { Picker, Cell } from '../../../../packages/stdf';
import {
someProvinceList,
<!-- Placeholder Demo -->
- import { Placeholder, Grids, Grid } from '../../../../components';
+ import { Placeholder, Grids, Grid } from '../../../../packages/stdf';
<div class="m-4 font-bold text-lg">基础用法</div>
<div class="m-4 font-bold text-lg">Basic usage</div>
<!-- Popup Demo -->
- import { Cell, Popup, Button, Icon } from '../../../../components';
+ import { Cell, Popup, Button, Icon } from '../../../../packages/stdf';
<!--Progress Demo-->
- import { Progress, Button } from '../../../../components';
+ import { Progress, Button } from '../../../../packages/stdf';
let percent = 20;
const changePercentFun = type => {
<!--ProgressLoop Demo-->
- import { ProgressLoop, Button } from '../../../../components';
+ import { ProgressLoop, Button } from '../../../../packages/stdf';
<!-- Radio Demo -->
- import { RadioGroup, Radio, Divider, Button } from '../../../../components';
+ import { RadioGroup, Radio, Divider, Button } from '../../../../packages/stdf';
const dota = [
{ label: '主宰', name: '奶棒人', desc: '主宰是一个近战敏捷英雄,他能够迅速切入战斗。' },
{ label: 'Jugg', name: 'Juggernaut', desc: 'The master is a melee agile hero, and he can quickly cut into the battle.' },
<!-- Rate Demo -->
- import {Rate, Icon} from '../../../../components';
+ import {Rate, Icon} from '../../../../packages/stdf';
let value = 2.5;
const getValueFun = e => {
<!-- Skeleton Demo -->
- import { Skeleton } from '../../../../components';
+ import { Skeleton } from '../../../../packages/stdf';
<div class="p-2">
<!-- Slider Demo -->
- import { Slider, Icon } from '../../../../components';
+ import { Slider, Icon } from '../../../../packages/stdf';
let value = 20;
const onChangeFun = e => {
<!--Steps Demo -->
- import { Steps, Button, Divider } from '../../../../components';
+ import { Steps, Button, Divider } from '../../../../packages/stdf';
import injCom1 from './injCom1.svelte';
import injCom2 from './injCom2.svelte';
@@ -274,7 +274,7 @@
<!-- injCom2.svelte -->
<!-- <script>
- import { Button, Icon, Avatar } from '../../../../components';
+ import { Button, Icon, Avatar } from '../../../../packages/stdf';
<div class="text-primary dark:text-dark text-sm">此处以组件形式注入一些内容</div>
import injCom1 from './injCom1_en.svelte';
import injCom2 from './injCom2_en.svelte';
@@ -277,7 +277,7 @@
<!--
<div class="text-primary dark:text-dark text-sm">Here you inject something in the form of a component</div>
@@ -1,5 +1,5 @@
- import { Button, Avatar } from '../../../../components';
+ import { Button, Avatar } from '../../../../packages/stdf';
<div class="flex flex-col space-y-4 items-center">
<!-- Swiper Demo -->
- import { Swiper } from '../../../../components';
+ import { Swiper } from '../../../../packages/stdf';
import Item from './Item.svelte';
const data = [
@@ -298,7 +298,7 @@
<!-- Item.svelte -->
import Item from './Item_en.svelte';
@@ -299,7 +299,7 @@
<!-- Switch Demo -->
- import { Switch, Icon, Cell, Dialog } from '../../../../components';
+ import { Switch, Icon, Cell, Dialog } from '../../../../packages/stdf';
let checkAsync = false;
const switchClickFun = () => {
<!-- TabBar Demo -->
- import {TabBar} from '../../../../components';
+ import {TabBar} from '../../../../packages/stdf';
const labels = [
{text: '首页', icon: {name: 'ri-home-3-line', size: 20}, activeIcon: {name: 'ri-home-3-fill', size: 20}},
{text: 'Home', icon: {name: 'ri-home-3-line', size: 20}, activeIcon: {name: 'ri-home-3-fill', size: 20}},
<!-- Tabs Demo -->
- import {Tabs, Tab, TabContent, Divider} from '../../../../components';
+ import {Tabs, Tab, TabContent, Divider} from '../../../../packages/stdf';
import {fly} from 'svelte/transition';
const labels = [{text: '飞机'}, {text: '轮船'}, {text: '火车'}, {text: '汽车'}];
- import { Tabs, Tab, TabContent, Divider } from '../../../../components';
+ import { Tabs, Tab, TabContent, Divider } from '../../../../packages/stdf';
import { fly } from 'svelte/transition';
const labels = [{ text: 'aircraft' }, { text: 'steamer' }, { text: 'train' }, { text: 'car' }];
<!-- TimePickerDemo Demo -->
- import { Cell, TimePicker } from '../../../../components';
+ import { Cell, TimePicker } from '../../../../packages/stdf';
<!-- Toast Demo -->
- import { Toast, Cell, Button, Loading } from '../../../../components';
+ import { Toast, Cell, Button, Loading } from '../../../../packages/stdf';
- import { Swiper, Cell, Steps } from '../../../../components';
+ import { Swiper, Cell, Steps } from '../../../../packages/stdf';
const imgs = [
{ type: 'img', url: './assets/images/wall_1.jpg' },
- import { Swiper, Cell, Button, Progress, Divider } from '../../../../components';
+ import { Swiper, Cell, Button, Progress, Divider } from '../../../../packages/stdf';